I am working on a microcontroller (this post is not microcontroller specific) project, part of what has me stuck is controlling a voltage divider to check the battery level. What I have done is this:
The gate of T2 goes to a microcontroller pin, which is either 0 or 3.3 volts. The battery voltage is read between R1 and R2. I use the voltage divider to make sure the voltage is not too high for the ADC on the microcontroller. The battery is a 9 volt battery. R2 and R3 are 10K and R1 is 100K. Both of the MOSFETs are "logic level". The p-channel is a FDV304P and the n-channel is a BSS138LT1.
The circuit works OK, but still has 10-15 microamps of current flowing when the gate of T2 is zero. Since I haven't used MOSFETs before, I don't know if this is good or not. Ideally, I'd like to do better since this part of the circuit is before the regulator (which can be shutdown) so it is always "on".
I don't need high accuracy here, it's just a battery indicator.
Thanks!
Brad
![186-schematic.png](http://static.electro-tech-online.com/imgcache/186-schematic.png)
The gate of T2 goes to a microcontroller pin, which is either 0 or 3.3 volts. The battery voltage is read between R1 and R2. I use the voltage divider to make sure the voltage is not too high for the ADC on the microcontroller. The battery is a 9 volt battery. R2 and R3 are 10K and R1 is 100K. Both of the MOSFETs are "logic level". The p-channel is a FDV304P and the n-channel is a BSS138LT1.
The circuit works OK, but still has 10-15 microamps of current flowing when the gate of T2 is zero. Since I haven't used MOSFETs before, I don't know if this is good or not. Ideally, I'd like to do better since this part of the circuit is before the regulator (which can be shutdown) so it is always "on".
I don't need high accuracy here, it's just a battery indicator.
Thanks!
Brad