# 18650 Internal Resistance Tester

I have next to no idea what Im doing just enough to get me in trouble

I copyed this sketch and changed the circuit and timer to load test for 10 seconds 18650 cells
im not sure why it is working without two voltage inputs across the load resistor but it seems to work ok

can someone help and look over this and tell me why I got this to work please

cheers
Brett

buzzliteyear:
im not sure why it is working without two voltage inputs across the load resistor but it seems to work ok

If that were the case, indeed it wouldn't work.

Luckily you have the grounds connected.

thanks heaps for the reply

there wasnt many tester out there but what I did find everyone else tested across the main load resistor like this

They probably used a 4-terminal resistor, and then differential mode. That's indeed more accurate in this situation.

Never mind, my bad. I’m old.

Ok i just got my digital clamp meter today and looking for help with this line

v2 = (analogRead(vIn)*vCal)/1014; // get loaded battery voltage

it looks like the code is calculating at max amps but I want it to calculate at the end of the 10 second load test

how do I change this ?

cheers
Brett

Start the test, add a 10-second delay, do your measurement, and you have the current at the end of the 10-second test.

That function by the way very likely needs a division by 1024, not 1014, and you will want to force it to do a floating point calculation - e.g. by using 1024.0 instead of 1024.

because i dont know what im doing I adjusted that figure to try match my volt meter but then worked out
the amps problem reading max and not lowest after 10 second test

this is what is there can you change it a show me
cheers
Brett

``````void ircalc(){                           // resistance calc function
digitalWrite(xBase, LOW );              // switch in the load
delay(10000);                                   // added 10 second load time
v2 = (analogRead(vIn)*vCal)/1014;   // get loaded battery voltage      was 1023 ( adjusted for loaded voltage )
i2 = v2/load;                                       // calculate loaded current
digitalWrite(xBase, HIGH);               // switch out the load
``````

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html . Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom...

Hi Tom, thanks so much for the Welcome....

I have changed the code view thanks for that
also the png circuit in in the first post below left ( I hand drawn it in DIYLC with mouse)
load resistor upgraded to 50w seems to give more consistent readings

thanks heaps for looking

Cheers
Brett