I'm looking for some advise, I'd like to build a controller to turn on and off the water in my garden and greenhouse, I've got some 24v DC valves so i was thinking of a relay board, but i can't find one with more than 8 relays and I've got about 14 different areas to water. Is 8 the limit or can i add more that 1 relay board? Also i'd like to have an LCD display to show whats going on, can this be added as well as the relays? I'm a bit new to this Arduino ,I did a fair bit of Qbasic and C++ but that was nearly 20 years ago. I'm really just after some advise on the possible combinations, and limitations before i spend out on the bits. Thanks in advance.
This is surely doable. I Think there are even 16 relay boards avalable. If not, running 2 such 8 relay boards is no problem. Check that the relays support the current needed by the valves.
Select an LCD that uses I2C communication. That occupies way less of I/O pins.
Funny You have used Qbasic! So did I. A fantastic tool to manipulate lost of different data. Fixing-Basic one guy named it.
Suggest you get two 8 channel relay boards.
Always start with a schematic before you start with writing any software.
i assume i'll need a MEGA not an UNO for this kind of project?
You don't have to use a Mega, port expanders could take care of the pins you need and a smaller board will be cheaper to replace if the magic smoke escapes.
Two 8 channel relay boards needs 3 address lines, 1 data, 1 select, maybe 1 clock….. LCD, using I2C uses 2 lines, A4 and A5. No problem for an UNO.
UNO 2-19=18 I/O pins could work.
2-13
A0-A3
A4 & A5 I2C
An UNO with expander chips would work.
A Mega would be a good choice.
Also member @Crossroads sells a 1284P based board.
@larryd
Why expander boards? An 8 channel relayboard, isn't it binary code for the address? 3 I/O? A select switching between 2 such boards.... Then all other I/O can use the same pins.
@larryd
Okey. Not using so many different relay boards, I was guessing.
I will probably need a simple up, down left right keypad and menu + enter / back buttons, simply led to show it's powered on will be enough. I might need a sunlight sensor to prevent watering in bright sunlight and also some kind of water sensor so if i'm away for a long time it doesn't water if it's been wet but that's a bit far of for now.
Basically i'm after the capacity to control upto 24x 24v DC soloniod valves they draw about 300ma and will be on for about 30 mins max each. I was thinking of getting some heavy duty 24v automotive relays to contol the valves and then the relay board to switch these relays, a bit more complex but easier and cheaper to switch out a single relay with out having to get a new board.
I've found a few bits on eBay, how do i add the links to show you what i'm proposing?
Go on searching for cost effective relays resp. I/O effective boards. 300 mA is not much and most relays will handle that.
Also look for a 24 volt 10, 15 Amp powersupply.
There's a sixteen relay version too.
Those relay boards are really cheap even if i have to replace the whole board if 1 or 2 go wrong i had no idea they were that cheap?
This is what i've come up with so far, i was hoping someone could tell me this lot was compatible and would work together then i'll purchase it and start playing around with code, and see where we go.
why do i need to check the relays for a few 1000 cycles?
Also people talk about using a chain of shift registers to control multiple relay boards is this easy to do for a beginner?
No, adding shiftregisters, soldering and cabeling is not good for a beginner. Plug and play would be the best.
Check those relay boards for a logic voltage that hopefully is the same as the controller. Voltgage and current capability of the relays ought to be easy to verify. 24 volt, 300 mA....
Check how they are connected, direkt I/O, 8 pins or addressed by 3 pins.
jamesb123:
why do i need to check the relays for a few 1000 cycles?
Since these are inexpensive boards, it is best to make sure the relays will cut the mustard.
At once per second, 20 minutes should weed out any poorly manufactured mechanical components. ![]()
Okay, maybe 10 minutes is long enough, don't want to drive the pet dog crazy.
The TFT LCD Screen Module is probably adding a level of not needed complexity.
The 16 X 2 or 16 X 4 should be more than sufficient.


