USB, DC & Solar Lipoly Charger
Created by lady ada
https://learn.adafruit.com/usb-dc-and-solar-lipoly-charger
Last updated on 2021-11-15 05:50:27 PM EST
©Adafruit Industries
Page 1 of 30
Table of Contents
Overview
3
FAQ
5
Solar Charger Preparation
6
• Installing the Capacitor
6
Solar Panel Preparation
7
•
•
•
•
•
7
7
8
10
11
Splice or Adapt?
Voltaic Panels with 1.3mm Connectors
Other 6V Solar Panels
Method 1
If You Have a Pre-2013 Solar Charger
Using the Charger
16
•
•
•
•
•
•
•
16
17
18
19
20
21
22
Solar Charging
USB & DC Charging
Indicator LEDs
Load Sharing
Temperature Monitoring
Adjusting the Max Charge Current
Adding External LEDs
Design Notes
• Is this a Max Power Point Tracker (MPPT)?
• Why a special solar charger?
• Solar Optimization!
Downloads
• Files
• Schematic & Fabrication Print
©Adafruit Industries
23
23
25
27
29
29
29
Page 2 of 30
Overview
Make your projects to go green this summer with our specialized USB/Solar Lithium
Ion Polymer Battery charger! This charger is a very unique design, perfect for outdoor
projects, or DIY iPod chargers. We've spent over a year testing and tinkering with this
charger to come up with a plug and play solution to charging batteries with the sun
and we're really pleased with what we ended up with.
Easy to use! Pick up any of our many 3.7V/4.2V LiIon batteries (https://adafru.it/aN5),
and a 6V solar panel (https://adafru.it/aN6). Plug the battery into the BATT port using
a 2-pin JST cable and the solar panel into the DC jack. Put the solar panel outside
(and keep the battery out of the sun, it needs to be kept shaded!) to start charging.
You can power another project like a Mintyboost at the same time by connecting to
the LOAD output port
• 3.7V/4.2V Lithium Ion or Lithium Polymer battery charger
• Charge with 5-6V DC, USB or 6V solar panel!
• Too dark out? Use a USB mini-B cable (http://adafru.it/260) or a 5V DC adapter (
http://adafru.it/276)
• Automatic charging current tracking for high efficiency use of any wattage solar
panel
• Use any 6V solar panel (6V seems to work best, 5.5V may work, 5V does not
work)
• Three color indicator LEDs - Power good, Charging and Done
• Low Battery Indicator (fixed at 3.1V) with LED output on (labeled CHRG)
©Adafruit Industries
Page 3 of 30
• Set for 500mA max charge rate, can be adjusted from 50mA up to 1A by
soldering in a resistor
• Will always draw the most current possible from a solar cell - up to the max
charge rate!
• Smart load sharing automatically uses the input power when available, to keep
battery from constantly charging/discharging
• Temperature monitoring of battery by soldering in a 10K NTC thermistor (http://
adafru.it/372) (not included) - suggested for outdoor projects where the battery
may get hot (50°C) or cold (0°C).
©Adafruit Industries
Page 4 of 30
FAQ
Is this a MPPT tracker?
This is not a true MPPT tracker, for information on why we did not design it as a
true MPPT, read our design notes! (https://adafru.it/aN7)
Why didn't you make this an MPPT?
For low power solar charging of lithium ion's, its not necessarily a better way to
charge. For information on why we did not design it as a true MPPT, read our
design notes! (https://adafru.it/aN7)
BUT I HEARD THAT MPPT IS THE BEST!!
For large multi-watt solar arrays that are charging lead acid batteries, you will want
to get an MPPT charger. For small cells, its not necessarily more efficient. For
information on why we did not design it as a true MPPT, read our design
notes! (https://adafru.it/aN7)
OK so how does it work?
Good question! For information on how this charger works, read our design
notes! (https://adafru.it/aN7)
What solar panels can I use?
Use any rigid, flexible, monocrystal, polycrystal, etc panels with 6V rating (12 'cells')
for the best performance
We've tried 5V panels and they don't work. 5.5V panels sometimes work, 6V is
really the best!
Can I charge with a solar panel on my windowsill?
The charger will draw as much current as possible, but the efficiency of the panel
will be much lower. Solar panels must not have any glass or shade to work
efficiently, they must be outside, pointed as best as possible directly at the sun!
©Adafruit Industries
Page 5 of 30
Both the Charge and Done LEDs are on and the battery is
not charging.
This is a fault condition detected by the charger. Most often it is a battery
problem. This can happen if the battery is allowed to discharge completely. The
protection circuits on some LiPo cells require the battery to be disconnected in
order to reset the circuit after an over-discharge cutoff event. Often just
disconnecting and reconnecting the battery will allow it to charge again.
Solar Charger Preparation
Installing the Capacitor
The first thing to do before starting to charge with a solar panel is to install the large
filtering capacitor. This capacitor is necessary to stabilize the panel a little, and since
we're going to charge with a lot of current, the capacitor needs to be pretty big. There
is a spot on the PCB for the capacitor, you can of course install it directly there by
soldering the wires of the capacitor into the pads.
Make sure to check the polarity of the capacitor, make sure the positive lead of
the capacitor goes into the pad marked +!
If you're low on space, you can solder wires to the capacitor and then install it a little
farther away. Just remember to use heatshrink to keep the capacitor legs from
shorting. If you want you can bend the capacitor over a bit as well, but dont have it
touch the hot charging chip (the black square in the middle of the PCB)!
©Adafruit Industries
Page 6 of 30
Next you will have to connect up your solar panel. Panels sometimes come 'bare' (no
wires), with just wires, or with a connector of some sort. You may need to splice a
connector onto the panel to match the 5.5/2.1mm (or 4mm on older charger) DC jack
on the adapter.
Solar Panel Preparation
Splice or Adapt?
The first verison of the solar charger came with a 4mm DC barrel jack on it. On older
versions (4mm) it would come with a converter cable.
• If you have a newer v2 charger (June 2013+), connect a 2.1mm Terminal Block
Adapter (http://adafru.it/369) onto the panel using basic wires, or a 1.3mm to
2.1mm adapter cable (http://adafru.it/2788) then plug that into the 2.1mm adapter.
This is the fastest method
• If you have an older v1 charger, you can use the terminal block method above
OR cut the adapter cable in half and splice the 4mm connector onto the panel.
The panel will plug right into the board but its more work.
Voltaic Panels with 1.3mm Connectors
Grab one of our adapter cables, it will let you plug in the solar panel directly (http://
adafru.it/2788)
©Adafruit Industries
Page 7 of 30
Other 6V Solar Panels
If you have a panel with something other than 2.1mm or 1.3mm connector, you'll need
to remove any existing connector. Cut off whatever connector is on
Gently remove the outer casing without nipping the inner wires.
©Adafruit Industries
Page 8 of 30
Strip and tin the inner wires.
©Adafruit Industries
Page 9 of 30
Method 1
For this you'll need a 2.1mm Terminal Block Adapter (http://adafru.it/369) but its really
simple. Just open up the screw terminals, slide the red wire into the + hole and the
black wire into the - hole and retighten! Now you can just plug it directly into the
charger (or adapter cable).
©Adafruit Industries
Page 10 of 30
If You Have a Pre-2013 Solar Charger
This method is a little tougher, but results in a nicer cable. You'll need some
heatshrink as well as some item with a 2.1mm DC barrel plug (like the 2.1mm adapter)
Cut off anything on the opposite end.
And carefully strip off the outer sheath.
©Adafruit Industries
Page 11 of 30
You'll want some longer wires on this side, maybe 1.5" (3-4 cm).
Strip just the ends of the wires and tin them.
©Adafruit Industries
Page 12 of 30
Place a big piece of heatshrink onto the cable, and then two shorter and smaller
pieces on each of the wires.
Solder red to red and black to black, keep the heatshrink away from your soldering
iron since it may shrink too fast!
©Adafruit Industries
Page 13 of 30
After the solder cools off, pull the smaller shrink onto the wires and heatshrink them!
©Adafruit Industries
Page 14 of 30
Then pull the big piece over everything!
And heatshrink it (with a hot air gun if you have one, or carefully with a lighter if you
don't).
©Adafruit Industries
Page 15 of 30
That's it! Check with a multimeter, in the sun, to verify that you have a open circuit
voltage on the plug.
Using the Charger
Solar Charging
Solar charging is easy, don't forget to prepare your solar panel and solder in the
electrolytic capacitor beforehand! (https://adafru.it/aN8)
Once you've done that, you can simply plug in the solar panel into the DC jack - look
for the PWR GOOD LED to indicate that the solar panel is providing power and then
©Adafruit Industries
Page 16 of 30
plug the battery into the BATT slot in the left. Use only 3.7V/4.2V lithium ion/polymer
batteries.
We have a tutorial about the batteries in case you have some questions about how to
use them. (https://adafru.it/aN9)
When the CHRG charging light is lit, the battery is being charged. Make sure to have
the panel facing direct sunlight not shaded and not behind any glass or plastic! when
the battery is full, you'll see the green DONE LED light up.
USB & DC Charging
Of course, sometimes is just really dark out and you can't solar charger, so there's a
USB port on the board as well. Use any mini-B cable to plug in and charge.
If there is something connected to the DC jack, it will mechanically disconnect the
mini USB connector so be sure to unplug the solar panel when USB charging
You can also connect a DC wall plug adapter directly into the jack, just make sure its a
5.5mm/2.1mm inner diameter connector, which is very common!
©Adafruit Industries
Page 17 of 30
If you need the DC power for something else, you can also connect to the DC input
via the 0.1" breakout. While you can feed power into the breakout pins as well, it's not
polarity protected so make sure you use a schottky diode or just be really careful.
Indicator LEDs
There are three status LEDs on the charger, which you'll find very handy!
The red PWR LED indicates that there is good power connected to the charger. If this
LED is not lit, something is wrong with the power supply
The orange CHRG LED indicates current charging status. When this LED is lit, the
charger is working to charge up a battery! It also acts as a low battery indicator (fixed
at 3.1V) when no power is connected. So, if you don't have USB/Solar wired up, when
the battery voltage drops below 3.1V, the orange LED will come on.
The green DONE LED is pretty easy to understand as well - when it's lit the battery is
charged up! Very handy for when you want to know that everything is done.
If you need to connect larger LEDs or a microcontroller up to these status pins, you
can us the STATUS 0.1" breakout on the bottom edge of the PCB. The pins are open
drain, so they will short to ground when 'active' and float when 'inactive' - you'll want
to use a pullup resistor if you need a digital signal or connect LEDs just like shown
below on the schematic, if you want bigger lights.
©Adafruit Industries
Page 18 of 30
Load Sharing
The MCP73871 chip in the usb/solar charger has a very nifty feature called 'load
sharing.' Say you have an every day lipoly charger and you want to use the battery wh
ile its charging. To do this, you might connect the project directly to the battery
output. This means, however, that the charger is both charging a battery and driving
your project at the same time. The charger is working extra hard and the battery is
being charged and discharged constantly.
As an improvement, this design has a pass transistor inside the chip, connected to the
output load from the input voltage, so that you dont lose efficiency from charging/
discharging the battery. When the USB/Solar charger is powered from a USB port or
©Adafruit Industries
Page 19 of 30
panel, the load current goes directly from the input voltage to the output. If the
current required is higher than what the panel or USB port can provide, the current is
supplemented by the lipo battery, up to 1.8A
The smart load sharing means that the LOAD output can be as high as 6VDC if in
direct sun because it will draw current directly from the 6V panel instead of from
the battery. If using this with an electronic project, make sure it is OK for up to
6VDC input or use a low-dropout-regulator (LDO) to regulate the voltage down.
This is all managed at the same time as the solar current maximization. Simply plug in
the lipoly battery on the left into the BATT port and connect your project up thru the L
OAD port on the right.
Temperature Monitoring
If you plan to have your project outside or unattended, we suggest adding
temperature sensing to keep the charger from overheating the battery or attempting
to charge when the battery is too hot or cold.
©Adafruit Industries
Page 20 of 30
Simply remove the 10K surface mount resistor from the THERM pads (or cut the trace
going to it), and solder in a 10K NTC thermistor (http://adafru.it/372). Test out the
system by trying to charge while you place the thermistor in a freezer or against some
ice, as well as in a cup of > 50°C hot water. The charger should stop charging the
battery. Once you are sure it is working, attach the sensing element (the epoxy bulb in
this case) so it is resting against the battery.
Adjusting the Max Charge Current
The USB/Solar charger comes with a preset rate of 500mA which will work great for
USB ports, USB wall adapters and solar panels up to 3 Watts. If you have a project
that uses a larger panel, or perhaps some other sort of setup, you can easily adjust
the current by soldering a resistor into the PROG pads.
©Adafruit Industries
Page 21 of 30
The current is set by 1000/RPROG Amps, where RPROG is the resistance. So for 2
Kohms, that would make it 1000/2000 = 0.5 A = 500 mA. If you want 1A, you would
use a 1K ohm resistor. If you want to increase the current, you need to decrease the
resistance, so you can just solder over the existing 2K. So for example, soldering
another 2K resistor into RPROG will give you 1K total resistance and 1000 mA current
draw. See above for a 2.2K resistor soldered for about 950mA of max current draw. If
you want to set the max current draw lower, you'll need to remove the 2K resistor.
Adding External LEDs
If you are placing the charger in a box, you may want to have external LEDs for
indicating charge state. This is easy! Simply use any 3mm, 5mm or 10mm LEDs you
wish and 1K resistors and wire them like so:
©Adafruit Industries
Page 22 of 30
Design Notes
Is this a Max Power Point Tracker (MPPT)?
This design is not a 'true' MPPT, and we did that for a reason! Max power point
trackers work by 'tracking' the voltage and current curve of a solar panel so that the
total Power (Voltage * Current) is maximized. This means that as the light changes, the
voltage and current must be carefully tracked. In general, the way controllers perform
MPPT is to have a DC/DC converter - that's because to have the best power
conversion you'll want DC/DC not linear converters (that lose any excess voltage as
heat). For example, say you want to charge a 6V lead acid battery and you have a 12V
(approx) panel. The voltage will range between 9V and 14V depending on current
draw and visible light. The buck converter will do its best to keep the current draw so
that the total power available at the output is maximized.
This diagram from Linear (https://adafru.it/CbQ) is really good at describing how it
works:
©Adafruit Industries
Page 23 of 30
The Green lines show the I-V curve of the panel for a given light condition. As the
light increases the voltages stay sort of the same but the amount of current you can
draw goes up! If you can keep the DC/DC converter operating on the red line, that's
the maximum power.
However, there are some side effects to using a MPPT design.
First is that DC/DC converters are expensive, and adding a DC/DC converter to a LiPo
charger chip increases the cost by 2x. For small panels, if the MPPT increases the
efficiency by 30% but you can double the panel size for the same price increase, it
might be easier to just go with a larger panel.
Second is that DC/DC converters are not necessarily more efficient than a linear
converter at low voltages and currents. At the voltages we're talking about, a 6V
panel charging a 4V battery, the max power point will tend to be around 5V - only a
volt above the battery. Considering there's a 0.5V drop with the input diode, the
added inefficiency of a DC/DC converter is about equivalent to the extra voltage drop
used by the linear charger. For this reason, you tend to see MPPT controllers only for
multi-ampere chargers for big lead acid batteries and really big panels.
So the upshot is...
If your panel voltage is ~1V above your battery charging voltage, your current draw is
under an Ampere, and you control the current draw to keep the voltage steady at
around the 'max power voltage' (the red line up above), it's possible to get near-MPPT
©Adafruit Industries
Page 24 of 30
performance, without the complexity of a DC/DC converter, and without the high
price. That's what the design of this charger does.
Why a special solar charger?
We've had a lot of customers that are interested in making solar powered projects, so
we wanted to make a lipo charger board that is specifically designed with Solar &
USB charging in mind. We'll explain why...
Most people try to plug a solar panel directly into a lipo charger and while it sort of w
orks, the battery takes forever to charge because the efficiency is terrible! That's
because most lipo chargers are meant to plug into a USB port or wall, and are very
simple in their design. USB ports supply 5V at up to 500mA and they're pretty solid the voltage doesn't change much even at the max current draw. So when you plug a
charger into a computer with a USB port, they just draw 500mA or so and happily
chug away. Same goes for wall adapters. The voltage and current limits are kept
steady.
Solar panels are a little different, the voltage and current vary constantly depending
on sunlight available. They are unstable! That instability confuses battery chargers,
which causes them to do one of two things: rapidly turn on and off as they try to draw
more current from the panel than possible and/or draw much less current than they
can, to keep the voltage from collapsing
Here is a diagram of a single solar cell, in various light conditions (the colored
rainbow lines):
©Adafruit Industries
Page 25 of 30
We find these diagrams common but a bit confusing. So we'll show how to use them.
Pick the top red line (maximum light) and start at the very right of the line where it
meats the horizontal scale. This is the current (I) = 0 point. We're drawing no current a
nd the voltage of the cell is 0.5V. 0.5V is the open circuit voltage. Keep following the
graph up and to the left. As the current draw increases, the voltage drops slightly until
we reach the point of drawing 38mA (0.038A). At this point, the voltage is around
0.4V. Next draw a bit more current, moving to the left some more and the voltage
starts collapsing.We can try to draw more current but as you can see, drawing even a
tiny bit more than 38mA makes the cell voltage drop to 0V. 38mA is the short circuit
current
Depending on the light conditions, the amount of maximum current can range, from
38mA (red) to 32 mA (orange) down to 5mA (yellow) or even lower. Solar cells can be
made larger (the short circuit current is bigger) but the voltage of the cell is fixed at
0.5V open circuit - it's just part the physics of the cell. However, you can connect a
bunch of cells in series to add them up. A 6V panel has 12 cells (12 * 0.5V = 6V)
Now you can see what happens if you connect a 6V solar panel to a lipoly charger. As
long as the current being drawn by the charger is less than the panel's short circuit
current at that light condition, everything is peachy. The moment the light changes
even a little, and the current the lipo charger wants is higher than the short circuit
current, the charger becomes unstable: it will draw too much current, which will cause
the voltage to collapse, which causes the charger to turn off, which reduces the
©Adafruit Industries
Page 26 of 30
current draw, which makes the panel voltage recover, which turns on the charger
again, which then draws too much current, and the cycle repeats.
You can see this happen in the image from my scope below:
The scale is 1V per square, and the 0V point is one square above the bottom of the
display (see the 2-> on the left) The open circuit voltage of the panel is about 6.5V,
the lipo charger draws some current and quickly the panel voltage collapses. After
250 us, the charger tries again, but fails again. The lipo charger may seem to be
charging because the CHRG light is on but really its doing a poor job of it!
Solar Optimization!
OK so how do we fix this problem? The issue we have here is that the voltage
collapses during high current draw. We need to find a way to keep the lipo charger
from drawing too much current, and backing off when the voltage starts to droop. We
looked high and low and finally found a chip that has something like this built in. The
MCP73871 calls it Voltage Proportional Charge Control (VPCC) and basically, it does
precisely what we want. We can set the voltage to a point just above the battery
charge voltage point (say 4.5V) and then instruct the charger to draw as much current
as possible. It will automatically increase/reduce the charge rate to keep the voltage
higher than 4.5V!
©Adafruit Industries
Page 27 of 30
In this case, we set the voltage using two resistors, the voltage divider ends up
stabilizing it at ~4.5V. Because the voltage collapse of a panel is really sudden, we
still end up needing a little more help stabilizing the panel. We do that by adding a
BFC (Big Freaking Capacitor).
This schottky diode charges a 4700uF capacitor from the panel - the diode prevents
the capacitor from draining back into the panel.
©Adafruit Industries
Page 28 of 30
Downloads
Files
• MCP73871 datasheet (https://adafru.it/aMO)
• Fritzing object in Adafruit Fritzing library (https://adafru.it/aP3)
• EagleCAD Board / Layout & Schematic files on Github (https://adafru.it/aMP)
Schematic & Fabrication Print
©Adafruit Industries
Page 29 of 30
©Adafruit Industries
Page 30 of 30