The Arduino Uno pinout consists of, 

  • 14 digital pins
  • 6 analog inputs 
  •  a power jack 
  • USB connection 
  • ICSP header.

 The versatility of the pinout provides many different options such as driving motors, LEDs, reading sensors and more.

Pin Description


Pin Category
Pin NameDetails
PowerVin, 3.3V, 5V, GNDVin: Input voltage to Arduino when using an external power source.5V: Regulated power supply used to power microcontroller and other components on the board.3.3V: 3.3V supply generated by on-board voltage regulator. Maximum current draw is 50mA.GND: ground pins.
ResetResetResets the microcontroller.
Analog PinsA0 – A5Used to provide analog input in the range of 0-5V
Input/Output PinsDigital Pins 0 – 13Can be used as input or output pins.
Serial0(Rx), 1(Tx)Used to receive and transmit TTL serial data.
External Interrupts2, 3To trigger an interrupt.
PWM3, 5, 6, 9, 11Provides 8-bit PWM output.
SPI10 (SS), 11 (MOSI), 12 (MISO) and 13 (SCK)Used for SPI communication.
Inbuilt LED13To turn on the inbuilt LED.
TWIA4 (SDA), A5 (SCA)Used for TWI communication.
AREFAREFTo provide reference voltage for input voltage.

Arduino -Pins Configuration

Voltage Regulator-The voltage regulator converts the input voltage to 5V. Crystal Oscillator The Crystal oscillator has a frequency of 16MHz,It provides the basic timing and control to the board.RESET Button–It is used to reset the board button every time we flash the code to the board.

Barrel Jack – The Barrel jack or DC Power Jack is used to power the Arduino board using an external power supply. The barrel jack is usually connected to an adapter. The board can be powered by an adapter that ranges between 5-20 volts but the manufacturer recommends keeping it between 7-12 volts.

Note:  Above 12 volts, the board may overheat and below 7 volts, the voltage might not be sufficient to power the board.

USB B-port–The USB Interface is used to plug in the USB cable. This port can be used to power the device from the 5V supply. It allows us to connect the board to the computer. The program is uploaded to the board serially from the computer through the USB cable.

The Arduino Uno consists of 6 analog pins, which use ADC (Analog to Digital converter). These pins can serve as analog inputs but can also function as digital inputs or digital outputs. These pins accept inputs in the form of Analog signals and return values that range between 0 and 1023 (because the Arduino Uno has a 10-bit Analog to Digital converter ).

An Analog to digital converter works in three stages: sampling, quantization, and digitization. Because the Arduino operates on a 0–5 volts range, the step size of the device is 5/1023=0.00488volts.

Thus, we can interpret a 4.88 mV input voltage to any of the analog pins as 1, 9.77 mV as 2, and so on until 5 V as 1023. Anything below 4.88 mV is considered 0 and above 4.99 V as 1023.

On the Arduino UNO board, pins 0-13 are digital input/output pins.

The Arduino digital pins can read only two states: when there is a voltage signal and when there is no signal. This kind of input is usually called digital (or binary) and these states are referred to as HIGH and LOW or 1 and 0.

LED (13): On the board, there is a built-in LED connected to digital pin 13. When this pin is HIGH or 1, the LED is switched on, when the pin is LOW or 0, it’s switched off. 

The ‘~’ symbol represents the  digital pin 3,5,6,9,10, and 11 . These pins have an additional feature called PWM. Hence these pins are called PWM pins.PWM stands for “Pulse Width Modulation”. It means, that an analog value is being modulated on a digital signal

GND (Ground pins): There are 5 ground pins available on the board.

RESET – Use to reset the Arduino Board. If this pin is supplied with 5 V, the board will reset automatically

I/O Reference Voltage (IOREF) – This pin is the input/output reference. It provides the voltage reference at which the microcontroller is currently operating. Sending a signal to this pin does nothing.

3.3V and 5V: These pins provide regulated 5v and 3.3v respectively to the external components connected to the board.

Digital GPIO of Arduino

Introduction

General-Purpose Input Output (GPIO) is a digital pin of an IC. It can be used as input or output for interfacing devices.

If we want to read switch’s state, sensor data, etc then we need to configure it as input. And if we want to control the LED brightness, motor rotation, show text on display, etc then we need to configure it as output.

Arduino GPIO Pins

Arduino Uno board has various digital IO pins which can be used for input/output devices. Following image shows the digital IO pins of Arduino Uno,

Arduino GPIO Pins

Arduino GPIO

Arduino analog pins can also be used as digital input/output pins. Let’s see digital input, output of Arduino (ATmega).

 Pin Configuration

Digital Output

Arduino (ATmega) digital pins can be configured as output to drive output devices. We have to configure these pins to use as output.

To configure these pins, pinMode () function is used which sets the direction of pin as input or output.

  • pinMode(pin no, Mode)

This function is used to configure GPIO pin as input or output.

pin no- number of pin whose mode we want to set.

             mode -INPUT, OUTPUT or INPUT_PULLUP

E.g. pinMode (3, OUTPUT)  //set pin 3 as output

These Arduino (ATmega) pins can source or sink current up to 40 mA which is sufficient to drive led, LCD display but not sufficient for motors, relays, etc.

Note: While connecting devices to Arduino output pins use resistor. If any connected device to Arduino withdraw current more than 40 mA from the Arduino then it will damage the Arduino pin or IC.

These pin produce output in terms of HIGH (5 V or 3.3 V) or LOW (0 V). We can set output on these pins using digitalWrite () function.

  • digitalWrite (pin no, Output value)

This function is used to set output as HIGH (5 V) or LOW (0 V)

pin no -+number of a pin whose mode we want to set.

Output value –HIGH or LOW

E.g. digitalWrite (3, HIGH)

Digital Input

To read data from senor or from any device/circuit, we need to configure digital pin as input. Arduino pin are set as digital input (default). So, there is no need to configure pin as input.

To configure pin as digital input, pinMode () function is used. We can read data from GPIO pin using digitalRead() function.

  • digitalRead(pin)

It is used to read data from specified GPIO pin.

Author

Write A Comment