DIY Solar Charge Controller for Li-Ion, Li-po, LiFePo or NiCd Batteries
Introduction: DIY Solar Charge Controller for Li-Ion, Li-po, LiFePo or NiCd Batteries
This article describes the design and construction of a (Dual) Solar Charge Controller. The design consists of a battery charger circuit using op-amps for measurement of analogue inputs and FET for PWM control. A micro-controller is used for charge control and the 4 line LCD is used for configuration and display of information. The software is provided open source. (Open Source Licence agreement). The circuit and PCB are designed using Eagle. The PCB is designed with most tracks running in one (x-x) direction and most components running in opposite (y-y) direction so the PCB required is a piece of veroboard and a few links. The project has been under test for a few weeks and evidence of operation charging li-ion batteries in varying weather conditions is given in System Testing. Finally construction details are provided so that the project can be built by a person with "intermediate level" electronics knowledge (not recommended for beginner).
Step 1: Features
1. Management of two batteries (one micro-board controls two charger boards).
2. Battery types: NiCd, NiMh, Li-ion (nickel-mang-cobalt), Li-Po or "User" defined.
3. Up to 4 cell (14.8V nominal) Li-ion/Li-po battery packs.
4. Up to 4 cells LiFePo (12.8V nominal, 14V absorption/float) (not tested yet)
5. Up to 12 cell (14.4V) Ni-Cd/MH battery packs.
6. For on-load or off-load charging.
7. Cell capacity nominally 1.000Ah.
8. Current range may be configured by sense resistor values.
9. High side current sensing. This means that the batteries, loads and solar panel have one common ground (0V).
10. Charge Controller uses 10-bit PWM hardware which is controlled by software.
11. Uses lithium CC/CV algorithm specified in datasheets for Nanjing TP4056, Linear LTC4056 and Texas BQ2057 chips (with some corrections/improvements).
12. 267
Discharge protection by emulation of Fortune DW01 chip.
13. Fuel gauge calculations
14. Uses 4 line by 20 character LCD display for configuration and monitoring of results.
15. Relatively simple construction using veroboard as IC packages are all PDIP.
16. Low power consumption, about 10mA for charger and 10mA for micro controller.
17. Industrial temperature range of micro-controller.
In order to simplify the design, these features are not provided
1. Not tested on LiFePo4 yet (should not be a problem- just a matter of settings)
2. USB, Wi-fi, surface mount,
3. Bucking regulators
4. Maximum Power Point Tracking (MPPT)
5. Cell balancing.
MPPT greatly increases complexity. This design is "not looking for mountains to climb". And at low power, is eficiency really that important when sunlight is free anyway? For cell balancing, it would be prudent to manually check individual cells using a multimeter and replace faulty ones.
Step 2: Comparison of Designs
There are some other good solar designs on Instructables like Open Green Energy. This design is similar to Open Green but is targeted at lower power setups. It uses the more traditional "resistive" current sensing which gives high sensitivity and is accurate for low currents (< 2 Amp ?). The Open Green design uses Hall Effect sensing which is probably a better solution for higher power/high current applications. The 100 mV/A output sensitivity of the ACS712 would suggest this is more suitable at higher current (about 10 Amp).
If you just want a battery charger then something like a CN3791 board selling for about £3 on ebay will save you a lot of effort. But the CN3791 is designed to charge a single li-ion cell, has no extra features like LCD display and will not work correctly if connected to a load while charging.
This project is NOT a battery charger. It is a solar charge controller in the sense that it is permanently connected to the PV panel, battery AND load. This project measures both PV (input) current and load (output) current so that on-load charging works correctly by compensating for load current. For example charge termination occurs when the input current (Iin) < (Iout+Itrk).
Step 3: Charger Scheme and Terminology
Battery University specify the recommended CV/CC charging scheme for different cells and manufacturers have developed chargers and chips based on this information. 267