11 years, 2 months ago.

Fails with more than 5 sensors... ?

I'm trying to use this with 6 ds18b20s but it fails on the initialisation section - works ok with 5... Mystified

I have a 140mm long piece of stripboard to which 6 DS18b20 sensors are attached in parallel. I have 1 4.7Kohm pull up resistor for the whole assembly mounted near one end where three wires lead off to the mbed. I'm powering from the 5V and using mbed pin 26 to read the sensors. With 5 sensors it all works fine quickly finding all 5 and proceeding to read. With 6 sensors the prog never gets past the iniitalisation step. Is there maybe some limit on the number of sensors that can be connected to the same pulup resistor or is there something in the code that is peventing it from finding the 6th sensor. I've tried swapping all the sensors around to no avail. removing ayn one of them makes it al work fine.

Question relating to:

Not sure anyone will be able to help without a bit more info about your setup

posted by Chris Pepper 15 Feb 2013

I cant think of any reason there would be a limit on the 1wire connection with that chip, are you supplying enough power?, at what part of initialisation does it fail?

posted by Chris Pepper 15 Feb 2013

1 Answer

11 years, 1 month ago.

In my home automation project I'm currently using 14 DS18B20 without any problems. I'm thinking that the problem might be in your code. Did you reserve enough memory to index more than five sensors? Posting your code might help.