Intro: How to Charge Your Lithium Battery!
There are many ways to construct a battery system for a portabel device or vehicle. I'm going to explain how I have constructed one for an Electric Longboard and one for a portable Loadspeaker (aka Boombox). I will not go into what battery to use, that depends on the application, but focus on how you can charge every lithium battery out there.
This instructable is for Lithium cells (18650, lipos, LiHV etc.) which require the charging cycle CC-CV (constant current, constant voltage). The battery system may work for other types for batteries as well, as long as they wants to be charged with CCCV.
CC-CV varies the voltage to constantly deliver the current set by you. When the voltage reaches the battery's maximum charge voltage, the current is gradually decreased so that the voltage does not exceed the set value.
Step 1: Things You Need
From power source to battery cells:
1. AC-DC Power adapter (Here is a great one)
2. Female DC-Plug to match your adapter
3. Step-Up or Step-Down DC-DC converter with adjustable current. (The ones I'm using: Step-Up, Step-Down)
4. Battery Monitoring System (BMS) (One for 3s, onefor 6s)
5. Optional : Relay with signal input voltage close to your power adapter's output voltage.
In my setups, the power AC-DC Power adapter is the bottleneck when it comes to charging fast. The rated power output is 120 W and it is maxed out during charging. If you want to be able to charge fast, buy a more potent power supply or use a bench power supply or a stationairy computer power supply. Charging fast results in high currents which will result in more heat. A more powerful step up/down converter (or better heat dissipation) may be required.
I should mention though, that all lithium cells benefit from slow charging and will last longer doing so. Never charge a battery faster than it is designed for.
Using this setup, it is possible to use different input voltages without changing the output. For example, my wall power supply gives 19,5 V but I can also charge from my car at 12 V. The DC-DC converter will adjust so that the output voltage and current remains unchanged.
Most power adapters comes with a male plug. Get a female plug for your application for a nice clean build!
Step 2: Power Supply
a. The Electric Longboard have a 9s1p LiHV Battery (high voltage lithium polymer), charging up to 4,3 * 9 = 39,15 V.
b. The Boombox has a 3s16p Lithium ION battery (18650), charging up to 4,2 * 3 = 12,6 V.
Both builds are using the same laptop power adapter. This adapter is 19,5 V and are capable of delivering 7,2 amps. For the longboard a DC-DC CCCV Step-Up module is used to boost the voltage from 19,5 V to 39,15 V (or whatever voltage i choose). For the Boombox, a DC-DC CCCV Step-Down module is used to lower the voltage from 19,5 V to 12,6 V (or whatever voltage I choose). The voltage of the power adapter you choose should be near the voltage of your battery. However, the Step-Up/Down module will need some difference between the output and the input to function properly.
If you have a high voltage battery (for say +30V) you really dont want a power supply of like 5 V. To charge in a moderate rate, the input current would be large, and things will get hot and heat is bad!
Let's say you have a 3s battery. The voltage at full charge is 12,6 volts. There are (among other alternatives) two different ways to charge this battery:
1. You could use a power supply of a higher voltage and use a DC-DC CCCV Step-Down module. I would go for some voltage higher than 15 volts to make sure that the Step-Down module gets the difference in voltage between the input and output that it requires (read the specs of the Step-Down module).
2. One could use a lower voltage power supply. For example: A 5 volt power adapter combined with a DC-DC CCCV Step-Up module.
Both options will charge your battery but they come with different benefits. The first option will probably charge your battery faster because it is easier to find a power adapter with more power output at a higher voltage than one at a lower voltage. The second option can have a input of 5 volts which is the voltage that all devices output from USB. Just be careful here to not set your Step-Up module at a higher current than what can be delivered by the USB-port. This may fry your computer or other powering device!
A typical output of a 5 volt power adapter is 1 A, resulting in a power output of 5 W. A typical 15 volt power adapter outputs 5 A, resulting in a power output of 75 W. There is a huge difference here!
Step 3: Step-Up/Down Module
Be sure to get a Step-Up or Step-Down module with adjustable current. The cheapest ones do not have it so make sure you get the correct one. If you don't have adjustable current, you don't have a CCCV charger. My Step-Up module for my Electric Longboard outputs about 3 amps (when the power adapter is maxed out) and it gets warm to the touch, even tough its rated at 10 amps. Make sure to get one with at least 50 % margin to your need. If not? Install a fan or heatsink to improve heat dissipation.
Some modules have a display, some don't. For my Electric Longboard, there is no easy way to fit a display so I went with a Step-Up module without one. The Boombox's Step-Down module have a display and its great to see the voltage of the battery and the current that it is currently charging with. If you have a display, you will not need a multimeter to set the value for the output voltage and current. If you don't have a display, you'll need a multimeter to measure both voltage and current during set-up. During normal operation, no multimeter is required. Just plug your power adapter in.
Note: Some (mostly) Step-Up modules are named LED-driver or voltage booster. A typical LED require constant current and a Step-Up module with adjustable current is perfect for driving the LED. That's why they may be named "LED Driver".
Step 4: BMS
If you are charging a single cell or multiple cells connected in parallel (1s), skip this part. A battery of multiple cells connected in series will require a BMS, Battery Monitoring System. Each lithium cell wants to be charged to 4,2 volts. If you have a 2s battery you would want it to charge to 8,4 volt. The problem is to make sure that each cell don't exceed 4,2 volt, possible becoming a hazard. 4,1 + 4,3 is still 8,4 so we will need a way to even the charge between the cells. Here is where the BMS comes in.
Some may argue that new cells of the same production batch are so similar in characteristics that no BMS is required to maintain an even voltage across cells in a multiple series battery. While this may be true in the beginning of the cell's lifetime, it may not after a couple (of hundreds?) charge cycles. If you don't want to manually keep track of the cells voltages, use a BMS.
If your application requires lots of power, the differences in the cells will be even more magnified during power draw, making the voltages across the cells differ more and more. In high power applications, you really want to have a BMS!
My electric longboard draws 40 amps from time to time which is more than most BMS's can handle (including the one I have). Therefore, I only use the BMS for charging. When discharging, I never discharge the cells to less than 3,5 volt, so there is a safety margin to the cells absolute minimum voltage, even though the cell's voltages drifts some from each other, no cells will be dangerously discharged.
Some BMS's comes with a temperature sensor (looks like a ceramic resistor hanging from two chords). A typical value is 65 degrees celsius. In my opinion, you would probably not need one. Just make sure that you check the components for heat during the first couple of charges. If it gets too hot, lover the charging current of the Step-Up/Down module.
Step 5: Relay
A relay is not necessary for the charging system, but it adds some nice feutures. It also adds a clicking noise when the power adapter is connected, which I find nice ;).
I wanted to make sure that the Step-Up/Down module didn't empty my battery when I'm not using the Electric Longboard or Boombox. The screen of the Step-Down module lits up when there is voltage on either the input or output, drawing a small amount of current. In long periods of time, the battery would discharge and may be damaged. So to fix this, a relay can be used! The priciple is to only enable voltage on the Step-Up/Down module when the input power adapter is connected.
Another feuture one can add is to delay the connection of the load (i.e. the battery) from when the power adapter is connecting. This let's the Step-Up/Down module charge up it's capacitors and whatnot before the high or low voltage is applied to the module's output ports. This can be done with a resistor and a capacitor.
When adding a resistor in series with the coil of the relay, a voltage divider is created. And it's not that bad in most cases. The coil acts like a resistor and depending on what value of the resistor and what resistance of the coil, the voltage on the relay is determined. The most common relays are made for 12 volt. If your Power adapter delivers more than 12 volt, you will benefit from this voltage divider we just created. Let's make some calculations to clarify.
My Power Supply is 19,5 volts. I've got one of this, a 12 volt relay. In the datasheet it says that the coil resistance is 320 ohm. Using Ohm's law (or an online calculator), we find that we need a resistor of 12 / 19.5 * 320 = 200 ohm to get 12 volts on the coil of the relay.
OK. I mentioned earlier that we need a capacitor as well. The capacitor should be connected in parallel with the coil. When voltage is applied over the cap and coil, a large current will flow to the capacitor very quickly and as the voltage increases, the relay will open. However, the resistor (200 ohm) that we added will limit the current. flowing into the capacitor, slowing down the charging of the capacitor and therefore delaying the opening of the relay.
Using an online calculator, we find that for a capacitor of 1000 uF and a series resistance of 520 ohm (200 + 320), it will take about half a second to reach 63% of 12 volt. According to the datasheet of the relay, it takes 75% of 12 volt for the relay to open. So, give or take, 0,5 seconds this Circuit will delay the opening of the relay. Plenty of time for the Step-Up/Down module to charge up.
As I mentioned earlier, we also benefit from the fact that the battery is a 100% disconected from the Step-Up/Down module when the Power chord is disconnected. No Power leakage: No risk of emptying the battery in starage.
Note: A diode can also prevent "back-current" into the Step-Up/Down module. Howver, I had a hard time finding one that could handle enough current and also have a low resistance. A high resistance diode will make your Step-Up/Down module deliver less current, and the diode may get really hot.
Note #2: There are alot of other Circuits that will give you the same characteristics. This one however is so simple and cheap, other circuits may be not.