Tag Archives: charger

How to build a solar panel charger with LiIon battery backup and USB output

Ah, solar power. The tingly feeling of getting free energy and saving the environment.

My HD2, the HTC phone/device I own at the moment, has its own reserve of four batteries to switch in case I need to make an intense use without a mains plug handy, yet I wasn’t satisfied as I didn’t have a renewable source of energy for charging it if those batteries died altogether, namely a decent solar panel; let’s face it, the solar chargers you see on eBay simply suck, they are built around teeny tiny solar cells capable of maybe 40mA @ 5V, and actually have an internal battery which does all the job, and that you’re supposed to charge at your mains at home before going out, because the builtin panel is going to take a couple of days in full sunlight to fill that battery, let alone being able to charge both backup battery, and phone battery, while you’re using your phone, which is actually the ideal usage scenario, as you’re going to need the backup battery when there is no sun, during the night.

My first attempt at building a solar charger was by using a 1W (5V@200mA) solar panel, that was exactly the same size of my HD2, but wasn’t enough in my opinion, since movie playback takes more than 200mA for itself, and there is nothing left to charge the phone. So I have that one set aside (and for sale, if you’re interested), but then I discovered this solar panel that outputs 700mA@5V, obviously bigger, but that is what I needed to playback movies, and at the same time charge both the phone battery and the charger internal backup battery.

So this page is a chronicle of my experience, and a DIY tutorial about building such contraption with the smallest expense possible.

First of all, the shopping list:

  1. Digital multimeter to check the project as it develops, to avoid discovering any mistakes when it’s too late
  2. Soldering iron
  3. Hot melt/hot glue gun, you wll be using at least a full stick of glue
  4. Solar panel (obviously), the bigger the better. You need a 5V model (higher voltage models are fine only if you add a voltage regulation circuit which I am not going to cover in here), and buy the one with the biggest current rating available, my 700mA one is pretty impressive in itself but you may be able to find better. You can go with lower output, but then it makes no sense to add a backup battery because it won’t be powerful enough to charge everything
  5. “Naked” female USB-A port, you can easily take it out off an old, not working motherboard, or hub
  6. Electrical wires, preferably in the standard colours red and black, but as you can see I used white and green since I only had those spare, as long as you remember which colour is which polarity (in my case, white is positive and green is negative)
  7. Two Schottky diodes (to stop the backwards flow of current to the solar panel and from the solar panel to the battery; you don’t need to buy them, just desolder off an old motherboard, an old phone charger, whatever
  8. A LiIon battery, my choice fell on a 18650 “Ultrafire” 3000mAh battery, but anything 3.7V with decent capacity is ok, really
  9. A protected charging circuit (a circuit that takes a variable voltage input and outputs static 4.2V, and has “flowback” protection, I got it by disassembling an OEM desktop charger for my old Nokia batteries); in alternative, just buy a “protected ultrafire”, costs more but delivers both things in less the hassle; in this case you will need just one diode.

Here is the step by step photoguide:

monocristalline solar panel 700mA 5V
This is the panel I bought, roughly 16x16cm, big, but a little powerhouse
18650 ultrafire 3000mAh
The Li-Ion battery I bought, it's a 18650 stylus battery, 3000mAh capacity, more than double of my own phone's battery
Li-Ion charging pretected circuit front
Front of the internal board I took off a desktop LiIon charger
rear liion protected charging circuit
The rear of the charging board, I soldered my own wires, I can still use the nokia small plug to power it; later I also soldered new wires for the battery output
female USB-A connector
The polarity of the USB-A connector; for it to be recognised as a charger, you need to short circuit the central pins, that are usually for data, by tinning them together
solar panel charger backup battery scheme
This is the sexy hand-drawn electrical scheme of the whole charger; after drawing it, I realized that the diode marked in red is not necessary, so I wasted one piece of electronics, no big deal; UPDATE: there is a diode coming out of the positive pole of the battery, this is to prevent direct-flow of current into the battery from the solar panel, so that the battery is charged only by the protection circuit. If you use instead a protected UltraFire, the battery will be directly in parallel to the panel, so you won't need any additional diode.
rear solar panel diode and female usb
This is the basic version of a solar charger, without battery backup system, it gives 5V output from the USB port blocking back flow of the current inside the solar panel with the diode
solar panel protection diode
You can see through the hot glue how the diode is soldered; it comes out of the positive pole of the panel, and the white stripe is located on the far side from the panel
two diodes on the solar panel
Here I added another diode thinking it was necessary for the back flow protection to the backup battery charging circuit (which happens if the battery poles go back into the power input of the charging circuit, in a failing attempt of the battery to charge itself); anyway, the first diode is enough to prevent it. The soldering stinks and I know it.
negative pole 18650 soldered
I was able to tin the wires to the negative pole of the ultrafire battery, it's not very solid but a little hot glue helped out
hot glue on 18650 negative pole
Here, a slab of hot melt glue on the negative pole, to keep the tinning in place and isolate it
spring for positive pole of 18650 battery
I literally wasted half an hour trying to tin the positive pole of the 18650, with no luck; in the end I devised this ugly spring, by attaching a small piece of metal to the wire...
18650 positive pole with spring attached
...and then applying it against the positive pole and keeping it there with hot melt glue... it worked!
solar panel charge with battery backup rear
After sticking all the components to the rear of the panel (I used more than a stick of melt glue) this is how it looked like
solar panel charger front look
This is how it looks from the front... nothing different, you can barely see the led and usb port on top
detail charging led and usb port solar panel charger
This is a close detail of the area where the charging led and USB port lie
solar panel charger with backup battery in action
This is the reward for the hard work: solar panel at sunlight (not direct sunlight but enough); you see the detail of both the charging led being lit green (which means the charging circuit is powered by the solar panel, and the backup battery is fully charged, otherwise while charging, it would be lit red), and the HTC HD2 with the lit orange charging led

UPDATE (9/29/11): several visitors asked me how to change the procedure in order to build a vanilla solar chager with no backup battery; easily done: take the circuitry scheme above, ideally remove the part regarding the battery, the charging control PCB, and the cables coming and going to these, and you’re set.

UPDATE (11/4/11): mpigio in the comments pointed out a serious flaw in the electrical scheme: the protection circuit was useless, since the battery was directly in parallel with the solar panel; I just added a diode coming out of the battery, so this is finally safe.
On a side note, as other pointed out in the comments, instead of digging for a recharging protection, you may just buy a protected 18650, that is a battery that has its own integrated protection circuit.

UPDATE (11/9/11): adding here something I needed to clarify in the comments more than once. Obviously, with no sun whatsoever, it’s the backup battery that gives the output voltage: this will not be 5V like a normal USB port, but at max 4.2V, and down to 3.7V or even less. Now, most devices should still consider this as a valid charging voltage (my HD2 did) even if for technical reasons they won’t charge up to 100%, but someone in the comments reported about it not being enough for a GPS navigator, which didn’t consider enough even the 4.8V that four 1.2V AA rechargeable batteries in series gave; in this cases it’s needed a voltage regulator (of the “boost” or “step-up” kind) that can take lower, variable voltages and always outputs 5V, so you can connect it to the USB port. This component should be safe to be the last and only one connected to the USB port, so that both solar panel and backup battery converge into it, and only a regulated, constant 5V output is given from the port.


With this setup you can charge anything which has a USB charging cable, be it iphone, ipod, ipad, mp3 player, every htc phone… you can even attach a USB hub to it if the panel is powerful enough, and charge more than one device at the same time!

Since the desktop charger had its own charging plug, I can use a standard Nokia charger to charge the backup battery.