====== Charging lithium to a specific State of Charge ====== Lead batteries are healthiest when they are kept 100% [[electrical:depth_of_discharge|State of Charge]] (SoC) all the time. Lithium batteries, on the other hand, suffer accelerated degradation when held at 100% SoC. So with lithium we have two competing goals: 1. charge enough to make sure we can get through the night with ≥20% capacity in the bank((for longevity)); and 1. charge so that the bank is not held at 100% SoC. ===== challenges ===== The balancing act is not so easy. ==== solar charging is highly variable ==== On a bench Li is easy to charge with an amp-counter and constant current power supply. Need 30Ah? run 10A into the bank for 3 hours. But solar charging is constantly changing, depending on the sun's position in the sky and local conditions. Related: [[https://www.youtube.com/watch?v=cpyZi1LkLhg|How Absorption, Tail current and a few clouds can trick you]] (YT) ==== lithium SoC and voltage ==== Lithium SoC is extremely difficult to gauge by voltage. The majority of the battery's capacity falls within a 0.2v range. Any voltage sag between the controller and battery will wildly distort whatever relationship exists between voltage and SoC. Shunts or voltage sensing wires will be helpful, as will heavier-than-spec wiring. ===== charging approaches ====== Charging lithium to <100% is easy; just lower charging voltage and see how the system behaves. Charging lithium to //some specific and consistent target// (30%, 50%, 80%, whatever) is notoriously difficult with solar as charging conditions are highly variable. This is not an issue if you are using 10A out of the 50A overnight; you will have plenty of safety net whether you charge to 40% or 90%. So play with lower charging voltages and with absorption times to see what keeps us in the sweet spot. It //is// an issue if you need to pull 30A out of the 50A bank overnight: leaving ≥20% SoC by morning means you'd have to go into sundown with ≥80% SoC. Not so much wiggle room there. In that scenario I might charge-and-stop to ~14v (or whatever consistently yields 100% SoC with your system), minimal/no absorption duration, then play with lower floats like ~13.35v to see where SoC settles. A more precise way to do it would be to use a controller that talks to a shunt and could hold the bank at a given SoC based on coulomb-counting. Should be doable with pi or arduino, or maybe some of the more network-centric gear like Victron already has that functionality. I imagine in a few years the feature will be commonplace.