I built up the charge controller board from my last post. It's got eight optoisolators on each side, one for each cell balancer. The blue potentiometer is used as a voltage divider to bring the 50+ pack voltage down to IO levels for the ADC. I wanted the option of using this board as a general breakout for this microcontroller, so it's got a few buttons and some prototyping space as well.
As with any rushed prototypes, it's got a few bodge wires. Apparently not ALL of the PSoC3's GPIO pins are really GPIO, some of them are for USB only (dedicated differential amplifier inside?). I cut a few traces and re-routed these to some extra pins, no big deal.
I added a 130 ohm resistor to an unpopulated pad on each cell balancer to limit the current driving the LED in the optoisolators. Then each balancer has two leads added, one on positive and one on the lower side of the "Balancing" LED, through the 130 ohm resistor. When the balancing LED comes on, the LED within the optocoupler will also switch on, pulling a microcontroller IO pin low.
|R15 is the added resistor.|
But it also doesn't work. As the batteries charge and cell voltage nears 3.6 volts, the balancers activate but cell voltage keeps rising, shooting past 3.6 volts and higher. As soon as the microcontroller shuts the charger off, the cell voltage quickly drops below 3.6 volts and the balancers turn back off - never actually balancing anything. So, this system will keep the cells from overcharging but can't be used to actively balance the battery pack.
The solution? Wet fingers. I can further modify the balance circuits so my microcontroller can put them into the balancing state. Then once a cell reaches full charge the microcontroller can shut the charger off, hold the charged cell in balancing mode (10-20 minutes?), and then start charging again.
This offers another advantage: self test on power up. Before beginning a charge, the microcontroller can briefly put the cells in balancing mode and check that each balancing LED is on. Then I don't have to worry so much about the controller failing, overcharging a cell, and burning down the house I live in.
This means re-spinning the PCB. A good opportunity to fix the mistakes in the first one, and it won't be as much work this time since I can work off the old schematic and layout.