¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Battery voltage readings - H4


 

Hi, despite many "battery" related posts here with interesting info on batteries I opened my new H4 (1950mAh battery there, no sd socket) and measured the voltages at the battery connector. H4 freshly charged over night.

My HP34401A meater reads (aprox. 1min between measurements)

1. H4 turned off, no usb cable: 4.212V
2. H4 turned on, no usb cable: 4.153V +/- 2mV
3. H4 turned on, with active usb cable connected: 4.223V

During step 3 with vbat_offset set to 0 the vbat command returned values from 3682-3823.

My current understanding is as follows:
1. the battery gets a little bit overcharged
2. the "vbat" ADC reading is pretty noisy (see the graph below), provided it is done via stm32's 12b ADC, with a 2layer pcb and some decoupling the readings should stay within +/- 10mV, imho.


 

Hi Igor

I added a low pass filter to the battery voltage reading in my firmware some time back because of this. See what that tells you. If it's any better then maybe DiSlord could implement the same (very simple) LPF in his firmware ?

ADC readings can be a bit noisy on the NanoVNA due to the circuit/board design (ADC inputs should normally be R/C or L/C filtered along with any ADC supply/reference pins), having a switched mode boost converter on the PCB doesn't help (they are noisy beasts).


 

On version screen i show averanged from 32 vbat measure.
On vbat command - only one read.
Yes i know about noise on ADC (on next version added additional L/C filter for ADC ref in CPU), for graphic vbat icon not need this filter (need 0.1V step).


 

Some time ago I posted several comments regarding this. They were based on the ST manual and attending schematics.
1. The diode voltage drop approach left the diode operating intermittently (sampled too soon after turn on, IMO), and in an unstable region due to the low current draw. I don't know if the new units also use the diode.
2. I demonstrated a purely resistive approach, and was told that though the responder had not read the manual (I had), I must be wrong. I still have the resistor approach working well. (I attached references and schematics to my post...they were ignored in favor of "opinion".) The resistor approach obviated the diode questions.
3. ST ADC sampling recommendations were not followed, so the readings were all over the place. The solution implemented was to take many readings (I think 24?) and average them. I don't know if these were addressed, or if my suspicions are correct.

None of these statements are verified by another, so they are just my opinions.

4. Battery voltage probably fluctuates to some small degree depending on the capacity of the battery and the cycling of the CPU and hardware, depending on what function is performed. I have seen this on other small devices.
5. For me (maybe not for everyone) battery voltage to the nearest 10 mV is great. I don't care if the battery is at 3660 or 3680...I just want to know roughly how much operating time is left. I realize that this is a "field" response, not an "engineering" response, and I appreciate the value of both.

We should not be surprised at the erratic, but generally useful, VBAT values.

On 2020-07-15 01:13:-0700, you wrote:
During step 3 with vbat_offset set to 0 the vbat command returned values from 3682-3823.

My current understanding is as follows:
1. the battery gets a little bit overcharged
2. the "vbat" ADC reading is pretty noisy (see the graph below), provided it is done via stm32's 12b ADC, with a 2layer pcb and some decoupling the readings should stay within +/- 10mV, imho.
--
72/73 de Rich NE1EE
On the banks of the Piscataqua