0
\$\begingroup\$

I'm trying to create a smarter controller for my hydroponic systems. I have an arduino controlling a sainsmart mechanical relay. The load on the relays are 24 VAC orbit sprinkler valves. Everything is powered from the same 120VAC circuit using different wall wart transformers.

The problem is that 30% of the time the arduino resets when a valve is triggered. This happens whether or not the relay board is fully optically isolated or not. But, this does not happen when the arduino is powered off a 9 volt battery.

I'm guessing that the relay triggering is sending power spikes into 120VAC.

Should I setup a snubber circuit, and if so, what are good specs? Should I ditch the mechanical relay in favor of the below SSR?

The mechanical relay board: http://www.sainsmart.com/8-channel-dc-5v-relay-module-for-arduino-pic-arm-dsp-avr-msp430-ttl-logic.html

The solid state relay board: http://www.sainsmart.com/8-channel-5v-solid-state-relay-module-board-omron-ssr-4-pic-arm-avr-dsp-arduino.html

\$\endgroup\$
  • 1
    \$\begingroup\$ It sounds like the sudden load of the sprinkler is causing the 120V power to sag momentarily. How is the Arduino board powered currently? Maybe more capacitance on the Arduino would help, or a diode followed by a bulk capacitor to hold up the input Voltage during line power droop. \$\endgroup\$ – mkeith Dec 17 '14 at 16:53
  • \$\begingroup\$ That's kinda what I was Guessing. The ardurino is powered by a 12V 2A power brick. \$\endgroup\$ – Dwight Dec 17 '14 at 20:10
  • \$\begingroup\$ What size diode and capacitor would work to hold up the 12v circuit? \$\endgroup\$ – Dwight Dec 18 '14 at 23:14
1
\$\begingroup\$

Probably the 120V is sagging when the relay load turns on. You might be able to fix this with 120V wiring improvements. It sounds like a bad condition to begin with.

Another option is to use a diode and cap to hold up the 12V rail during interruptions. To solve this problem analytically, you would want to know:

  1. How long is the interruption on the 12V output
  2. What voltage drop from 12V is allowable before the system will not function reliably
  3. How much current is consumed by the load

A diode (Schottky) which might work is the SR202. I found this on digikey doing a quick search. Other options will work also. Make sure the diode can handle the normal load current.

The way to choose the cap is as follows:

  • dt = time of interruption
  • i = current consumed by load during interruption
  • dV = maximum voltage drop board will tolerate.
  • Vf = drop across diode due to load current

C = i * dt / dV

A note about dV: the diode Vf affects dV. When you calculate the maximum voltage drop, you need to consider that the starting point is 12V - Vf. So if Vf is 0.3V, you will be starting from 11.7. If the board works down to 9V, then dV = 11.7 - 9 = 2.7V

Round up or tack on a little extra capacitance for margin. When you calculate the required capacitance, you will see whether it is practical to solve the problem this way.

If you don't know any of the required information, and you can't easily obtain it, you could just try bigger and bigger capacitors until the problem goes away or you give up. In that case, I would start with 220uF aluminum electrolytic. Make sure the voltage rating is high enough. I would probably just use a 20V or 25V capacitor. If you find a value that works, you might want to go up a little bit from there to give yourself margin. If the capacitance value becomes ridiculous, you should probably consider another solution. Large capacitors can cause large inrush current when the power supply is first connected, and this can lead to other problems.

\$\endgroup\$
1
\$\begingroup\$

My guess is that the spike that often occurs when the relay driving a solenoid changes state. Note that I'm being careful how I say that: most often, the spike occurs when the relay opens and the AC waveform is at just the right point. But relay contacts can bounce also when closing and that also leads to transient spikes.

For me, the cure is simple. Just put a small 35V varistor across each solenoid coil, right at the solenoid. We use Epcos S07K35 from Digikey part number 495-4376-ND

\$\endgroup\$
1
\$\begingroup\$

I solved the issue of the arduino rebooting by sequencing the on/off of each relay with a delay of 250ms. The issue only happened when triggering 2 or more relays at the same time. I'm sure a RC snubber would have worked, though. 2 months now with no issues.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.