Reads the state of the
PGOOD pin on the bq24074.
The sketch can be found here.
PGOOD pin is pulled to
GND when the LiPo battery on the bq24074 is fully charged. The Feather can be used to read the state of that pin to determine if the battery is fully charged.
One potential problem is that the pulled high resistor on
pin 14 can cause issues to the
This method theoretically can use the Feather to also read the state of the
CHG pin on the bq24074 which indicates when the LiPo battery is charging.
- The pulled high resistor on
pin 14does not cause an issue with the
- Connect a LiPo battery to the
LiPo BattJST connector on the bq24074.
- Connect the JST connector on the Feather to the
GNDpins on bq24074 so that the Feather is powered by bq24074 and that there is a common ground.
- Add a
10kΩpull up resistor to
pin 14on the Feather and
pin 14on the Feather to the
PGOODpin on the bq24074.
- Plug in the USB port on the bq24074 to
Circuit made with Circuit Diagram
The sketch reads the opposite of
pin 14 so when the
PGOOD pin is open,
pin 14 is pulled high and the value of
pin 14 is
PGOOD is pulled to
GND (open drain),
pin 14 is also pulled to
GND but the output value is read as
test title=Typical Output test: pgood Digial Read: Pin: 14 Value: 0 Digial Read: Pin: 14 Value: 1
When the USB power supply is not plugged into the bq24074, the
PGOOD green LED is off and the value of
pin 14 is
0. The built in red LED on the Feather is off.
When the USB power supply is plugged into the bq24074, the
PGOOD green LED turns on if the LiPo battery is full and the value of
pin 14 is
1. The built in red LED on the Feather is blinking.
Everything worked as expected. The value of
pin 14 was correct when the green LED was on or off. The built in red LED on the Feather blinked when the green LED was on and off when the green LED was off.
The Feather can be used to read the state of
PGOOD pin and therefore the state of the
CHG pin as well.