1
\$\begingroup\$

I'm trying to control small, plastic 12V solenoid valves with an Arduino nano. I have an Arduino nano hooked up to a Sainsmart 4-Channel 5V Relay Module, and finally connected to the solenoid valves, which are powered externally with an AC to DC converter. The valves are controlling gas flow to tanks of seawater for a marine biology experiment. As such, I need the solenoid valves to open and close very quickly (on the order of tenths to hundredths of a second).

The problem is that after the solenoid valves fire, my Arduino resets and reinitializes, and this messes with the timing of gas flow. I've isolated the problem to the powered solenoid valves (the code, arduino, relays, and solenoids all work perfectly when the solenoids are unpowered. The second I plug them in, the problem resumes). I think that reverse voltage spikes are causing my arduino to reset, but am not entirely sure.

I've looked into adding flyback diodes, but heard that those slow down the relays and again, I need the timing to be very fast. Does anyone know if adding a diode will solve my problem, and if so, how much will it slow down the relays?

My knowledge in electrical physics is limited, so if you could keep your explanations to more basic language, I'd appreciate it. But ANY and all help would be welcome! Thank you!

\$\endgroup\$
  • 1
    \$\begingroup\$ Welcome to EE.SE. A schematic is better than words. You can add one in using the CircuitLab button on the editor toolbar. Double-click a component to edit its properties. 'R' = rotate, 'H' = horizontal flip. 'V' = vertical flip. Note that when you use the CircuitLab button on the editor toolbar an editable schematic is saved in your post. That makes it easy for us to copy and edit in our answers. You don't need a CircuitLab account, no screengrabs, no image uploads, no background grid. Add a link to the relay module datasheet too. \$\endgroup\$ – Transistor Jul 9 at 18:41
  • \$\begingroup\$ Classic problems ignoring lack of EMI immunity. Without schematic, photos and your research skills you are stuck. \$\endgroup\$ – Sunnyskyguy EE75 Jul 12 at 1:26
0
\$\begingroup\$

Using a zener diode should solve your issue while keeping the speed fast enough. Since solenoids have inductivity fast switching causes the solenoid do demagnetize into the circuitry. You should definetly use a flyback diode when working with induction load. Zener should do the trick well.

\$\endgroup\$
0
\$\begingroup\$

You're on the right track. Inductive loads, like solenoids, usually need a flyback diode to prevent voltage spikes when they are switched from the on state to off state.

Tenths to hundredths of a second isn't all that fast for electronic devices. I suspect you'd be fine with nearly any diode type. Even relatively slow diodes will still have a reverse recovery time measured in microseconds, and your switching speed is considerably slower than that.

Getting an oscilloscope on the solenoid power line should help confirm that this is your root cause. It could also help you determine a specific diode to install based on the size and shape of the overshoot.

\$\endgroup\$
  • \$\begingroup\$ This post has a similar question, and some good answers: electronics.stackexchange.com/questions/26944/… The zener diode is a much faster way to turn off solenoids, if your circuit can handle it. \$\endgroup\$ – David Drysdale Jul 9 at 21:41
  • \$\begingroup\$ Actually, The recovery speed of the diode is not what determines the time the solenoid turns off. v = L di/dt. A flyback diode only put as reverse voltage of whatever the diode is rated at, and is actually a poor choice generally speaking for dissipating the magnetizing current, and it is why many relay manufactures are now recommending other types of coil suppression. Check this link out. \$\endgroup\$ – David Drysdale Jul 9 at 21:50
0
\$\begingroup\$

Consider that you most likely already have flyback diodes in the relay module, and you don't seem to notice that your relays are "slow". Your valves won't appear any slower with flyback diodes unless the EM field decay is the limiting factor, as opposed to mechanical movement, and I doubt that will be the case.

\$\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.