Use Raspberry pi to driver Temperature sensor DS18B20

Bynora

Use Raspberry pi to driver Temperature sensor DS18B20

Use the following diagram to connect your DS18B20 “1-Wire” Temperature sensor.

PWM

A couple of notes before you get started:
To take advantage of Cayenne’s automatic detection of 1-wire sensors, connect them to GPIO 4.
Make sure Raspberry Pi is powered off when connecting wires.
When using a GPIO ribbon cable, make sure the power wire (it’s a different color than the others) is connected to the corner of your Raspberry Pi and the top of your Pi cobbler.
The provided diagram is just an example of how to connect the sensor. There are many ways to connect sensors and extensions, so try what works best for you!
Some full-size breadboards (used in diagrams below) have a powerline that is separated in the middle. If this is the case, be sure your sensors are connected on the same half of the breadboard as your Pi Cobbler.

Step 1
Connect power from the Pi Cobbler to the DS18B20 VDD pin. Make sure a pull-up resistor is in place between the power (VDD) and output (DQ) pins on the DS18B20.
Step 2
Connect ground from the Pi Cobbler to the DS18B20 ground (GND) pin.
Step 3
Connect the DS18B20 output pin (DQ) to GPIO Pin 4 on the Pi Cobbler. Connecting to GPIO 4 allows for automatic detection of your 1-wire device in Cayenne.
Step 4
You’re done! Power on your Raspberry Pi and Cayenne will automatically detect the DS18B20 sensor and add it to your dashboard.
Add new >> Device/Widget >> sensors>>Temperature>> select DS18B20 >> add sensor

About the Author

nora editor

You must be logged in to post a comment