Go Down

Topic: Bizarre Reading from DS18B20's after adding 5th Sensor (Read 2876 times) previous topic - next topic

Scott McGurk

Hi all,

Apologies if this is something simple, but I cant seem to get my head around it!

Had a control / temp monitor system reading 4 sensors which worked perfectly (readings of 16.87, 15.3,12.8 and 1.2) all normal.

I add in the 5th Sensor, and here's what seems to happen...


0.0, -187.25, 12.8, 15.68(new sensor), 0.0

I've changed the value of the pullup resistor in the past due to the bus length and loading (is currently at 1K6) and running in powered mode.
Pin voltages are normal, (vcc/gnd 4.98V, dq/gnd 2.58V)

Any ideas, I'm thinking some sort of fault in the wiring somewhere, but I cant seem to track it down.
The oddity is that the new sensor reads fine, but stops the others from working so eliminates a wiring fault from the new cable - and moves it to previously working cables!

Thanks in advance!


try looking at these:


I had similar problems recently, I overcame it by adding another pullup resistor (10k) near the 1820 at the end of the 'string'.  If your pullup is next to the arduino you could try moving it to the 'far end' . 


Note also that 1-Wire chips in general do not like to be connected via "star topology"...

So running a bunch of pairs of wires out to separate 1-Wire chips, and connecting the near ends up is a Bad Idea.

The Right Way is to have a single two wire cable going from sensor A to sensor B to sensor C... etc.... making something analogous to a ladder.... the wires are the two "sides" of the ladder, and the 1-Wire chips are the "rungs".


The library I have (DallasTemperature.cpp) reads the scratchpad from the sensor without checking the CRC. Thus it could be complete rubbish, and I have found myself with a number of sensors that sometimes they return a bad result. You should check the CRC after a read, otherwise you have no way of knowing that the read completed OK.
Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

Go Up