How to increase number of outputs to control 12vdc relays?

I'd like to know more about increasing the number of outputs for controlling 12vdc relays. (I"m using 12vdc relays to control lights, and sprinkler valves for irrigation. I'd like to you if I can increase the number of outputs and realistically what the maximum number of relays I can control.

Do I need to worry about exceeding Auduino max current to output devices?

Have the same question about inputs. I'm using magnetic contact switches to tell when a door or gate is left open. What's the number of inputs I can use with Arduino?

Thanks

If you can solder there are a lot of binary decoder IC's on the market that will do this. 4 Pins on the arduino could then be mapped to 16 relays. The code will need to be a little more complex though, but once done you can easily have 32 relays working off of just 8 pins.

The following link should explain how they work.....

Got it thanks.

I was hoping i could just add in daughter cards with additional I/O channels.

Doug

I do not know of such a board and a quick search didn't turn up anything.

This would be a good learing project though and not too expensive for a decoder chip and some stripboard...

Another way would be to use the serial output to send serial data to another arduino that could then be used to increase the digital outputs (and inputs as well). So when the main arduino wants to turn on relay 15, it routes the signal '15 ON' via serial to the second arduino. The second arduino just sits listening for instructions and turns on the appropriate pin.

In the reverse situation where you want more inputs, the remote arduino would sit there running a script to read the input pins and when a change is detected it sends the corresponding serial message to the main arduino.

You could also use a few arduino pro-mini boards with NRF24L01+ to send the singals to the relays and get the sensor data back again. They work really well.

Good Luck!

A TPIC6B595 can drive eight 12volt relays without additional parts (except for a 100n supply decoupling cap).
And can be daisy-chained to (almost) as many as you like.
A single chip or a whole string of them only use three Arduino pins.
They are controlled the same way as a 74HC595. There are many examples on this forum.

Leo..

This card I offer will drive up to 32 relays, and is easily daisychained. Just add a diode across the coil of each relay.
http://www.crossroadsfencing.com/BobuinoRev17/