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.
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.
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...