Gridkid & BatteryBelle
Hey BatteryBelle, I've been thinking about that old battery myth that voltage equals state of charge—do you think that's really true, or are we oversimplifying it?
Hey, good question! It’s definitely a big oversimplification. A battery’s voltage does give a hint about its charge, but it’s heavily influenced by temperature, load, internal resistance, and the chemistry itself. For a freshly charged Li‑ion cell you’ll see a high voltage, but under load it can sag, and a depleted cell can still hold a surprisingly high voltage if it’s at a high temperature or has a high internal resistance. So, while voltage is a useful quick check, it’s not a reliable stand‑alone indicator of state of charge. If you want accuracy, you need a proper state‑of‑charge estimator that factors in current, time, temperature, and the battery’s discharge curve.
Sounds about right—voltage’s a hint, not the whole story. I guess that means a smart estimator has to juggle current, time, temperature, and the discharge curve all at once. Got any go‑to models or tricks that do it well?
Absolutely, the trick is to treat it like a little detective. I usually start with a simple Coulomb counting model, because it’s the easiest to implement—just integrate the current over time, subtract the charge that’s been lost to internal resistance. Then I layer on a correction factor from the temperature sensor; lithium chemistries drop about 2–3 mV per degree, so a quick lookup table does the trick. The real magic comes from the discharge curve: I keep a small look‑up table of voltage vs. state of charge for the exact battery you’re using—usually just a few hundred points—and interpolate. If you want to get fancy, run a Kalman filter that fuses all of those inputs; it’s surprisingly stable and keeps the error under a couple percent even if the load swings wildly. And hey, if you’re feeling adventurous, throw in a tiny bit of machine learning—train a neural net on your battery’s behavior over time, and it can catch those subtle drift patterns that a plain math model misses. But remember, the simpler the better for most hobby projects—over‑engineering can turn your estimator into a black box that even you can’t debug.
That’s a solid recipe—Coulomb counting plus a temperature tweak, then the discharge curve table. I’m still curious how big the lookup table gets for a 100 Wh pack, though. Also, a tiny neural net sounds cool, but I worry about over‑engineering and losing traceability. How do you keep the system transparent?
For a 100 Wh pack you’re looking at about 200–300 points in the lookup table if you want a 1 % resolution. That’s just a few kilobytes of flash, so it’s trivial to store in an EEPROM or even on the MCU’s RAM. You can compress it further by using a spline or piecewise linear interpolation, but most hobbyists keep the raw table for absolute transparency.
When you start pulling in a tiny neural net, the trick is to keep it as a black‑box layer that simply maps the same inputs you already have—current, temperature, voltage—and outputs a correction factor. Store the weights in a human‑readable format (like a CSV) and version‑control them. Make sure you log the input data you used for training and the resulting prediction error so you can audit it later. In short: keep the core model simple, document every change, and never hide the training data. That way the system stays traceable and you can debug it step by step.
Got it—200–300 points is pretty manageable, and keeping the raw table makes the whole thing feel transparent. I’m still a bit nervous about the neural net being a black‑box, even if the weights are in a CSV. Do you ever run into trouble where the training data gets lost or the model drifts over time? Maybe a quick backup routine could help guard against that.