Go Down

Topic: 1-Wire, DS18B20... How do I search the bus? (Read 22 times) previous topic - next topic


Jan 31, 2010, 01:13 pm Last Edit: Jan 31, 2010, 06:44 pm by joe115 Reason: 1

Using the latest version of your 1wire library, I'm still experiencing strange behaviour. Having up to 4 sensors of type DS18B20 in one bus (non-parasite mode), everything works as expected.

Adding the 5th sensor of the same type, the "search" function either cannot see (enumerate) any of the sensor, or only some of them. I changed the test bed several times, to eliminate possibly faulty wirings, and yes - depending upon the current test environment the number of sensors seen by "search" varies. But in a specific test bed (wires remaining at the same place etc., simply playing around with the sensors itself) the behaviour of search is reproducable.

I tried some permutations of the sensors I have at hand (all of the same type DS18B20), but the overall behaviour remains the same. 1-4 sensors are fine, adding the 5th led to the erratic behaviour.

Any ideas? Or someone else out there with similar issues?




What's the physical wiring of your sensors look like?  There are some app-notes from Maxim/Dallas that discuss overall network topology and the limitations you'll run into with wire length, as well as some mitigation strategies.  I don't have the app-note location handy, however.  I ran into similar problems as you when wiring sensors up in my house and ended up having to run two separate networks.  That may be the case for you, as well...


Jan 31, 2010, 03:45 pm Last Edit: Jan 31, 2010, 06:41 pm by joe115 Reason: 1
All sensors are still on a breadboard, but thanks for the hint. I had a quick look at the app note you were refering to (#148) at
but nothing for short range networks like the one I have on my breadboard.

It's no big deal for the application I have in mind: sensors will be ~2m away from the bus master, and I can even spend more arduino pins, to have more than one 1wire bus, and reduce the number of DS18B20 on one bus.

But I'd like to understand, why  ;)


Paul Stoffregen

One other person (who's local to me) reported a problem.  I'm going to meet with him on Monday and try to learn more.  It might be related.

If you could get the 64 bit ID numbers from your 5 chips and post them here, it would really help.

I really do want to get to the bottom of this.  To be realistic, right now I'm working on finishing up a highly urgent project, so it might be a week or two until I can really focus on OneWire again.  But I definitely will.  Hopefully before then I can find a way to reproduce the problem here.



Your dedication is much appreciated! (I've got a job myself during weekdays...)


Let me know how I can support you any further.


Go Up