I'd like to be able to throw a relay and solenoid from an AVR.

For this project, I'll occasionally need 12-36V for maybe 250ms. I found someone having done something very similar using the following circuit:

7 caps throwing a relay

My (somewhat weak) understanding of capacitors leads me to believe that a sufficiently large capacitor charged with a 5V source at low current might be able to put out a lot of current at 5V, but won't necessarily be able to put out higher voltage.

  • \$\begingroup\$ In your diagram you have labelled q1 twice, this might be correct but if it is then what is q2? Can you relabel them in the question please? \$\endgroup\$ – Dean Nov 21 '11 at 23:43
  • \$\begingroup\$ Sorry, that's not my diagram. I pulled it from the page linked above. \$\endgroup\$ – Dustin Nov 22 '11 at 1:44
  • \$\begingroup\$ @Dean, I re-labeled the image so that the transistors' Darlington configuration is more obvious. \$\endgroup\$ – W5VO Nov 22 '11 at 1:58

What you are describing is commonly used for flash bulbs where you need a lot of current, but only for a short period of time. You limit the rate at which the capacitors can be charged as to not pull too much current from your source, but then the capacitors are able to provide a lot of current for a short time. This is the reason you have to wait a bit between taking pictures with a flash.

The concept still applies when you are wanting to apply a voltage greater than your source except you need a way to step up the voltage. For this I would recommend a DC-DC boost converter. The boost converter is also recommended in this question for high current applications. You can learn more about the boost converter in any of these questions.


Your intuition is correct about capacitors: a sufficiently large bank of capacitors charged to an appropriate voltage would be able to power a solenoid for a brief period of time. You are also correct in that simply charging capacitors with a 5V power supply will not result in a higher voltage.

You would need a boost converter in order to charge up the capacitor to the 12-36V needed for the solenoid to activate.

  • \$\begingroup\$ Thanks for the validation. Electronics are just beginning to make sense to me. I'm still having a bit of trouble visualizing voltage. \$\endgroup\$ – Dustin Nov 21 '11 at 19:51
  • \$\begingroup\$ @Dustin my answer here might help you understand voltage a bit better. And if that still doesn't help, feel free to ask and I or someone else can give other illustrations to help you understand voltage. \$\endgroup\$ – Kellenjb Nov 21 '11 at 20:09
  • \$\begingroup\$ If you charged 3 capacitors with 5V, wouldn't you be able to get an output of 15V though? (maybe a boost converter isn't required?) \$\endgroup\$ – Earlz Nov 21 '11 at 21:27
  • \$\begingroup\$ @Earlz I don't remember what the circuit is called, but there is one that is capable of doing that. The difficulty is you essentially charge them in parallel but then have to switch them to being in series when you go to discharge them. \$\endgroup\$ – Kellenjb Nov 21 '11 at 22:09
  • \$\begingroup\$ @Kellenjb - that sounds like a charge pump to me. \$\endgroup\$ – Oli Glaser Nov 21 '11 at 22:45

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.