Arduino code for discharger updated

I tweaked the Arduino code a little more.  Deleted some debug leftovers, added some comments and restructured a subroutine.  I did a couple of several-minute tests with 1 and 15 cells to compute some timing fudge factors so the time between samples is much closer to the nominal 30 second value.  No support yet for saving data to eeprom.  Added a couple of sets of samples 5 seconds apart after the test is over and the relay is open to observe “bounceback” of the cells.

Main flow is like this:

  • Inits, including I/O pin directions
  • Serial startup dialog
    • get number of cells
    • compute end-of-test voltage
    • compute timing fudge
    • wait for command to start
  • Do one line of samples with relay still open
    • print sample #
    • read battery voltage
    • read current
    • loop, reading each cell
    • each value is printed as it’s read, with commas
  • Close relay to start discharge
  • loop doing lines of samples as above every 30 sec
  • if battery voltage is < end-of-test voltage, quit
  • when done, open discharge relay, announce done
  • do 3 more sample lines, 5 sec apart to see cell recovery
  • sleep forever

I’ll post the code if I can figure out how to attach a file.

Here’s actual results of a discharge test on my 14 salvaged sub-C cells.  One cell failed very early; a second failed around 43 minutes, which dropped the battery voltage enough to end the test.  At ~1.3A, 43 minutes is about 930 mA-hr.  The cells are nominally ~2000 mA-hr, and most of the cells were still well above 1 V, so the test doesn’t reflect the real capacity of most of the cells.  But the battery failed at 43 minutes.  I should remove those cells, charge it again, and see how it comes out.  (Those were the same 2 cells that were reverse charged in the first sample output a couple of posts ago.)

Anyway, code and hardware seem to be functional.  I do still need some perl to more properly digest what the Arduino spits out.

This entry was posted in Discharge tester - Arduino and perl code. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *