Prevent Solenoid from Sagging Voltage - Page 1
Forum section: electronics / projects

author: craigfoo
author_rank: Contributor
timestamp: October 01, 2013, 02:31:20 pm
content: I have an ATmega2560 MCU that controls a FET that controls a solenoid. Everything runs off the same 5V and when I actuate the solenoid it drags my 5V down to 4.1V and trips the Brown-Out reset circuit of the MCU and resets. I put a series resistor inline but the "punch" on the solenoid is greatly reduced because it needs that initial slug of current to get moving.The 5V supply has more than enough current to supply all my electronics so I'm hoping there is an easy way to prevent this from happening. I can't change the Brown-Out reset threshold because the operating voltage for the MCU is 4.5V-5.5V and I don't want to keep dipping the voltage below those levels fearing that I may corrupt the EEPROM.I also have 24V available but my solenoid is a 5V solenoid (which I need to keep) and even at a short duty cycle, I'm afraid of damaging the solenoid.Thoughts?

author: free_electron
author_rank: Super Contributor
timestamp: October 01, 2013, 02:55:57 pm
content: Provide a local buffer capacitor for the cpu.Or put a bigger buffer cap overt he main supply. Like 1000uf .I prevent stuff like this from happening by feeding the cpu from its own power branch. You can do the following trick :Take a shottky diode, or regular diode if you do t have a shottky, go from 5 volt to anode.Go from carhode to your supply of the cpu.Put a 220uf cap from cathode to groundWhenever there is a current spike the cpu will not see it. The diode blocks the capacitor charge from flowing into the solenoid. So, the charge in the capaciotr can only be used by the cpu.That solves the problem.

author: DutchGert
author_rank: Frequent Contributor
timestamp: October 01, 2013, 06:35:27 pm
content: Quote from: free_electron on October 01, 2013, 02:55:57 pmVery simple but very nice

author: Poe
author_rank: Frequent Contributor
timestamp: October 02, 2013, 03:22:26 pm
content: Quote from: craigfoo on October 01, 2013, 02:31:20 pmA 5V solenoid should not 'arc' when fed with 24V. The enamel is likely rated at >40V. The only way to damage it is excessive heat dissipation. Maybe just power the solenoid from the 24V source with a low enough duty cycle? That would reduce the 5V regulator and caps requirements... and solenoid speed would slightly improve. No additional components needed either.Just some questions:Where did you add the resistor? How much energy does your FET take to turn on? If you are directly connecting a huge gate capacitance to an IO line, the processor might be reseting due to that 'short'. Have you looked at it on the scope to see where in the solenoid's current ramp it resets? If it resets before the solenoid gets halfway up its current ramp then that's likely a good sign it's not the solenoid current pull. Does your layout allow for an efficient exchange of this energy from bypass cap to FET gate?Isolating the uP's supply with a diode and it's own supply cap is also a good idea I have used many times. Especially if that's easier or your worried about the software hanging up and frying your solenoid.

author: craigfoo
author_rank: Contributor
timestamp: October 02, 2013, 06:51:19 pm
content: Great answers! Thanks! Unfortunately I'm working with an OTS board and I'm adding all my "fixes" to the connector that interfaces with the solenoid. The uP with diode and cap solution sounds awesome and I wish there was an elegant way to do it. Whatever fix works, I have to repeat it on 120 boards so white wiring each board isn't really feasible.I've added 3000uF to the 5V right at the connector for the solenoid and I still get my dip in voltage. I'm looking at the dip on the scope and it drops down to 4.2V. I know the FET is ok because the control works fine without the solenoid attached.Maybe I'll see if I can burn up a solenoid with 24V

author: dannyf
author_rank: Super Contributor
timestamp: October 02, 2013, 07:12:35 pm
content: Put a series diode from the 5v source to your mcu and on the cathode side put a capacitor.

author: dannyf
author_rank: Super Contributor
timestamp: October 02, 2013, 07:15:48 pm
content: QuoteApparently, facts dispute that.

author: Rufus
author_rank: Super Contributor
timestamp: October 02, 2013, 07:20:48 pm
content: Quote from: craigfoo on October 02, 2013, 06:51:19 pmYour 5v supply can either provide enough current to drive the solenoid or it can't. There is no turn on surge it is an inductor the initial current is zero.If the 5v supply can provide enough current to hold the solenoid in then you could put a resistor in series to limit the current to that amount. You could place a large capacitor after the resistor to provide additional solenoid current for a short time which might be enough to pull it in. Charging that capacitor when you first turn on will likely overload the power supply and possibly cause problems. After turning off the solenoid you may not be able to turn it on again before the capacitor has had some time to charge.

author: David_AVD
author_rank: Super Contributor
timestamp: October 02, 2013, 08:57:33 pm
content: Quote from: craigfoo on October 02, 2013, 06:51:19 pmDoes "OTS" = Arduino in this case?

author: SeanB
author_rank: Super Contributor
timestamp: October 03, 2013, 04:52:38 pm
content: How about a separate 5V supply for the solenoid, or a series resistor with a capacitor to provide current to the coil fed direct from the 24V supply.

author: David_AVD
author_rank: Super Contributor
timestamp: October 03, 2013, 09:06:35 pm
content: Another issue could be poor wiring routing causing the micro to see those current spikes from the solenoid. A picture of the current setup would help.

author: Rudolfo
author_rank: Contributor
timestamp: October 04, 2013, 03:05:09 pm
content: There is the way to connect a 5V relay to 24V by using current PWM methode, like described here: One Relay for multiple Supply Voltageshttp://www.eetimes.com/document.asp?doc_id=1273003. A newer solution is based on the iC-GE (http://www.ichaus.de/product/iC-GE).