Before reviewing the schematic I had a look at the datasheets of both the SSD1306 OLED controller and the W25Q80BV Flash ROM, and both have a sleep mode/power-down mode. Hoorray! This means that the current power configuration should work to power Trinket Pro, OLED and ROM when the device is in the following states:
- Turned on with low battery (Trinket and OLED only, to show "low battery message"), current should be under 30 mA;
- Turned on with low battery while charging (Trinket/OLED/ROM working to enable data transfer via USB-to-Serial, total current should be under 100 mA, the remaining 400 mA of the USB will be used to charge battery; 3.3V regulator should also switch to power via USB rather than battery to provide maximum charge current to the battery (will the schottky diode work like on the Trinket Pro regulator)
- Turned on with very low battery and not charging, only the Trinket should power up to check battery status and turn off
I still have to find a way to let the Trinket Pro shutdown itself; probably a pin that pulls low the ENABLE pin of its regulator won't work alone, but maybe pulling it low for some time while charging a capacitor should work?
While I find the perfect solution to this feature imlpementation, take a look at the OLED+ROM test that I performed on the Teensy 3.0; I'm using the Teensy 3.0 because that's the only 3.3V compatible board that I had lying around my house; I'll soon get a Trinket Pro 3.3V.