Wednesday, December 18, 2024
ExplainerIoT HardwaresRaspberry PiSensor & Devices

Raspberry Pi GPIO Basics

This Article contains some basic information for setting up and using the Raspberry Pi’s general-purpose input/output(GPIO) connector. This connector allows you to connect all sorts of interesting electronics to your RPi. Remember 26 pin layout for the originally Raspberry Pi and 40 pin layout that came in with the Raspberry Pi “+” models. Read this post for Raspberry Pi GPIO Basics.


Difference Between 26 pin and 40 pin layout

Revision 1 (26 Pin Layout) and Revision 2 (40 Pin Layout) are two layout version. I2C port was swapped. The two pins SDA & SCL are still SDA & SCA but use a different internal I2C interface. So if you are using the pins as GPIO rather than I2C, then you will refer to them as 2 and 3 on a revision 2 board. Also, GPIO PIN 21 was replaced by GPIO 27 on revision 2. Top 26 pins same as rev 1. Extra Pins of the 40-Pin connector are made up three useful extra GND connections and 9 GPIO pins.

The ID_SD and ID_SC pins are intended for use in communicating with a special serial memory chip, which can be included on interface
boards that conform to the hardware at top (HAT) standard and allows the raspberry Pi to identify the board.


The hardware at top standard is an interface standard that you can you use with the raspberry pi 2. B+ and A+. this standard does not in any way stop you from just using GPIO pins directly, however interface boards that conform to the HAT standard can call themselves HATs and differ from regular raspberry pi interface boards in that a HAT must contain a little electrically erasable programmable read-only memory (EEPROM) chip that is used to identify the HAT so that ultimately the raspberry pi can auto-install necessary software. At the time of writing, HATs have not quite met that level of sophistication, but the idea is good one. The Pins ID_SD and ID_SC are used to communicate with HAT
EEPROM.


You may like also: How To Use Raspberry pi in a truely headless mode


Keeping Raspberry Pi Safe when using the GPIO Connector

Raspberry Pi is little fragile when it comes to adding external electronics. Today, Latest Models are little more robust but still quite easy to break. So follow some precaution given below:

  • Do not put more than 3.3V on any GPIO pin being used as an input.
  • Do not draw more than 16mA per output and keep the total for all outputs below 50mA in total for Revison 1 layout and below 100mA on a revison 2 (40 Pins).
  • Do not power the RPi with more than 5V.
  • Do not draw more than a total of 250mA from the 5V supply Pin.
  • Do not poke at the GPIO connector with a screwdriver or any metal object when the Pi is powered up.
  • When using LEDs, 3mA is enough to light a red LED reasonably brightly with a 470ohm series resistor.

Controlling LED with Raspberry Pi

Control LED with GPIO connector. Visit these articles given below.

Buy now : Raspberry PI 3 Model B+ Motherboard


You may like also:


Buy now : Raspberry PI 3 Model B+ Motherboard

I hope you like this post Raspberry Pi GPIO Basics. Share your feedback and quires in comment box.

Harshvardhan Mishra

Hi, I'm Harshvardhan Mishra. Tech enthusiast and IT professional with a B.Tech in IT, PG Diploma in IoT from CDAC, and 6 years of industry experience. Founder of HVM Smart Solutions, blending technology for real-world solutions. As a passionate technical author, I simplify complex concepts for diverse audiences. Let's connect and explore the tech world together! If you want to help support me on my journey, consider sharing my articles, or Buy me a Coffee! Thank you for reading my blog! Happy learning! Linkedin

8 thoughts on “Raspberry Pi GPIO Basics

Leave a Reply

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