Go Down

Topic: Multiple DS18B20 Temperature Sensors on one bus (Read 111007 times) previous topic - next topic

mattlogue

I'll be utilizing said sketch when I add a few to my fridge. There are always hot spots and colds spots.
Just because I live in the states don't mean I care

02632

Question on multiple digital sensors:
Can I use different pins instead of knowing the address or each sensor?

I want people to be able to plug sensors into connectors that equal what it goes to:

like this:

Connector - Item A Temp -- << -- If a sensor is connected it will show the temp of item A
Connector - Item B Temp -- << -- If a sensor is connected it will show the temp of item B
Connector - Item C Temp -- << -- If a sensor is connected it will show the temp of item C

All Temp sensors will have XLR connectors and can be plugged into any port... 

aldozan

#32
Apr 27, 2018, 09:13 am Last Edit: Apr 27, 2018, 09:17 am by aldozan Reason: Incomplete posting
Well, that is against the concept of bus itself!
Why don't you use difgerent kind of sensor, like a probe not connected to any bus?
Anyway if you really eant to use 1wire devices on different pins you should define multiple instamces of the 1wire class, each one connected to a different pin.

Nick_Pyner

I can't see the point of what you are doing, but there is little point in questioning your motives - providing you know which sensor is which - as there are manifest benefits, even without using them on a bus. I think a better way of using DS18B20s on individual pins is here
http://sheepdogguides.com/arduino/ar3ne1tt2.htm

Arduino-Bob

This was a really helpful topic.  When I went to it, I got the notice from wiki-spaces that they are closing down.  I would hate for the community to lose this info. Where should it go to keep from losing it?

Nick_Pyner

#35
Sep 05, 2018, 02:44 am Last Edit: Sep 05, 2018, 03:02 am by Nick_Pyner
I guess you are accessing this forum through Wikispaces.  I don't think the forum is closing, so access it directly.
http://forum.arduino.cc/index.php#c2

rjnusbaum

I know this is an old thread but I am having problems getting more than 4 sensors to work on a single bus. 4 sensors work fine. I add a fifth one and suddenly none of the sensors are visible. Doesn't matter which sensor as I have tried swapping in and out. As soon as I add the fifth sensor nothing shows up on the bus. Any thoughts?

rbloper01

Try using an external power supply, you may just be pulling too much power from the board.

Nick_Pyner

I think it is just slack wiring. DS18B20s run on practically nothing and, if adding a fifth to a group of four was the straw that broke the camel's back, I'm sure we would all know about it.

rjnusbaum

I think it is just slack wiring. DS18B20s run on practically nothing and, if adding a fifth to a group of four was the straw that broke the camel's back, I'm sure we would all know about it.
I've wired it up 3 or 4 different ways on two different breadboards. Same result. Any 4 sensors works fine. Add any 5th sensor and they all disappear.

rjnusbaum

#40
Nov 01, 2018, 01:46 am Last Edit: Nov 01, 2018, 01:50 am by rjnusbaum
I've wired it up 3 or 4 different ways on two different breadboards. Same result. Any 4 sensors works fine. Add any 5th sensor and they all disappear.
Solved. Was using 4.7k pullup resistor as recommended. Too big for 5 sensors as when they all pull power during conversion they drop voltage below minimum. 1k resistor seems to make things work.

Nick_Pyner

I rather suspect something else is going on. Reducing the pullup is common practice when using long cable runs to the sensor, which is probably not the case here, and even in that situation, 2.2k is about as low as I have ever heard of.

rjnusbaum

I rather suspect something else is going on. Reducing the pullup is common practice when using long cable runs to the sensor, which is probably not the case here, and even in that situation, 2.2k is about as low as I have ever heard of.
If there is I haven't figured it out. The sensors I am using are the waterproof ones with the 3' cables. I have tried  a bunch of different wiring configurations on two different breadboards. I tried 3.3V and 5V (both of which should work). I then tried the resistor change. 2K made the sensors appear to a scan but would not work reliably when actually getting the temp. 1K makes everything work.

I have not found a single example documented online that used more than 4 sensors on a single bus. It definitely should work but I haven't figured out why it isn't. Oh and I have tried both a UNO and a Mega board. I am going to try them with my Pi too and see what happens there.

Nick_Pyner

I can't comment other than that I hope you aren't using the parasitic power mode. I only use four at a time myself, all waterproof 3m, but there have been instances on this forum of people using more, and with no problem. Using waterproof sensors with cabling means you have gotten round one DS18B20 problem - using cheapskate cabling. The type of sensor per se is irrelevant, and the only issue that might come up with Arduino is whether it is 5v or 3.3v, which is not relevant here. I believe the sensor only uses the pullup when it is actually passing data, which rather suggests that the number of sensors has no bearing on the size of the pullup. I think this is one for el Supremo, who is rather supreme on these matters..

rjnusbaum

I can't comment other than that I hope you aren't using the parasitic power mode. I only use four at a time myself, all waterproof 3m, but there have been instances on this forum of people using more, and with no problem. Using waterproof sensors with cabling means you have gotten round one DS18B20 problem - using cheapskate cabling. The type of sensor per se is irrelevant, and the only issue that might come up with Arduino is whether it is 5v or 3.3v, which is not relevant here. I believe the sensor only uses the pullup when it is actually passing data, which rather suggests that the number of sensors has no bearing on the size of the pullup. I think this is one for el Supremo, who is rather supreme on these matters..
Nope not using parasitic power mode.

Go Up