iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
The best way to add a battery indicator depends on your Arduino board and battery pack. If the board already exposes a battery-sense circuit, read that input. Otherwise, a correctly designed resistor divider can let an analog pin measure pack voltage. For a more useful state-of-charge estimate, use a compatible I2C fuel-gauge breakout such as a MAX17048 or LC709203F. A voltage reading mapped to “percent” is only an approximation, not a direct measurement of remaining capacity.
How do I monitor battery level with an Arduino?
Use this compatibility-first decision path:
- Check the board documentation. Some Arduino boards include a battery divider and an ADC connection. The Arduino MKR WiFi 1010 Battery Application Note documents this arrangement.
- If there is no sense input, verify the pack voltage and analog-pin limits. Add an external divider only when its maximum output stays within the board’s analog-input and reference limits.
- Choose an I2C fuel gauge when you need a gauge-derived percentage, current, capacity or better behavior under load. Confirm that the selected gauge supports your chemistry and cell count; many popular Arduino breakouts target a single LiPo/Li-ion cell.
In all three cases, the result is an estimate of battery condition. Terminal voltage changes with load, temperature, battery age and charging state, so it should not be treated as an exact capacity meter.
Approach 1: use a board’s existing battery-sense circuit
On boards that provide one, the battery input is normally reduced by a resistor divider before reaching the microcontroller ADC. The MKR WiFi 1010 example reads a 12-bit ADC value using a 3.3 V reference, then applies the documented divider ratio to estimate the source voltage. Follow that board’s pin name, ADC resolution, reference and divider constants rather than copying values to another Arduino.
Typical implementation sequence
- Read the documented battery-sense analog input.
- Convert the ADC count using the board’s stated ADC range and reference voltage.
- Undo the documented divider ratio to estimate battery voltage.
- Map that voltage between application-specific empty and full thresholds if a display percentage is required.
Arduino’s example deliberately uses configured empty and full voltages. Those thresholds are not universal LiPo limits and should not be reused for a different chemistry, cell count or board without validation. The complete circuit and calculation are in the MKR WiFi 1010 application note.
#1 Best Overall
- DC 0~25V Voltage Detection Module Sensor
- Voltage input range: DC0-25 V
- Voltage detection range: DC0.02445 V-25 V
- Voltage analog resolution: 0.00489 V
- DC input interface: red terminal positive with VCC, negative with GND
Approach 2: add a resistor divider to an analog input
A divider scales the battery voltage to a level the ADC can safely measure. If the battery can reach Vmax, choose resistors so the divider output at Vmax remains below the analog pin’s permitted voltage, including any board-specific reference or tolerance requirement. The firmware then converts the measured output back to pack voltage using the actual divider ratio.
Design checks before connecting anything
- Use the battery’s highest possible voltage, not its nominal label voltage. For a 2S LiPo, that is the fully charged pack voltage specified by the cell and charger.
- Confirm the Arduino analog input’s absolute maximum and selected ADC reference. A 5 V-tolerant digital pin is not automatically a 5 V-tolerant analog input.
- Account for resistor tolerance and ADC error. A small capacitor at the ADC node may help filtering, but follow the board’s sampling guidance.
- Check divider current. Lower resistance improves settling and noise immunity but continuously drains the battery; higher resistance reduces drain but can require longer ADC acquisition or buffering.
- Never connect the pack directly to an analog pin unless the board documentation explicitly permits that voltage.
Turning voltage into a displayed percentage
After calculating pack voltage, software can clamp it between chosen empty and full thresholds and interpolate a percentage. That is a voltage-to-range indicator, not a chemistry-specific state-of-charge model. A LiPo’s loaded voltage can dip during a current surge and rebound afterward, so use hysteresis or averaging if the display must remain stable. Do not present the interpolation as remaining milliamp-hours.
Rank #2
- 3pcs ACS712 Hall Effect Current Sensor Module 30A Range ACS712 Current Sensor + 3pcs DC 0-25V Voltage Tester Terminal Sensor Kit for Arduino Current Sensor
- 3pcs ACS712 Hall Effect Current Sensor Module 30A Range ACS712 Current Sensor
- 3pcs DC 0-25V Voltage Tester Terminal Sensor Kit
Approach 3: use a dedicated I2C fuel-gauge breakout
A fuel-gauge IC measures battery behavior and exposes gauge-derived values over I2C. It can be preferable when you want voltage plus a percentage estimate without designing an ADC divider, but the breakout’s chemistry, cell-count and configuration limits still apply.
Recommended Free Tools
MAX17048 example
Adafruit’s MAX17048 Arduino guide shows connecting VIN, ground, SCL and SDA, installing the Adafruit MAX1704X Arduino library, and printing voltage and charge percentage in the Serial Monitor. Treat its wiring and voltage range as specific to that breakout and its intended single-cell LiPo/Li-ion use; verify the module documentation before attaching another pack.
Rank #3
- 【Perfect Combination】Using this product can measure both voltage and current, very suitable for DIY electronic design projects.
- 【Current Sensor Module】Chip: ACS712ELC-30A; Pin 5V power supply, on-board power indicator; The module can measure positive and negative current of 30 amperes, corresponding to analog output of 66mV/A.
- 【Voltage Sensor Module】Voltage input range: DC0-25V; Voltage detection range: DC0.02445V-25V; Voltage Analog Resolution: 0.00489V; DC input connector: Terminal cathode connected to VCC, GND negative pole; Output interface: "+" then 5/3.3V, "-" then GND, "s" then the for Arduino AD pins.
- 【Package Included】2 x ACS712 Hall Effect Current Sensor Module + 2 x Voltage Sensor Module DC0-25V Voltage Tester Terminal Sensor
LC709203F example
Adafruit’s LC709203F Arduino guide documents the library, pack-size selection, voltage and percentage readings, and an I2C address of 0x0B. It warns that reversing battery polarity can damage the monitor and that the chip should remain powered by the battery. The associated Adafruit product page states that this breakout accepts 3.3 V or 5 V power and logic; that statement applies to that product, not every LC709203F board.
Other library ecosystems
The SparkFun BQ27441 Arduino Library documents readings for voltage, state of charge, current, power and capacity, and identifies the Battery Babysitter as a product using that gauge. Confirm the selected board’s present availability, wiring and battery configuration separately; the library documentation is not a universal guarantee of module performance.
Rank #4
- Work Principle:The voltage transformer module is based on the principle of resistor divider,which will reduce the input voltage of the terminal interface by a factor of five.The analog input voltage does not exceed 5V, and the input voltage of the voltage detection module does not exceed 5Vx5=25V.
- DC input Interface:Terminal positive to VCC,negative to GND;Output Interface:"+" to 5/3.3V;"-" to GND; "s" connects to AD pin;Voltage Input Range:DC 0-25V.
- Stable Performance:The voltage transformer module has stable performance and high output efficiency,which will be useful for your work.
- Easy to Use:The voltage transformer module is small and lightweight,so which is easy to use.Its compact size and design make it easy to take and store.
What changes for a 2S LiPo?
A 2S pack is two cells in series, so its voltage is roughly twice that of a single-cell pack. That immediately rules out many single-cell MAX17048 and LC709203F breakouts unless the manufacturer explicitly supports a 2S pack. Do not connect a 2S battery to a single-cell gauge merely because the connector fits.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →For a 2S project, first look for a gauge rated for the pack’s series count and chemistry. If you instead use an analog divider, size it for the fully charged 2S voltage and verify the Arduino ADC input limit. Also ensure the pack has appropriate balancing and protection; a battery indicator does not replace a charger or protection circuit.
Best Value
- The DC 0 - 25V voltage detection module sensor is designed to measure voltage within a specific range.
- It has a voltage input range from DC 0 to 25V, allowing for various voltage inputs.
- The voltage detection range of the module is from DC 0.02445V to 25V, indicating its detectable voltage limits.
- With a voltage analog resolution of 0.00489V, it can provide relatively precise voltage measurements.
- The DC input interface requires connecting the red terminal's positive to VCC and negative to GND for proper operation.
Voltage divider or fuel gauge?
| Decision factor | Board sense or resistor divider | I2C fuel-gauge breakout |
|---|---|---|
| Extra hardware | None when the board already includes sensing; otherwise two resistors and optional filtering | Dedicated gauge module and four-wire I2C connection, plus battery wiring |
| Battery chemistry and cell count | ADC only measures voltage; firmware must account for the chosen pack | Must match the gauge’s supported chemistry, cell count and configuration |
| Electrical limits | Divider output, ADC absolute maximum and reference must be checked at maximum pack voltage | Gauge and breakout power, logic and battery-terminal limits must be checked |
| Interface | Analog input | I2C using SDA and SCL; address conflicts may matter |
| Software effort | ADC conversion and your own threshold mapping | Vendor or community library and device configuration |
| Displayed percentage | Voltage-derived approximation between chosen thresholds | Gauge-derived estimate, still affected by configuration and operating conditions |
| Battery drain | Divider current is continuous unless switched; calculate it from resistor values | Gauge quiescent current varies by module and must be checked in its documentation |
Wiring and compatibility checklist
- Identify chemistry, nominal voltage, maximum charge voltage and series-cell count.
- Check polarity markings twice. Reversed battery connections can destroy a gauge; never allow battery terminals to touch. Arduino’s MKR note warns: “Please make sure that the battery terminals do NOT touch each other. The short circuit can cause permanent damage and even explosion.”
- Confirm Arduino logic voltage and the breakout’s permitted supply and I2C levels.
- For I2C, connect SDA to SDA and SCL to SCL, provide a shared ground, and check the device address against other peripherals.
- Install the exact library named by the module guide and run its example before integrating a custom display or power-management code.
- Measure the battery with a multimeter first. An unexpected pack voltage indicates a wiring, charger or battery problem, not a software calibration issue.
- Check the board and module’s sleep or quiescent current when estimating runtime.
Common failure modes
The percentage jumps when a motor starts
That is usually load-induced voltage sag. Average several readings, add display hysteresis, and avoid treating a single ADC sample as capacity.
The ADC reading is over-range
Disconnect the battery, recalculate the divider at maximum pack voltage, and verify the board’s analog-input limit and reference. Do not “fix” an over-range input in software.
The I2C scanner finds nothing
Check shared ground, SDA/SCL orientation, pull-ups, module power and the documented address. For LC709203F examples, the expected address is 0x0B.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
The gauge reports an implausible percentage
Verify cell count, chemistry or pack-size settings, battery polarity and whether the gauge is intended for a single cell. A single-cell configuration cannot correctly represent a 2S pack.
Practical recommendation
Use the board’s documented battery-sense input when it exists and your requirement is a simple low/medium/full indicator. Build a divider when you need to measure a pack the Arduino ADC can safely accommodate and are willing to define an approximate voltage range. Choose a compatible I2C fuel gauge when a library-provided state-of-charge estimate and additional telemetry justify the extra component. In every case, select thresholds and hardware from the actual battery and board documentation, not from a generic “LiPo percentage” table.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

