Open Source Peak Power Tracker!

I needed a solution for charging my single cell lithium ion batteries from solar.

I found some lightweight solar panels like these:

open voltage4.4V
closed current65mA
weight1 gram

These panels enabled me to build a 4 watt panel with mass under 2 ounces. The panels are flexible and durable (waterproof) but expensive.

The goal is to charge a single cell lithium battery using many of these cells in parallel (for increased current)

The main issue is the solar cells produce maximum power (150mW each) at 3v. This voltage is too low to charge a lithium battery which needs up to 4.2V. For optimal charging the solar cells should be run at their peak power voltage, and the voltage then boosted (boost converter) to the voltage needed for the batteries. A quick google search resulted in very few options for devices which could achieve this. Most systems are designed for 12V or higher, and even those were too expensive for me (~$100)

Instead I designed a pcb circuit board for use with solar systems of 3-12V and up to 10A. This is certainly overkill for only a 6w panel running at 3V, however I could not find decent components that were not capable of these ratings.. and the total cost for parts and board is only ~$5.

Pictures of the first version of the board:

Since I have experience with microprocessors, I decided to use one to control the converter. What I ended up with was a programmable buck/boost converter. This allows for converting DC voltages up or down, or tracking peak power. For more information on how buck converts work, see: http://en.wikipedia.org/wiki/Buck_converter

The board must be hooked up in the correct direction to work. (It can run both ways) There is no output or input, just a high voltage side and a low voltage side, power can be pumped either way. If you hook it up backwards, LED1 will blink, this means saturation, and you should flip it around to work correctly.

The microprocessor has an internal 64mhz PLL. This means that there is a high resolution for duty cycle even for fast switching frequencies (like 1mhz).

Running at different duty cycles, you can see the battery voltage (single cell lithium) red. solar panel voltage (single flexible cell) green. And battery current (crappy hall sensor) blue.

Note: the current sensor saturated because of a bug in software (and now it's fixed but not sunny to take more data)

The good news is the battery current and voltage are similar so the peak power tracking can be acheived with only voltage measurement. The battery voltage increases with charge current, so I can use this fact to "detect peak power" The ADC on the microprocessor is very good and has programmable gain up to 32x to get high resolution at low voltages.

The buck/boost regulator is capable of continuous and discontinuous mode. When peak power tracking continuous mode is always enabled, but when the battery reaches charge, it may be best to run in discontinuous mode.

I have done testing over frequency, and I noticed that the lowest frequency possible before you start saturating the inductor is optimal. Higher switching speeds work, but the losses go up. This means I will dynamically scale frequency so that the inductor does not saturate. Instead of tuning frequency and duty cycle, I have: