# Relay Solution for Controlling Pumps with Arduino

I'm working on a hydroponics project that requires me to run 10 pumps for 15 seconds every 2 minutes. I was able to set this system up by running a relay board off of an Arduino, but the relays were mechanical (and fairly cheap) and within 13 days they had started to break down. I've had to switch out the relays to get the pumps working again, but I'm almost out of relays to switch. From my research, it looks like solid state relays might be the way to go. So, my question is: are there solid state relays that can handle 12VDC, 5A and reliably switch - on average - once a minute for extended periods of time? And if so, how can I control them using the Arduino board I already have (if I have to buy a shield or anything like that, that's fine). I currently have a power supply that can supply 12VDC and 10A max, so I'd like to continue using it; but if I have to buy a new power supply, I can do that too.

Thanks!

• Why use a relay? A MOSFET will be much simpler. – Nick Johnson Jul 20 '15 at 15:31
• Alright. Will a MOSFET be durable enough for this problem? I'm sure I can look up how to wire them if they will work. – Abro Jul 20 '15 at 15:47
• Basically a MOSFET will not wear out like a mechanical device. In a SMPS it's not unusual to switch it more than a 100,000 times per second over years... – christoph Jul 20 '15 at 16:03
• For the best reliability, choose a MOSFET or SSR that will run cool (low voltage drop). Thermal fatigue failure modes make cycling over 10's of seconds kind of worst-case. But anything at all that works will last better than what you are getting out of your relays! – Spehro Pefhany Jul 20 '15 at 17:25

You can use a logic-level gate MOSFET such as the IRLB8314PbF.

simulate this circuit – Schematic created using CircuitLab

The resistor R2 pulls the MOSFET gate low if the I/O goes high-Z. R1 limits the GPIO current.

This part has a maximum Rds(on) of 3.2m$\Omega$ with 4.5V or better drive, so at 5A it will barely get warm (80mW -> about 5°C rise) even without a heatsink. Only about \$1 each in 10's. The diode D1 is to absorb the inductive energy in the motor winding when the MOSFET switches off. It is rated at 3A continuous, which is more than adequate to handle brief 5A spikes.

• Thanks, Spehro! This circuit looks good. Will this function alright if my source is 12V? – Abro Jul 20 '15 at 20:18
• @Abro Yes, it's a 30V MOSFET so enough margin at 12V too. – Spehro Pefhany Jul 20 '15 at 20:29
• Sweet! This really helps a lot! One more question before I'm fully satisfied: would a capacitor be useful to help protect against back-emf from the pump? The diode's already there, so is that enough protection? – Abro Jul 20 '15 at 20:40
• @Abro the diode is enough. A capacitor across the high power source (one) might be useful, and twist the wires to the source together if they are long. – Spehro Pefhany Jul 20 '15 at 20:41
• P.S. another really good reason is that if the layout is not perfect and there is a bit of inductance in the source, the gate pin can be driven below ground with substantial current (load current through maybe 5nF), which can be enough to latch up the micro. I've seen it happen with IRF gate drivers and this level of load current. – Spehro Pefhany Jul 21 '15 at 13:06