Hi all,
I want to design a small project and make it portable. It uses an 18650 li-ion battery and I thought it'd be nice to also incorporate a cheap little MCP73832 IC to be able to charge the unit from the USB port. I have been researching for a way to read the STAT pin from the MCU so that I know in the software when the battery is being charged.
Since the USB delivers 5V and the MCU will be powered by the battery - as low as 3.1V, I can't read the STAT pin directly from the MCU because no input should be higher than its VCC. To avoid this issue, I used 2 transistors as a sort of level shifter to interface between the 3V and 5V parts and also light up a "charging" LED (simplified schematic attached).
Is there anything wrong with this way of reading the STAT pin?