Ds18b20 self-heating

Inspired by a comment in this topic I thought I’d share some extreme 1wire testing I’ve been doing. I’ve got 100 ds18b20s spread roughly evenly across two buses (50 on each bus, plus a few extra stray sensors on bus0). I used a handful of these 5x5 testboards:


That particular one is dangling from the ceiling above my desk.

I picked the bottom left and bottom right sensors (slot 51 and slot 48) and confirmed they were in good agreement:
0.48: 0x 30 d4f7 12 0b60 (22.750C)
0.51: 0x 33 93df 10 0b60 (22.750C)

0.48: 0x 30 d4f7 1a 0b78 (22.938C)
0.51: 0x 33 93df 18 0b78 (22.938C)

with 12-bit conversions every ~40 secs. Then I changed the code to hammer .48 as hard as possible (back to back conversions every ~620 msecs) while converting .51 once per minute, which yielded:

0.48: 0x 30 d4f7 01 0bc8 (23.562C)
0.51: 0x 33 93df 01 0b88 (23.062C)

Then I swapped the hammering to .51, with 1 minute conversions on .48:

0.48: 0x 30 d4f7 1e 0b88 (23.062C)
0.51: 0x 33 93df 00 0bc0 (23.500C)

So it looks like you can get about 0.5C warming doing conversions too rapidly. I reduced the hammering rate until they both agreed, and that was at 2 sec sampling rate.

Those components on the testboard are all Dallas genuine, so then I tried an ebay-purchased encapsulated non-genuine. One thing I’ve noticed with all my non-genuine samples is that they do the conversions much faster. They can do a 12-bit conversion in about 89 msecs Vs about 620 msecs for the Dallas parts. The following are the results at ~40 sec sampling, and then back-to-back sampling (~11 samples per second):

0.44: 0x 2c f5db 0d 0b00 (22.000C)
0.44: 0x 2c f5db 00 0b10 (22.125C)

So they’re faster and show less signs of self-heating, although I’m unsure if that’s because they use less power or because the metal tube acts as a heatsink.

1 Like


In this batch they’re all genuine but for the one in slot 7 and you can see it has way faster conversion times (70 Vs low 600’s msecs)

Interesting. I don’t know where the idea of switching the power to the bus came from, but I do remember way back using the DS18B20 on an emonGLCD to do a similar test. I think I found that in still air, there was a just detectable effect, but with moving air, it all but disappeared. I can’t remember the details now, though it might be in the archived forum somewhere.

What I do remember though about the emonGLCD is there were complaints that with the sensor at the top, it was allegedly heated by the other components on the board. I can’t say what extent of the heating was, or whether it was verified or not.

I can confirm that. (I have an emonGLCD) I haven’t used it in more than 5 years, so don’t have any data, but I do remember the temp reading from it being more than just a degree or two higher than other thermometers in the same room, near (<1 metre) the emonGLCD.

The old grey matter - with a lot of help from Google - works:

https://openenergymonitor.org/forum-archive/node/2484.html

That also says that Glyn decided to switch the sensor power not primarily for self-heating, but to conserve power.

I guess when you’re battery operated, every uA is sacred. I’ve just done some current measurements on my 50 sensor bus. In all these pics, Blue is the 1wire bus, and Yellow/Green are the dual-range current probe, and they’re all basically different zoom levels of the same thing.


The big picture. With 50 devices on the bus, I can’t do broadcast conversions; instead I always have one ds18b20 converting and when it’s done, start the next one. In this pic each conversion takes about 600 msecs (12-bit) and then there’s some 1wire chatter to fetch the result and start the next one converting.


Zoomed in on one of those long conversion stretches. The average current being drawn during the conversion is 647uA (cf. datasheet at a typical active current of 1mA). Those 10 msecs Blue pulses are me probing the bus to see if it’s done yet. With 50 devices to get through I need to move on as soon as possible rather than wait a set time - particularly useful for cloned devices which are about 10x faster.


Zoomed in on an end-of-conversion. My Blue are-you-done-yet probe was 2 msecs too early, so had to wait another whole 8 msecs for the next one. During that 8 msecs of bus idle time you can see the current drops away to practically 0… even with 50 devices on the bus. Then the next bus probe sees the conversion is complete and starts comms - which causes lots of short sharp current spikes on the bus edges - peaking at 10.35mA, but all of them very short lived.


Zoomed in on the quiet time. I really need a bigger shunt, but according to that noise the average draw during the idle time is 16.9uA, or about 340nA per sensor (cf. 750nA from the datasheet).

I always thought that this was due to the DS18B20 position being at the top of the PCB above the LCD display and backlight… Perhaps I should try turning my EmonGLCD upside down for a bit to see its any better…

I ran mine with the backlight off (it was in a well lit room) and I don’t remember the LC dsplay
itself being warm to the touch. The PC board was warm, so I attributed that to the 328 chip.