Introduction: Temp Sensor DS18B20 (Raspberry Pi)

Picture of Temp Sensor DS18B20 (Raspberry Pi)

Basic tutorial of how to setup a DS18b20 temp sensor with the raspberry pi.

Step 1: Parts

Picture of Parts

Required Parts:

RPI 3 – https://goo.gl/CdVNoH

4 Amp Power Adapter – https://goo.gl/js4Uc7

16GB Micro SD – https://goo.gl/FDqZal

Jumper Cable Assortment – https://goo.gl/7o34sL

ds18b20 sensor – https://goo.gl/8hryFP

Step 2: Setup

Picture of Setup

1. Edit config.txt

sudo nano /boot/config.txt

add "dtoverlay=w1-gpio" to the bottom of the file

sudo reboot

2. Type the following commands

sudo modprobe w1-gpio
sudo modprobe w1-therm

cd /sys/bus/w1/devices/

ls

3. change directory to sensor instance

cd 28-00000xxxxxxx *serial number is unique
ls

4. check to see if sensor is functional

cat w1_slave

you should see output similar to this

root@raspberrypi:/sys/bus/w1_slave/28-00000495db35# cat w1_slave
a3 01 4b 46 7f ff 0d 10 ce : crc=ce YES

a3 01 4b 46 7f ff 0d 10 ce t=26187

Step 3: Code

Picture of Code

Download and run python script:

Step 4: Additional Info

Picture of Additional Info

Comments

About This Instructable

971views

29favorites

License:

Bio: the Raspberry Pi is Awesome!
More by piddlerintheroot:Soil Moisture Sensor (Raspberry Pi)5V Relay (Raspberry Pi)Stepper Motor Controller (Raspberry Pi)
Add instructable to: