For years (and years), I've dreamed of making a little solar charger. You know, some little gizmo with a solar cell on one side, USB power on the other, and magic in the middle. That's always been the trouble, though: until recently, I didn't know enough
magic electrical engineering to design one.
Now that I do, I'm a little surprised by how little the hard parts aligned with the parts I thought would be tough. The first time that I thought about this, back in high school, I was concerned about charging batteries. Everything else, I thought, would work off-the-shelf. Charging itself is the simplest part of the design.
So what was difficult? I'll get there. First, I want to talk about the parts I used and the design process.
The first step was picking a solar cell. There's a place called Surplus Shed that has great prices on solar. (I got a 1W panel for $5; Adafruit charges twice that.) After looking through their choices, I selected this guy: 150mA peak current, 11V peak voltage.
In general, solar panels maintain the same voltage across a wide range of currents, but the voltage begins to drop as you draw above 80% of the absolute maximum current. (Maximum current is achieved when the panels leads are shorted and it's developing no voltage.) As sunlight decreases, current falls rapidly but voltage remains relatively constant. These relationships are shown in the picture (source).
The blue line crossing the 'knee' on all the curves is the maximum power point. It's the spot at which the product of volts and amps (that's watts!) is at a maximum. The figure's superduper important on big solar farms where they want to squeeze every milliwatt out of the panel. For my purposes, it's enough to know that I'll get more power if I operate the solar panel near its maximum voltage. (If I can choose between 3.3V@150mA and 9.9V@150mA, I'll pick the latter.)
Second, batteries. Batteries, needless to say, hold the solar power and help to time-average load. The solar panel develops about a watt of power (10V*0.15A = 1.5W) but USB devices draw up to 5 watts (The iPhone and fast-charging devices draw 5V@1A). A high-capacity battery will store solar power as it comes in and provide the necessary boost to charge gizmos as is needed. I have a few choices: NiMH, NiCd, Li-po, sealed lead acid, LiFePO4, and the list goes on. In short, each has its strengths and weaknesses: a few have heavy metals (lead acid, NiCd), a few are unstable (Li-po), and so on. Lithium iron phosphate struck the best mix: a high per-cell voltage kept total battery count low, simple charging requirements allowed for a direct connection to the solar cell, and absolute chemical stability (no fires!) kept me comfortable with the charger. They lack the energy density of Li-po batteries, but compensate in their stability and ease of charging. A trio of them in series will create a pack whose voltage can fluctuate between 9.6 and 10.3 volts - a great match with the solar panel.
Next, I chose a power supply. I'd already decided on a 5V supply. There are two main types of switching power supplies: buck and boost. Buck supplies reduce a voltage by switching the load on and off. Boost supplies increase voltage out by creating a large current to ground through an inductor, then switching to use that current to create a higher voltage. (They're complicated.) Since the batteries are 9-10 volts and the output is 5, a buck regulator is ideal. (For a smaller voltage drop, a linear regulator may have been more efficient.) These come in all sorts of configurations. I had a few requirements:
- minimal cauliflower (extra pieces to make the supply work)
- fixed 5V output voltage (keep part count down)
- at least 2A of current capacity (to charge two high-current devices at once)
- Low quiesent current draw (don't waste battery power)
The LM2676T-5.0 fit all those requirements. It's a little thing. Looks like a transistor with a bunch of extra legs. The datasheet provides a list of suggested components for best performance. I tried to parse it, but couldn't figure out how their tables worked and couldn't find the components listed. Instead, I took a shot in the dark and grabbed a few nice beefy parts.
When everything came in, I wired the power supply up to test and was quite pleased: it regulates 5V under a 1A load with only slight ripple. The ripple should decrease when it's moved from a breadboard to a real PCB.
- When it's dark out, the solar panel's voltage falls. If it's more than 5V below the battery voltage, current starts to flow backwards, discharging the batteries. This is Not A Good Thing. I need to devise a circuit that behaves like a diode, but without the 0.7 volt drop.
- The power supply draws 4mA when it's on and not driving a load. To save power, it includes an on/off pin: dragging the pin to ground shuts off the unit and reduces current draw to 50µA. I think that I can connect the pin to the USB connector's case through an inverter: when a device is plugged in, the case will be connected to ground, the inverter will rise, and the unit will power up.
- To prevent damage to the batteries, the unit should shut off if battery voltage falls below 9V. That's probably best implemented using a comparator with hysteresis. As always, low power consumption is critical.
That's all, I think. Solar charger is in the works, and I'll write more as it happens.
Oh. Also. Pictures. I will take some. There's this enormous, awesome collection of bits and bobs and thingies and whiz-bangs. I should take a picture.