I've got an Adafruit PowerBoost 1000C and I'd like to connect the LBO (Low Battery Output) to a Raspberry Pi GPIO pin to detect low battery and shut down safely. I'm using a 2500 mAh battery.
What I think I want is this:
PowerBoost LBO -> diode -> resistor -> GPIO
I have a few questions about this:
- I'm using the diode to prevent current flow back into LBO, which I've read can cause the low battery LED to light up at the wrong time. I have some 1N914 / 1N4148 switching diodes. Are these appropriate for the task?
- What resistor value do I want to use? I think Ohm's law is relevant here, but I'm not totally sure what values to plug in and why.
- Is it better to have the diode before the resistor like above, or should I reverse those? Does it matter?
I saw a recommendation not to source or sink more than 0.5mA into an input pin. In that case, it seems like a 10Kohm resistor would be appropriate (4.2V / 10000Ω = 0.00042A) since 4.2 is the voltage of a fully-charged LiPo and 0.42mA is close to 0.5mA. Am I thinking about this correctly?