ADC Calculator

If you want to charge your battery to full and wish for the battery to display as 100% on the screen, then you can use this calculator. Just be aware that not all boards charge a battery to 4.2V so this calculator will not give you the true level that the battery is charged.

Ratio of voltage divider for battery pin e.g. 3.20 (R1=100k, R2=220k)

Overrides the ADC_MULTIPLIER defined in the firmware device variant file for battery voltage calculation.

Should be set to a floating point value between 2 and 6.


Calibration Process

The calibration process uses a simple formula to adjust the ADC multiplier based on the battery voltage. Here’s a detailed breakdown of how the calculation is done:

  1. Determine the target ADC value: The target ADC value for a full battery (100% charge) is known, which is 4.19V.
  2. Adjust the ADC Multiplier: The formula adjusts the current ADC multiplier to make sure that the device reads 100% charge when the battery voltage is 4.19V.
  3. Calculate the new ADC Multiplier: The new ADC multiplier is calculated by the following formula:

    [ \text{New ADC Multiplier} = \text{Current ADC Multiplier} \times \left( \frac{4.19}{\text{Battery Voltage at Current Multiplier}} \right) ]

Example Calculation:
Initial Condition: Your device shows a battery voltage of 3.82V using a current ADC multiplier of 2.
Formula: New ADC Multiplier = 2 × (4.19 / 3.82)
Calculate the Ratio: 4.19 / 3.82 ≈ 1.097
Multiply the Current ADC Multiplier by the Ratio: New ADC Multiplier = 2 × 1.097 = 2.194
Update the Device: You then set the new ADC multiplier (2.194 in this case) in your device's configuration. This calculation adjusts the multiplier so that the battery charge readings are accurate, mapping 4.19V to 100% battery charge.

ADC Calculator Form

Device:
Battery Voltage (V):
Current ADC Multiplier:
Calculated New Operative ADC Multiplier:

Voltage Measurement Calculator

If you want to display the real value of a battery on the screen and Mesh, use this calculator. You will need a multimeter to calculate everything.

Device Measured Voltage (Multimeter) [V] Displayed Voltage (Screen) [V] Manual ADC Multiplier Adjusted ADC Multiplier