Thank you for your donation!


Problem: GPIO button false trigger on startup
#7
(06-24-2020, 08:51 PM)TheOldPresbyope Wrote: @waffle

Some random thoughts.

  1. If you are seeing spurious behavior during startup, then you need to devise a test which executes during startup, not a test which is run manually after everything has initialized.
  2. GPIO 3 is also used in I2C communications. I'm just saying....
  3. From my reading, GPIO 3 includes an internal 1.8 kohms pull-up to 3.3v., so telling the software to pull it high is effectively a "no op".
  4. How big is that capacitor you wired between GPIO 3 and ground? (Because of #2 you have created an RC-network.) 
  5. How long are the wires connecting it to the GPIO pin and to ground? Did you wire directly to a GND pin on the RPi or somewhere else.
  6. As above, how long are the wires connecting the switch to the GPIO pin and to ground? Did you wire directly to a GND pin on the RPi or somewhere else.
  7. How are you triggering the relay which turns on the amp? How have you made certain the flaw doesn't lie in this portion of the circuitry and software rather than in the input-button portion?
Like I said, random thoughts.

Regards,
Kent
1. The spurious behavior happens when I launch gpio-buttons.py. I was testing the pin state before launching it because Tim mentioned that the GPIO pin could be in the wrong state after boot.
4,5. The capacitor in an smd one placed directly between pins 5 and 6 on the underside of the board. The value is around 1nF if I remember correctly.
6. Here are the internals. Power button is green wire, gnd is black.
7. GPIO handler launches a python script that toggles the relay and an led on the front panel. I can't think of anything else that could launch this script. Also, this button was previously set to reboot the system, and I sometimes got reboots after I started the system, but couldn't understand wth was happening.

I moved the button to GPIO 12 and gonna be testing for a while. It's a very nasty bug because you have to do lots of reboots to catch it..
Reply


Messages In This Thread
GPIO button false trigger on startup - by waffle - 06-24-2020, 04:21 PM
RE: GPIO button false trigger on startup - by waffle - 06-25-2020, 12:10 AM

Forum Jump: