Yayyyy ! Multi DS18B20 Digital Temperature Thermometers

I am just pushing the success here forwards as a lot of people who just want to measure temperature accurately and siimply with ZERO fuss need to know about this. Give it a spin folks as this is probably the best tthig you could use to demonstrate Cayenne out of the box with just a single 4k7 resistor.

  • Virtually one part device.
  • Direct Pi Compatible,
  • NO interface needed (other than that annoying 4k7 pull up)
  • -55 to + 125 Deg C
  • Zero callibration or fiddling needed.
  • 0.5 Deg C accurate out of the box and 1/16th deg C resolution ( mad ! )
  • It works !

Here is how on a breadboard:

  • The DS18B20 is a three wire DIGITAL thermometer
  • There wre three wires: +ve and a-ve and a single ‘1 wire’ buss that hooks onto the Pi header pin 7 = GPIO-4 1w = one wire point.
  • Coolest thing is you can daisy chain multiple DS18B20 with the 3 wires all in parallel and the unique ID and cleverness of Cayenne sorts it all out: Each thhermometer just pop’s up without having to do ANYthing on the Dashboard by the time you can turn back to the screen.
  • Wayyyyyy Coollllllllll

Here is screen:

I will be more than happy playing with this for a while but ‘observations’ and tidy up of the way these devices work are as follows for now…

Wish List:

  • There seems to be no way to edit tag, descriptor or individulaly name each DS18B20

  • Degree C option on some sort of a settings table please ( in progress ? )

  • Note a curious ‘feature’ is that ‘Deg C’ seems to come up initially for a minute or so before someone comes and flips it over to politically correct (?) Deg F for you guys… (have a close look at the plot)

  • Time and date history gadget ( General graphing + history database ? )
    Here is an image of a gadget that interacts with php and a clunky old MySQL I use for monitoring pennguin nesting boxes and solar hot water etc type systems


  • Last tip request for the low level techies is that it should be entirely possible to get the Pi to issue the WPU (Weak Pull Up Current) and thus eliminate the slightly untidy but irritating single 4k7 external resistor. I think that the Pi at the lowest level can have this switched on (minor code tweak in sofware). This would mean full plug and play that for the 90% of simple single digital temperature probe setups. FAB demo, or kitset (you can buy these finished, sealed in high temperature, stainless food grade + 1.5 m lead for ~$2

~ Andrew


Next thing we will be asking for multi trace on one chart…
~ Andrew


please be careful. the problem with the time axis is not solved! i have a topic on it:

  • between consecutive time intervals you have always the same space even if the intervals are not the same!


Nice post Andrew!! You officially hold the record for most 1-wire sensors hooked up. We might have to post this somewhere it’s a great little intro to how easy Cayenne is.

Regarding wish list:
-Click on the cog wheel icon to manually edit the sensor name?
-in progress :smile: , but behind our Triggers & Alerts feature.

  • @akaranfilian look into this?
  • History widget coming, it’s our next widget to release.

@bogdan_bogodai still looking into the time intervals. @akaranfilian @svazir Can you investigate graph intervals?

~ Andrew

Have only just found Cayenne but am looking forward to trying this out. I am currently monitoring a string of six of these sensors using a raspberry pi. The sensors are all connected to one cable about 15 metres long in all. Some are bare DS18B20s and some are waterproof.
I do take issue on the resistor. The Raspberry Pi GPIO ports do have inbuilt resistors that can be enabled but not for that value so for the sake of 1 resistor, I really would not waste any time trying to eliminate it. I have heard reports of people having to tweak the value of that resistor to improve reliability but I have never had to.

Let us know when you connect the six 1-wire temp sensors. If you connect to GPIO 4 then they should all be automatically detected and put on your dashboard. My record is four 1-wires, so I’m eager to see you beat it!


Challenge accepted

Love it. I accept me own challenge as well…Pictures / videos or it doesn’t count!

@eptak if you want to enter this challenge feel free :slightly_smiling:

1/. Minor irritation but seems taking out DS18B20 once added seems locked / impossible without deleting the project and re-adding the required numbers again ? Should this be star date bug-logged ?

3/. Am having issues adding any DS18B20 at moment but may be ‘just me’
It used to be almost automatic but no go at present…
Will update.

2/. Per above suggestion about using internal WAPU; yes there is nothing as simple and solid as a 4k7. I imagine total transmission line (this is a 1 wire bus) and what it is made of with all complxities of C and R may need a range or R. I was just thinking ‘instant’ add a device to GPIO pins with three wires thats all. Internal WPU is sufficient for picaxe / on board distances and sure simplifies things in the classroom when teaching stuff from a non electronical angle that’s all.

It Just Works so great + thanks + good work everyone

~ Andrew

I’m slightly hijacking your thread here, but I’m having some issues with my massive amounts of DS18B20 sensors. the 2 that I had attached originally are still on my dashboard, but the new ones are not automatically appearing. See below:

And here’s a picture to make it count!

Sweet!! We should be able to reproduce this so @svazir @akaranfilian let’s check it out.


I would suggest adding a few at a time ?
At moment I am finding new DS18B20 are not auto-adding themselves but will try a deep reboot again (reformat update/upgrade re-install
~ Andrew

I never tried more than 2 ! But with a hardware master chip, we should be able to add tens of sensors :slightly_smiling:
Adam’s issue is weird…

As above initially a modest number of DS18B20 just ‘Pugged and Played’ and came up on the dashboard of last months version of Cayenne. This was brilliant. All i did was plug them in and they just came up on the dashboard with ZERO intervention :slight_smile:

However I have not managed to add any DS18B20 recently on latest version of Cayenne… Not sure why but will do a clean start and re flash one of the Pi 2 I have been using and get back on this early next week. It is looking like it is now a manually added device. It now is asking for a serial number to make it work. The serial number is not known or visible until the DS18B20 is added… Bit of a Catch 22 there… And I am not sure how many people with average skills will be able to read the serial number as it is a bit of a fiddle.

It seems at the moment that you can not ‘delete’ a DS18B20 once added. This should be fixed… Mean time I see each DS18B20 is added to the mydevices config txt file beside the webiopi config file and wonder if deleting the instance from the mydevices list would remove it cleanly from the dashboard ?

Deg C please…

~ Andrew

Very weird. I just added 9 DS18B20 with no issues. I know @ats1080s might have had the same issue you were experiencing. Either way, shouldn’t need to enter any serial number, should automatically appear.

3/. Yes, we’re fixing this.

4/. Discussed this with team and it’s on our hot list. Currently being designed!

I’ll add pictures soon for my 1-wires.


@ats1080s @picaxe @consult @bogdan_bogodai @eptak
Alright guys, uploading some pics of the nine 1-wire sensors I added. I didn’t have to manually add any of these widgets to the dashboard. All sensors are connected to GPIO pin 4 and appeared in my dashboard after some time. I decided to use a resistor for each individual sensor. I’ll try and keep adding as I get my hands on more DS18B20!

@picaxe Try to go to the dashboard and add a device. I did this last night and after that all the other DS18B20 showed up (which caused some other issues lol)

@bestes I just for some reason thought of this. After I tried to add the PWM channel last night that is when all the temp sensors showed up in my dashboard, almost as if the auto check for new devices was not running and adding a new device kick started it.

Good observations…guess we’ll find out when @picaxe can give this a try