Safety First - On Lithium-Ion Batteries
Contents
Safety First - On Lithium-Ion Batteries#
What you will need
Nothing
What you will get
Preliminary knowledge of circuits and power source properties useful in Duckietown
Duckiebots support different battery (power bank) models, although not all will work.
The Duckiebattery was designed in house to right power requirements, diagnostics and desirable features in robotics applications.
The Duckiebattery (DB-C-DBatt
)#
This battery has been the standard battery for the Duckiebots since 2021. For example, models DB21M
, DB21J
, and DBR4
use this battery.
The Duckiebattery is a special battery. It is special because it is programmable, smart, and designed specifically for Duckiebots.
Using this battery will allow your Duckiebot to monitor the state of charge and other diagnostics, and shutdown via software. Moreover, it enables advanced features such as auto-charging in Autolabs, because it will guarantee power to the onboard computer when being plugged in or out of charge.

Fig. 3 The Duckiebattery is a 5V 2A power bank with two USB-A outputs designed for robotics applications.#
Technical specification#
Capacity: 10Ah at 3.7V
Charging: Micro USB 5V at up to 2A
Output 2 x USB type A 5V at up to 4A (combined), max 2.5A on a single port
Charge time: 0-100% takes about 5h and 0-90% about 4h with a 2A power supply
Weight: 189g (fully charged)
Caution
Lithium-ion batteries like the Duckiebattery are potentially dangerous and must be handled with care.
Here are some things to do and not to do.
Warning
Keep reading the following safety precautions: do not skip this section.
Handling: things to do#
Things to do
Dispose of the battery pack immediately if it has been subject to moisture and/or the case is eminently damaged.
In case of fire use a CO2 extinguisher.
Store preferably in a cool, dry, and ventilated area subject to moderate temperature change.
Storage at high temperatures (>50 C) should be avoided.
Handling: things not to do#
Things not to do
Do not connect a charge voltage greater than 5V.
Do not connect an external voltage source to the USB output ports.
The battery must not be opened, destroyed, or incinerated, since it may leak or rupture, releasing in the environment its hermetically sealed chemicals.
Do not short circuit terminals.
Do not crush or puncture the battery, or immerse it in liquid.
Do not place the battery near heating equipment, nor expose it to direct sunlight for long periods.
LED description#
The battery has five LEDs on the top, used for indicating the state of charge.

Fig. 4 LEDs indicate the state of charge of the Duckiebattery.#
Note
To see the battery state of charge, click once on the button. The state of charge LEDs will stay on for 10 seconds and the battery set in idle
state, “waking up” the battery.

Fig. 5 Wake up the battery by pressing the side button once.#
Charge the battery#
After setting the battery in idle
mode, charge it by connecting a 5V 2A power adapter. Note that using a higher amperage charger will not damage the unit. The LEDs will be flashing at 1 Hz, showing the battery is receiving charge.

Fig. 6 Charging the Duckiebattery.#
When the battery’s state of charge is particularly depleted (e.g., as soon as you receive the battery), the LEDs might be unresponsive for up to 30 minutes while receiving charge.
Duckiebattery states and state transitions#
The Duckiebattery has several operation modes (states), the most relevant of which are described below.

Fig. 7 State diagram for the Duckiebattery.#
Battery protection mode#
The battery is equipped with safety features to prevent damage to others and itself. In particular, it has dedicated hardware to protect its cells from low-voltage discharge.
When a certain low cell voltage level is detected, the battery microcontroller, together with all other active components will be turned off, except the charger. When a Duckiebattery enters protection mode, it will look unresponsive.
Nonetheless, the charger will “trickle” charge the battery cell until it has reached a safe voltage level, exiting the battery protection mode.
The battery protection mode can last up to 30 minutes, during which the battery might not indicate a state of charge nor that it is being charged. This does not mean the battery is dead, just “hibernating”.
USB outputs#
The battery has two separate 5V 2A USB type A outputs, namely USB OUT-1 (a.k.a. the muscles) and USB OUT-2 (a.k.a. the brains).

Fig. 8 Duckiebattery outputs behave differently.#
USB OUT-1: Connect this output to a non-sensitive power load, i.e., motor or LEDs. This output will experience short power drops when plugging and unplugging the charger cable.
USB OUT-2: this is a 5V 2A USB output, uninterrupted by the charging process or the status of USB OUT-1. This port should be connected to the computing unit (i.e., NVIDIA Jetson Nano or Raspberry Pi) to allow the unit not to restart when plugging or unplugging the charger of the battery.
Duckiebattery live diagnostics#
The Duckiebattery provides live diagnostics. Learn how to query them in the Duckiebot Handling Cheatsheet (DB21).
Troubleshooting#
The most common fault is not related to the battery pack itself but the connection between the pack and the charger and/or the load.
Note
Always make sure the USB cable is not damaged and is of good quality. Do not use a cable longer than 30cm. A faulty cable can cause excessive voltage drops between the battery pack and load, leading to low voltage issues.
Troubleshooting
SYMPTOM
My battery does not charge.
RESOLUTION
There can be several reasons why a charge is not being accepted. Below are the most common issues:
The input voltage is too low or too high. Make sure you apply 5V via the micro USB connector
The battery is in battery protection mode and does not look like it’s charging, but it is. Come back in >30 minutes and press the button once to enter
idle
mode.The battery is in a fault state. This can be caused by over-temperature on the battery cell and/or its internal PCB. Leave the battery to cool down for 1h then attempt to charge it again.
Troubleshooting
SYMPTOM
One or both USB outputs are not working
RESOLUTION
There can be several reasons why the USB output is not working. Below are the most common issues:
The battery is not on
idle
mode. Press the battery button once.The battery is in battery protection mode. Remove all loads, put in charge, and wait more than 30 minutes to have the battery exit protection mode. Then enter wake up the battery by pressing the button once.
The USB output is in over current/temperature mode. Disconnect all loads, enter
idle
mode, and let the battery rest for 30 minutes.An external voltage was applied to the USB (output) port(s). This is a big no-no (refer to DO’s and DONT’s above). Disconnect all loads and enter
idle
mode.
Troubleshooting#
Note
The most common fault is not related to the Duckiebattery itself but the connection between it and the charger and/or the load.
Note
Make sure that the charging cable is not damaged and is of good quality.
Do not use a charging cable longer than 30 cm
.
A faulty cable can cause excessive voltage drops between the Duckiebattery and load, leading to low voltage issues.
Troubleshooting
SYMPTOM
The Duckiebattery does not look like it is charging.
RESOLUTION
There could be several reasons why the Duckiebattery would not look like it is charging:
The input voltage may be too low/high (make sure to apply
5 V
via the Micro USB connector).The Duckiebattery is in
protection
mode (plug it in a 5V 2A wall charger, wait for around30 mins
and then press the side button once and notice if a faint red LED turns on).The Duckiebattery is in a fault state, which could be caused by a cell and/or its internal PCB being overheated (unplug the charging cable from the charger, wait for around
1 h
and then plug the charging cable back into the charger).
Troubleshooting
SYMPTOM
One or both of the USB output ports are not working.
RESOLUTION
There could be several reasons why a USB output port would not be working:
The Duckiebattery is not in
idle
mode (press its button once).The Duckiebattery is in
protection
mode (disconnect all loads, plug the charging cable into a charger, wait for around30 min
and then press its button once).The USB output port is in
overcurrent
/overtemperature
mode (disconnect all loads, press the Duckiebattery’s button once and then wait for around30 min
).An external voltage was applied to the USB output port (disconnect all loads and then press the Duckiebattery’s button once).