uConsole Battery Overlay
You can improve inaccurate battery readings on your uConsole especially since there are many variants of battery for uConsole. Before trying battery recalibration, you should first add the custom battery device tree overlay to your /boot/firmware/config.txt file and define your specific cell capacity values in micro-amp hours (µAh) and micro-watt hours (µWh):
dtoverlay=clockworkpi-custom-battery,charge_full_design_uah=<full charge in uAh>,energy_full_design_uwh=<full charge in uWh>
Step-by-Step Calculation
We will use the following battery specification as an example: Molicel INR18650 P30B - 18650 Battery - 3000mAh - 30A
[!IMPORTANT] This example assumes a custom setup using three 18650 batteries wired in parallel. This means the total capacity is tripled, but the nominal voltage remains the same as a single cell (typically 3.6V or 3.7V for lithium-ion 18650s).
1. Determine Base Specifications
- Capacity per cell: 3000 mAh
- Total Capacity (3 cells): 3000 mAh × 3 = 9000 mAh
- Nominal Voltage: 3.6V (Standard nominal voltage for this chemistry)
2. Calculate charge_full_design_uah (µAh)
To convert milli-amp hours (mAh) to micro-amp hours (µAh), multiply by 1,000.
- Formula: Total Capacity (mAh) × 1,000 = Total µAh
-
Calculation: 9000 mAh × 1,000 =
9000000µAh -
Result:
charge_full_design_uah=9000000
3. Calculate energy_full_design_uwh (µWh)
To find the energy in micro-watt hours (µWh), first calculate the energy in milli-watt hours (mWh), then multiply by 1,000.
- Formula: Total Capacity (mAh) × Nominal Voltage (V) = Total mWh
- Calculation: 9000 mAh × 3.6V = 32400 mWh
-
Conversion: 32400 mWh × 1,000 =
32400000µWh -
Result:
energy_full_design_uwh=32400000
[!NOTE] If you are using batteries with a 3.7V nominal voltage, the calculation would be: 9000 mAh × 3.7V × 1,000 =
33300000µWh. Check your specific battery’s datasheet to confirm whether it is rated for 3.6V or 3.7V nominal.
4. Apply Overlay
Append the following line to the end of the file /boot/firmware/config.txt with the calculated values:
dtoverlay=clockworkpi-custom-battery,charge_full_design_uah=9000000,energy_full_design_uwh=32400000
Battery Overlay Calculator
Use the calculator below to easily generate the configuration line based on your battery specifications.