Success! I finally managed to get the LiFePO4wered/Pi+ to 2A continuous load current in UPS mode! :) Without active cooling, and with the charger keeping up and keeping the battery charged. So what changed?
As I have previously explained, it all comes down to limiting the heat production on the board. One commenter suggested I switch the 60V 5A SS56 Schottky diode for a lower voltage model, such as a 40V 5V SS54. The reason is that the diode drop in the forward direction is lower for a diode with lower reverse breakdown voltage. With a lower forward voltage, it will dissipate less heat. I tried that, but unfortunately it didn't seem to make much of a difference.
So I decided to look over some of my old thermal camera shots again to see what was producing the heat.
In this one I was measuring the diode temperature, but as you can tell, there's another hot spot, between the 2 and 0 of the "> 120°C" text. It even seems a little brighter than the diode spot, actually. This is transistor Q4 in the schematic, it's present (in combination with Q2 and Q3) to disconnect the charging circuit from the battery when the battery isn't charged, to minimize current leakage. Of course, while charging, it has the full charge current flowing through it. Assuming conversion from ~3V to 5V at about 90% efficiency, this transistor has a continuous current of about 3.7A flowing through it when the load draws 2A. Unfortunately the Vgs voltage is only 3V or so, so the transistor isn't turned on as hard as would be ideal, and likely has a RdsON of around 100mΩ. This results in burning 1.37W of power in this little SOT23 transistor and it gets HOT. Too hot probably, the DMG2305UX spec mentions 1.4W max mounted on 1 inch square 2 oz copper, which I'm not meeting in that location, especially since the diode is also heating the board.
So I decided to try a different transistor, a Toshiba SSM3J338R (with the original SS56 diode). It is specified to have 20mΩ typical RdsON at 2.5V Vgs, so it should be a good improvement and it has a SOT23 package as well. It should only dissipate 0.27W at the same current, resulting in 5 times less heat.
And it works! Here's a thermal shot:
And having it loaded with 2A, coming up from discharged battery, the system manages to supply the load with 2A and charge the battery, as it required for UPS functionality. Success!
But you must have noticed the little star, asterisk "*" in the heading. You know what that means. :) Fine print, exceptions, disclaimers, etc. Well there are some here as well.
In this case, it's about the input voltage to the system. These tests were all done with 5V USB input, but I've designed the board to accept input voltages up to 24V. So I decided to test what would happen at 2A with 20V input voltage. The result isn't good:
Yikes, frying the diode again! This makes sense unfortunately. At high input voltages, the PWM duty cycle is very low, which means that current is most of the time flowing through the freewheel diode. At 5V input, the diode only conducts around 40% of the time, but at 20V input it's about 85% of the time.
Every power system is subject to trade-offs like this. I'm all right with lower current capability when powered by higher input voltages--it's a trade-off the customer will have to make in their system design. As long as it can do 2A with 5V input I'm happy.
So how low do we need to go to have it work as a UPS and not overheat? i tried 1.5A load:
Better, "only" 110°C, but still too hot, since the battery discharges while plugged in.
Ok, try 1A then:
That's better, only 82°C and the system stays cool enough to allow the battery to charge! It's not 2A, but it still can act as a UPS for a Pi3 at 100% CPU.
Then I wondered: since at the higher input voltage the diode becomes the problem again, maybe switching to the lower voltage SS54 would be helpful to reduce heat in this condition?
So I tried 1A load with both the SS54 and SSM3J338R:
Great, that reduced it to 74°C. Maybe we can try higher current now? Bump it back up to 1.5A:
Hmm, hot. The reading is higher than with the other diode actually. Oddly, the battery IS charging with this load. I guess maybe I measured temperature in a slightly different spot? All I know is that it is charging the battery and it would work as a UPS with 1.5A load and 20V input voltage. Awesome!
So how about 2A? I bumped it up and waited for the system to settle to take another picture. That's when I heard a faint sizzle, and when I looked at the board, I saw magic smoke and a little flame! :$
So, here's the last picture showing the damage:
Oddly it's switching transistor Q1, a Toshiba SSM3J332R, that has bitten the dust. That's not what I expected since at high input voltages, this transistor is on LESS, only about 15% of the time at 20V input, so it seems it would take less of a beating.
I'll need to figure out why that happened. My guess is that with the low duty cycle, the peak current is going to be significantly higher than the average current, much higher than at more moderate duty cycles at lower voltages. Anyone have any insights that could help me?
In summary, this is why we make prototypes. :) A lot to learn as usual. I'm feeling confident we're getting closer to figuring it all out, and production.