Go Down

Topic: How to replace solenoid power source with capacitor (Read 4363 times) previous topic - next topic


Sep 08, 2014, 07:26 am Last Edit: Sep 09, 2014, 04:59 am by Primat3 Reason: 1
Need some help with replacing the power source for a 12v 0.6A solenoid for a 5v driven capacitor (circuit attached).  Main point is what capacitor, second how do you wire it to drive everything from the duino. The solution is welcome, but I would much appreciate if the calculations could be made explicit (teach a man to fish and all that).

Edit: Corrected schematic.


Sep 08, 2014, 07:51 am Last Edit: Sep 10, 2014, 05:35 am by raschemmel Reason: 1
Your schematic is wrong.
see this schematic for correct wiring.

Leave the power plug out of the schematic for now since it just confuses things.

Secondly, a capacitor is not a power source. It is a energy storage device. You can't run anything off it because it will simply discharge the circuit.. You can't run a 12V 0.6 A solenoid off 5V , with or without the cap.
Where did you get the schematic ?
Where did you get the idea you could run that solenoid off 5V ?
How much experience do you have with electronics ?


You are right. I made the schematic late last night and drew the solenoid/diode on the wrong side of the transistor. I do have it setup as an emitter follower switch, I'll edit the schematic when I get back home.

Second: I know a capacitor is a energy storage device. Sorry if I was not clear enough. The question is: how do I use a capacitor (and how do I calculate what capacitor to use) to run the 12V 0.6A solenoid for 1.5 seconds (no more often than every 5 seconds) from the duino's 5V.

