DS18B20 reliability considerations

Theoretically I guess so, but no, I don’t use any level matching.

The usual 4K7 or sometimes a 5K0 depending what I have to hand.

No, just power at 5V, pullup to 5V and read via a standard 3V3 IO pin, usually a Pi or Atmel ATmega328p running at 3V3.

This isn’t that uncommon to OEM kit, it’s just not widely known to be the case.

It all started with the emonTx V2 pcb v2.2 (Changlog) and a minor fault on the PCB, if you look at the schematic there is SJ2 solder bridge pads to allow the user to select a 3V3 or 5V supply, but the board was made with a permanent link to 5V (see picture below, the left and centre pads linked in red) so unless that track was broken, all emonTx v2 temp sensors were 5V powered but the MCU was 3V3.

image

This was my first encounters with using ds18b20’s so when I started using them else where I just stuck with what I knew worked, perhaps because of my background of working with automotive 12VDC electrics for many years and rarely, if ever, did you get the expected voltage at the other end of a cable, voltage drops were unavoidable and now working 3-5V, I came to believe this might be the reason so many people report issues with ds18b20’s whilst I had not experienced any issues at all. That and the fact I make sure every connection is 110%, again from the automotive background, 99% of all vehicle electrical faults basically end up being a problem with 1 of 3 things, connections, connections or connections.

I’ve never done the theoretical maths or taken any exact measurements as I haven’t really needed to do any debugging of ds18b20 circuits, but I’d come to the conclusion that by giving it 5V it probably ends up performing nearer to 3V3 levels than 5V levels once it’s travelled several metres and passed through a few connectors too, but your question about pulling up to 3V3 rather than 5V now raises some doubt as at rest the pullup to 5v must result in a >3V3 level? But there are no reports of damaged MCU’s (that I’m aware of) and I certainly haven’t had any issues. (so cheers for that @dBC ignorance was bliss for a while :thinking:)

Although the emonTx v3.4 ds18b20 connections via the RJ45 are 3V3 not 5V and the pullup is to 3V3 too, the emonPi’s RJ45 pin 2 is 5V (not 3V3 like the emonTx v3.4) and it uses a 4K7 pullup to 5V like the old emonTx v2.

The emonPi also powers the optical pulse sensor with 5V and reads at 3V3, it’s performance differs to the emonTx v3 optical pulse counter input (identical sensor) as it is all 3V3 on the emonTx v3. The only difference to the way the circuit compares to the ds18b20 connections on these devices is that the pulse counter uses an internal pullup/down on both, so the pulse counter is pulled to 3V3 even when powered via the emonPi’s 5V RJ45p2.