My current solution:
- Measure the voltage drop from the LT1302 boost converter's switch pin (pin 7) to ground, which is about 1.6v when charging and 3.8v when not charging. I chose this because it seems to be the biggest difference in charging / not-charging voltage.
Read this voltage drop via analogRead(). (I'm using a Gemma. I know a microcontroller is kind of overkill, but it also lets me blink my LED in fun colors and patterns.)
Make the LED blink or not depending on whether the reading is above or below a threshold.
- (1) While the *average* voltage on pin 7 of the boost converter when charging is 1.6v, it seems to vary a lot. So to correctly infer whether the MB Is in use, I use a moving average of the last 4 readings. This works fine, but is there a different measurement I could take that would more reliably distinguish charging vs not? Maybe the Schottky diode?
(2) The only real downside is that the LED continues to blink when charging is complete. Is there a way to sense device-plugged-in-and-charging vs. device-plugged-in-and-fully-charged?