Posted 01 November 2017
At the conclusion of my ‘field’ testing of Wall-E2’s new-found ability to mate with the charging station using the square-wave modulated beacon signal, I noticed that Wall-E2 was always disconnecting from the charging station based on elapsed time (set for 2Hrs at the moment) rather than detection of the end-of-charge condition. After investigating this a bit more, I found that one of the charging modules never switched from charging to ‘finished’. This was more than a little irritating, as I was counting on that transition to make sure that Wall-E2 was fully charged before disconnecting.
During the process of creating the PCB design for my charging module, I took a dive into the datasheet for the MCP73871 charge management chip on the PB1000C in an effort to figure out if there was any way to improve the end-of-charge detection situation. When I looked through the specs (relevant data sheet portions shown below), I found that there is a spec called ‘Charge Termination Ratio’ (oddly shown with dimensions of mA, but what do I know), and this value is controlled by the value of the resistor connected to the PROG3 pin.
On the Adafruit PowerBoost 1000C module, the resistor attached to PROG3 is 100K, the larger of the two values mentioned in the datasheet, and this value sets the charge termination threshold at approximately 12.5 mA (according to the Adafruit gurus, ‘approximately here means +/- 25% – yikes!)
So, I decided to see if decreasing the value of this resistor give me a more robust charge termination experience. Rather than trying to replace the SMT/SMD resistor part, I decided I could just mount a regular 1/8W resistor in parallel, with the value chosen to get the right resultant value. Since there is such a large (+/- 25%) variation, there’s no real good reason for trying to arrive at an exact value, so I just chose a convenient value (meaning the closest value I could find in a small 1/8W package) – in this case, 51K. With a little bit of patience, and a strong magnifier, I was able to get the resistor soldered onto the SMD part without burning up the pads or anything else, as shown in the following photo
This parallel combination results in an PROG3 resistor value of about 33K, which (assuming a linear progression) should result in a charge termination current of about 40mA. When I tried this setup with a mostly charged battery and an Adafruit ‘Charger Doctor’ for monitoring charge current, the PB1000C changed to the ‘finished’ state with a measured current of about 20mA.
When I first tried this trick, I was expecting the charge to terminate when the Charge Doctor readout showed “0.04” – but it didn’t happen until more like “0.02”. When I mentioned this on the Adafruit forum, a very knowlegeable reply was forthcoming from “Mike”
“Charge termination ratio” is a general term for LiPo chargers. Most of them don’t use an external resistor to set the cutoff current, and just end the charge cycle when the current flowing into the battery reaches a given fraction of the constant-current level.. 1% is fairly common.
If you run the math out, the ratio of I.prog:I.term is R.prog1:R.prog3
We started with 100k because that’s one of the two values listed in the DC Characteristics table, and after a while you learn to take datasheets very literally. They excel at telling you the parts of the truth the vendor wants you to hear, but nothing more. It’s always best to start from the exact spec values and then vary the parameters to see what they left out.
We left it at 100k because it worked, and the datasheets for the LiPos we carry spec 1% as the termination level.
The tolerance for that value is +/-25%, so a nominal value of 33mA can be expected to fall in the range between 24.75mA and 41.25mA. The Charge Doctor has a resolution of 10mV/10mA, and I’d expect its measurement error to be about half that through rounding if nothing else. That puts the potential range of measured values for a nominal 33mA current between 19.75mA (rounded to 20mA) and 46.25mA (rounded to 40mA).
The error is almost as large as the value you want to measure, and larger than the difference you want to measure.