0

Feather M4 messuring battery problem
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Feather M4 messuring battery problem

by Gadip on Sun May 02, 2021 5:00 pm

Hi
I'm developing a bicycle signal flashlight based on the M4 and Neopixel Featherwing.
The flashlight is working on a single LiPo battery pack.
I want to monitor the battery voltage and take advantage using the built in solution of the M4 (sampling at A6 port throw 100K voltage dividor).
Unfortunately I have noticed some problem when battery voltage drops below 3.8v - the output voltage of the LDO (VCC) also starts to drop and it is no longer gives a stable 3.3v as it is supposed to do
This actually causes the AREF voltage to drop as well, resulting in my sample actually not changing anymore and remaining constant around 3.8 volt.
I purchased about 5 M4 circuits and this happens in all of them.
(according to the LDO data sheets it is supposed to give a stable 3.3v from a 3.5v input voltage).

How can I resolve the problem?
Will the use of one of the internal reference voltages of the CPU be stable even at a lower VCC voltage?
Is it possible to leave the AREF jumpe to VCC connected when using an internal reference voltage or should I cut it off?
What are the required changes in the sample conversion code?

float measuredvbat = analogRead(VBATPIN);
measuredvbat *= 2;
measuredvbat *= 3.3;
measuredvbat /= 1024;

Should I simply change the value of the 3.3 multiplication to the value of the internal reference voltage I chose to work with?

Thank you very much

Gadip
 
Posts: 2
Joined: Sun May 02, 2021 4:25 pm

Re: Feather M4 messuring battery problem

by blnkjns on Sun May 02, 2021 6:23 pm

What if you add a LR2032 button cell to ARef?

blnkjns
 
Posts: 663
Joined: Fri Oct 02, 2020 3:33 am

Re: Feather M4 messuring battery problem

by Gadip on Tue May 04, 2021 5:21 pm

blnkjns wrote:What if you add a LR2032 button cell to ARef?

Thank you for your response!

A battery as a power source is not elegant enough for a solution.
Also, battery is not stable, and stability is the reason for this problem from start.
In my opinion, if choosing to add a dedicated power source than more stable regulator should be it.

In the mean time I succeed to use the inner 2.5v reference without cutting the Aref-Vcc jumper. And now I'm getting a stable and accurate readings even if battery is 3.5v. It probably can work in lower values, but I don't want to discharge the battery lower than 3.5v - in this value I enter to deep sleep mode.
Another reason is that when battery reaches to 3.5v, the Vcc is down to 3.0v!

Can anyone explain why the 2.5v inner reference is working without cutting the jumper while the other inner references are not?
Also, is it safe working as so for the long run (I haven't seeing any increases in current, or over heating, or decreasing of functionality)?

Second question is: are all of my boards regulator malfunction or are thay working as they supposed to work - by design?

Thanks.

Gadip
 
Posts: 2
Joined: Sun May 02, 2021 4:25 pm

Please be positive and constructive with your questions and comments.