What is after the first 1. 2. 3. 4. steps ?
567.dk

RPI Info RPI 1-Wire ® RPI 1-Wire ® Temperature (DS18B20) RPI i2c. RPI i2c. 16 LED Output (MCP23017)

RPI 1-Wire ® Temperature (DS18B20)


This guide shows how to messure and log temperatur with 1-Wire DS18B20 and a Raspberry pi

PCS Item Calculated Price Price bulk buy
1 DS18B20 0.95 E-bay US $ 0,95 (@5 pcs US $ 4.72) with shipping to Denmark (July 2013)
1 4.7KΩ Resistor 0.02 E-bay US $ 0,02 (@50 pcs US $ 0.99) with shipping to Denmark (July 2013)


Recommended standard reusable hardware

PCS Item Calculated Price Price bulk buy
1 Raspberry PI Type B and power 72,54 US $ 72.54 with shipping to Denmark (July 2013)
1 4 GB SD card 5.30 US $ 5.30 with shipping to Denmark (July 2013)
1 Wire Jumper Cable 7.49 US $ 7.49 with shipping to Denmark (July 2013)
1 BREADBOARD 170 TIE-POINTS 0.99 E-bay US $ 0,99 with shipping to Denmark (July 2013)
1 BREADBOARD 400 TIE-POINTS 2.59 E-bay US $ 2.59 with shipping to Denmark (July 2013)


Use donate button if you like my guides, or if you want a new guide ( See missing work ).

Datasheet 1-Wire ® Temperature (DS18B20)


Connect a 4.7KΩ and a DS18B20, as shown - - - - - - - To connect multible 1-Wire ® Devices - Note use only 1 resistor
some text some text

some text some text some text


Start with prepare a Raspberry pi with supported os - my prefered is Raspbian “wheezy” Direct download my server (2013-05-25)

You can find my bref installation guide in RPI Info


Sample bash code for fast run !!

At ssh/console type:
wget http://567.dk/rpi/ds18b20.sh
chmod 777 ds18b20.sh
./ds18b20.sh

and you get output from sensors on console and in default log dir /home/pi/567.dk/ds18b20

And re run the script with
./ds18b20.sh
some text
Here you see 10 sensors, with following columns.
Epoc time - Date - Time - Try number - SensorID - temperature in celsius


Note: A bref test with 20 DS18B20, runned unstable. But it was stabile with 10 sensors !!!



A step by step guide below here

After each reboot prepare 1-wire bus with the following commands:
sudo modprobe w1-gpio
sudo modprobe w1-therm

to find devices type command
ls /sys/bus/w1/devices/

some text
You can read the temp file with cat /sys/bus/w1/devices/SensorID/w1_slave

some text
Temperatures are displayed with X1000. - Here are some samples.
some text some text some text some text
to read all devices at once type
cat /sys/bus/w1/devices/28-*/w1_slave