Now that the Jaguar motor controller has reached its end of life, they are accumulating in FRC team shops. Team 548 had around two dozen hiding in a tote. One use I found for them is testing batteries. After many brownouts during the 2016 season, we wondered if the batteries were faulty. My first plan was to use a robot, but it was hard to eliminate variables, noisy, and overheated motors. After returning to the drawing board and doing some digging, I found a roll of steel high-temperature wire which had a total resistance of around 0.58Ω, able to burn about 14 amps at 8 volts for hours on end. With a spare Jaguar, box fan, and that wire, I constructed and programmed a 10A constant current load with PC data-logging.
Due to license issues, the PIDController source is no longer included but was sourced from the LeJOS project with modifications. Seventeen Acres Battery Test V1 is licensed under the MIT license. USE THIS SOFTWARE AND GUIDE AT YOUR OWN RISK. This software is not designed for and does not have adequate safety mechanisms for use with actuators, precision applications, safety-critical applications, or industrial use. Use this software for testing in a non-production environment only. Do not use this software or setup described unsupervised. Even use with a resistive load, as described below, can cause damage, injury, fire, or death. This software is in a rough state and may malfunction.
The input side of the Jaguar is wired similarly to a normal robot but the main breaker is omitted since there is only a single 40A limited load. The steel wire is split into three separate sections in case a different resistance was required. All three sections are connected in series across the Jaguar’s output. The load panel is then placed in front of a box fan. Since black Jaguars have an internal RS-232 to CAN bridge, it is connected via its 6P6C RJ25 port to a USB to RS-232 adapter with a DB9 to RJ25 converter attached to the PC. This setup is also used for firmware updates and ID management in normal FRC usage.
The most straightforward way to control and monitor a Jaguar would be to use a cRIO, but FRC limitations make them tedious to use for static operations. A second option would be connecting to the Jaguars to a PC application using the serial libraries in Java. While the Jaguars have RS-232 serial, the protocol is not well-documented or simple. The BDC-COMM Windows software used to configure and test the Jaguars, however, has an often-ignored CLI mode which, although somewhat cryptic, has enough documentation to be useful. The CLI mode enables all of the important functions of the Jaguar including PID, sensors, and output control. The Battery Test java application launches the BDC-COMM CLI terminal internally and then sends commands to that to operate. In constant current mode, the Java application runs a PID loop on the input current (calculated with output voltage and current, input voltage, and experimentally determined efficiency of .94) to output a set voltage to the Jaguar via BDC-COMM. Every 10 ms, the status values, set-point, and the energy integrator are updated. Every 100ms, a snapshot of input voltage, current, power, and energy and output voltage, current, power, and energy is logged to a CSV.
java -jar "Battery Test.jar"
For the batteries I tested (an unused 2015 MK battery (2015-009), a KoP battery from 2015 (2015-001), and two used 2016 MK batteries (2016-007 and 2016-006)) no correlation could be found between brand or age and capacity. For better results, real battery connectors should be used, since a 30mΩ input resistance difference would cause the .3V voltage drop observed in 2015-009 and 2016-006.
Thanks to FRC team 548, the Robostangs for supporting this project. They had no involvement with this publication and any views or statements presented in this article are my own.