How to make ds 18b20 works...?


#1

Hi, I am trying to have online temp. from a few ds18b20, but… I had never before use linux and rasp… At now, I have working rasp at IOS app, and connected two ds18b20, but… there is thing that I have to learn rasp. that ds18b20 are connected:) but I can’t find how… If somebody can helpo what should I do will be great. Thank you.


#2

Hi @michal, Welcome to the Cayenne Community.

It sounds like you’ve been able to add your Raspberry Pi to Cayenne, can I ask if the DS18B20 sensors are connected to GPIO 4 per this tutorial?:

If so, they should be automatically added to the Cayenne Dashboard as widgets the next time the Pi is powered on and makes an internet connection.


#3

Yes, I found this tut.before I asked - pin outs should be ok,There is one thing, that I connected two sensors without resistor ( I don’t have this value) but It should works, there can be some errors, but pi should find it - all of others modules works without it. Finally I always put resoistor to close the loop.
I found video : http://www.youtube.com/watch?v=OBu1weMecbY about that PI should auto find it, but I tried a few times and after reboot there is no new sensors.


#4

I won’t profess to have a deep knowledge of electrical engineering, and I do see the links on Google that say you don’t need a resistor for the DS18B20. I was skeptical, so I decided to run this as a test:

New pi, new Cayenne account, DS18B20 wired without a resistor. Cayenne didn’t generate a widget for the DS18B20, and when I looked in /sys/bus/w1/devices (where the Pi stores its 1-Wire detected devices) I saw entries like this:

So it sees something, but those addresses don’t look right. They normally start with 28- and don’t have so many zeroes.

I powered off the Pi, added back in the resistor, powered on the Pi and checked that folder again:

That looks like what I was expecting, and sure enough Cayenne saw the DS18B20 sensor and created a widget for it.

So I would check your /sys/bus/w1/devices folder and see what kind of entries are in it. If they are all zeroes, then I would say you probably do in fact need the resistor. If you’re seeing a 28-xxxxxx type entry, and Cayenne still doesn’t see it, let us know.


#5

There is a step by step screen shot of what @rsiegel is talking about here-

-Ian


#6

Thank you for help - at this moment, I cant check, but I have resistror, but there is one more thing - I have sensors as waterproof so I can’t check what colours are soldered to what pins, there can be problem- I connected as description at www, but - never know:) I found a few different directions about pin / colour. I will Let know after check,


#7

If the metal probe feels warm, the Vcc and GND are reversed. In my experience this does NOT :astonished: damage the sensor, yes I have done this before.

Ian


#8

I’m a member of this club :smile: Can’t remember if it was a DS18B20 though. Mine was beyond warm, enough that my finger reacted like I was touching a hot stove. I will concur that that sensor has behaved since then.


#9

I found problem… as I wrote - I found order at banggood - it was wrong connection - data and gnd was reversed… I checked /sys/bus/w1/devices and as you wrote - I have all zeros. It is possible that sensors are dead…;/ That was my last 2 unused;/


#10

Definitely worth trying reversing them (and wiring in the resistor where it belongs). As said above those things can be pretty resilient. Sorry to hear if they are dead of course. :disappointed_relieved:


#11

So… new sensors works fine, thanks everybody for helping at stsart:) I have what was the most important for me - temps, now I can slowly learn to rasp and linuks:) and have new year without questions - why it is not working:) Happy New Year, and see you soon:)


#12

@michal, this is very good to hear!
Please keep us updated as to your journey, the community very much enjoys seeing what everyone is doing.

Please have a happy and prosperous New Year!

-Ian