Author Topic: Prevent Solenoid from Sagging Voltage  (Read 3550 times)

0 Members and 2 Guests are viewing this topic.

Offline craigfooTopic starter

  • Contributor
  • Posts: 20
Prevent Solenoid from Sagging Voltage
« on: October 01, 2013, 02:31:20 pm »
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?

 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8550
  • Country: us
    • SiliconValleyGarage
Re: Prevent Solenoid from Sagging Voltage
« Reply #1 on: October 01, 2013, 02:55:57 pm »
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 ground

Whenever 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.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline DutchGert

  • Frequent Contributor
  • **
  • Posts: 257
  • Country: nl
Re: Prevent Solenoid from Sagging Voltage
« Reply #2 on: October 01, 2013, 06:35:27 pm »
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 ground

Whenever 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.

Very simple but very nice
 

Offline Poe

  • Frequent Contributor
  • **
  • Posts: 250
Re: Prevent Solenoid from Sagging Voltage
« Reply #3 on: October 02, 2013, 03:22:26 pm »
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?

A 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.

 

Offline craigfooTopic starter

  • Contributor
  • Posts: 20
Re: Prevent Solenoid from Sagging Voltage
« Reply #4 on: October 02, 2013, 06:51:19 pm »
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  ;D
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Prevent Solenoid from Sagging Voltage
« Reply #5 on: October 02, 2013, 07:12:35 pm »
Put a series diode from the 5v source to your mcu and on the cathode side put a capacitor.
================================
https://dannyelectronics.wordpress.com/
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Prevent Solenoid from Sagging Voltage
« Reply #6 on: October 02, 2013, 07:15:48 pm »
Quote
The 5V supply has more than enough current to supply all my electronics

Apparently, facts dispute that.
================================
https://dannyelectronics.wordpress.com/
 

Offline Rufus

  • Super Contributor
  • ***
  • Posts: 2095
Re: Prevent Solenoid from Sagging Voltage
« Reply #7 on: October 02, 2013, 07:20:48 pm »
I've added 3000uF to the 5V right at the connector for the solenoid and I still get my dip in voltage.

Your 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.
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2863
  • Country: au
Re: Prevent Solenoid from Sagging Voltage
« Reply #8 on: October 02, 2013, 08:57:33 pm »
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.

Does "OTS" = Arduino in this case?
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16366
  • Country: za
Re: Prevent Solenoid from Sagging Voltage
« Reply #9 on: October 03, 2013, 04:52:38 pm »
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.
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2863
  • Country: au
Re: Prevent Solenoid from Sagging Voltage
« Reply #10 on: October 03, 2013, 09:06:35 pm »
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.
 

Offline Rudolfo

  • Contributor
  • Posts: 30
Re: Prevent Solenoid from Sagging Voltage
« Reply #11 on: October 04, 2013, 03:05:09 pm »
There is the way to connect a 5V relay to 24V by using current PWM methode, like described here: One Relay for multiple Supply Voltages http://www.eetimes.com/document.asp?doc_id=1273003 . A newer solution is based on the iC-GE (http://www.ichaus.de/product/iC-GE).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf