Skip to content

Pete-C2/Energy-Monitor

Repository files navigation

Energy-Monitor

Energy monitor to determine DC energy. This will be used to calculate the capacity of a battery and stop discharge at the end of battery life or to calculate the energy supplied to a battery and stop charge when either the current reduces or a pre-determined time is reached.

Requires:

Installation:

  • Copy files to a folder on the Raspberry Pi.
  • Enable SPI in Raspberry Pi Configuration
  • Edit /etc/rc.local to autorun application:
    • sudo nano /etc/rc.local
    • Add: python /home/pi/.../energy-monitor.py where ... is the location of your file.
  • Edit connections and/or resistor values and/or component settings to define your system hardware. The defaults match my hardware.
  • Edit calibration values to ensure that your system is accurate. I used an adjustable 12V PSU and 21W car bulb to set the calibration points.

Recommendations (to make life easier):

Use

See wiki.

Changelog

V3.2

Added lead-acid cut-off on time

V3.1

Added lead-acid cut-off on full charge

V3.0

Added basic charging control

V2.2

Added calibration and checking routines

V2.1

Added hardware test routine

V2.0

Modified for new hardware.

V1.0

Added CSV logging of results.

V0.4

Added control of relay.

Added energy measurement until battery discharged.

V0.3

Added web display of voltage and current.

Added zero current setting.

Added calibration of voltage and current.

V0.2

Added measurement of current.

V0.1

Initial trial code.

Measures voltage of input

About

Energy monitor and battery capacity measurement

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published