¿ªÔÆÌåÓý

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

Re: Voltage sensing diode


 

On Fri, Nov 1, 2019 at 01:55 PM, Rich NE1EE wrote:

I was thinking yesterday that the ST would present a very high impedance on
VBAT when a) the unit is running, so VBAT is internally switched off, and b)
VBATEN is off, so the bridge is not in the loop.
When the VBATEN bit is set the bridge divider is enabled and the input impedance of the VBAT pin will be 100kOhm.

When the VBATEN bit is unset Table 32 of the data sheet indicates that IDD_VBAT (the RTC domain supply current) is only ~1.3uA at 3.6V and 25degC. So the input impedance will be ~2.8MOhm.

The DMMs I have here have too low an impedance to measure VBAT, accurately, at least when VBATEN is unset.

The only way I could make anything like a reliable measurement was with a 'scope and a x10 10MOhm probe. You can easily see when VBATEN is set or unset per Raymond's excellent pictures.

Let's assume we are using a silicon diode for D2.

When VBATEN is set the diode current will be ~40uA and Vf ~0.45V. If the maximum charge voltage of the battery is 4.2V then VBAT will not go above 3.75V which is within the 4.0V maximum.

But when VBATEN is unset the diode current will only be ~1.5uA and Vf ~0.25V. So VBAT could reach 3.95V which is very close to the 4.0V maximum. In fact I measured 4.00V on the 'scope this afternoon with a single silicon diode as the battery approached full charge.

I previously installed a single SOD323 diode marked A6. Today I made some measurements of the battery voltage using that diode with a 'scope, and was consistently seeing Vf ~0.25V when VBATEN was unset i.e. most of the time.

(I now believe this diode to be a BAS316 silicon type, not a Schottky as I previously thought.)

I replaced the BAS316 with half a BAV99 in a SOT23 package marked A7p with identical results i.e. Vf ~0.25V (which kinda confirms the BAS316 theory).

CONCLUSIONS

I do not think a single silicon diode is adequate to protect the STM32 under all charge conditions. So I turned the package through 90deg and reconnected the BAV99 with both diodes in series, from pin 1 to pin2 to VBAT. This drops about 0.5V and allows for a 0.25V margin on the VBAT maximum voltage limit. Pin 3 on the right hand side of the picture is not connected.

When the battery is fully charged QRP's NanoVNA-Q firmware now shows VBAT = 3635mV, which is only a whisker above the 3.6V maximum input to the ADC.

I am not convinced that a diode is the best way to fix this. A diode gives an *offset* which is fine for VBAT protection. But for VBAT measurement a simple voltage divider at the VBAT input could be used to *scale* the battery voltage to the ADC input voltage.

Perhaps if VBATEN was set all the time in the firmware a single 16k resistor at VBAT input (instead of D2) might suffice.

The VBAT current would of course be higher at ~40uA but with a 450mAh battery that wouldn't be too much of a problem.

Join [email protected] to automatically receive all group messages.