0

I have no problem turning on and off pins on my rpi4 (using both gpio on the terminal and Gpiozero with python3) however when I connect a wire (which is connected to a switch) to the pin... it turns the pin output to 0. When I disconnect, it goes back to 1.

What is the deal here? When I take the connection and attach it to an always on 5V pin - the switch turns on!

Any thoughts?

S1r-Lanzelot
  • 111
  • 5

1 Answers1

1

Question

Experiment

(1) Rpi4B terminal command Gpio and Python GpioZero can set GPIO pin output High or Low level.

(2) GPIO pin if connected to a (push button or toggle) switch can set Gpio pin output to Low.

(3) If switch in (2) is disconnected, GPIO pin output goes High level again.

(4) If GPIO pin connected to Rpi 40 pin connector's 5V power output (Pins 2, 4) GPIO pin output becomes High level again.

Legend

(a) High (logical) level means Rpi finds GPIO pin (physical, electrical) voltage ~= 3.3V (or ~= 5.0V)

(b) Low (logical) level means Rpi finds GPIO pin voltage ~= 0.0V

(c) High = 1 = 'turn on', Low = 0 = 'Turn Off'

Question

What is the deal here? When I take the connection and attach it to an always on 5V pin - the turns on! Any thoughts?

Answer

There is no big deal. If Rpi GPIO pin is connected to 5V, it is getting warmer and warmer (should not seeing smoke or flame, or hearing a pop or a bang), just dying slowing frying (geek talk = "silicon up latching").

References

Latching Up Forum Discussions

(1) DHT11 sensor and the wrong voltage may have fried my RPi3

(2) Circuit wiring issue

(3) https://www.raspberrypi.org/forums/viewtopic.php?f=56&t=232411&p=1426931&hilit=latching+up#p1426931

(4) https://www.raspberrypi.org/forums/viewtopic.php?f=56&t=232411&p=1424642&hilit=latching+up#p1424642

.END

tlfong01
  • 4,665
  • 3
  • 10
  • 24
  • I thought a GPIO pin could output 5V, why would it not be safe to connect a switch (that is expecting 5v input) to the pin? I am still confused as to the pin suddenly switching to low output when the pin is attached. Thank you. – S1r-Lanzelot Sep 05 '19 at 03:51
  • 1
    Well (1) Rpi is a small, weak 3V3 guy, not like its strong big brother 5V Arduino. Rpi thinks and talks only 3V3. (2) If the other end of your switch is connected to 5V, then the poor Rpi guy gets crazy, and before going to hell, would yell something like "Oh Bloody Hell, My stupid master wants me to go to hell, let me sing my last song, anyway, Low, Low, Low, ,... Rpi RIP. :) – tlfong01 Sep 05 '19 at 04:11
  • And I am singing this for the short lived boy - https://www.youtube.com/watch?v=6ppdB6JX99Q – tlfong01 Sep 05 '19 at 04:18