Reducing 12V to 5V

The simplest circuit will be using a voltage regulator like LM7805. These regulators are very common.

However, it can only supply a maximum current of 1A and you will also need a heatsink.

It is simple to build: connect the 12V wire at the left most terminal of the IC, while looking at the inscription and with the pins down. Connect the 5V output for USB port at the right most pin. Connect the ground of your 12V supply and of your USB to the middle pin or to the heatsink. You may also add two capacitors like:

enter image description here

From Fairchild datasheet.

enter image description here


What you require for this application is a voltage regulator, to be more precise a step down voltage regulator.

Voltage regulators come in 2 types:

  • Linear
  • Switching

Linear:

A linear voltage regulator converts your voltage by dissipating the remaining as heat. What this means is that in your application the heat dissipated is

(InputVoltage - OutputVoltage)* Current Supplied = (12-5) * 1 = 7W!!!!

Now that is a large amount of heat that you will need to dissipate, so you will definitely need a heatsink and good airflow in order not to burn your regulator.

Switching:

Now a switching regulator works by switching states, this is way more efficient and dissipates way less heat. A switching regulator is the best option when your current draw is high.

What I would recommend for your application is buying a readily available switching regulator PCB that has all the components already soldered, all you need to do is connect the input supply, test the output till you get 5V and power your usb device.

Other References:

  • http://www.ti.com/lit/an/snva558/snva558.pdf
  • https://www.sparkfun.com/products/9370
  • http://www.aliexpress.com/item/10pcs-XL6009-DC-DC-Non-isolated-step-up-converter-replace-LM2577-dc-dc-module/1508297668.html ( i have personally used this and found it to be reasonably good)

While a linear regulator like the LM7805 may suffice a couple things need to be taken into account:

  • Power dissipation could be high, depending on your current needs. At 1A, you will be dissipating a bit more than 7W which, unless you install a heatskin, will fry your regulator in no time.

  • Even if nothing is connected to the 5V pin of the regulator there will be a leakage current that will eventually deplete your battery, given the time.

If you're serious about power consumption you may be better off using DC-DC converters that you can find at very low prices. Their efficiency is quite good.

Make sure you wire the USB port correctly.

Also, even if your charger provides a clean 5V output, not necessarily all devices will be able to charge from it. Some need a certain voltage on their D- and D+ pins.