This is how I made it for now
Vbatt is 6VDC (4x AAA batteries) and VREG is 5VDC (hence, VREG is the reference voltage).
To measure the batteries, I draw 10mA; this seems to be okay to me - if not okay, please suggest another current I should have.
![]()
This is how I made it for now
Vbatt is 6VDC (4x AAA batteries) and VREG is 5VDC (hence, VREG is the reference voltage).
To measure the batteries, I draw 10mA; this seems to be okay to me - if not okay, please suggest another current I should have.
![]()
Last edited by flotulopex; - 22nd September 2015 at 23:16.
Roger
Roger, as I stated earlier, when the FET is OFF you supply +6 to the PIC pin. This is dangerous!
Ioannis
Wow! I missed that!
What's the solution then? Shall I go with P-channel MOSFET?
Last edited by flotulopex; - 23rd September 2015 at 18:44.
Roger
How about move the MOSFET above the junction of ADC_IN. Voltage drop across the MOSFET?
George
George's idea maybe feasible but FET's specs should be examined in detail.
A P-channel I thing is best with the aid of second NPN transistor that will be driven from the PIC enable output.
If you need more help with the circuit, please ask.
Ioannis
Is this an "acceptable" solution?
6V is battery voltage
5V is from PIC
Battery check is OFF:
Battery check is ON:
![]()
Roger
Yes it is. In fact exactly what I was thinking to suggest you!
Only objection the values of the voltage divider. These are low and you will have much current drain. Since PIC ADC has a nominal input impedance of 10K you can increase by a factor of 10 the values. Say at 1k8 and 5k6.
Ioannis
Thanks Ioannis.
By choosing the 180 and 560 values, I was thinking about drawing "enough" current out the batteries to get an as accurate as possible voltage reading (load = +/- 10mA).
10mA is "only" 1% of the batterie's capacity added to the few mA from the circuit, I think this is already low - but I'm not a battery expert, just knowing for sure that three minutes are okay for eggs
What do you think?
Roger
for low battery draw, use high value r's and wait 5RC , that's 5 time constants between readings which allows 1 micro farad cap to charge to full divider value. That's 180K times 1X10to minus 6 which is about .2 seconds. The 1 micro farad is many times the cap value in the pic so it is an accurate reflection of the voltage and high r's draw micro amps from battery...... no switching on/off stuff![]()
Bookmarks