-
Notifications
You must be signed in to change notification settings - Fork 21
Calibration
Calibration information is stored in the configuration file battery.cfg in the [calibrate] section.
Course calibration adjustment is done using the
measured = [0.0, 3.305, 6.604, 9.910, 13.217, 16.526, 19.844, 23.171, 26.494]
displayed = [0.0, 3.278, 6.583, 9.873, 13.156, 16.474, 19.789, 23.094, 26.424]
parameters.
Fine offset calibration adjustment is done using the delta readings
delta = [0.003, -0.003, -0.007, 0.011, -0.002, 0.007, 0.004, -0.005]
Raw battery data is first adjusted by calculating the ratio between the 'measured' values (values measured with an accurate multimeter) and the 'displayed' (values displayed by the Beaglebone at the same time as measured with the multimeter) and multiplying the raw value by the ratio.
This corrected data then has the fine offset added to the reading to give the corrected reading.
-
ssh to the Beaglebone
-
Disconnect any variable loads or power sources from the battery that will change the voltages.
-
Start the calibration software with the command 'python calibrate.py'
-
Measure with an accurate multimeter the value of each battery cell relative to the battery negative. To improve the overall accuracy make sure that all the readings taken with the multimeter are done on the same range so if your multimeter will only read to say 21.999 volts before changing range and you need to measure voltages higher than this take all the readings to say 12 volts then take the readings above twelve volts relative to the 12 volt battery cell and add the twelve volt reading to get the total reading.
-
Edit the configuration file battery.cfg, replace the 'measured' readings with the readings measured with the multimeter, and the 'displayed' readings with the upper set of readings displayed by the calibrate program.
-
Stop the calibrate program with the Ctrl C key and restart it. The readings displays should now be close to the multimeter readings.
-
Measure with the multimeter the value across each battery cell.
-
Edit battery.cfg relacing the 'measureddelta' readings with the measured readings and 'displayeddelta' with the lower set of readings displayed by the calibrate program.
The BatteryMonitor should now be calibrated.