Go Down

Topic: Multiple temperature sensors. (Read 876 times) previous topic - next topic


I'd like to add multiple temperature sensors to a project I have. Problem is I have a limited number of pins left to use. 4 Analogue pins and maybe a couple of digital pins.

I would like to use 8 sensors ( 2 lots of four).
Simplest solution would seem to use the single wire type sensors. Can I use 8 of them on a single input pin? Any examples of this about?
Next could be 2 sensors per analogue pin and switching power to either one via a digital pin. Would this work?
Another way could be to use a second Arduino but I would rather avoid that.

Any suggestions?


I usually use a MUX (like 74hc4051), but that costs 3 control lines, so that i often use a 74hc595 in order to get more digital IO lines...  :smiley-roll:

but one-wire works fine, 2... but it seemed to be more expensive and less accurate to me (LM35/LM75)...

Jack Christensen

The Maxim DS18B20 one-wire thermometers along with this library have worked well for me. The datasheet says ±0.5°C Accuracy from -10°C to +85°C and that fits with my experience. I think I've had up to five running together on a single wire, although just on a breadboard.
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/


3 x DS18B20 in a star with 2 meter cable (equal length) per sensor - don't forget a pull up! - ran for 5-6 months
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)


Sep 18, 2011, 02:55 am Last Edit: Sep 18, 2011, 03:01 am by ArduinoM Reason: 1
I use 8 pcs DS18B20, in a star network, NON-PARASITIC i.e. I use 3 wires (pwr, gnd, data) on all sensors total (only one pin used for data for 8 sensors, all wires of same colour just connected together with a screw-terminal + 1 resistor between data-and-power)
My sensors are encased in a stainless-probe-tube, actually idendical to Adafruit's sensors but cheaper ;)
( http://www.aliexpress.com/product-fm/437071773-Waterproof-DS18b20-temperature-probe-temperature-sensor-Stainless-steel-package-Free-DS18b20-Technical-Manual-wholesalers.html )
about $4 a piece...

I did test all my 10 sensors together (bought spares) and it worked just fine. Only problem is that the sensors need some time to digitalize the temp readings (how much, depends on the accuracy you need or think you need)

I use address based calling to the sensors opposed to just ask for next, next....
the drawback is of course that if one sensor has to be replaced, I need to recode my program with the new sensor address...



A more hardware intensive answer... which will spare you mastering advanced 1-Wire work!... is...

Peter Anderson's TM#129 (US$20 at 6/05)

... which you can read about at...


I bought one from him at eBay recently, $12 incl p&p... he has a stock of these KITS... no PCB, but few components to wire together, and good documentation if you are not a complete beginner...


Go Up