I'm a long time app developer but only recent electronics guy and forum searcher/lurker. Thanks for all the info here guys! I've learned so much on my Arduino already...
I'm trying to develop an external battery tester circuit to have the voltage data sent over serial for PC logging. I'll be discharging up to 6 batteries at once (~1.3v peak each) and graphing their discharge curves on the PC. I've read up on analogread() and analogReference() and feel very comfortable with the concept but I don't know how to physically connect this stuff up!?
I've developed several arduino projects already and I'm very comfortable with the fundamentals, Serial.*, etc. I just don't know how to use the build-in 10bit ADC (or an external, say 24bit) to measure an external voltage. I can use the integrated 10bit to measure voltages ON the arduino (Vin for example) but how do I measure an external battery's voltage?
I'm not asking for you to design the circuit for me perse, I want to learn this stuff. I just can't find where to start on this one... Also, huge bonus if you can describe how I might also integrate a load in the circuit to discharge the batteries while I test them?
PS - I have a theory that the built-in 10bit ADC is already wired to Vin/Gnd only leaving aref and input available, which prevents me from doing what I need to do.
This theory has left me researching for a 24-bit 6 channel ADC on DIP which I'm certainly assuming would solve all of my problems!? I'm guessing I don't actually need 24 bits, but overkill is fun. If this is all correct, can someone recommend an ADC for me?
No problem, you can use any of the six analog inputs to measure your pack.
analogRead can measure up to 5 volts but your battery pack will peak at just under 8 volts. The easiest way to handle this is to use two equal value resistors as a voltage divider so that each unit value from analogRead will be just under 10 millivolts (10v/1024) . Two resistors with a value between 1k and 10k would work. One end of ar a resistor connects to the battery plus, the other end connects to the anlog input and one end of the other resistor, the other end goes to ground and the negative side of the battery.
Your load for discharging the battery depends on the current. For largish currents a suitable sized 12v car bulb works well.
I'll actually be testing the 6 cells individually as well as an option to test them together on this "test station". Then I'll add a second external ADC with a couple channels and use the voltage divider you recommend for testing the whole pack, thanks!
For the 6 where they're tested individually I'll just need to use a voltage regulator to generate 1.3v (that value possible?) and connect aref pin to it? 10bit may be enough if I understand the way that works correctly giving me the full 1024 step range for 0v-1.3v. Any flaws in this part of the plan?
you can connect the individual cells directly to the analog input pins. Each unit of analog read will be 4.89 millivolts (5v/1024). I would think this is more than adequate accuracy for a battery monitor unless you are doing peak detect charging.
But be careful not to connect the 6 cell pack directly, the maximum voltage on the pins is a little over 5 volts