Closed charlespax closed 8 years ago
From stmdude:
Power.. Battery... I've been looking at the T400 schematic with regards to the battery and charging. Now, before you read further, you need to know that I'm very paranoid and particular about the charging of lithium based batteries. :wink:
To decide how (and if) you want to charge a LiPo cell, there are a few parameters one has to know:
- The maximum allowed charge-current for the cell
- The lowest cell voltage allowed for full-current charge
- The maximum allowed cell-voltage for the cell
- The current temperature of the cell
So, in the T400, the MCP73831 handles a lot of this (btw, you haven't specified which MCP73831 you are using in the schematic. Using the wrong one (I'm thinking of people copying the board, etc) can lead to over-charged cells, which is bad).
- Is set by the resistor on the PROG pin
- The MCP73831 uses a very safe value for this. Downside: Charging an over-discharged battery can take a while longer than it should/could
- This isn't handled. And, considering the nature of the device, it probably should.
So, if you read the datasheet for a LiPo battery, you'll find two temperatures. These specify the range where charging is permitted (typically from 0C -> 45C). Charging the battery when it's outside of these temperature-ranges can damage it.
So, my suggestion is: Since the battery itself doesn't have a thermistor in it, use the internal themometer in the STM to sense the temperature. Put a N-Channel MOSFET on the PROG pin of the MCP, which the STM32 can control. This allows you to terminate charging (floating PROG = disabled charging).
Also, I'm assuming you'll adopt the battery detect circuitry to the STM, and just feeding VBAT into an ADC channel (via a voltage divider, of course)? (With a FET to be able to get rid of the leakage, just like the T400 has)
Sorry for the rant..
I just ripped open a BL-5C battery. Here is the internal protection PCB.
It contains two ICs. One is marked DW01 z, which is a battery protection IC from Fortune Semiconductor. It is probably similar to this one. The 8205S is a 8205A dual NFET.
What do you think?
From stmdude:
It's a pretty basic (and adequate) protection circuit. One thing you should confirm though (you might have already done it) is to make sure that the MCP73831 actually tries to charge a little bit before trying to do a battery detect (VBAT > 0V). Otherwise, "4. Charge Detection after Overdischarge" won't work. I've been bitten by that one once before. (Not with the MCP chargers though, that was a BQ)
Still, some rudimentary temperature checks would be in order (considering that people might very well put an instrument like this in a temp-chamber)
The Adafruit Feather boards could be a nice reference design for our battery charging system. It's fairly similar to the T400 as well. Adafruit has a series of Feather boards with different microcontrollers and various wireless options.
Below are the power and battery charging circuits for the various boards. Decoupling cap and other bits may be left out.
Adafruit-Feather-32u4-Basic-Proto-PCB
Adafruit-Feather-32u4-Bluefruit-LE-PCB
Adafruit-Feather-32u4-FONA-PCB
Adafruit-Feather-32u4-RFM-LoRa-PCB
Adafruit-Feather-ESP8266-HUZZAH-PCB
Adafruit-Feather-M0-Adalogger-PCB
Adafruit-Feather-M0-Basic-Proto-PCB
Adafruit-Feather-M0-Bluefruit-LE-PCB
Adafruit-Feather-M0-RFM-LoRa-PCB
Adafruit-Feather-M0-WiFi-WINC1500-PCB
Adafruit-WICED-WiFi-Feather-PCB
All Feather boards use the same MCP73831 battery charging circuit that we also use in the T400, so I think we should stick with that for the LabWiz board.
Each Feather board uses one of two LDO voltage regulators: SPX2319-3.3, AP2112-3.3.
Here is the voltage regulator and the battery charging circuit.
We still need to implement switching between battery power and USB power https://github.com/PaxInstruments/labwiz-board/issues/37.
Implement a solid battery charging circuit. See http://community.paxinstruments.com/t/pax-instruments-labwiz/167