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