STM32WLE5CC ADC Battery Measurement doesn't give stable output, voltage is fluctuating.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-17 3:08 AM
Hello,
I am using STM32WLE5CC MCU with STM32Cube IDE, and used Lorawan as End Node.
I am trying to read battery Voltage from STM32WLE5CC internal ADC Battery Channel, I got fluctuating voltage level from it.
I see 254, 201,220 like values, which is not usable to justify battery actual level.
Please help me to find solution of this issue?
Thank You
- Labels:
-
ADC
-
STM32CubeIDE
-
STM32WL series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-28 2:29 AM
Hello ST Community Members and ST employees, Please provide your valuable response regarding this case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-28 6:29 AM
Let me guess, you have a small size chip that uses the power in as a reference. Make sure you calculate the reference voltage and use that in the calculation of the battery voltage. The voltage will vary as the processor runs different instructions. More capacitance on the power in will help. But make sure you have a 0.1 uF capacitor as close to the processor power and ground pins as physically possible.
Finally there is such a thing as ground bounce, where something switching current on the board changes the level of the ground somewhere else as it ripples. A ground plane helps this or careful routing of the ground net.
It also may be that the battery voltage drops when the device is using more current and rises when it is not.
There is really not a lot to go on based in the information in your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-28 9:36 PM
Thanks for response,
I have 0.1uF near to Vcc of STM32WLE5CC, and PCB has enough GND plane according to PCB Design Guidelines,
I am using default generated library functions GetBatteryLevel()(used in Lorawan), this function uses internal Calibaration values.
I observed that When Data Send Over Lorawan (consumes 140mA), then battery Level reduces sharply.
So, Is there is method I can use to solve this issue, as I need exact battery level.
Thank You
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-29 1:06 AM
You have exact battery level, but battery voltage is not stable. The best you can do, is an aritmetic mean from several measurements reasonably spread over time.
