curlypete
Posts: 14
Joined: Fri Mar 22, 2013 4:32 pm

which GPIO addon card for RPI?

Sun Mar 24, 2013 6:27 pm

Dear all,

I would like to setup 50 temperature sensors to the raspberry PI.
I know these are analogue sensors so something that would have analogue to digital would be needed?
does anyone have any ideas how i could do this?
also not sure what thermistors i will use yet, but they will be waterproof for fish tanks in my shed.
regards Pete

PS1981
Posts: 445
Joined: Wed Dec 12, 2012 4:11 pm

Re: which GPIO addon card for RPI?

Sun Mar 24, 2013 7:08 pm

That's a hell of a lot of sensors. I don't know about an available addon card, but maybe several pcf8591p IC's may do the trick. Analog signals on I2C, I think they have been known to work with the pi. (will cost you more than the pi itself btw.)
http://www.ebay.de/itm/260982137677?ssP ... 300wt_1163

curlypete
Posts: 14
Joined: Fri Mar 22, 2013 4:32 pm

Re: which GPIO addon card for RPI?

Sun Mar 24, 2013 7:21 pm

Thanks, i am a bit of a newbie, so will probably take me a while to get round the electronic side of this. would i need 1 chip per sensor?
how would i go about wiring up lots of sensors and assigning them to GPIOs on the Raspberry PI. ive read a few guides and understand digital IOs directly off the PI
does the length of wire to the sensor affect its readings too?

appreciate the help and ideas with the IC you linked

PS1981
Posts: 445
Joined: Wed Dec 12, 2012 4:11 pm

Re: which GPIO addon card for RPI?

Sun Mar 24, 2013 7:37 pm

Cable lengths are not to be overdone to my knowledge, but I'm not sure what the limit is. If you google the chip you should find the pdf manual, it is rather large however and will take sme time to study. I think the chip is given an address by setting certain pins high/low, and one chip gives I think 4 analog inputs. I hope I'm not spouting rubbish here, I have ordered some myself but do not have them yet so cannot give first hand experience report yet. Search for the chip here in the forum and you get some examples.

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2848
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: which GPIO addon card for RPI?

Sun Mar 24, 2013 7:44 pm

You could try using the one-wire sensors like the DS18B20 they're about 3 quid each but have the AD conversion onboard and you can chain a lot of them together. (I don't know what the limit is)
Alex Eames RasPi.TV, RasP.iO

curlypete
Posts: 14
Joined: Fri Mar 22, 2013 4:32 pm

Re: which GPIO addon card for RPI?

Sun Mar 24, 2013 9:46 pm

thanks i like the look of the digital DS18B20 sensors.

how would you recommend i could link 50x of these to the GPIO pins?
e.g. which gpio expansion board is good?

pgman
Posts: 22
Joined: Sun Jan 06, 2013 8:34 pm

Re: which GPIO addon card for RPI?

Sun Mar 24, 2013 10:05 pm

50 DS18b20 chips can be bought from about £35 on ebay (china), but you'd have to encapsulate and waterproof them, unless you can reliably read the outside glass temp. There are also encapsulated ones at 10 for £17. These will be the most accurate and easiest electrically to set up - its a one wire bus, though given 50 of them you will need to look at feeding them correctly with power (i.e use 2 wire mode, not parasitic power) and you may need to split them into groups. Beware of trying too high accuaracy levels as they take time to convert.

Next option would be analogue LM35s or similar, but as earlier mentioned you'd need lots of A/D converters, or some form of selecting circuit (see below) to select individual chips and send that signal to a single A/D converter. LM35s are about £21 for 50 on ebay. You'd probably need to keep LM35 chips powered all the time, so you'd also need something like 74HC4066 quad analogue switches to isolate individual LM35s.

Easiest and cheapest would be thermistors or thermocouples with a switch circuit to a simple A/D convertor. again you'd need to encapsulate them, or read the outside of the tank. You'll get 10 thermistors for a pound.

To create a simple swithing circuit you need either a set of counter/ripple gates (74HC595 £3 for 10) or some I2C controlled port expanders (PCF8574 £5 for 10). This would give you 50 pins. You write code that pulls just one of these pins high at a time, the rest have to be low. To each pin you connect a thermistor/thermocouple and then connect the other side of the thermocouples to the A/D convertor. This way 50 different sensors are cycled through in turn, and just one A/D convertor reads the sensors in turn.

If you go analogue sensors then each one needs to be calibrated on its actual cable (as you have to allow for cable resistance on anything over 1m). Also the A/D readings will need to be converted to temperatures, so you'll need lookup tables if you want actual temps rather than just alarm condition reached.

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2848
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: which GPIO addon card for RPI?

Sun Mar 24, 2013 10:06 pm

curlypete wrote:thanks i like the look of the digital DS18B20 sensors.

how would you recommend i could link 50x of these to the GPIO pins?
e.g. which gpio expansion board is good?
The whole point of them is that they only need one pin for the whole lot. GPIO 4. Also need power and GND and a resistor for each one. I don't know how many you can use in one network, but I think it's quite a few. Check out the datasheet. (Just google DS18B20 data sheet).
Alex Eames RasPi.TV, RasP.iO

curlypete
Posts: 14
Joined: Fri Mar 22, 2013 4:32 pm

Re: which GPIO addon card for RPI?

Mon Mar 25, 2013 12:16 am

wow, this is amazing information. I will be looking at these options later this week.
its given me much more to think about..
kind regards for all of your input and time.
Pete.

Return to “General discussion”