I want to measure Li-pol battery voltage with STM32 MCU. I power STM32 with 3V so I need a voltage divider for battery connection (Li-pol max voltage is 4.2V). Moreover, I'd like to add N-channel MOSFET to prevent battery discharging through the resistors.
There are a lot of similar topics here, but most of the decisions use extra BJT to drive a FET (Low Current Battery Monitor Detail Question) or a capacitor to automatically turn off the transistor (Selecting low power mosfet for battery monitor).
I'd like to use only one MOSFET in such a way:
The only problem with this circuit (as I see) is the voltage at the source pin.
For example, if I use R1 = R2 = 10K then in open state there will be 2.1V at the source. MCU GPIO maximum voltage is 3V and 0.9V (3 - 2.1) will be not enough for FET to remain in open state.
But if I use R1 = 20K, R2 = 10K the maximum voltage at the source will be 1.4 V and 3V from GPIO should be enough (V gate threshold = 1.06V).
Are there any other problems with this circuit because of which it is so unpopular?