Can I please have a sanity check on my circuit? I'm not 100% comfortable with my plan.
I'm using an Adafruit RP2040 CAN Bus Feather Product Link. I need to carry a battery charge indicator LED to the outside of the enclosure so I'll know the battery charge is complete without either opening the case or providing a 'peephole' to see the internal LED. Below is the Adafruit provided schematic of the charge section. VBUS is the 5V USB input voltage.
STAT is a logic level output which outputs ~0.4V while the battery is charging and ~4.6V when the battery is completely charged. The below information was extracted from the MCP73831/2 datasheet LINK. My component is the MCP73831. I measured 0.5V while the battery was charging and 4.5V once the charge was complete.
The RP2040 inputs are not 5V tolerant (correct me if I'm wrong) so I need to drop the STAT 5V output to something tolerable in order to feed it into a GPIO.
This is where I'm getting a bit nervous. My idea is to add a voltage divider to drop the 4.5V STAT output to ~2.5V and feed that into GPIO24, No Pullup. See additional circuitry below.
Even though STAT can source 35mA and I'm only drawing ~250uA, I feel like I'm missing something that may damage my $20 CAN BUS Feather. Am I on the right path or am I missing something that should make me nervous?
Well, if you're super-ultra-crazy worried, buy a 4-pin optoisolator and drive it's LED with the STAT output. Use the isolator output to feed the Feather(might need a pullup, unless the GPIO has one). No connection, power, ground, or signal, required then.
That's an option. However, it would require a separate board. That can certainly be my Plan B if necessary. Thanks for the idea.
I was hoping to get away with soldering a few posts to 9, 24 and GND, solder 1/4W resistors to the posts and one lead directly to pin 1 of the IC. I'm just looking for some assurance I'm not going to scrap my RP2040. I already smoked one using a dirty DC-DC converter reducing 24V to 5V. Start up voltage spikes killed the 3.3V LDO. So now I'm all paranoid. I decided it would be safer to use a battery.
Glue your 4 pin iso to the back face of the screw term with hot glue, and fly-wire the rest. Easy-peasy.
You'd be surprised what even reputable manufacturers resort to, when it's 11th-hour and anything else would set back the holy-grail schedule.
Looks to me like the STAT output is sinking the LED current, not sourcing. If the output is open drain, your divider will draw a small constant current through the LED.