• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
KaliTut

KaliTut

Kali Linux tutorial and Linux system tips

  • Home
  • Raspberry Pi
  • Privacy Policy
  • About us

Raspberry Pi GPIO input wired with button/switch

Last Updated on May 31, 2020 by Kalitut Leave a Comment

Raspberry Pi GPIO input wired with button

Raspberry Pi GPIO input

Basically, you can operate a GPIO pin either as an input or as an output. As an input, it can assume the states “High” and “Low”. For example, from a switch or button. 
In general, Raspberry Pi’s GPIOs are wired with resistors to set inputs to a defined level (+ VCC or GND) or to limit the current.

  • Basics: Connect Raspberry Pi GPIO

GPIO input with push-button / switch and pull-up resistor

Raspberry Pi pull up resistor

The pullup principle pulls the GPIO input to the + VCC level with a pull-up resistor. The ground state of the input would then be “high” or “logical 1”. With a switch or pushbutton, the GPIO input is pulled or switched to ground (GND). That is, in the switched state, the input would have the state “Low” or “logical 0”.

GPIO input with push-button / switch and pull-down resistor

Raspberry Pi pull down resistor

The pull-down principle pulls the GPIO input with a pulldown resistor to ground (GND). The ground state of the input would then be “low” or “logical 0”. With a switch or pushbutton, the GPIO input was pulled to the level of + VCC. This means that in the switched state, the input would have the status “High” or “Logic 1”.

GPIO input with button / switch and cross resistance

Raspberry Pi cross resistance

Basically, the current in the switched state (push button / switch actuated) is limited only by the resistance of the internal components. In order to limit the current in the external wiring, an additional shunt resistor is often switched in front of the GPIO input.

Pull-up or pull-down resistor?
It is recommended to connect GPIO inputs with a pull-up or pull-down resistor. The question is, why is such a resistance necessary? And which principle should be used? So pullup or pulldown? And what size should these resistors have?

  • GPIO with pull up or pull down resistor?

Filed Under: Raspberry Pi Tagged With: Raspberry Pi GPIO

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Follow us

  • Facebook
  • Twitter
  • YouTube

Categories

  • Android pentesting tools
  • Arduino
  • Books
  • Darknet
  • database
  • General
  • Github Tools
  • Hacking
  • Kali Linux
  • Linux
  • Linux Commands
  • Network Administrator
  • Penetration Testing
  • Penetration Testing Tools
  • PowerShell
  • Raspberry Pi
  • resources
  • Review
  • Termux
  • Tutorials
  • Ubuntu
  • Uncategorized
  • Video Tutorials
  • vmware
  • WiFi Adapter
  • WiFi Pentesting
  • Wireless Router
  • Wireshark

Recent Posts

  • Hijacked Wi-Fi? Thorough explanation of hacking techniques
  • Windows PowerShell tutorial for beginners
  • Learn to Hack Steps from Beginner to Hacker
  • PowerShell Tutorial – GUIDE introduction with basics
  • Top Hacking Tools
  • Home
  • About us
  • Privacy Policy
  • Affiliate disclaimer

Copyright © 2023