DISCLAIMER: I know nothing of electrical engineering I just seen this as the best fit category for my question.

I have a solar panel that is being run to a controller switch (for lack of a better name) the controller switch then has a hookup for a battery and a hookup for output. I have the battery connected and its supplying 12V - 12.8V to the output.

I want to hook up a female USB end to the the output. But I know that a USB port should only provide around 5V.

Before I had the controller and battery I had the solar panel hooked directly up to the guts of an old cigarette lighter phone charger. It worked great. But when I tried to hook up that same little circuit board to the output of the controller it just arced and so I removed it.

Have no idea what I'm doing wrong here. I hooked a voltage meter to the output and sure enough, 12V. Hooked a LED light up to it and it lit up real bright. But whenever I hook up that little circuit it arcs and if I hook up the circuit board from the inside of a USB wall charger... Nothing, no power coming from the USB port (measured with voltage meter).

  • 3
    \$\begingroup\$ Precisely what is your question? \$\endgroup\$
    – Andy aka
    May 3 '14 at 13:42
  • \$\begingroup\$ Sorry, probably could have worded that a little better. I meant to ask what I could use to drop the voltage coming off the output From 12v down to 5v. No worries though, Cornelius gave me good info on the matter with some pretty good diagrams and I couldn't be happier with his answer. \$\endgroup\$
    – w0lf
    May 3 '14 at 16:14
  • 2
    \$\begingroup\$ what current do you need at 5 volts. There might be a case for avoiding the 7805 regulator. If 1 amp is needed, there will be 7 watts dissipated by the 7805 A's heat, whereas if you used a buck converter, dissipation will be about 0.5 watts because they are much more efficient but will cost maybe $5 compared to $1 for the 7805. \$\endgroup\$
    – Andy aka
    May 3 '14 at 17:40
  • 2
    \$\begingroup\$ You say that when you try to connect a cigarette lighter phone charger it's just arcing, so maybe you inverted the polarity and damaged it ? (see here) But assuming the polarity is right and the voltage is approximately 12V DC, there's no reason for it not to work. \$\endgroup\$
    – user40669
    May 3 '14 at 18:30

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

  • \$\begingroup\$ Thank you, exactly what I needed. Only question I have left is if my phone will charge off anywhere from 500mA and 1.5A then the max 1amp from this regulator should suffice? Sorry, for having to be baby-stepped through this, Im completely new to all this and appreciate your help \$\endgroup\$
    – w0lf
    May 3 '14 at 13:57
  • 5
    \$\begingroup\$ This will be very inefficient (more than 50% of power will change into heat on 7850 regulator. \$\endgroup\$
    – Kamil
    May 3 '14 at 15:04
  • 4
    \$\begingroup\$ Given the OP lack of electronics experience it may be the best engineering trade off (lack of complexity versus efficiency). \$\endgroup\$
    – mctylr
    May 3 '14 at 18:28
  • 6
    \$\begingroup\$ I've done a DIY USB car charger using this approach, and be aware that it heats A LOT. In cold countries it may be tolerable but here in Brazil, inside a hot car, it actually damaged the regulator. A heatsink is obligatory. \$\endgroup\$ May 4 '14 at 0:08
  • 3
    \$\begingroup\$ Use a R-785.0-1.0 instead of the LM78xxx. Same pinout but efficency is up to 80%. Max 1A and more expensive, but in the 3$ range, so ok for a one off hobby project. \$\endgroup\$
    – Christian
    Feb 28 '17 at 17:05

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


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.


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:


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.

  • 1
    \$\begingroup\$ In that case of needing voltages on the D+- pins, I've seen a handy instructable where the guy just uses a bunch of same value resistors to go VCC to D+ and then D+ to D- and then D- to GND to activate charge mode on the mobile device \$\endgroup\$
    – KyranF
    May 4 '14 at 4:21
  • \$\begingroup\$ Bear in mind that not all devices have the same requirements when it comes to the data pins. Some phones can be a problem. I remember banging my head against the wall with my Razr V3. \$\endgroup\$
    – JuanΠ
    May 4 '14 at 14:33
  • \$\begingroup\$ Yes, and I think this instructable was specifically for iPhone too. I hate iPhones.. \$\endgroup\$
    – KyranF
    May 5 '14 at 1:02

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.