• ### Unpopulated passives

One may wonder why there are some unpopulated footprints for passives scattered around the board. These are more evidence of a lack of thorough engineering on my part when I quickly threw this circuit together. :)

Initially I was intending to detect whether the battery is full during charge by checking whether all three shunt regulators have activated. This seems like a really elegant way to check for end of charge, and in theory, it is. The problem is the way I was trying to measure this condition. I was going to measure the base voltage of the bypass transistors, and since I am already measuring the top of each cell (which is connected to the bypass transistor's emitter), I could calculate the VBE and figure out if the transistor is on.

Unfortunately, since I'm measuring voltages up to ~12V using an ADC reference of 1.5V, I am using voltage dividers with a pretty high ratio (5.11M and 680K). So the absolute tolerance of the top resistor makes a pretty big difference compared to value of the bottom resistor, even with 1% resistors. On top of that, since I'm measuring the VBE difference using two different resistive dividers, their tolerances can add up to make things worse. I calculated that for the expected 0.6V VBE value, my measurement error could be as high as +/-0.4V, worst case! Unusable when trying to design a reliable circuit.

It might have been possible to monitor the VBE change during charge instead of using an absolute threshold, but that would assume we know the state of charge of the cells when starting a recharge. I didn't want to make any such assumptions since the system needs to work correctly when a full battery is plugged in as well.

I decided instead to just determine the end of charge by measuring the voltage at the top of the battery. All cells need to be at 3.6V to have the top of the battery reach 10.8V. Of course, we have some measurement inaccuracy here as well, but it's only the inaccuracy of one resistive divider instead of the potentially cumulative inaccuracy of two. I calculated the inaccuracy to be ~250mV, and I deal with this by setting the threshold lower and having a "top off" timer that will keep the charge current going for 5 more minutes. This is safe because the shunt regulators will bypass the excess current and prevent the cell voltage from going above 3.6V.

On the "cell empty" end, the measurement inaccuracy isn't a problem because of the big voltage change for an empty cell. The cell voltage shouldn't go lower than 2V, but a cell at 3V is just a drop away from being empty as well. So with my per-cell threshold at 2.7V, I should be safe in not switching the load off too early while making sure I don't discharge the cell too deeply.

So with all of this, measuring the shunt regulator base voltages has become useless, so I'm not populating those parts. An added benefit is that it also reduces the leakage current through the voltage dividers.

• ### Microcontroller power issues

Another issue I've run into with this board was the microcontroller's power supply.

Since the voltage range of a LiFePO4 cell is compatible with the voltage range of the MSP430 microcontroller, I powered the MSP430 directly from the bottom cell. This would ensure minimal power consumption, which is very important to preserve the battery's shelf life and to make sure the battery doesn't get discharged further once undervoltage protection kicks in. Since LiFePO4 cells also have very low internal resistance, I figured they would act like a big cap to shunt any noise that would be generated by the booster.

Wrong! Well, maybe the cell works as a *big* cap in that it has similarly bad high frequency behavior. :) It certainly did not filter out switching noise and the MSP430 did not like it (oddly, the micro behaved kind of unpredictable and timers seemed to be running *faster*--maybe they were being clocked by the noise?). It seems the cells have very low internal resistance at DC, but the impedance increases with frequency.

Hacking in a ferrite bead and extra filter capacitor on the back of the board solved the power supply noise problem.

Another problem with the micro's power supply is that during charge, the extra 0.2V regulation voltage across the current sense resistor pushes the voltage at the top of the bottom cell up to 3.8V toward the end of the charge cycle. This is still well within the absolute maximum rating (4.1V) of the microcontroller, but outside the recommended operating conditions (3.6V). I'll probably revisit the power topology in the second rev.