On an automotive project of mine, I want to add a feature for measuring vehicle battery voltage. However, one requirement is to minimise (or eliminate) current draw when my device is in standby mode. Because of this, a simple resistor voltage divider won't be suitable, due to its continuous current draw at all times. After browsing around for a while doing some research, I think that a circuit like the following should do the job. I would like some feedback on it.
The node marked 'GPIO' will be connected to an AVR microcontroller I/O pin, which I will program to be PWM-ed with a 5V square wave at a fairly low frequency (< 100 Hz). If I make the duty cycle on-period long enough to provide adequate charge to the series AC-coupled capacitor, at the point it returns low, it will cause the P-FET to be pulsed on for a short duration - determined by the value of the pull-up resistor and cap itself. During this period will be when I take a voltage measurement with the microcontroller at the node marked 'ADC'.
A few notes:
- Through experimentation, I have determined that a 10K pull-up resistor and 0.1uF cap results in the FET being turned on for approx. 1 ms when given a 2 ms charge pulse to the capacitor. This should be plenty of time to make an ADC reading.
- Given an ADC reference of 5V, the ratio of the resistor divider (0.319) should give me a reasonable resolution for battery voltages up to 15V.
- Most common MOSFETs have V
gs maximums of 20V, so in case battery voltage should ever rise above that, I have added protection to the gate in the form of a bi-directional TVS diode. I'll probably use an 18V-rated one so it has a standoff/working voltage of 15V.
- Pair of schottky diodes to add protection to the ADC pin of the microcontroller, again in case battery voltage ever rises above 15V.
I've breadboarded the circuit and it seems to work just fine.
But there are some things I'm not sure about:
- The P-channel MOSFET I was thinking of using is a common jellybean BSS84. This has a fairly poor RDS
on of typically 5 Ohms, but I don't think this matters because the current passed will be tiny, and what's an extra 5R when you have 10K in series anyway?
Should I use a different MOSFET, or stick with this one?
- Should I keep the 10 nF capacitor? I added it to smooth the turn-on edge from the MOSFET and provide a bit of a buffer for the ADC. However, I'd rather keep the number of components to a minimum. I don't really think I need it in terms of buffering the ADC, as 10K is not particularly high impedance.
- For the schottky protection diodes, two questions: a) if I use a BAT54S diode pair, will leakage current be an issue? b) Do I actually need them? Would the micro's internal protection diodes handle things? Given the prior 10K series resistance, I expect they should only have to cope with a few hundred microamps.
Any other advice will be appreciated. Thanks.