Author Topic: Building an automatic battery tester. How to measure voltage and/or current?  (Read 113 times)

0 Members and 1 Guest are viewing this topic.

Offline misquamacus

  • Newbie
  • Posts: 3
  • Country: us
Hi friends,

I'm looking to test some lithium batteries quickly, and automate the process with an arduino. The batteries I need to test have six 18650s wired to an internal balancing board, but there are no external balancing leads, so the only way to find if a cell has gone bad is by testing discharge rate. The manufacturer says they should be able to discharge 18 amps continuously without issue, and 22 in a burst.

So far I have rigged up a bunch of LED strips using a sketch similar to the one attached below from adafruit. That draws the max safe output current from my batteries (22.2v, 18a, 400W), and I've determined that if they can supply that for 6 min then they are good. The test works; however, I'd like to have the Arduino automate that process.

Is there a way I could get the arduino to measure the current or voltage going into the LEDs even though it bypasses the board? I'd like to write a sketch wherein if the voltage/current drops below a specified threshold the arduino stops the test and signals me (flashes the LEDs), or if the energy stays above that threshold for six minutes the arduino stops the test and gives some other signal.



Online Ian.M

  • Super Contributor
  • ***
  • Posts: 5989
I hope you aren't really trying to put 18A through the ground track of a solderless breadboard!  >:D

As far as hardware goes, a potential divider for measuring the voltage into an Arduino ADC input should do nicely.  22K upper resistor, 4K7 lower resistor and a 0.1uF decoupling cap across the lower resistor should do nicely.  It will need calibration but that's fairly easy - simply read the ADC with a known voltage applied and divide the voltage by the ADC reading.

For the current, I'd use an Allegro ACS series isolated hall current sensor.   Look for a supplier that stocks 30A ACS715 breakout boards.   There are other current sensor options but they are all far more complex than an ACS715 which when powered at 5V will produce 0-4V for 0-30A through it, suitable direct connection to an Arduino ADC input.

Personally I'd have the Arduino log the current and voltage at 1 second intervals over its UART to a PC terminal for later plotting, and use a beeper for the user alert rather than flashing the load LEDs as continuing discharge once the battery drops to 18V is *NOT* a good idea.

Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo