Getting Started
Last revision 2025/12/29
This guide offers detailed instructions for installing the LattePanda Sigma UPS, covering both hardware and software setup, and provides tips for extending battery life and managing power settings using Arduino IDE and LPUPS library.
Precautions
-
To ensure normal operation of the UPS, use a reputable brand of 3.7 V 18650 lithium-ion batteries with a capacity of at least 3000 mAh and a maximum discharge current greater than 5 A.
-
Install batteries of the same model and with similar charge levels.
Significant differences in capacity among the four batteries will reduce the actual usable total capacity of the UPS. -
The LattePanda Sigma UPS features integrated battery protection, allowing safe use of flat-top 18650 batteries.
Batteries with built-in protection circuits (button-top 18650) are not required. -
⚠ Warning: The LattePanda Sigma UPS does not support 3.2 V lithium iron phosphate (LiFePO₄) batteries, even if they are the 18650 size.
Installing incompatible batteries may cause fire or explosion during charging. -
If the UPS will not be used for an extended period, remove the batteries to prevent over-discharge and potential battery damage.
Hardware Preparation
- 1x LattePanda Sigma UPS
- 4x 18650 3.7V lithium-ion batteries
- 1x LattePanda Sigma
- 1x LattePanda Sigma UPS Power Cable
- 1x LattePanda Sigma UPS Signal Cable
Software Preparation
Arduino Library Installation Tutorial
Hardware Installation
-
Turn off the UPS power switch
-
Remove the protective film from the heatsink and attach the heatsink on the MOSFET.
-
Install the 18650 lithium battery into the UPS, pay attention to the positive and negative direction.

-
Mounting the UPS to the Sigma Metal Base Plate with Copper Posts

-
Installing LattePanda Simga on top of the UPS

-
Connecting the power and signal cables


-
After checking that everything is in place, plug in the power supply and turn on the power switch.

After installing the UPS, please use the USB-C or DC 5.5x2.1mm connector on the UPS to power the LattePanda. Powering the LattePanda through its own interface will prevent you from using the UPS feature.
Software Installation
-
Please make sure you have already installed the Arduino IDE, and LPUPS library.
-
Launch the Arduino IDE, open the UPS program: "File -> Examples -> DFRobot_LPUPS -> fourBatteriesLPUPS"
-
Select the corresponding development board model: "Tools -> Board -> Arduino Leonardo"
-
Select the corresponding development board port: "Tools -> Port -> COM*" (Select the port marked with Arduino Leonardo)
-
Upload the example program, and after a short wait, you can see that the battery has been recognized in the system. If you need to further set the threshold battery level for automatic power-saving and forced sleep on your LattePanda Sigma, you can adjust it in the Windows Advanced power Settings.

Adjusting Charge Limit
Keeping lithium batteries at a full charge of 4.2V for extended periods can lead to rapid wear due to high self-discharge currents. If high battery capacity is not a priority, you can set a maximum charging voltage in the Arduino program to extend battery life.
Step 1. Launch the Arduino IDE and open “File -> Examples -> DFRobot_LPUPS -> fourBatteriesLPUPS.”
Step 2. Locate the following section of code:
// maxChargeVoltage = 15600;
// LPUPS.setMaxChargeVoltage(maxChargeVoltage);
Step 3. Uncomment the code, and modify maxChargeVoltage to your desired value.
maxChargeVoltage is measured in mV; for example, if you set it to 15600, it means the maximum charging voltage is 15.6V, and the voltage of a single cell is 15.6V÷4=3.9V.
Step 4. Re-upload the Arduino program. Charging will automatically stop when the total voltage of the battery pack reaches 15.6V to extend the battery life.
The allowable range of maxChargeVoltage is 14800 ~ 16800, any setting beyond the range will not take effect.
Was this article helpful?
