Voltage
V2 Arduino code (code version 2.0 or later): enter these calibration values in the calibration web app at configure.echook.uk.
Legacy Arduino code (below version 2.0): update these values in
calibration.hand re-upload the code.
Calibrating 24V
Due to resistor tolerances in the divider from 24V to an Arduino-readable level (0-5V), each board needs a slightly different calibration. The step-down is linear, so one measurement pair is enough.
Follow this order:
Connect the +24V pin to a power source and use a multimeter to measure supply voltage. For this example, use 23.5V.
Measure the voltage on the other side of the potential divider (the 24V test point on the PCB and pin A0 on the Arduino). For this example, use 3.6V.
Calculate the ratio between them:
For legacy code versions, enter this figure into
calibration.hasCAL_BATTERY_TOTAL. Reflash the Arduino for the calibration to take effect.For V2 code versions, enter the same value in the web app.
const float CAL_BATTERY_TOTAL = 6.53;Calibrating 12V
Calibration is by the same method as 24V above:
Measure the voltage at the 12V input.
Measure the voltage to pin A7 of the Arduino.
Divide the former by the latter to obtain a multiplier to use in the code.
For legacy code versions, open
calibration.hand updateCAL_BATTERY_LOWERwith the result.For V2 code versions, enter the same value in the web app.
Reference Voltage
This calibration option is a throwback to when eChook boards had adjustable DC-DC regulators and having exactly 5V powering the Arduino wasn't guaranteed. With the fixed 5V Tracopower DC-DC regulators, the output should be exactly 5V, and as such, this setting should be left at 5V.
Last updated