I was playing around with the OneWire Temperature example posted here on the forums, and I wanted to connect multiple sensors to a single Core. Eventually I’d like to do a large bus of these sensors throughout my house, and I had a single sensor working, but hadn’t expanded to more than one. Most of the work here was already done by the OneWire library, and the awesome person who ported it over (was it @wgbartley ? )
Again, nothing fancy, but maybe this will help other people playing with the DS18B20’s
This firmware will search the OneWire bus for up to “NUM_SENSORS” temperature sensors, and store the ROMs. Then it will update the sensors every few seconds, and publish the values about every minute to
Temperature/AABBCCDDEEFF... where AABBCCDDEEFF is the unique ID of the sensor. It will also output these over Serial.
“large bus … throughout my house” might not work so well.
Capacitance and topology will be your foe.
Look for app notes from Dallas/Maxim on large installations for tips & guidance.
Thanks, that’s a good idea!
some Googling led me here: http://www.1wire.org/Files/Articles/1-Wire-Design%20Guide%20v1.0.pdf
edit: Wow, just breezed through that PDF, setting up a 1-Wire network properly looks like it would require very careful work.
Dave, you could setup several smaller sensor clusters, each with a Spark. That is more feasible and gives you more flexibility
Yes, but what if your house is a bus?
Then I’d say 1-wire was the least of your worries…
I’m planning on doing something similar, and was wondering about this sort of thing. What would be considered “small” in this case? I originally was going to put a Spark core in every(er most) room of my house with some sensors, and then realized I could maybe just run some longer wires to the actual sensors. In that case, I could do with a spark per floor or something simple like that.
I’m having trouble figuring out just how long of a wire I could actually use though, even for something like the DS18B20
That 1-Wire design guide was very informative, and I am certainly not a 1-wire expert so I’m hoping someone can jump in. The impression I got was that runs in the 30-70 foot range, with less than 10 sensors each is probably fairly safe. Generally it also sounds like you want to avoid straying far from the main wire when possible.
I hope that helps, and is even remotely correct!
Hey @Dave, do you have any updates on your plan to implement multiple 1-wire sensors in your house? I’m interested in doing something similar.
Sure! I just ordered a large pullbox of cat6 ethernet and I’m planning on using that to see what kind of signal / distance / resistance I can get with that. If that goes well I’m going to maybe do a test setup of 20 temperature sensors and a single floor run. Otherwise I figured I’d grab a bulk spool of speaker wire, which should carry more power.
I’ve also been thinking about building a simple GIS app that would watch for sensor ids / values to come back, and let you lay them out on a floorplan of your house, so you can see which temp sensor goes where, etc. That all depends on finding some free-time though!
It’s the capacitance that gets you with long one-wire runs, in my experience. I doubt you will need to revert to speaker wire, or if it would help much.
I’ve run almost 60’ with a DS18B20