I have the Pololu Mini Pushbutton Switch SV #2809 [https://www.pololu.com/product/2809]. I have it configured with:
- 5v battery connected to Vin and GND
- Vout and GND to Raspberry Pi power in
- Raspberry Pi via GPIO to ON
- Rspberryy Pi via GPIO to OFF
- Manual extremal momentary button connected to B and A
- Rapberry Pi power to Vout and GND
The control flow I use is as follows:
- Press the external momentary button
- Power turns on and RPi runs
- RPi sets GPIO connected to ON as HIGH so that power cannot be disrupted
- RPi performs other tasks then sets GPIO connected to OFF as HIGH to turn off power
- Power goes off and RPi turns off
- Next time the momentary button is pressed, the cycle starts again
This al works perfectly. I can press the external button and have the whole cycle run. Then press it again each time I want the cycle to repeat. Here is my problem. If I wait a few minutes from the end of one cycle before I press the external button again, the 2809 board is unresponsive to any future button presses. If I disconnect Vin and reconnect it, everything is back to normal. Its as if the board “goes to sleep” when inactive for a few minutes but I don’t see this behavior documented at all.
Any thoughts as to what might be going on?
FYI, it takes about 45 seconds for the RPi to complete its “other tasks” in step 4 above, before it sends the OFF message to the 2809 so I don’t consider the circuity to be very “bouncy”.