I have a project that I am working on that uses a micro controller to control an electromagnet that I want to run with a 3.7 volt battery. I would like to reverse the polarization on the electromagnet to push and pull the magnetic fields to attract and repel a magnet (change poles). I understand that I need an hbridge to reverse direction of the polarity. I also understand that the h bridge can manipulate a higher voltage than what the microcontroller can supply.

My question is, How can I use the energy from the battery to spike to 12v on the supply voltage of the h bridge? The 3.3 volt is not enough energy to overcome the pole on the magnet. I tried with a 12v 2 amp power supply and the magnet flew across my desk ( this is the desired force). In the link below I am following this tutorial and design but they are using a 12v power supply. I would like to keep the power source singular.

I have researched inductors, capacitors, and even OP amps. My goal is to try to use the 3.7 battery that powers the microcontroller to increase the voltage/amps quickly and have the voltage available to the high input side of the hbridge and exclude a 12v power supply.I have been leaning towards an inductor but I am not sure. The voltage increase will only be for about 500 miliseconds to release a magnet.What should I use?

If there is a big fundamental that I am missing, I apologize.

Here is the setup so far: Following tutorial here: http://www.instructables.com/id/How-to-Control-an-Electromagnet-with-an-Arduino/

Arduino Uno or Teensy 3.1 (3.3v supplied by 500mah LiPo) Hbridge SN754410


  • 1
    \$\begingroup\$ Note: It's physically impossible to amplify power. You need 12W (12V * 1A), no matter what you try. If your power source cannot provide >12W, this will be physically impossible. \$\endgroup\$ Commented Dec 21, 2014 at 2:24
  • \$\begingroup\$ You're right, maybe I don't understand. I had the idea in my head that a coil, (in a car) could take 12v and increase the voltage to near 40,000 volts from 300mah, I was thinking that there was some sort of trade off in the Ohms law or something. \$\endgroup\$
    – Brad
    Commented Dec 21, 2014 at 2:42
  • \$\begingroup\$ There is, but the tradeoff is between voltage and current. That is, you can produce greater voltage and less current, or vice-versa. The product, though, is power, and that you can't diddle. \$\endgroup\$ Commented Dec 21, 2014 at 4:31
  • \$\begingroup\$ Further note: mah is Milliampere hours. If you draw 300 mA, your 300 mAH source will supply that for 1 hour. If you use 1 mA, the 300 mAH source will last 300 hours. if you draw 300*60 mA (e.g. 18000 mA, or 18 A), your 300 mAh source will last one minute (this is ignoring other things like the internal resistance of the source). \$\endgroup\$ Commented Dec 21, 2014 at 4:37

1 Answer 1


If your battery can provide about 5-6A at 3.7V then you can use a boost converter to increase the voltage to 12V.

It would have to be capable of providing your desired 1A output current as a bare minimum.

Basically your coil requires 12W (P=VI = 12V × 1A = 12W). You have to have a power source, at whatever voltage, that can provide that amount of power. No amount of magic will get 12W out of a power source that is only capable of, say, 5W.

Good batteries for this are Lithium Ion and their cousins. They can provide high currents for short periods of time.

A second option is to use multiple batteries in series. Four 3.7V batteries in series will provide 14.8V. Three would be 11.1V. If your coil will operate well enough at 11.1V then three would be ideal. You could take a tap off the + terminal of the lowest battery to power the Arduino so you don't get any losses from an inefficient regulator.

A further third option, if the coil only needs to be energised occasionally, would be to charge a capacitor up over time with a higher voltage. It basically uses a boost converter but with much less current. A capacitor is slowly charged to a higher voltage, then the entire charge is dumped into the coil in one go. This is basically how camera flash units work (the whine you hear is the capacitor charging).

  • \$\begingroup\$ Thanks for your answer. Unfortunately, I only have the choice between a 3.7v 500mah and 3.7v 850mah battery for size and mobility constraints. I would not have any issues with increasing the voltage of the battery because I could regulate the 12v power source down to 3-5 volts. But, I am trying to accomplish this with 3.7v polymer LiIo batteries. Is there a way to run Lithium Ion batteries in series to power the arduino but also combine the voltage when needed for the electromagnet? \$\endgroup\$
    – Brad
    Commented Dec 21, 2014 at 2:28
  • \$\begingroup\$ Thats a good idea. I could possibly use two batteries in series to charge the cap? I am assuming that there is a little bit of delay for the charge which is ok. But i am wondering if it is possible to use two batteries like this? I am trying to use these batteries here: sparkfun.com/products/341 \$\endgroup\$
    – Brad
    Commented Dec 21, 2014 at 2:49
  • \$\begingroup\$ I think I am down the right path now thanks! One more question, I understand the mah rating for a battery is the amount of energy in milliamps that the battery can supply in an hour. So, would 110 mah LiIo batteries in series be able to supply the wattage needed? Thanks again for you answers. They are very appreciated! \$\endgroup\$
    – Brad
    Commented Dec 21, 2014 at 3:08
  • \$\begingroup\$ @Brad - that's entirely dependent on the battery construction, there is no general answer. Realistically, I don't think there are any 110 mAH lipo batteries that can provide 6+ A without damaging them. \$\endgroup\$ Commented Dec 21, 2014 at 4:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.