I have connected an IR remote receiver to my Rasberry Pi's GPIO BCM 3 on.

The receiver works as expected and I have the wanted side effect, that if off as soon as an arbitrary key on the remote is pressed, the Raspberry Pi boots up.

My question is, have I to face any side effects with this setup?


This question is unanswerable - depends on the undefined IR remote receiver.

Pin 5 (BCM 3) is just another input (by default) but is probably a poor choice, as it has a 1.8kΩ pullup, and the receiver may not be able to pull it down.

Pin 5 can be used to reboot the Pi (but AFAIK should not affect the Pi unless shutdown - but I have never tested this)

Name:   gpio-shutdown
Info:   Initiates a shutdown when GPIO pin changes. The given GPIO pin
        is configured as an input key that generates KEY_POWER events.
        This event is handled by systemd-logind by initiating a
        shutdown. Systemd versions older than 225 need an udev rule
        enable listening to the input device:

                ACTION!="REMOVE", SUBSYSTEM=="input", KERNEL=="event*", \
                        SUBSYSTEMS=="platform", DRIVERS=="gpio-keys", \
                        ATTRS{keys}=="116", TAG+="power-switch"

        This overlay only handles shutdown. After shutdown, the system
        can be powered up again by driving GPIO3 low. The default
        configuration uses GPIO3 with a pullup, so if you connect a
        button between GPIO3 and GND (pin 5 and 6 on the 40-pin header),
        you get a shutdown and power-up button.
Load:   dtoverlay=gpio-shutdown,<param>=<val>
Params: gpio_pin                GPIO pin to trigger on (default 3)

        active_low              When this is 1 (active low), a falling
                                edge generates a key down event and a
                                rising edge generates a key up event.
                                When this is 0 (active high), this is
                                reversed. The default is 1 (active low).

        gpio_pull               Desired pull-up/down state (off, down, up)
                                Default is "up".

                                Note that the default pin (GPIO3) has an
                                external pullup.

EDIT To clarify you do not need gpio-shutdown to get powered up by driving GPIO3 low. This is always active UNLESS you use gpio-poweroff

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.