Ds18b20 raspberry pi

I am using ds18b20 with the raspberry pi and I am using "node-red-contrib-sensor-ds18b20" node with inject and debug node and it shows the payload as mentioned in below picture.


while I need temperature. Any suggestion.

Hi, have you enabled 1-Wire in raspi-config?

Yes, I did. and that`s why I got Sensor Id. As shown in below picture.

When I set up node-red-contrib-ds18b20-sensor (different node but works great by the way) I had to enabled 1-Wire in raspi-config and

sudo nano /boot/config.txt
add at bottom
dtoverlay=w1-gpio

Perhaps this is your problem or go try node-red-contrib-ds18b20-sensor instead.

1 Like

Do you have a 4k7 resistor between data and vdd?

"dtoverlay=w1-gpio" is already there.
error

While I am using "node-red-contrib-ds18b20-sensor" node and getting the below message.

Yes. Below is my circuit diagram.
95215564_588279365125138_3382854016290521088_n

I don't think you are getting good contact from the Dupont connectors attached to the sensor, I also noticed that in your screenshot of the node that there were more than 1 sensor ID's shown. Do you have a breadboard that you can use to connect to the sensor?

Now I am using breadboard, but still same result and two sensor ids show.

Does the sensor disappear from the dropdown if you disconnect it?

You need to double check your wiring, resistor size and that the device is actually a DS18B20
Colin has a good point if you disconnect the device the id should disappear but the 3 sensor ID's shown in the 3rd post are not DS18B20 the family name / ID for all DS18B20's should start with 28- this is the output you should be seeing.

topic: "FF5E0F721704"
payload: 21.625
_msgid: "171e7630.55f71a"
file: "28-0417720f5eff"
dir: "w1_bus_master1"
family: "28"

1 Like

I have changed the sensor and now it is work fine. How can I add humidity.

Good that you got it sorted. Have you searched through the forum for "Humidity"? There are lot's of entries. It is also better to start a new thread when the question/topic changes, and not simply extend the thread.

Ok :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.