I am working on a battery internal resistance checker.
For my RC car i use 4 x AAA Nimh batteries non packed.
I want to group the batteries with same (or close) internal resistance.
Actually, i calculate it manually from the reading of Vopen, Vload and iload.
With the famous formula Ri=(Vopen-Vload)/iload
The Arduino can do this in a very smart way.
R_LOAD is 0.5 Ohm (5W)
The battery is 1.5v (Max)
Yes, i want to drain about 3A for an accurate check.
Question:
Can i do this : 3A to the analog input (A1)?
(this pic is not from me but i am ok with it, except for the battery voltage, mine is 1.5v max)
Thank you for reply
ok...
Does the mosfet RLZ44N be a good choice?
Will it add some resistance to the circuit. If so, will it be a better choice for the logical switch?
Don't forget to connect gnd of the controller to gnd/-ve of the battery.
Make the controller gnd connection at the battery terminal so load current doesn't cause any unnecessary volt-drops.
I have an issue with residual current after fet have switched off the load
A1 from previous picture is useless.
Here is the loop
Read A0
If V=0
-- assume there is no AAA bat plugged
-- display some message
If V>0
-- assume a bat has been plugged
-- switch D7 high
-- read A0 for loaded voltage
-- switch D7 back low
-- calculate internal resistance

The issue is that when the user (me) unplugs the AAA bat, the voltage reading on A0 does not go back to 0. It remains present, changing around the AAA bat voltage value.
Does it come from the mosfet i am using, should i add some load somewhere ?
Leo,
I did use the input pullup feature. this does not the trick.
When the AAA battery is disconnected, the A/D value stay quite the same (around 250).
Maybe this would be a clue
I use a battery holder for the AAA bat. (clean, no prob with it)
When i remove the bat, reading A0 gives around 250 (should be 0)
When i touch with my fingers both of the terminals of the empty bat holder, the reading goes to 0.
A workaround does the trick but i dont like it because this discharge the AAA bat if connected: adding a resistor (tested with 10kOhm) between +bat and ground. It works but the AAA bat will discharge and i must not do it.
You should be getting an A/D value of 1023 without battery and when the mosfet is 'off' (D7 LOW).
Maybe you're measuring too close after the time that the mosfet has turned off.
Post a real picture of your setup, and the code.
Read the forum rules before you do.
Leo..
Sorry A/D reading is >1000 as you said
But then, analogRead gives wrong voltage value
I seems that there is no way to disable pullup with in loop after it has been enabled
Analog0 (with no pullup) 'see' some current when Fet has been activated. This current disapear when fet is back on even with no AAA bat plugged.
And can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Including your power supply, and arduino connections.