The New Battery Monitor

The software

Functions of the software

  1. Watch the Starter battery voltage: Alarm if it doesn’t rise to charging voltage when the Domestic battery does. Alarm if it drops below a set level at any time, for more than say 20 seconds to allow for engine start.
  2. Watch the Domestic battery voltage: Alarm if it doesn’t rise to charging voltage when the starter battery does. Alarm if it drops below a set level at any time.
  3. Watch all three current sensors. Display exact currents from all shunts and calculate and display the load current.
  4. Calculate and display when the Domestic Bank is fully charged.
  5. Note the voltage of the fully charged battery when charging stops. keep a log of this voltage.
  6. Calculate and display the charge being drawn from the battery when it is off-charge. Compensate this figure for current draw.
  7. Keep a log of drawn Ahs and voltage during discharge.
  8. Keep a log of total drawn charge should the battery voltage drop below the Alarm level.
  9. Control various display and setting screens
  10. Control the alarm beeper
  11. Drive the traffic light system:
    • When I moor up for the night and stop the engine, I expect a solid green LED. A full Battery.
    • As the battery discharges the LEDS will go Green, then Green/Amber, then just Amber at 50% of capacity.
    • If a steady Red LED comes on with the amber, the battery has dropped below 11.8 volts, and a steady Red LED alone means the battery is in trouble at less than 11.0 v
    • In the morning I start the engine.
    • Flashing Red means we are charging, at Bulk, with a voltage of less than 10.5v
    • Flashing Red and Amber means we are at Bulk Charge with a voltage of less than 13v
    • Flashing Amber means we have reached Absorption voltage, but with heavy charge.
    • Flashing Amber and Green means the battery is charging, and is getting close to full
    • A flashing Green LED means the battery is full, and I can stop the engine
Assumptions
  1. That a battery’s physical capacity is roughly twice its safe capacity. And that it will damage a battery to discharge below the safe capacity, even if current is available.
  2. That a battery’s lowest open-circuit voltage should be 11 volts, and any discharge causing the voltage to drop below that will damage the battery.
Algorithms
  1. The bank is fully charged if: The voltage is above 14volts AND the charge current is below 5 amps AND has not reduced in the last 10 minutes.
  2. The bank is 50% discharged if: The current Capacity is known AND the compensated discharged capacity is now => the current capacity. If current Capacity is NOT known then: the voltage is below 11 volts for more than 1 minute ( must allow for the spike) OR compensated discharged capacity reaches 280Ah?
Peukert

When battery manufacturers quote a battery capacity they cheat. A battery’s capacity depends on what it is being used for. This was all known about in the 1880’s. A battery doesn’t store energy as electricity, it stores it as chemistry, and how much energy you get back out of the chemistry depends on how nicely your treat it! So if a battery is discharged at 20 Amps for an hour, although it has supplied 20AHrs of energy, it has used around 36.4AHrs of its capacity. Weird, I know. So the arduino chip in the control unit needs to take this into account when it’s estimating the battery’s capacity. It’s known as Peukert’s Law.