DIY USB Solar Charger Tutorial (Wallet Size!)

Hi everyone,

I’ve got a quick, easy, and fun tutorial for you! I’ll show you how to make your very own solar charger for your mobile devices to charge them wherever you find a bright light source and no power outlet. Yep, it’ll work everywhere; from the beach, all the way to the Moon (not the dark side unfortunately). Needless to say, harnessing the power of the sun/photons is not a new concept. Even used to power Vanguard 1 way back in 1958, the sun provides enough energy every hour to satisfy the entire planet’s energy requirements for a whole year! Today, we’ll see use a little bit of that energy for our USB solar charger.

DIY USB Solar Charger Tutorial from Treehouse Projects on Vimeo.

I’ll have a follow up post to this one explaining the intricacies of the photovoltaic cell, but let me take a few words to give you a general idea of how this magnificent technology works. Think of a solar cell as if it is a battery. It has a positive and negative side to it, and electrons flow through the positive to the negative. Unlike a typical battery which takes advantage of chemical processes to produce energy, solar cells use the Sun – more precisely, the packets of energy called photons which the sun emits. Solar cells are made typically of silicon, doped with phosphorus to create the positive end, and boron to create the negative. A photon will hit the solar cell, and knock one electron loose. The electric field created by the positive and negative ends of the cell will guide the free electron from the positive end, to the negative, and create a current. We now have energy! I know this explanation may seem incomplete and rudimentary, but I promise to have more detail presented in a visually appealing way soon.

On to the fun part!

Resources Required

  1. Solar Cell(s)
    You’ll want your setup to replicate ~5V and generating at least 200mA. This can be done in several ways by connecting the required number of cells in series/parallel to achieve the desired power of at least 1W. I’ll explain more in the Process section below. I purchased two 0.5W (5V 100mA) solar cells on eBay for $4.00.
  2. Wire
    Just regular 22-24 gauge wire will work well. Use two colors (preferably red and black).
  3. USB Extension Cable
    You’ll need one to cut in half, but use the end with the female USB connector only. Your mobile device’s USB cable will plug into the solar charger from here.
  4. Soldering Tools
    You need a soldering iron for this project (hopefully yours is better than mine). Flux paste and shrink tubing will make your work much easier as well.

Except for the solar cells, most of the resources are commonplace for the hobbyist. You could throw in a multimeter for testing purposes as well. You can salvage solar cells from old garden lights if you don’t want to buy more. In fact, this awesome Instructable outlines how you can restore solar cells from garden lights which have been ‘damaged’ (look cloudy and faded away). This project should take approximately 45 minutes.


solarcharger solarcharger


(if you know what you’re doing, skip the first two paragraphs)

To make things simpler, forget the solar cells you now have on hand are any different from a regular old battery – simply ignore their shape, size, and coolness. Further, assume they are batteries rated at whatever voltage and current rating they came with. So if you bought a solar cell that was advertised as a 5V 100mA cell, you assume it is a 5V battery which can provide about 100mA under ideal conditions. Applying the simple formula P = VI (where P is power, V is voltage, and I is current) to our aforementioned battery, it has a power rating of P = 5V x 100mA = 5V x 0.1A = 0.5 Watts. I recommend obtaining at least a 1W setup, but regardless your total voltage must be 5V. So in this case, our voltage source is 5V for each battery and we’re good when it comes to that. We just need at least 2 of them now to total 1W – in this case.

But what if your batteries (solar cells) are rated differently. Well there are two ways you can connect batteries to achieve a desired result. Now think of solar cells as LEGO blocks – you can stack them on top each other (in parallel), lay them beside each other (in series), or lay them beside each other and stack them on top of each other in any combination. Similarly, we can stack our batteries like LEGO blocks. Consider the diagram below, courtesy of

Notice that connecting batteries in series makes the voltages of each battery add up to a battery of higher voltage, and connecting them in parallel maintains the voltage, but sums up to a higher current rating. So now treat your LEGO batteries as solar cells, and determine how you need to string them together to achieve an approximate 5V voltage rating, and your desired current rating by connecting them in series, parallel, or a combination of both. In my case, with two 5V cells on hand, I connected them in parallel to increase the current since my voltage was fine.

Now the process is simple:

  1. Solder the cells the way you decided based on the above logic and test your solar array with a multimeter in sun light.
  2. Slice your USB extension cable in half, and keep the female end of it. Don’t throw out the other end, a good hobbyist always finds a use for everything – so save it.
  3. Strip the wires off the USB cable, to reveal a series of 5 individual wires. You would normally see a black and red wire, so you would connect them to the negative and positive ends of your solar array respectively. In my case, however, the USB cable had no red wire, so I had to experiment a little to discover that a light blue wire was actually it’s replacement. You could experiment before soldering everything up using alligator clips.
  4. Solder the solar array to the USB cable, don’t forget to insert some shrink tubing if you have some before doing so.
  5. You’re all done! You can mount your setup anywhere you like. As you can see in my pictures and video above, I put mine in a wallet. You can put yours on a backpack, window, or anywhere else!


There’s not much to conclude with for this simple project, except that it’s a great way to start fending off the detrimental effects of climate change in your own little way! Of course, if you have any questions, comments, or suggestions at all, I’m all ears :) Thanks for your time, I hope you enjoyed this tutorial!

Posted in Tutorials

Leave a Reply

Your email address will not be published. Required fields are marked *