[RAK3172/3372] Battery level measurement issue

Hi,

I received some RAK3372 for testing and I meet a problem with battery level measurement : api.system.bat.get() always gives 4.19V or 4.20V

I’m using a RAK3172 with RAK15007v2 board with this code : RUI3-Best-Practice/RUI3-WisBlock-Kit-4 at main · RAKWireless/RUI3-Best-Practice · GitHub

Version : RUI_4.1.1_RAK3172-E

It joins well, I get BME680 values (but can’t monitor vbat).

I check all topics in forum and found nothing to help me.

Regards

Hi @Batto ,

Do you have connected battery in your setup or still disconnected?

If still no battery and USB is connected, the reading that you get is from the open circuit voltage of the charger IC. This is normal.

However, if there is battery connected and unit is not being charged, what voltage do you see on the battery and what is the retured value of the api.system.bat.get()?

Hi @carlrowan,

Yes I have a lithium battery and I get 4.19 or 4.20 in any situation (USB connected or not, when not I get result by LoRaWAN, battery connected or not).

It’s just like VREF is not well configured.

Hi @Batto ,

The internal ADC of STM32WL is not optimized since we do not comply on its required input impedance. This is needed as a comprise to achieve low power operation.

  1. If you can share me the actual voltage of the battery during these testing.
  2. If you can use a drained battery and do the test (so we have a low voltage reading).

These two items will be helpful for us to assess your findings and investigate.

Here is my discharge curve :

Finally it seems to drop. I did some measures, for example at 4.05V “real” I got 4.20V.

I don’t know if it’s linked, but for RAK4631, I have to multiply api.system.bat.get() by 1.07 to get the real value.

Hi @Batto ,

I did some test on my RAK3172 evaluation board and also seen some discrepancy. We are supposed to fixed this before already but it appears discrepancy still exist (I also around 0.2V which is really significant).

At the moment, I don’t think it will be useful to detect that the battery if fully charge. Maybe possible to detect if it is low. But either situation, if you need better accuracy, I suggest to detect the battery using lower resistor values (might compromise low-current operation) and use another ADC channel.

We will look into further and update you.

I don’t need an accurate measurement, I just need to know the roughtly the state of charge ( more or less 5% is good enough).

But if there is a “celling” around 4.20V it’s a problem because it let me think that 100%->20% = 100% and <20% = it drops quickly