Timeline for My relay triggers on access. How to disable this?
Current License: CC BY-SA 4.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 4, 2022 at 13:38 | comment | added | Dmitry Grigoryev | @Dims Because the relay module inputs have 5V on them, and the Pi will not apply 0V until you set up the GPIO pin as output. | |
May 4, 2022 at 8:49 | comment | added | Dims | If normal is 5V for my relay, then why doesn't it trigger when I turn on my device? | |
May 4, 2022 at 7:25 | comment | added | Dmitry Grigoryev | @Dims Most likely it can't stay "normal" because "normal" = 5V for your relay module and 0V for the Pi GPIO. In more conventional terms, your relay module is "active low" and the Pi GPIO is "active high". "Active" is the opposite of your "normal" - you set a signal to "active" when you want something to happen. Indeed, there's no way for the Pi to know what level is "active" for a random device you bought separately. | |
May 2, 2022 at 15:10 | comment | added | Dims |
Nice workaround, thanks. But I still want to understand: whatever "normal" is, why is it change on GPIO.setup(pin, GPIO.OUT) ? Shouldn't it be and stay in "normal" before and after this instruction?
|
|
May 2, 2022 at 12:37 | history | answered | Dmitry Grigoryev | CC BY-SA 4.0 |