How to add Battery Monitoring to any robot
Articulated Robotics presents a practical guide to measuring a lithium battery’s voltage and publishing battery status from a ROS 2 robot.
In this talk
- 0:00
Battery safety and voltage ranges
Battery monitoring can help a mobile robot avoid losing power in the field and prevent risky over-discharge. The guide assumes a lithium battery and recommends using a dedicated battery management system for protection. A five-cell pack, for example, may range from roughly 16 to 21 volts.
- 3:07
Sizing a voltage divider
An Arduino or ESP32 can read analog voltage directly, while a Raspberry Pi or Jetson needs an ADC or another measurement method. A voltage divider protects the input by reducing battery voltage to a level the board can accept. For a 22-volt maximum battery and 5-volt Arduino input, the presenter chooses 20-kilohm and 4.7-kilohm resistors, then uses the ADC reading to calculate voltage.
- 6:31
Calibrating the measurement
The Arduino sends analog readings to a Raspberry Pi over USB serial, with the divider connected to analog pin A0. An initial estimate of 18.45 volts differed from the multimeter’s 17.67 volts because the actual resistors and Arduino supply voltage differed from the assumed values. Recalibrating with measured values and a steadier 5-volt supply brought the result to about 17.65 volts, within the circuit’s limited resolution.
- 9:26
Publishing battery status in ROS 2
For a ROS robot, the presenter exposes battery voltage and percentage as state interfaces in the existing hardware interface. A battery state broadcaster controller reads those interfaces and publishes a ROS topic. The example reports voltage in the 17.6 to 17.7 range and about 15% remaining based on configured minimum and maximum voltages.
- 13:20
Using and displaying the data
The battery monitoring package includes an RViz visualization, though the presenter finds its setup finicky and suggests building a visualization that better suits the robot. Battery readings can also trigger practical responses such as a warning light or sound when charge is low.
Briefs summarise talks and interviews; timestamps open the video at that moment. Claims in a talk are the speaker's own.