A DIY 8S 280 Ah LiFePO4 battery: assembly, BMS, temperature sensors and compression
How to build a 24 V (8S) LiFePO4 battery yourself from eight 280 Ah prismatic cells. This article covers:
- a calculator: how many cells, which BMS, fuse and cable for your battery, and the order of work;
- choosing and checking the cells, and balancing them before assembly;
- busbars, insulation, and the order for connecting the BMS;
- the essentials: what connects where, 15 questions to check and what happens if you skip them; safety;
- which fuse to fit so that it blows before the cable does;
- what to do if the difference between cell voltages grows under current;
- what the BMS can do and which thresholds we recommend for LiFePO4;
- where to put the BMS temperature sensors, for a heated room and for frost;
- how to control the BMS from the command line, Python or a microcontroller: the protocol, ready-made commands, libraries;
- whether the cells need compressing, why not with clamps, and whether it extends service life;
- whether the battery lasts longer if you do not charge or discharge it fully, and what happens to it if it just sits (tables and a chart);
- voltages of common pack sizes: 1S, 4S, 8S, 16S and up.
Connecting such a battery to an APC Smart-UPS and setting up the UPS is covered in a separate article.
draft — under discussion and being expanded
⚠ Before you start. Eight 280 Ah cells hold more than 7 kWh. A short circuit across this battery means thousands of amps: a dropped spanner across the terminals will melt, and a cable without a fuse will catch fire. Use insulated tools, take off rings and your watch, and cover any terminals you are not working on. Fit the fuse on the positive lead, close to the battery, before you connect any load for the first time.
What we have
| Item | Ours |
|---|---|
| cells | 8 EVE LiFePO4 prismatic cells, 280 Ah [TO ADD: model, e.g. LF280K, and batch year] |
| layout | 8S: eight cells in series, 25.6 V nominal, ≈ 7.2 kWh |
| BMS | JBD 8S "smart" board (board ID AP21S001), rated 50 A, two external temperature sensors plus the board sensor |
| balancing | a separate active balancer board [TO ADD: model and current]; the BMS's own balancing is off |
| charging | an external charger (fast) and the UPSes themselves (slow, at a slightly lower voltage) |
| loads | two APC Smart-UPS units (1000 and 1500) on one battery |
| link to the BMS | UART → USB cable to a server, which reads voltages, current and temperatures every few seconds |
LiFePO4 8S voltages
A LiFePO4 cell is 3.2 V nominal, so eight in series give 25.6 V. That is close to the working range of a 24 V lead-acid battery (two 12 V blocks), which is why LiFePO4 8S replaces it in UPSes, inverters and solar systems.
| State | Cell | 8S battery |
|---|---|---|
| datasheet charge limit | 3.65 V | 29.2 V |
| everyday charge (longer life) | 3.45–3.55 V | 27.6–28.4 V |
| full, after resting | ≈ 3.35 V | ≈ 26.8 V |
| plateau: from ~90 to ~20 % charge | 3.25–3.30 V | 26.0–26.4 V |
| nearly empty | 3.0 V | 24.0 V |
| where we recommend cutting off discharge | 2.8 V | 22.4 V |
| datasheet discharge limit | 2.5 V | 20.0 V |
⚠ On the plateau the voltage barely moves: between 70 and 30 % the difference is a few hundredths of a volt. So you cannot read the state of charge from the voltage. The BMS works it out by adding up the current that goes in and out.
Voltages of common pack sizes
A pack is named by how many cells are connected in series: 4S is four, 16S is sixteen. The voltages are multiplied by that number; the capacity in amp-hours does not depend on it.
| Pack | Nominal, V | Charge limit (3.65 V), V | Everyday charge (3.45 V), V | Cut-off (2.8 V), V | Discharge limit (2.5 V), V | Replaces lead-acid |
|---|---|---|---|---|---|---|
| 1S | 3.2 | 3.65 | 3.45 | 2.8 | 2.5 | — |
| 2S | 6.4 | 7.3 | 6.9 | 5.6 | 5.0 | 6 V |
| 4S | 12.8 | 14.6 | 13.8 | 11.2 | 10.0 | 12 V |
| 8S | 25.6 | 29.2 | 27.6 | 22.4 | 20.0 | 24 V |
| 15S | 48.0 | 54.75 | 51.75 | 42.0 | 37.5 | 48 V |
| 16S | 51.2 | 58.4 | 55.2 | 44.8 | 40.0 | 48 V |
| 24S | 76.8 | 87.6 | 82.8 | 67.2 | 60.0 | 72 V |
| 32S | 102.4 | 116.8 | 110.4 | 89.6 | 80.0 | 96 V |
- "48 V" comes in two kinds. 16S (51.2 V) is the most common battery for home systems and solar inverters. 15S (48.0 V) is closer to a 48 V lead-acid battery in its full-charge voltage. Before choosing, compare the input voltage limits of your inverter or UPS with the "charge limit" and "cut-off" columns.
- 4S in place of a 12 V lead-acid battery. An ordinary lead-acid charger is mostly fine, but in equalisation or desulphation mode it goes above 15 V, which is over the 14.6 V limit. Turn that mode off for LiFePO4.
- The "everyday charge" column is the voltage to charge to when the battery sits full on standby (a UPS, backup power). Why it lasts longer that way is explained under Service life.
Calculator: building a battery for your own job
The calculator works out a battery from any prismatic LiFePO4 cells, not just our 280 Ah 8S. Enter the cell and the layout: either as a cell count (S in series, P in parallel), or as the voltage, capacity, energy or runtime you need. The calculator shows:
- how many cells to buy and what the battery will weigh;
- voltages for the charger and the BMS thresholds;
- the battery current at its lowest voltage, and from it the BMS continuous current, the fuse rating and the cable size;
- how long top balancing will take;
- what not to forget for that particular build.
The calculator runs in the browser and needs JavaScript.
Reading S and P. "8S" is eight cells in series (24 V). "8S2P" is sixteen cells: first pairs are connected in parallel into groups, then the eight groups go in series. That battery has twice the capacity and current at the same voltage. It needs one 8S BMS; its current is chosen for the load (the calculator works it out), not multiplied by P. The other route is two separate 8S batteries, each with its own BMS and fuse, connected in parallel at a busbar.
Why the current is worked out at the cut-off. An inverter or UPS draws the same power whatever the battery voltage. When the battery is nearly empty and the voltage is lowest, the current is highest. That is the current the BMS, fuse and cable are chosen for.
Why the cable is sized for the fuse, not for the load. The fuse protects the cable. If the cable is rated for less current than the fuse, an overload will burn the cable before the fuse opens.
What not to forget: the order of work
| Step | What to do | Details |
|---|---|---|
| 1 | work out S and P, the BMS, fuse and cable | calculator |
| 2 | buy cells from one batch; a BMS for the required current with temperature sensors; a DC-rated fuse; flexible copper cable; tinned lugs | cells, cables |
| 3 | get the tools ready: bench power supply, multimeter, torque wrench, lug crimper | balancing |
| 4 | check every cell: voltage, case, threads | cells |
| 5 | balance all cells in parallel at 3.65 V | balancing |
| 6 | stand the cells in a row with insulation between them, compress them with plates, rods and springs | assembly, compression |
| 7 | busbars and BMS sense wires under the bolt, tightened to the datasheet torque | assembly |
| 8 | check the sense connector with a multimeter, connect the BMS in the right order, set the thresholds | connection order, thresholds |
| 9 | fix the temperature sensors (on a terminal only with intact insulation) | temperature sensors |
| 10 | fuse on the positive at the battery, cables with lugs, a load switch | cables and lugs, fuse |
| 11 | before first connecting an inverter or UPS, pre-charge its capacitors through a resistor | UPS article |
| 12 | set the charger to the voltage from the calculator; watch the first charge | checks |
| 13 | after a week, check the bolt torque, terminal heating and the spread of cell voltages | checks, spread under current |
The essentials: what connects where, what to check, safety
What connects where
| What | Where | How |
|---|---|---|
| BMS B− | negative of the first cell | power cable of the same size as the rest: the whole current flows through it |
| BMS P− | negative of the load (UPS, inverter) and of the charger | never connect B− and P− directly |
| positive of the load and charger | positive of the eighth cell | through the fuse at the terminal, then a switch |
| BMS sense wires | the first to the negative of the first cell, then in turn to each joint between cells, the last to the positive of the eighth | under the terminal bolt; check with a multimeter before plugging the connector into the board |
| active balancer wires | the same points as the sense wires | also under the terminal bolt |
| external temperature sensors | the middle cell and the positive terminal; if frost is possible, the middle cell and an end cell | with intact insulation, not under a bolt (temperature sensors) |
| BMS link (UART) | a USB adapter on the computer, or a microcontroller | one adapter per battery, no shared ground between batteries |
| frame, plates, rods | not connected to anything | insulated from terminals, busbars and cell cases; rods sleeved in tubing |
The key questions, and what happens if you skip them
| No. | Question | What happens if not |
|---|---|---|
| 1 | Are the cells from one batch, with equal voltages? | the whole battery is limited by the weakest cell, and the BMS keeps stopping charge or discharge because of it |
| 2 | Has the battery been top balanced? | one cell reaches the top first, the BMS stops charging, and the battery stays undercharged while the balancer spends weeks evening it out |
| 3 | Has the sense connector been checked with a multimeter: even steps of ~3.3 V? | a swapped wire puts the wrong voltage on the board input, and the BMS burns out |
| 4 | Does all the current go through the BMS, with B− and P− not joined directly? | the BMS still shows the cell voltages but protects the battery neither from overcharge nor from a short circuit |
| 5 | Is the fuse on the positive at the terminal, and can the cable carry more than the fuse rating? | in a short circuit the cable gets red-hot and its insulation burns; that is how fires start |
| 6 | Are the BMS continuous current and its thresholds above the load current at cut-off? | the BMS shuts the UPS or inverter down under load, exactly when the battery is needed |
| 7 | Are the bolts tightened with a torque wrench and checked again after a week? | a loose contact heats up, the cell spread grows under current, and the terminal may melt (spread under current) |
| 8 | Is there no washer between terminal and lug, and is the lug crimped with a press tool? | the current flows through the steel bolt or a poorly crimped cable, and the joint heats up |
| 9 | Are the cell cases insulated from each other, from the frame and from the rods? | worn film connects the cases: leakage current, heat, sparks |
| 10 | Are the temperature sensors fitted, and is low-temperature charge protection on? | charging below freezing permanently takes away capacity, and at worst causes a short circuit inside the cell |
| 11 | Is the charger voltage no higher than 3.65 V × S, better 3.45–3.55 V × S? | only the BMS stands between the cells and overcharge; if it fails, the cells swell and vent gas |
| 12 | Is the discharge cut-off no lower than 2.5 V per cell, better 2.8 V? | discharging below the datasheet limit damages the cell: capacity drops, and it has to be tested on its own before going back in |
| 13 | Are the UPS or inverter capacitors pre-charged through a resistor? | the first connection gives a big spark and burnt contacts, the BMS trips as if on a short, and its MOSFETs may be damaged |
| 14 | Are the terminals and busbars covered with an insulating lid? | a dropped spanner or cable shorts the battery |
| 15 | Do you connect in parallel (cells for balancing, or several batteries) only at equal voltages? | a large current flows between them: sparks, burnt terminals, the protection trips |
Safety
- Insulated tools. A spanner touching two terminals gets red-hot and welds itself on within seconds. Work on one joint at a time and cover the other terminals.
- Take off rings, watch, bracelet and chain. A ring that shorts the terminals turns red-hot in seconds and burns the finger.
- Safety glasses. A short-circuit spark throws molten metal.
- Put nothing on the battery: no tools, bolts or multimeter.
- Fuse first, load second. Fit the fuse before the load is connected for the first time. Before working on the battery, switch off the load and the charger, and only then undo the cables.
- Never charge without a BMS or below freezing. Overcharge protection and the below-0 °C charge cut-off must always be on.
- Do not drill, bend or solder the terminals. Bending or overheating a terminal can damage the cell seal.
- Where the battery stands: a non-combustible base, away from anything flammable, with air around it; not in a closed cabinet next to paper or cloth.
- LiFePO4 is safer than other lithium cells, but it is not fireproof. An overcharged, punctured or overheated cell swells and vents harmful, flammable gas. If a cell has swollen, is getting hot or is smoking: switch off the charger and the load, ventilate the room, do not breathe the smoke.
- Keep an extinguisher nearby: dry powder or CO₂, to put out the cables and anything that has caught fire around the battery.
- For the first few weeks, check for heat: after an hour at high current, feel the terminals and busbars or look at them with a thermal camera.
Cells: choosing and checking
Buy all eight cells from one batch. In a series battery the same current flows through every cell, and the battery is empty when its weakest cell is. One 260 Ah cell among seven 285 Ah cells makes the whole battery a 260 Ah battery.
What to check as soon as the cells arrive:
| Check | How | Good |
|---|---|---|
| voltage of each cell | multimeter | within ~0.01 V of each other (usually 3.25–3.30 V) |
| internal resistance | an internal resistance tester (1 kHz AC), not a multimeter | as in the datasheet (tenths of a milliohm), the same on all cells |
| case | look, and hold a straight edge against the wide faces | no bulging, dents or signs of leakage |
| terminal threads | screw a bolt in by hand | goes in easily, thread not stripped |
| markings | QR code or printing on the case | similar manufacturing dates |
You can also measure each cell's capacity: charge to 3.65 V and discharge to 2.5 V at a known current. For 280 Ah that takes a day per cell. If you cannot do that, the checks above plus the first full cycle of the assembled battery are enough: a weak cell shows up straight away, because it reaches the top and the bottom first.
Balancing before assembly (top balancing)
Before you connect the cells in series, bring them to the same state of charge. Then in the assembled battery they all reach "full" together, and the BMS does not stop charging because one cell has run ahead.
- Connect all eight cells in parallel: all positives together, all negatives together. Before you do, make sure their voltages are within 0.05 V of each other; otherwise a large current will flow between them the moment you connect them.
- Connect a bench power supply set to 3.65 V, with the current as high as the supply allows (10–30 A). Use short, thick leads, and set the voltage by a multimeter on the cell terminals, not by the supply's display.
- Charge until the current drops almost to zero (below about 1 A).
- Disconnect the supply, let the cells rest for a few hours, then take the parallel connection apart.
How long it takes: eight 280 Ah cells at about 40 % need roughly 1,300 Ah to top up. At 10 A that is five and a half days; at 30 A, nearly two.
An active balancer in the finished battery also evens the cells out, but it only moves charge when the voltages differ noticeably, and on the plateau the difference is a few millivolts. So it takes a long time to even out a large starting difference, a few minutes at the end of each charge; top balancing removes it in one go.
Assembly: layout, busbars, insulation
Layout. The eight cells go in one row or in two rows of four. Series connection: the positive of the first cell to the negative of the second, and so on. The battery's negative output (to the BMS) comes from the negative of cell 1, and the positive output (through the fuse) from the positive of cell 8.
Insulation between cells. The blue film on the case is thin and wears through easily. A cell's case may be at a voltage relative to its terminals, so put insulating sheets (1–2 mm FR4 or ready-made spacers for prismatic cells) over the whole face between neighbouring cells, and an insulating sheet underneath as well. Once assembled, cover the terminals with a non-conductive lid.
Busbars. Flexible ones (many thin copper strips) or plates with a loop-shaped bend are better: the cells "breathe" a little as they charge and discharge, and a rigid busbar pulls the terminal upwards. The terminals are aluminium: before tightening, clean the contact surface of oxide with a fine abrasive or a brush, and wipe it with alcohol.
Tightening. Use the torque from the cell datasheet and a torque wrench. An overtightened bolt strips the thread in the aluminium terminal, and such a terminal is hard to repair. A loose contact heats up under current. Check the torque again after a week of use.
BMS sense wires (thin, one to each point between cells) go under the terminal bolt together with the busbar, with a ring terminal, and not onto the middle of the busbar. Otherwise the BMS also measures the voltage drop across the busbar, and under current one cell looks higher and another lower than it really is.
Power cables and lugs
How many amps a cable can carry
For example, 16 mm² of copper carries 100 A in free air and 85 A in conduit continuously, according to the PUE tables (the electrical installation rules used in Ukraine). Aluminium of the same cross-section carries 75 and 60 A. These figures are for PVC or rubber insulation at +25 °C. Flexible cable with silicone insulation withstands 180–200 °C, so on paper it can carry more, roughly 120–150 A. But on a 24 V battery the limit is usually set not by heating but by voltage drop: two metres of 16 mm² cable (there and back) is ≈ 2.2 mΩ, and at 100 A it loses ≈ 0.22 V and ≈ 22 W of heat.
What the columns mean:
- Cross-section, mm² — the area of the conductor (all strands together), not of the cable with its insulation;
- Conductor diameter, mm — for a solid conductor. A stranded conductor of the same cross-section is about 10–20 % thicker because of the air between strands;
- Copper / aluminium in free air, in conduit, A — the largest continuous current per the PUE (tables 1.3.4 and 1.3.5): PVC or rubber insulation, air at +25 °C; "in conduit" means two single-core cables in one conduit; "—" means the PUE table has no value;
- AWG — the nearest AWG size, its actual cross-section, and the nearest commonly sold size that is not thinner than the metric one (AWG);
- Resistance, mΩ per 1 m — the resistance of one metre of conductor at +20 °C (copper 0.0175, aluminium 0.028 Ω·mm²/m). The same number is the voltage drop in millivolts per amp per metre of cable.
| Cross-section, mm² | Conductor diameter, mm | Copper in free air, A | Copper in conduit, A | Aluminium in free air, A | Aluminium in conduit, A |
|---|---|---|---|---|---|
| 0.5 | 0.8 | 11 | — | — | — |
| 0.75 | 0.98 | 15 | — | — | — |
| 1 | 1.13 | 17 | 16 | — | — |
| 1.5 | 1.38 | 23 | 19 | — | — |
| 2.5 | 1.78 | 30 | 27 | 24 | 20 |
| 4 | 2.26 | 41 | 38 | 32 | 28 |
| 6 | 2.76 | 50 | 46 | 39 | 36 |
| 10 | 3.57 | 80 | 70 | 60 | 50 |
| 16 | 4.51 | 100 | 85 | 75 | 60 |
| 25 | 5.64 | 140 | 115 | 105 | 85 |
| 35 | 6.68 | 170 | 135 | 130 | 100 |
| 50 | 7.98 | 215 | 185 | 165 | 140 |
| 70 | 9.44 | 270 | 225 | 210 | 175 |
| 95 | 11 | 330 | 275 | 255 | 215 |
| 120 | 12.36 | 385 | 315 | 295 | 245 |
| 150 | 13.82 | 440 | 360 | 340 | 275 |
| 185 | 15.35 | 510 | — | 390 | — |
| 240 | 17.48 | 605 | — | 465 | — |
| 300 | 19.54 | 695 | — | 535 | — |
AWG and resistance for the same sizes:
| Cross-section, mm² | Nearest AWG | That AWG's cross-section, mm² | Nearest common AWG, not thinner | Copper resistance, mΩ per 1 m | Aluminium resistance, mΩ per 1 m |
|---|---|---|---|---|---|
| 0.5 | 20 | 0.52 | 20 | 35 | 56 |
| 0.75 | 18 | 0.82 | 18 | 23.333 | 37.333 |
| 1 | 17 | 1.04 | 16 | 17.5 | 28 |
| 1.5 | 15 | 1.65 | 14 | 11.667 | 18.667 |
| 2.5 | 13 | 2.62 | 12 | 7 | 11.2 |
| 4 | 11 | 4.17 | 10 | 4.375 | 7 |
| 6 | 9 | 6.63 | 8 | 2.917 | 4.667 |
| 10 | 7 | 10.55 | 6 | 1.75 | 2.8 |
| 16 | 5 | 16.77 | 4 | 1.094 | 1.75 |
| 25 | 3 | 26.67 | 2 | 0.7 | 1.12 |
| 35 | 2 | 33.63 | 1/0 | 0.5 | 0.8 |
| 50 | 1/0 | 53.48 | 1/0 | 0.35 | 0.56 |
| 70 | 2/0 | 67.43 | 3/0 | 0.25 | 0.4 |
| 95 | 3/0 | 85.03 | 4/0 | 0.184 | 0.295 |
| 120 | 250 kcmil | 126.68 | 250 kcmil | 0.146 | 0.233 |
| 150 | 300 kcmil | 152.01 | 300 kcmil | 0.117 | 0.187 |
| 185 | 350 kcmil | 177.35 | 400 kcmil | 0.095 | 0.151 |
| 240 | 500 kcmil | 253.35 | 500 kcmil | 0.073 | 0.117 |
| 300 | 600 kcmil | 304.02 | 600 kcmil | 0.058 | 0.093 |
Voltage drop and run length
The run here is the distance from the battery to the load, one way. The cable goes there and back, so resistance is counted over twice the length: drop = current × 2 × run length × resistance of 1 m. The current in both tables is the largest continuous one per the PUE (free air). At a lower current the drop is smaller, and the allowed run is longer by the same factor.
The "run at 3 %" columns give the longest distance at which the cable, at that current, loses no more than 3 % of the system voltage: 0.36 V on 12 V, 0.72 V on 24 V, 1.44 V on 48 V. For batteries and UPSes I recommend no more than 2–3 %. For 230 V lighting, 3–5 % is usually accepted.
Copper:
| Cross-section, mm² | Max continuous current in free air, A | Drop per 1 m of run at this current, V | Run at 3 % on 12 V, m | Run at 3 % on 24 V, m | Run at 3 % on 48 V, m |
|---|---|---|---|---|---|
| 0.5 | 11 | 0.77 | 0.5 | 0.9 | 1.9 |
| 0.75 | 15 | 0.7 | 0.5 | 1 | 2.1 |
| 1 | 17 | 0.595 | 0.6 | 1.2 | 2.4 |
| 1.5 | 23 | 0.537 | 0.7 | 1.3 | 2.7 |
| 2.5 | 30 | 0.42 | 0.9 | 1.7 | 3.4 |
| 4 | 41 | 0.359 | 1 | 2 | 4 |
| 6 | 50 | 0.292 | 1.2 | 2.5 | 4.9 |
| 10 | 80 | 0.28 | 1.3 | 2.6 | 5.1 |
| 16 | 100 | 0.219 | 1.6 | 3.3 | 6.6 |
| 25 | 140 | 0.196 | 1.8 | 3.7 | 7.3 |
| 35 | 170 | 0.17 | 2.1 | 4.2 | 8.5 |
| 50 | 215 | 0.151 | 2.4 | 4.8 | 9.6 |
| 70 | 270 | 0.135 | 2.7 | 5.3 | 10.7 |
| 95 | 330 | 0.122 | 3 | 5.9 | 11.8 |
| 120 | 385 | 0.112 | 3.2 | 6.4 | 12.8 |
| 150 | 440 | 0.103 | 3.5 | 7 | 14 |
| 185 | 510 | 0.096 | 3.7 | 7.5 | 14.9 |
| 240 | 605 | 0.088 | 4.1 | 8.2 | 16.3 |
| 300 | 695 | 0.081 | 4.4 | 8.9 | 17.8 |
Aluminium:
| Cross-section, mm² | Max continuous current in free air, A | Drop per 1 m of run at this current, V | Run at 3 % on 12 V, m | Run at 3 % on 24 V, m | Run at 3 % on 48 V, m |
|---|---|---|---|---|---|
| 0.5 | — | — | — | — | — |
| 0.75 | — | — | — | — | — |
| 1 | — | — | — | — | — |
| 1.5 | — | — | — | — | — |
| 2.5 | 24 | 0.538 | 0.7 | 1.3 | 2.7 |
| 4 | 32 | 0.448 | 0.8 | 1.6 | 3.2 |
| 6 | 39 | 0.364 | 1 | 2 | 4 |
| 10 | 60 | 0.336 | 1.1 | 2.1 | 4.3 |
| 16 | 75 | 0.263 | 1.4 | 2.7 | 5.5 |
| 25 | 105 | 0.235 | 1.5 | 3.1 | 6.1 |
| 35 | 130 | 0.208 | 1.7 | 3.5 | 6.9 |
| 50 | 165 | 0.185 | 1.9 | 3.9 | 7.8 |
| 70 | 210 | 0.168 | 2.1 | 4.3 | 8.6 |
| 95 | 255 | 0.15 | 2.4 | 4.8 | 9.6 |
| 120 | 295 | 0.138 | 2.6 | 5.2 | 10.5 |
| 150 | 340 | 0.127 | 2.8 | 5.7 | 11.3 |
| 185 | 390 | 0.118 | 3 | 6.1 | 12.2 |
| 240 | 465 | 0.109 | 3.3 | 6.6 | 13.3 |
| 300 | 535 | 0.1 | 3.6 | 7.2 | 14.4 |
AWG: one size, several names
AWG (the American scale) works the opposite way to mm²: the smaller the number, the thicker the wire. Beyond AWG 1 come 1/0, 2/0, 3/0 and 4/0, and after that sizes are given in kcmil. The same size is written differently in different countries and by different sellers:
| How it is written | What it means |
|---|---|
10 AWG, 10 ga, 10 gauge, #10 | all the same: AWG 10. "ga" and "gauge" just mean "size" |
B&S 10 | Brown & Sharpe, the old name of the same AWG scale |
1/0, 0, 0 AWG, 1/0 AWG | AWG "one aught", thicker than AWG 1 |
2/0 = 00, 3/0 = 000, 4/0 = 0000 | thicker still; the number of zeros = the number before "/0" |
250 kcmil, 250 MCM, 250 kcm | 250 thousand circular mils ≈ 127 mm². MCM is the old name for kcmil |
SWG 10 | ⚠ a different, British scale: SWG 10 is 3.25 mm in diameter, AWG 10 is 2.59 mm |
4 Ga in car audio | ⚠ often thinner than a real AWG 4 and made of copper-clad aluminium (CCA) |
12AWG 680/0.08 | AWG 12 made of 680 strands of 0.08 mm; an honesty check: 680 × 0.005 mm² ≈ 3.4 mm² |
How to check a cable labelled in AWG: work out the cross-section from the strands (as in the example above) and compare it with the table below. Scrape the conductor with a knife: there must be no grey aluminium under the copper (CCA). CCA has about 1.5 times the resistance of copper and is no good for batteries.
| AWG | Also written as | Conductor diameter, mm | Cross-section, mm² | Nearest metric size, mm² |
|---|---|---|---|---|
| 24 | 24 AWG, 24 ga, #24 | 0.51 | 0.21 | 0.5 |
| 23 | 23 AWG, 23 ga, #23 | 0.57 | 0.26 | 0.5 |
| 22 | 22 AWG, 22 ga, #22 | 0.64 | 0.33 | 0.5 |
| 21 | 21 AWG, 21 ga, #21 | 0.72 | 0.41 | 0.5 |
| 20 | 20 AWG, 20 ga, #20 | 0.81 | 0.52 | 0.5 |
| 19 | 19 AWG, 19 ga, #19 | 0.91 | 0.65 | 0.75 |
| 18 | 18 AWG, 18 ga, #18 | 1.02 | 0.82 | 0.75 |
| 17 | 17 AWG, 17 ga, #17 | 1.15 | 1.04 | 1 |
| 16 | 16 AWG, 16 ga, #16 | 1.29 | 1.31 | 1.5 |
| 15 | 15 AWG, 15 ga, #15 | 1.45 | 1.65 | 1.5 |
| 14 | 14 AWG, 14 ga, #14 | 1.63 | 2.08 | 2.5 |
| 13 | 13 AWG, 13 ga, #13 | 1.83 | 2.62 | 2.5 |
| 12 | 12 AWG, 12 ga, #12 | 2.05 | 3.31 | 4 |
| 11 | 11 AWG, 11 ga, #11 | 2.31 | 4.17 | 4 |
| 10 | 10 AWG, 10 ga, #10 | 2.59 | 5.26 | 6 |
| 9 | 9 AWG, 9 ga, #9 | 2.91 | 6.63 | 6 |
| 8 | 8 AWG, 8 ga, #8 | 3.26 | 8.37 | 10 |
| 7 | 7 AWG, 7 ga, #7 | 3.67 | 10.55 | 10 |
| 6 | 6 AWG, 6 ga, #6 | 4.12 | 13.3 | 16 |
| 5 | 5 AWG, 5 ga, #5 | 4.62 | 16.77 | 16 |
| 4 | 4 AWG, 4 ga, #4 | 5.19 | 21.15 | 25 |
| 3 | 3 AWG, 3 ga, #3 | 5.83 | 26.67 | 25 |
| 2 | 2 AWG, 2 ga, #2 | 6.54 | 33.63 | 35 |
| 1 | 1 AWG, 1 ga, #1 | 7.35 | 42.41 | 50 |
| 1/0 | 0, 0 AWG, 1/0 AWG | 8.25 | 53.48 | 50 |
| 2/0 | 00, 00 AWG, 2/0 AWG | 9.27 | 67.43 | 70 |
| 3/0 | 000, 000 AWG, 3/0 AWG | 10.41 | 85.03 | 95 |
| 4/0 | 0000, 0000 AWG, 4/0 AWG | 11.68 | 107.22 | 120 |
| 250 kcmil | 250 MCM, 250 kcm | 12.7 | 126.68 | 120 |
| 300 kcmil | 300 MCM, 300 kcm | 13.91 | 152.01 | 150 |
| 350 kcmil | 350 MCM, 350 kcm | 15.03 | 177.35 | 185 |
| 400 kcmil | 400 MCM, 400 kcm | 16.06 | 202.68 | 185 |
| 500 kcmil | 500 MCM, 500 kcm | 17.96 | 253.35 | 240 |
| 600 kcmil | 600 MCM, 600 kcm | 19.68 | 304.02 | 300 |
| 750 kcmil | 750 MCM, 750 kcm | 22 | 380.03 | 300 |
Cable size calculator
Type a number into any field and the rest are recalculated. Cross-section, diameter and AWG are linked: change one and the others follow. If you enter the voltage drop you want (in volts or per cent), the calculator picks the cross-section; if you enter the cross-section, it works out the drop.
The calculator runs in the browser and needs JavaScript; the same numbers are in the tables above.
The fuse: it must blow before the cable does
The BMS protects the cells, not the cable. It stops a short circuit by switching off its MOSFETs, but a MOSFET can fail shorted, and then nothing stands between the battery and the short. That is why a separate fuse goes on the battery positive. It is the deliberately weakest point of the circuit: on overload or a short it melts before the cable has time to get red-hot.
| Requirement | Why |
|---|---|
| on the positive, as close to the battery terminal as possible (~20 cm at most) | all the cable after the fuse is protected; the piece before it is protected by nothing, so keep it short and well secured |
| rating at least 1.25 × the highest load current | so the fuse does not blow in normal use; the highest current is at cut-off, and the calculator works it out |
| rating no higher than the cable can carry continuously | otherwise the cable overheats before the fuse opens; that is why the cable is sized for the fuse, not for the load |
| DC-rated, for 32 V or more | a DC arc does not go out by itself the way an AC one does; a fuse or breaker rated only for 230 V AC may fail to break it |
| breaking capacity above the battery's short-circuit current | for an 8S 280 Ah battery that is around 10 kA or even more. A fuse that cannot break it keeps arcing. Class T fuses are the safest (up to 20 kA); ANL and MEGA often break only a few thousand amps, so check the datasheet |
| not an automotive blade fuse | those are made for tens of amps and small short-circuit currents |
If several branches leave the battery in thinner cable (two UPSes in our case), each branch needs its own fuse at its start, sized for its cable. The main fuse at the battery will not protect a thin branch: it is sized for the thick cable.
A load switch after the fuse is handy for isolating the battery, but it does not replace the fuse: it never trips on its own. A DC breaker can replace the fuse only if its breaking capacity exceeds the battery's short-circuit current.
[TO ADD: which fuse we have, type and rating]
Connecting copper cable to a LiFePO4 terminal
The lug. A copper tube lug sized for the cable and for the terminal bolt (M6 on EVE 280 cells), crimped with a hexagonal crimping tool. A proper crimp is a cold weld: the copper of the cable and the lug become one piece.
Do not solder the cable into the lug. Solder that wicks between the strands makes the cable stiff next to the lug, and vibration breaks it right there. And under current and heat, solder slowly creeps.
Do not tin the lug yourself; factory-tinned is fine:
| Lug | On a LiFePO4 terminal |
|---|---|
| factory-tinned (a thin electroplated layer) | best: tin stops the copper oxidising and reduces galvanic corrosion between the copper and the aluminium (these cells usually have aluminium terminals) |
| bare copper | fine in a dry room: clean it bright and apply a thin layer of antioxidant contact paste |
| tinned with a soldering iron | no: a thick, uneven layer of solder under the bolt creeps under pressure and heat, the bolt loosens and the contact heats up |
| aluminium, a twisted joint, a car crocodile clip | no |
Order under the bolt (bottom to top): cell terminal → lug, flat face to the terminal → BMS sense wire ring → flat washer → spring or disc washer → bolt. No washer between the terminal and the lug: the current must flow through the lug's flat face into the terminal, not through the steel bolt. The lug lies flat, no wider than the terminal, not bent. Tighten with a torque wrench to the torque in the cell datasheet, and check it again after a week.
Fixing a temperature sensor to a terminal
⚠ Most important: the sensor must be insulated from the terminal. The BMS temperature sensor wires connect to the BMS circuitry, which is referenced to the battery negative. The "+" terminal is 25–29 V higher. A sensor with a metal ring under the bolt, or with damaged insulation, would connect the battery "+" to a BMS input and burn out the BMS. So the sensor does not go under the bolt; it is pressed against the lug or busbar next to the terminal, and only with intact insulation (an epoxy bead or heat-shrink, like the BMS's own probes).
| How to fix it | Good enough? |
|---|---|
| electrical tape only | no: PVC tape adhesive softens from 50 °C, the tape slides and the sensor lifts off the metal |
| a cable tie only | weak: it presses at one point and leaves an air gap |
| thermal paste + Kapton tape + cable tie | yes: the paste fills the gap, Kapton holds up to 200 °C, the tie presses it down |
| thermal adhesive (thermally conductive, electrically insulating) | yes, if you will never need to remove the sensor |
Thermal paste is not essential, but with it the sensor reads a few degrees more accurately and responds faster. Use an ordinary electrically non-conductive silicone paste (the kind used for CPUs); metal-filled pastes (silver or liquid metal) are not suitable here. Apply a thin layer, just enough to fill the gap. Cover the sensor and lug with a piece of foam so the sensor measures the metal, not the air.
Compress or not, and why not with clamps
In short: compress, yes, evenly and moderately. With clamps, no.
Why compress. A prismatic cell gets slightly thicker as it charges and thinner as it discharges, and over the years it slowly swells. Inside are layers of electrodes; when nothing holds them together they separate, and the cell ages faster. Manufacturers measure cycle life on compressed cells. For example, the EVE LF280K datasheet gives cycle life measured in a fixture that presses on the wide face with about 300 kgf; over the whole face (≈ 17 × 20 cm) that is less than 1 kgf/cm². Not much pressure, but it is constant and even.
The second purpose is to protect the busbars and terminals. The cells are always moving a little: they get thicker with charge and heat, thinner with discharge and cold, and over the years they also swell from the gas slowly building up inside. A cell that isn't held in place moves freely: it shifts, tilts and bulges. Every such movement pulls on the busbar, and the busbar pulls on the bolt and the terminal: bolts work loose, the contact heats up, and the thread in the aluminium terminal strips. Compressed cells stand as one block, the frame takes the movement, and the busbars and terminals carry no extra load.
Why not clamps:
| A clamp | What happens |
|---|---|
| presses with a small pad on one spot | the thin aluminium case bends, and the pressure inside is uneven |
| the force is unknown and depends on your hand | easy to overdo: the case deforms and the cell can be damaged |
| rigid, with no spring | the cell breathes but the clamp does not: during charging the pressure rises, and nobody knows by how much |
| slips or loosens over time | the compression is lost without anyone noticing |
How to compress properly:
- Two rigid end plates covering the whole wide face of the end cells: steel from 6 mm or aluminium from 10 mm, or thick plywood with a steel channel across it: a thin plate bends in the middle and the pressure stays only at the edges. Put an insulating sheet between the plate and the cell.
- Four threaded rods (M8 or thicker) at the corners, running along the row of cells. Slide tubing over each rod: PVC or silicone, a snug fit, along its whole length from plate to plate. The rod runs along the edges of every cell, and a cell case can be live. If rubbing or vibration damages the heat-shrink film on the cases, a bare rod connects the cases of several cells, and a short-circuit current flows between them. Thin heat-shrink on the rod wears through as well; thick tubing stands up to rubbing. It also keeps the rod away from terminals and busbars.
- A spring under the nut on each rod. The spring keeps almost the same force as the cells get thicker and thinner. Set the force by how far the springs are compressed: for ~300 kgf over four rods, each one carries ~75 kgf (≈ 740 N). A spring rated 50 N/mm gives that force when compressed by about 15 mm.
- Tighten the nuts evenly, in a criss-cross order, half a turn at a time, measuring the spring compression with a ruler.
- Tighten with the cells half charged (on the plateau), not full.
Springs or just rods?
| What | Rods with springs | Rods only, no springs |
|---|---|---|
| when the cells get thicker (charge, heat, age) | the force barely changes: the springs compress a little more | the force rises, by how much nobody knows: the rigid frame does not let the cells expand |
| when they get thinner (discharge, cold) | the force stays | the force drops, a gap may open, and the cells shift |
| how to know the force | measure the spring compression with a ruler | no way: it depends on your hand |
| upkeep | glance at the springs | check for gaps and retighten the nuts from time to time |
| best suited for | any battery, especially with frequent cycles and high current | backup and UPS: the battery sits full, few cycles, low current |
Our advice: springs are better. For a backup battery, rigid rods without springs will do, but tighten them with the cells half charged, only until everything sits snug, no tighter, and every few months check that no gap has opened and no face has bulged.
Does compression extend service life? Yes, but to be more precise: compression lets the cells reach their datasheet life; it adds nothing beyond it.
| How the cells are held | What happens inside | Service life |
|---|---|---|
| loose, with gaps | the electrode layers separate, part of the area stops working, gas stays trapped between the layers; in a study of unconstrained prismatic cells, swelling sped up after only ~250 cycles | the shortest; nobody promises the datasheet cycles here, since the maker measured them in a fixture |
| snug in a box, no force | the cells cannot shift, but almost nothing resists their growth | longer than with no box, shorter than in a frame; for a UPS or backup this is usually enough |
| moderate and even, with springs, at the datasheet force | the layers are pressed together, gas is squeezed out, the particles make better contact | the datasheet figure; in lab studies noticeably more cycles than without compression (up to ~25 % in one 2025 study) |
| too hard | the separator pores close up and the electrolyte moves between the electrodes less freely | shorter than with moderate force: in studies the highest pressure gave the fastest capacity loss |
| a clamp on one spot | over-pressed in one place, the rest of the face free | unpredictable |
The fewer the cycles, the smaller the difference. A UPS battery that sits full and is discharged a few times a year ages mostly from time, heat and the voltage it is held at (see Service life), not from cycling.
Is it essential in a UPS? In a UPS the battery sits full most of the time and discharges rarely and at low current, so it will work without compression too. But at the very least the cells must sit tightly, with no gaps, in a frame or box so they cannot spread apart or shift. Otherwise any movement of the cells passes to the busbars, and the busbars tear out the terminals.
⚠ Compression will not "cure" a swollen cell. If a face is already bulging, replace the cell rather than clamping it.
[TO ADD: how ours is compressed — frame, plates, rods, springs, or no compression; photos]
Service life: what makes a battery last longer
A battery ages in two ways at once: from cycling (charge and discharge) and from time, even when it just sits. Time does more harm the warmer it is and the higher the charge. In a UPS, where the battery sits full nearly all the time, the second matters more.
Does it last longer if you do not charge or discharge it fully?
In short, yes, and the top end makes the biggest difference. LiFePO4 ages fastest when it sits fully charged for a long time, especially in the warm, and when it is discharged below 2.5 V. The middle of the range is the easiest on a cell.
| How it is used | How to set it up | What happens to service life |
|---|---|---|
| all the way in both directions every time | charge to 3.65 V, discharge to 2.5 V | the datasheet cycles: 6000 to 80 % capacity for the EVE LF280K (25 °C, 0.5C, in a fixture); both ends are the hardest on a cell |
| without the top and bottom ends | charge to 3.45–3.55 V, cut off discharge at 2.8–3.0 V | usually more cycles than the datasheet; you lose only a few per cent of capacity, since LiFePO4 holds little energy above 3.45 V and below 2.8 V. This is the setting we recommend |
| a narrow band in the middle (20–80 %) | by the BMS state of charge | a little longer still, but each cycle delivers ~40 % less energy, so over the whole life the energy gain is small |
| only shallow cycles in the middle, never a full one | — | in one study (Naumann, 2020), a surprisingly large capacity loss; part of it comes back after a few full cycles |
| sits full all the time (UPS) | the voltage it is held at | the higher, the faster it ages: 3.65 V per cell is the worst, 3.40–3.45 V (27.2–27.6 V for 8S) is good |
| discharge below 2.5 V | — | fast ageing; below ~2.0 V the copper inside the cell starts to dissolve, and such a cell can become dangerous |
Compare energy, not the number of cycles. Sellers write, for example, "6000 cycles at full discharge and 8000 at 80 %". But 8000 cycles at 80 % add up to 6400 full ones, which is only 7 % more energy over the whole life. The cycle count goes up mostly because each cycle is smaller.
Once every month or two, charge fully to 3.55–3.60 V and let the cells balance. The BMS then corrects its state of charge, the balancer evens out the cells at the top, and part of the loss from shallow cycling comes back.
If a new battery just sits
Even without a single cycle a cell ages: a protective film slowly grows on the graphite electrode and ties up some of the lithium. The rate depends most on temperature and less on the state of charge. Capacity falls fastest in the first year and more slowly after that.
| Time in storage (approx.) | 10 °C, 50 % charge | 25 °C, 50 % charge | 25 °C, 100 % charge | 40 °C, 100 % charge |
|---|---|---|---|---|
| 1 year | 99 % | 99 % | 97 % | 93 % |
| 2 years | 99 % | 98 % | 96 % | 90 % |
| 5 years | 98 % | 97 % | 93 % | 84 % |
| 10 years | 98 % | 95 % | 91 % | 78 % |
What else changes while the battery sits:
| What | How it changes | What to do |
|---|---|---|
| capacity | falls slowly (table above) | store it cool, at 30–60 % charge |
| internal resistance | rises by a few per cent a year: the voltage sags more under current | test the battery under load before putting it into service |
| self-discharge | typically 1–3 % a month | every 3–6 months check the voltage and top up to about half |
| spread between cells | the cells self-discharge at different rates, so the spread grows | balance them before assembly (top balancing) |
| a BMS left connected | draws a little power itself and over months can drain the battery flat | for long storage, disconnect the BMS or check more often |
| frost | sitting in the cold does a cell no harm | never charge below 0 °C |
How to store it: 30–60 % charge (on the plateau you cannot tell it from the voltage, so discharge a full battery by about half its capacity), 10–25 °C, dry, BMS disconnected. Check the voltage every 3–6 months: no cell should drop below 3.0 V.
When buying "new" cells, ask for the production date of the batch: a cell that has spent two years in a warehouse fully charged and in the warm is no longer quite new.
The BMS: what it can do
A BMS (battery management system) is a board that the battery's whole current passes through. It sits on the negative side: the B− terminal goes to the negative of cell 1, and P− goes to the load and the charger (on our board charging and discharging share the same terminal). The board measures each cell through a separate connector with thin wires.
On a JBD board the charge and discharge switches (six MOSFETs each) are connected in series back to back, so current in either direction passes through both groups. When a protection trips, the BMS turns off one group: charging or discharging.
| Feature | How it works |
|---|---|
| cell protection: overcharge | any cell above the threshold for longer than the delay → charging stops; a second, hard threshold sits higher |
| cell protection: over-discharge | any cell below the threshold → discharging stops; a second, hard threshold sits lower |
| battery protection: voltage | the same for the total of all cells |
| charge and discharge current | above the threshold for longer than the delay → off, then another try after a set pause |
| short circuit | its own threshold, with a delay in microseconds |
| temperature | four thresholds: too hot and too cold, separately for charging and for discharging |
| state of charge | counts the amp-hours in and out; you need to enter the battery capacity for this |
| counters | cycles, and how many times each protection has tripped |
| balancing | passive: bleeds the highest cell through a resistor at a low current |
| communication | UART (and Bluetooth on versions with the module): all readings and settings, switching the MOSFETs on and off |
Each threshold has a "release" value at which the protection clears by itself. After overcharge the release is below the threshold, after over-discharge it is above. Otherwise the switch would keep turning on and off.
The thresholds we recommend for LiFePO4 8S
| Setting | We recommend | Why |
|---|---|---|
| cell overcharge | 3.60 V | LiFePO4 is charged to 3.55–3.65 V; above that it ages faster |
| release after overcharge | 3.45 V | 0.1–0.2 V below the threshold |
| hard overcharge threshold | 3.70 V | a second safeguard, a little above the main one, no higher than 3.75 V |
| cell over-discharge | 2.80 V | below 2.8 V there is almost no capacity left, and below 2.7 V it is a deep discharge |
| release after over-discharge | 3.10 V | 0.2–0.35 V above the threshold |
| hard over-discharge threshold | 2.50 V | a second safeguard, no lower than the datasheet limit |
| battery: overcharge / over-discharge | 28.8 / 22.4 V | 8 × the cell thresholds |
| charging: too hot / too cold | 45 / 2 °C | charging below 0 °C plates lithium and ruins the cell for good; 2 °C allows for sensor error |
| discharging: too hot / too cold | 60 / −20 °C | LiFePO4 delivers current down to −20 °C; above 60 °C is dangerous for the cells and the board |
| charge and discharge current | the board rating | 50 A for ours; more only after checking how hot the board gets under current |
| battery capacity | 280 Ah | the state of charge is counted from it |
Passive and active balancing
Passive balancing in the BMS simply burns off the excess of the highest cell in a resistor, at a low current. It keeps a battery that was balanced before assembly in balance, but it cannot close a gap of a few amp-hours.
So we have a separate active balancer board: it moves charge from the higher cell to the lower one at a few amps and keeps the cells within a few millivolts of each other. We turned off the BMS's own balancing so the two systems do not work against each other.
The active balancer's wires go to the same points between the cells as the BMS sense wires, and also under the terminal bolt.
Current: the board rating and what the UPSes need
The board is rated at 50 A. At full power the SUA1000I draws up to ~38 A from the battery and the SUA1500I up to ~55 A, so the SUA1500I alone would exceed the rating at full load, let alone both together. Our load is lower [TO ADD: the actual discharge current of both UPSes]. The BMS discharge current threshold must be above the real current, or the BMS will shut the UPS down under load. The charge current is the sum of the charger and the UPSes, which also top the battery up; that sum must be below the BMS charge threshold.
The board can only be pushed above its rating after checking how hot it gets under current: in steps, watching the board sensor. We have not done this test yet.
Shunts: how much current they can carry
A shunt is a resistor of very low resistance that the battery's whole current flows through. The BMS measures the voltage across it (in millivolts) and works out the current from it. To keep the shunt cooler, boards use several identical resistors in parallel. Ours has five, marked 0m50.
Reading shunt markings:
| Marking | Resistance | How to read it |
|---|---|---|
0m50, m50 | 0.50 mΩ | "m" stands where the decimal point goes, units are milliohms |
1m00, 1m0 | 1.00 mΩ | the same |
R001 | 1 mΩ | "R" stands where the decimal point goes, units are ohms: 0.001 Ω |
R0005 | 0.5 mΩ | 0.0005 Ω |
R002 | 2 mΩ | 0.002 Ω |
How to work it out. Five 0.50 mΩ shunts in parallel make 0.50 ÷ 5 = 0.10 mΩ in total, and each carries a fifth of the current. How much one shunt can take is set by its rated power P, which depends on the package. The current of one shunt is I = √(P ÷ R). For continuous use we apply two corrections:
- 60 % of the rated power. The rating is given for +70 °C, and the shunts sit next to hot MOSFETs. Above +70 °C the allowed power is reduced.
- 15 % imbalance. The traces to the resistors differ slightly, so the most loaded shunt carries 15 % more than the average.
| Rated power of one shunt, W | Typical package | Limit of one shunt per datasheet, A | All five per datasheet, A | All five continuously (60 % of power, 15 % imbalance), ≈ A |
|---|---|---|---|---|
| 1 | SMD 2512, standard | 45 | 224 | 150 |
| 2 | SMD 2512, metal (alloy) | 63 | 316 | 210 |
| 3 | SMD 2512 / 2725, metal | 77 | 387 | 260 |
| 5 | SMD 3920 / metal strip | 100 | 500 | 340 |
How much heat the shunts give off (heat = current² × 0.10 mΩ; the hottest one with the imbalance correction) and the voltage drop they cause:
| Battery current, A | Heat in all five shunts, W | Heat in the hottest shunt, W | Voltage drop across the shunts, mV |
|---|---|---|---|
| 50 | 0.25 | 0.07 | 5 |
| 80 | 0.64 | 0.17 | 8 |
| 100 | 1 | 0.26 | 10 |
| 150 | 2.25 | 0.6 | 15 |
| 200 | 4 | 1.06 | 20 |
The verdict for our board. The shunts are not the weak point: even five ordinary 1 W shunts carry ≈ 150 A continuously. The limit is set by the MOSFETs, 6 + 6, for which a sensible limit is ~80–100 A. For comparison, at 100 A the shunts together give off 1 W and the twelve MOSFETs ≈ 16 W.
[TO ADD: size and look of our shunts — 2512 or larger, metal or standard; photo]
⚠ The shunt resistance is also stored in the BMS settings (register 2C, "shunt resistance"). The board works out the current from exactly this number. If you add or replace shunts, the current readings will be wrong. Then the current is calibrated again: a load with a known current, a clamp meter on the cable, and the BMS sets the new resistance itself. Do not tweak the number in register 2C by hand.
Shunt calculator. Enter the marking (0m50, R001) or the resistance in milliohms, the number of shunts, the rated power of one shunt and the battery current. The calculator shows the continuous current limit, the heat and the voltage drop. If you enter the continuous current you need, it shows what power each shunt must be rated for.
The calculator runs in the browser and needs JavaScript; the same numbers are in the tables above.
Order for connecting the BMS
- Check the sense connector before plugging it into the board. Multimeter: black probe on the first wire (battery negative), red probe on each following wire in turn. The voltage should rise in even steps of ~3.3 V: 3.3 → 6.6 → 9.9 … → ~26.4 V. A missing step or a drop means wires are swapped.
- Connect the board's B− to the battery negative.
- Plug the sense connector into the board. Check the exact order of steps 2 and 3 in your board's manual: it differs between manufacturers.
- Connect P− to the load and the charger. Never connect B− and P− directly: all the current would then bypass the protection.
- Check the readings: all eight cells, the total equal to the voltage across the battery terminals, sensible temperatures.
Disconnect in reverse order: the load first, then the sense connector, and B− last.
Temperature sensors: where to put them
Our board reports three temperatures: two external sensors (10 kΩ NTC on wires) and the board's own sensor next to the MOSFETs. [TO ADD: which of the three readings is the board; it is easy to spot: under heavy current it rises while the other two hardly move.] The BMS settings let you choose which sensors are enabled. A disabled sensor is not shown and plays no part in the protection.
🔑 The key point: the board has no separate thresholds per sensor. All enabled sensors work with the same too-hot and too-cold thresholds for charging and for discharging. So the "45 °C while charging" threshold applies to the board sensor too. At our currents (tens of amps) the board barely warms up, so this does not matter. But if you raise the current to 80–100 A, the board may reach 45 °C and stop charging while the cells are cold. The external sensors do not go on the board or its heatsink: it already has its own.
If the battery is always kept warm
When the battery only ever sees temperatures above freezing, there is no cold to worry about, and both external sensors watch for heat:
| Sensor | Where | What it catches |
|---|---|---|
| external 1 | on the side (narrow) face of a middle cell, the fourth or fifth, at half height (in two rows, an inner one) | the hottest spot: the middle of the row cools worst |
| external 2 | on the battery's "+" output terminal, where the heavy cable is attached, or on the busbar next to it | a bad contact: a loose bolt heats up before anything else |
| board sensor | already on the board, next to the MOSFETs | heating of the BMS itself |
Putting the terminal sensor under the 45 °C threshold is deliberate: if a contact has reached 45 °C something is wrong with it, and charging is better stopped until the bolt is checked.
Leave the cold-charging protection (2 °C) enabled anyway. It costs nothing, and a "warm" room turns cold if the heating goes off for a long time in winter.
If the battery may see frost
Then move external sensor 2 from the terminal to the cold side: onto the side face of an end cell, near the bottom or on the side where cold air comes from. That is the sensor that will block charging in frost. Sensor 1 stays on the middle cell. Check the terminal that no longer has a sensor by hand or with a thermal camera after an hour at high current.
⚠ The sensor on the "+" terminal must have intact insulation and must not go under the bolt: the terminal is 25–29 V above the BMS negative. How to fix it is in the section on the terminal sensor.
How to mount them:
- the sensor head must sit tight against the metal or the case: a thin layer of thermal paste, with Kapton or aluminium tape over it;
- put a piece of foam or other insulation on top, so the sensor measures the cell, not the air;
- route the sensor wires away from the busbars and fasten them so they cannot chafe;
- do not squeeze a sensor between cells: it will either push through the insulation or end up in a gap and read poorly. In a compressed battery the wide faces are covered, so the sensors go on the exposed side faces;
- keep the top of the cell between the terminals clear: that is where the safety vent is, and it must not be covered.
Check. At rest, after a few hours with no current, all three readings should agree within 1–2 °C. If one reads very differently, that sensor is poorly attached or faulty. We monitor the sensors all the time: if a sensor disappears or shows an impossible temperature, we get a notification.
[TO ADD: where our external sensors are; photos]
Checking the assembled battery
| Check | How | Good |
|---|---|---|
| cell spread at rest | BMS readings after a few hours with no current | up to ~10 mV on the plateau; a few mV with an active balancer |
| total of the cells | compare with a multimeter across the battery terminals | differs by no more than 0.1–0.2 V |
| current | a load of known power, a clamp meter on the cable | the BMS shows the same within 1–2 % |
| contact heating | after an hour at high current, feel the terminals and busbars (or check them with a thermal camera) | barely warm, all the same |
| first full charge | watch the cells at the top | they reach the top together, with no cell running ahead |
| state of charge | after the first full charge the BMS sets 100 % | it then counts on its own; do a full charge every few months |
We do a full discharge to measure the real capacity rarely, and with the UPSes: that is covered in the article on the APC Smart-UPS with LiFePO4.
The spread grows under current: check the bolts
A voltage difference between cells comes in two kinds, with different causes:
| How the difference behaves | Cause | What to do |
|---|---|---|
| small at rest, grows noticeably as soon as charge or discharge current flows, gone a minute after the current stops | a bad contact: a loose bolt, an oxidised terminal, a sense wire not under the bolt | check and tighten the contacts (below) |
| grows slowly, stays at rest too, largest at the end of a charge or discharge | the cells are at different states of charge or have different capacities | balancing; check whether it is always the same cell |
Why a contact affects the readings: the BMS measures a cell's voltage together with the voltage drop across the joint next to it. Under current a bad contact adds tens of millivolts to the reading, and the cell next to it looks higher or lower than it really is. The BMS may then stop charging or discharging too early, and the balancer may move charge where it is not needed.
How to find a bad contact:
- Compare the BMS readings at rest and under a steady high current. The cell whose reading jumps the most points to the place: look around its terminals.
- At the same current, measure the voltage drop across each joint with a multimeter: one probe on the body of the cell terminal, the other on the busbar or the lug on it. Good joints all show roughly the same few millivolts; a bad one shows several times more than its neighbours. Work carefully: the probe must not touch the next terminal.
- After an hour under current, feel the terminals or look at them with a thermal camera: a bad contact is warmer than the others.
- Once found, switch off the load and the charger, undo the bolt, clean the terminal and the lug, reassemble them in the right order and tighten with a torque wrench to the datasheet torque. Do not tighten harder "just in case": the thread in an aluminium terminal strips.
- Check that the BMS and balancer sense wires sit under the terminal bolt, not in the middle of a busbar, and that their lugs are secure.
⚠ A bad contact does more than spoil the readings. Under current it heats up, the heat loosens it further, and that is how terminals melt and busbars burn. So if the spread grows under current, check the bolts the same day.
Controlling the BMS: command line, Python, microcontroller
A JBD board is not read-only: from a computer or a microcontroller you can change its settings and switch the charge and discharge MOSFETs on and off. Below: how it communicates, ready-made command frames, programs and libraries.
⚠ Turning off the discharge MOSFETs cuts power to everything the battery feeds, in our case both UPSes and the servers behind them. Try write commands on a battery with no load first.
Connection
| Item | How |
|---|---|
| interface | UART, 9600 baud, 8N1; the same four-pin connector the Bluetooth module plugs into |
| levels | TTL logic, not RS-232 or RS-485; measure the voltage on the board's TX pin before connecting (3.3 or 5 V) |
| to a computer | a USB → TTL UART adapter (CP2102, CH340, FT232RL): board TX → adapter RX, RX → TX, ground → ground; do not connect power |
| to a controller | ESP32 (3.3 V) directly if the board is also 3.3 V; if the board and controller levels differ, through a level shifter |
| Bluetooth | the module plugs into the same connector: for a wired link you remove it or use a splitter; if both are connected, disconnect the phone while you write to the board |
⚠ On most boards the UART ground is tied to the cells' negative (B−). If the controller or computer shares a ground with the load or with another battery, then when the BMS switches its MOSFETs off, current may flow through the thin UART wire and burn out the adapter or the board. One BMS, one controller. Where grounds might meet, use galvanic isolation: an isolated USB → UART adapter or a digital isolator.
How a command is built
Every command is a frame of bytes:
DD A5|5A command length data… checksum (2 bytes) 77
A5reads,5Awrites;- checksum = 0x10000 − (command + length + all data bytes), high byte first;
- reply:
DD command status length data… checksum 77; status 0 means OK, and the reply checksum is calculated starting from the status byte.
Ready-made frames, checksums already worked out:
| Action | Frame |
|---|---|
| basic data: voltage, current, charge, MOSFETs, temperatures | DD A5 03 00 FF FD 77 |
| cell voltages | DD A5 04 00 FF FC 77 |
| board name | DD A5 05 00 FF FB 77 |
| charge and discharge on | DD 5A E1 02 00 00 FF 1D 77 |
| charge off | DD 5A E1 02 00 01 FF 1C 77 |
| discharge off | DD 5A E1 02 00 02 FF 1B 77 |
| charge and discharge off | DD 5A E1 02 00 03 FF 1A 77 |
| enter service mode | DD 5A 00 02 56 78 FF 30 77 |
| exit and save changes | DD 5A 01 02 28 28 FF AD 77 |
| exit without saving | DD 5A 01 02 00 00 FF FD 77 |
In command E1 a set bit means "off": bit 0 is charge, bit 1 is discharge. In the reply to 03 it is the other way round: 1 means "on". Send only these two bits and leave the rest at zero.
What the replies to 03 and 04 contain
All numbers are high byte first.
| Bytes | Meaning | Units |
|---|---|---|
| 0–1 | battery voltage | 10 mV |
| 2–3 | current, signed: negative is discharge | 10 mA |
| 4–5 | remaining capacity | 10 mAh |
| 6–7 | full capacity | 10 mAh |
| 8–9 | cycle count | — |
| 10–11 | manufacturing date | year − 2000 (7 bits), month (4), day (5) |
| 12–15 | balancing: 12–13 are cells 1–16, 14–15 are 17–32; each bit is one cell | — |
| 16–17 | protection flags (table below) | — |
| 18 | firmware version | 0x97 is version 9.7 |
| 19 | state of charge | % |
| 20 | MOSFETs: bit 0 charge, bit 1 discharge | 1 is on |
| 21 | number of cells | — |
| 22 | number of temperatures N | — |
| 23… | N temperatures, 2 bytes each | 0.1 K: (value − 2731) ÷ 10 = °C |
The reply to 04 is 2 bytes per cell, in millivolts.
| Bit | What tripped | Bit | What tripped |
|---|---|---|---|
| 0 | cell overvoltage | 7 | too cold while discharging |
| 1 | cell undervoltage | 8 | charge overcurrent |
| 2 | battery overvoltage | 9 | discharge overcurrent |
| 3 | battery undervoltage | 10 | short circuit |
| 4 | too hot while charging | 11 | measurement chip fault |
| 5 | too cold while charging | 12 | MOSFET turned off by command |
| 6 | too hot while discharging |
Settings in EEPROM
Thresholds, delays and capacity live in the board's EEPROM. You can only read and write them in service mode:
- If a Bluetooth password is set, send it first by writing register
06. On ours, after a password was set, reading over UART still worked but writing did not. - Enter service mode:
DD 5A 00 02 56 78 FF 30 77. - Read a register with an
A5frame carrying the register number and zero length; write it with a5Aframe carrying two bytes of value. - After writing, read the register back and compare.
- Exit with saving (
28 28) only if everything matches. Otherwise exit without saving (00 00), and the board keeps its old values.
Example: the cell overvoltage threshold, register 24, in millivolts. Read: DD A5 24 00 FF DC 77. Write 3.60 V = 3600 mV = 0E 10: DD 5A 24 02 0E 10 FF BC 77.
| Register | Meaning | Units |
|---|---|---|
| 10 / 11 | design capacity / cycle capacity | 10 mAh |
| 12, 32–35, 13 | cell voltage for 100, 80, 60, 40, 20 and 0 % | mV |
| 18–1F | temperature thresholds and releases: charge and discharge, hot and cold | 0.1 K |
| 20–23 | battery: overvoltage, release, undervoltage, release | 10 mV |
| 24–27 | cell: overvoltage, release, undervoltage, release | mV |
| 28 / 29 | charge / discharge current | 10 mA |
| 2A / 2B | balancing: start voltage / start difference | mV |
| 2D | functions: switch, balancing, LEDs | bits |
| 2E | which temperature sensors are enabled | bits NTC1…NTC8 |
| 36 / 37 | hard cell thresholds | mV |
| 3A–3F | protection delays | s |
⚠ Leave the number of cells (register 2F) and the shunt resistance (2C) alone: a mistake in either breaks the measurements.
Command line: jbdtool
The open-source Linux program jbdtool works over a serial port, Bluetooth, CAN or the network (through an ESP adapter):
jbdtool -t serial:/dev/ttyUSB0,9600 # basic data and cells
jbdtool -t serial:/dev/ttyUSB0,9600 -j # the same as JSON
jbdtool -t serial:/dev/ttyUSB0,9600 -r -a # all EEPROM settings
jbdtool -l # parameter names
jbdtool -t serial:/dev/ttyUSB0,9600 -r BalanceStartVoltage BalanceWindow
jbdtool -t serial:/dev/ttyUSB0,9600 -w NtcConfig NTC1,NTC2
jbdtool -t serial:/dev/ttyUSB0,9600 -g off # charge off (on to turn it back on)
jbdtool -t serial:/dev/ttyUSB0,9600 -G off # discharge off: cuts power to the load!
⚠ -w rewrites a bit field completely: any name not in the list is turned off. -w NtcConfig NTC1,NTC2 disables every other sensor.
A GUI program: bms-tools
bms-tools is an open-source Python program for Windows and Linux. It does what the vendor's app does: readings, all EEPROM settings, calibration, MOSFET control and logging. Inside is a separate library you can use in your own scripts.
Your own Python script
For simple jobs you do not need a library: the frame is short. The script below reads the basic data and the cells (needs pip install pyserial):
import struct
import serial
def frame(cmd, data=b'', write=False):
# DD, A5 (read) or 5A (write), command, length, data, checksum, 77
body = bytes([cmd, len(data)]) + data
crc = (0x10000 - sum(body)) & 0xFFFF
return bytes([0xDD, 0x5A if write else 0xA5]) + body + crc.to_bytes(2, 'big') + b'\x77'
def ask(port, cmd, data=b'', write=False):
port.reset_input_buffer()
port.write(frame(cmd, data, write))
head = port.read(4) # DD, command, status, length
if len(head) < 4 or head[0] != 0xDD:
raise IOError('no reply from the BMS')
if head[2] != 0:
raise IOError('BMS returned error %#04x' % head[2])
body = port.read(head[3])
tail = port.read(3) # checksum (2 bytes) and 77
if len(body) != head[3] or len(tail) != 3 or tail[2] != 0x77:
raise IOError('incomplete reply')
if (0x10000 - sum(head[2:4] + body)) & 0xFFFF != int.from_bytes(tail[:2], 'big'):
raise IOError('checksum mismatch')
return body
with serial.Serial('/dev/ttyUSB0', 9600, timeout=1) as p:
d = ask(p, 0x03)
volt, cur, remain = struct.unpack('>HhH', d[0:6])
print('battery %.2f V, current %.2f A, remaining %.2f Ah, charge %d %%' % (volt / 100, cur / 100, remain / 100, d[19]))
print('charge', 'on' if d[20] & 1 else 'off', '· discharge', 'on' if d[20] & 2 else 'off')
print('temperatures, °C:', [(int.from_bytes(d[23 + 2 * i:25 + 2 * i], 'big') - 2731) / 10 for i in range(d[22])])
c = ask(p, 0x04)
print('cells, V:', [int.from_bytes(c[i:i + 2], 'big') / 1000 for i in range(0, len(c), 2)])
To turn charging off with the same script: ask(p, 0xE1, b'\x00\x01', write=True); to turn it back on, b'\x00\x00'. On Windows use COM3 instead of /dev/ttyUSB0 (the number is shown in Device Manager).
Microcontroller
| What | For |
|---|---|
| esphome-jbd-bms | ESP32 or ESP8266 over UART, ESP32 also over Bluetooth; all readings in Home Assistant, MOSFET on/off |
| Overkill-Solar-BMS_2-Arduino-Library | Arduino: readings and a MOSFET control function; one user reports that MOSFET control did not work for them, so test it |
| GenericBMSArduino | Arduino, read-only |
| your own code | the same frames as in the table above: 7 bytes to read, 9 to write |
The easiest route is an ESP32 with ESPHome: UART at 9600 baud on any two free pins, and the battery appears in Home Assistant with charge and discharge switches. The project's author warns about the same thing we did above: one controller per BMS, with no shared ground between batteries.
Article changelog
- 2026-11-10 — service life: whether compression and a partial charge range extend it; what happens to a battery that just sits (tables and a chart); voltages of common pack sizes. Earlier the same day: the cable tables split into narrower ones; compression: the second purpose, tubing on the rods, springs or rods.
- 2026-11-09 — "The essentials" section: what connects where, 15 questions with consequences, safety; a fuse that blows before the cable; cell spread under current and checking the bolts.
- 2026-11-09 — BMS control (protocol, jbdtool, bms-tools, Python, ESP32 and Arduino); temperature sensors: two external plus the board sensor, separately for a heated room and for frost.
- 2026-11-09 — first draft: assembly, BMS, temperature sensors, compression. Photos and our specific choices will be added after discussion.