Mini Pushbutton Switch 2809 working intermittently

I have the Pololu Mini Pushbutton Switch SV #2809 [https://www.pololu.com/product/2809]. I have it configured with:

image

  • 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:

  1. Press the external momentary button
  2. Power turns on and RPi runs
  3. RPi sets GPIO connected to ON as HIGH so that power cannot be disrupted
  4. RPi performs other tasks then sets GPIO connected to OFF as HIGH to turn off power
  5. Power goes off and RPi turns off
  6. 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”.

Hello.

Can you post some pictures of your setup? What type of battery are you using? 5V is pretty close to the 4.5V minimum operating voltage for that switch, and as documented on the product page (under the “Characteristics at limits of operating range” header), it does get difficult to turn on at low voltages, so your application might be better suited for the low-voltage (LV) version of this board. Can you try monitoring your battery voltage when you try to use the switch (ideally with an oscilloscope)?

- Patrick

Thanks Patrick. I’m going to guess that your assumption about being on the lower limit of 4.5v is my problem. Let me test that theory by upping my battery voltage and I’ll let you know what happens.