To your other questions:
-I made it.
-Makes sense from what I know about capacitors, which is admittedly not that much. Hence the question.
-None. This is my first project, but I do my homework. My only knowledge of electronics so far comes from reading an introductory book (Practical Electronics For Inventors. Highly recommended BTW. http://www.amazon.com/Practical-Electronics-Inventors-Paul-Scherz/dp/0071771336) and researching on my own.

Thanks for the help.


Sep 08, 2014, 11:44 pm Last Edit: Sep 09, 2014, 06:59 am by raschemmel Reason: 1

I do have it setup as an emitter follower switch,  

This is the wrong configuration for driving a solenoid. Check it yourself. Google transistor solenoid driver and ALL of the examples on the web look like the one I posted. You need to change it. The transistor should SINK the current , NOT SOURCE it.

Second, Ohms Law P (W) = I x V

If the solenoid is rated for 12V @ 06A, that means the power rating is P = I x V = 0.6 A x 12V = 7.2 W.
The solenoid coil is not made to operate at 5 V so it is unlikely that is going to work, but if it did, by Ohms Law,
it would draw I = P/V = 1.44 A @ 5 V (If it works at all at that voltage).
The arduino onboard regulator is rated for 800 mA @ 5V so there is no way it is going to supply 1.44 A to the solenoid.

What is the part number of the transistor in your schematic ?

Highly recommended BTW. http://www.amazon.com/Practical-Electronics-Inventors-Paul-Scherz/dp/0071771336) and researching on my own.  

Thanks for the reference , maybe someone else can use it. I have BS of Electronic Engineering Technology from DeVry Institute so I don't think I need it.

You don't need a capacitor. If the regulator can't supply the current , the capacitor is not going to supply it. The solenoid inductance (which BTW is UNKNOWN) will discharge the cap if the regulator cannot source the needed 1.44 A. If you had a 5V supply that could source 1.5 A, AND the solenoid would work at 5 V (which we don't know) then you still would not need the cap,
(If you changed the schematic for the one I posted ).


Sep 09, 2014, 12:33 am Last Edit: Sep 09, 2014, 11:26 am by dc42 Reason: 1
In principle you could use an inverter or diode-capacitor ladder to charge a capacitor to 12V from the 5V supply, and store enough energy in the capacitor to power the solenoid for 1.5 seconds. But there are at least two problems with this:

1. If you turn the solenoid on for 1.5 seconds every 5 seconds (so it is off for 3.5 seconds), then the average current it takes from 12V will be 0.8 * (1.5/5) = 0.24A. Even if your inverter were 100% efficient and you used a capacitor to smooth out the current, to generate 12V @ 0.24A from 5V, the drain on the 5V supply would be (12/5) * 0.24 = 0.576A. That's still quite a lot of current.

2. You will need quite a large capacitor. Suppose you want the capacitor voltage to drop no more than 2V (from 12V to 10V) during the 1.5 seconds that the solenoid is on. If we make the approximation that the current remains at 0.8A for the whole of that 1.5 seconds, then the value of the capacitor you need it:

C = (I * t)/V = (0.8 * 1.5)/2 = 0.6 Farads. So you need a supercapacitor. And it has to be rated at more than 12V, which means you need several in series (because supercapacitors are generally rated at much lower voltages than 12V).

Powering a solenoid from a capacitor bank is only practical if the solenoid needs to be powered only occasionally (i.e. very low duty cycle), and only for a very short period of time.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.


Sep 09, 2014, 01:12 am Last Edit: Sep 09, 2014, 01:29 am by raschemmel Reason: 1
0.6 Farads  

(That's 600,000 uF ) (since 1,000,000 uF = 1 Farad)
You don't want to know how much that would cost.

Thanks dc42. ,
We did cover that subject at DeVry but since I haven't used that since then I forgot it.
Do you know any links that explain the equation you used in some detail ?
this one :
C = (I * t)/V = (0.8 * 1.5)/2 = 0.6 Farads.
(C =I*t/V)


Sep 09, 2014, 02:33 am Last Edit: Sep 09, 2014, 05:00 am by Primat3 Reason: 1
Thank you both for the explanation. It sounds like I am going down the wrong track here so let me state the problem to see if anyone can point me to a more feasible solution. What I am trying to accomplish, in order of priority, is:

1) Activate the solenoid for 1.5 sec on a low duty cycle (around 30 times/day) but I want it to be responsive if the user F'ed up and needs to activate it again relatively soon (5-10 sec?).
2) Of course I need to keep the cost low (don't we always?).
3) Need to keep the size to a minimum (a volume bigger than a 8-AA pack for powering the solenoid starts to get unwieldy).

Raschemmel: The transistor is in the configuration you posted. Isn't that called an emitter follower configuration? or did I get it backwards? I am using a TIP 120 (http://www.adafruit.com/datasheets/TIP120.pdf) but nothing says I can't change it. I tried running a 12v battery pack (8 AAs) as power source through the transistor, but no dice. Not enough power to activate the solenoid.

The book recommendation was for other newbies out there reading this thread.

The correct (I hope) schematic is attached. (It does not show the power source to the arduino).
I should add the setup works fine using my PSU's 12V out.

Edit: Corrected schematic


I might get that Soundstream just to play with it  :D but at that size (and price) it does not work for this project.


The problem is your connection to the solenoid power supply.
Take a good look at the following symbol and then tell me which terminal of the battery your solenoid is connected to (+ or - ?)

Didn't see the ± in the symbol  :% The solenoid IS connected to the positive terminal.

The negative ("-") terminal of the battery should be connected to ground. (not your solenoid)

How so? I have the negative terminal from the battery connected to the solenoid's negative.

Are you telling me that you measured 12V across your AA battery pack terminals and you connected the NEG terminal of the SOLENOID to the NEG terminal of the battery pack and then briefly touched the  POS terminal of the solenoid to the POS terminal of the battery pack and the solenoid DID NOT ENGAGE ? Is that what you are telling me ?

Yes that's exactly it. Though now you made me doubt my previous experimentation so I am off to try that again (and measure the volts/amps)... Back in a few.



... Ok I feel like a complete idiot... The full pack gives 11.89v at ~9amps and pulls the solenoid without any problem. Not sure how I messed it up the previous (multiple) times.

The TIP 120 wouldn't have any problem running that load right?


Ok so this is what threw me off: The circuit works fine from the PSU, the solenoid works fine straight from the battery pack, but when I switch the PSU for the battery pack I don't get the solenoid to pull. What gives?


Now you have me even more worried.
When you said this:

The full pack gives 11.89v at ~9amps  

did you actually mean this :

The full pack gives 11.89v at 0.9 A  (900 mA)


Missing Ground?
(PSU - power supply unit)

"Who is like unto the beast? who is able to make war with him?"
When all else fails, check your wiring!


Thanks for correcting the OP's schematic , but if you look at his schematic and look at yours it is clear that the problem was more than a missing ground. The NEG battery terminal was connected to the POS terminal of the solenoid in the OP's schematic, plus there was nothing at all connected to the POS battery terminal. What you did was remove the NEG BAT terminal from the solenoid and connect it to ground where it belongs and connect the POS BAT terminal to the solenoid where the NEG BAT terminal had previously been connected. The schematic is correct now. Can you please explain to the OP why his circuit would not work the way he had it shown in his schematic ?


Sep 09, 2014, 06:11 am Last Edit: Sep 09, 2014, 06:13 am by Primat3 Reason: 1
The schematic is correct for wiring to the 12V out of a 300 Watt Power Supply Unit (PSU). Now, I understand you that to replace the PSU for the battery pack, I need to run the battery's negative to ground. How? the arduino's? shoving it up my ass? the schematic is NOT for the battery pack, that's were I am trying to get to. The schematic IS for the PSU and it DOES work.

I appreciate your help Raschemmel, though not your tone. As a side note advise, I suggest you check your temper. It'll bring you nothing but trouble, and in some places would get you punched in the face before you knew what happened. If you are willing to help out newbies, you should be expecting some level of WTF on the responses.  As I stated from the get-go, this is my first project, and while I do my own research and don't go around asking others to solve my problems, if I am stumped, there is obviously something I am missing.

Go Up