solenoid valves - Page 1
Forum section: electronics / beginners

author: Xpendable
author_rank: Contributor
timestamp: November 05, 2014, 10:44:15 pm
content: I'm working on a project that will use an ATMega32u4 to control up to (12V solenoid valves used for pneumatics. I use opto-isolated relay modules from SainSmart to switch the solenoid valves on and off, and I use a separate 5V voltage regulator just for powering the relay switching current. I power the whole circuit and the 8 solenoid valves using a 12V 3A power supply. I know that when the solenoids energize and de-energize (especialy when switching several at the same time), it can cause some voltage (or do I mean current?) to backfeed to the 12V power supply. The power supply doesn't like this and has some sort of safety measure that resets it, causing the ATMega32u4 to reset. I can avoid this problem entirely by powering the solenoids separately with their own 12V power supply. But... how can I solve this problem using only a single 12V power supply? I think the answer may be a diode(s) on the supply lines going to the solenoid valves. How would I know which diode or diodes to use?

author: Andy Watson
author_rank: Super Contributor
timestamp: November 05, 2014, 11:03:54 pm
content: Place a diode across each solenoid, cathode towards the positive. The diode needs to be able to withstand the operating voltage of the solenoid (12V) and the be able to conduct the operating current of the solenoid (3A/8 = 375mA). Something like a 1N4001 should be ample.Adding the diode will conduct the back-EMF/kick-back and the energy will be dissipated in the resistance of the coil and diode. It will also slow down the release of the solenoid (because the current continues to flow via the diode).

author: ludzinc
author_rank: Unknown
timestamp: November 05, 2014, 11:21:24 pm
content: It could be a case of a sagging rail. The solenoids may momentarily drag the 12V rail down (what power rating is your 12V supply?) far enough that your 5V rail also sags and your micro then resets (brownout).Isolate your 5V regulator from the 12V rail:From 12V feed a bulk storage cap via a diode (100uF, maybe more depending on how much power you are pulling from your 5V rail). When the 12V sags the diode prevents the solenoids from draining your bulk cap.The cap then supplies your 5V regulator and you don't brown out.

author: Xpendable
author_rank: Contributor
timestamp: November 06, 2014, 01:05:09 am
content: Quote from: ludzinc on November 05, 2014, 11:21:24 pmSo what constitutes a "bulk storage cap"? Something like this?http://www.digikey.com/product-detail/en/EMVE160ADA101MF55G/565-2204-1-ND/757365I do think it's very possible that the cause is sagging rails. I do have a scope... I should actually use it to find out for sure!

author: Xpendable
author_rank: Contributor
timestamp: November 06, 2014, 01:08:49 am
content: Quote from: Andy Watson on November 05, 2014, 11:03:54 pmHmm... didn't realize the solenoid release would be slowed. That's actually potentially an issue. The application is for pneumatic halloween props where rapid fire switching of the solenoids is sometimes needed. Do I need a separate diode on each solenoid, or could I get away with just having a big enough diode behind a screw terminal where the solenoids would get their power from? I guess that may be hard to predict without knowing more about the solenoids.

author: Andy Watson
author_rank: Super Contributor
timestamp: November 06, 2014, 01:34:51 am
content: Quote from: Xpendable on November 06, 2014, 01:08:49 amTry it. It might still be quick enough - we're talking fractions of a second, not hours. There are other options to regain the speed, but we're starting to ramp-up the complexity.QuoteYes, one diode per solenoid circuit.

author: Richard Head
author_rank: Frequent Contributor
timestamp: November 06, 2014, 06:36:50 am
content: If you want a faster solenoid release time then use a 12V Zener diode in series with the 1N4007. It will make a big difference to the release time.

author: Seekonk
author_rank: Super Contributor
timestamp: November 06, 2014, 01:35:54 pm
content: Look at the app notes for a LM1949, it is a good read. I wouldn't call your application fast. I had a glue project where I was driving 6V valves with 60V. If I remember it was 2ms on and 2ms off continuous.

author: Xpendable
author_rank: Contributor
timestamp: November 06, 2014, 02:34:28 pm
content: Interesting. I limit the state changes to 50 ms resolution for my 8 relays / solenoids, meaning that they will never switch states more than 20 times a second. Definitely a lot slower than fuel injectors!

author: Xpendable
author_rank: Contributor
timestamp: November 06, 2014, 06:37:39 pm
content: I did some experimenting with my scope (Rigol DS1102E) and captured what happens when I use the same 12V power supply to power the micro and the solenoid. A single solenoid is not enough to reset the micro, but it's enough to observe some interesting behavior with no protection from the flyback voltage (is that the right term?) I probed the 12V input from the power supply and the 5V output from the micro's on-board 5V voltage regulator. I'm currently using an Arduino Micro as test (which uses the ATMega32u4 which I will be using in my project). Here's what I observed:12V rail: Vmax hits 22.4V spikes and shows drops to below 2.23 volts.5V output from Arduino Micro: spikes above 7.4 volts and drops below 2.23 volts.Now I'll try some caps and diodes and see what happens.EDIT: I connected a 1N4001 between the 2 terminals on the solenoid and as expected, I see no spikes or drags of any kind on either the 12V or the 5V. I was hoping that I could integrate the diode directly on my PCB, but I don't think I can do that. Since the solenoid is being switched by an off-board relay module (that accepts TTL control), the diode doesn't work because the contact gets broken when the switch is off. So the diode really must be upstream on the solenoid itself. Am I right?

author: EEMarc
author_rank: Regular Contributor
timestamp: November 06, 2014, 07:25:41 pm
content: It is the inductive kick caused by the collapsing magnetic field. The voltage spikes until current conducts one way or another sometimes damaging whatever gets in it's way. It is energy limited so the higher the voltage such as Richard's Zener, the faster the magnetic field will collapse faster. An anti-parallel diode or TVS near the solenoid is the easiest and usually the lowest noise way. Otherwise giving the current a path to flow to go will also work.Beyond that, it is the physics of the solenoid that limit the operation. A fuel injector is a small, short throw, low mass solenoid designed for very fast operation. I think they get an assist for closing with the fuel pressure as well. Heavier solenoids with weaker return springs, a longer throw, and weaker magnetic force will take longer to open and close. A stronger return spring, and a higher current for pulling in the solenoid will help improve the speed.