Wistrio LoRA battery discharging too low


Several times I left discharging the Wistrio Lora 5205 during the night to test the Voltage threshold from which the board stops.

This morning I found the LIPO battery completely discharged (1V) and swolen! That the second time it happens with a different battery and a different board.

Looking inside the hardware, I found a battery charger (BQ21040) that seems to only manage battery charging cycles and a 3.3V regulator (RP104N331), that converts 5V or VBat to 3.3V.

Into the firmware, I looked for some battery power management but I didn’t found any code that will shutdown the module if the main voltage drops below 3,1V (for example). Just some functions measuring the battery level and the board power source to save battery (I imagine). There is some callbacks defined but never used for this purpose.

Can someone explain what mechanisms are used to manage the battery voltage and, if it’s not present, how can we implement it (hard or soft), especially how to completely shutdown the board by software to save battery life?


Can somebody give me an answer?


I’m sorry for late because of the holiday in China.

Actually, there are few code which are used to manage the battery in the open source code firmware of Wistrio now, and we’re developing a newer firmware continuously step by step, but it will take a long time. If the next version is released, i’ll updated it on RAK website ASAP.
Surely, people can develop based on our open source code as they want by themselves, because it is fully open source.

Hello Fomi,

I saw this code in the firmware and I can modify it easily. The problem is that the STM32 is always running to check if power voltage is under or over some voltage, so it can react to switch off GPS chip for example. The STM32 is always running until the power voltage is under it’s working voltage, maybe 1.6V, and the battery can’t, and must not, be discharged so low because it can explode!!!

What is needed is an external chip that will compare the input voltage to some threshold and shut off the STM32 when the voltage is below 3.2V and switch it on when voltage is over 3.5v, approximately. This should be the role of BQ21040 but it seems to only manage the battery charging cycle, but not the discharging cycle. I’m not electronician so I’m not sur about that :slight_smile:

Thank you