Learn to code

Arduino Home

Lessons 1
Arduino - Getting Started
Lessons 2
Arduino - Basics
Lessons 3
Arduino - Serial Communication
Lessons 4
Arduino - Digital / Analog
Lessons 5
Arduino - Visual Output
Lessons 6
Arduino - Motor Control
Lessons 7
Arduino -LCD Displays
Lessons 8
Arduino -LCD Displays

Arduino Pin Functions

in Arduino Getting Started

This tutorial continues with the quest to learn more about programming and electronics. Most of the time,  we will choose the Arduino Uno board for our tutorials. The Uno is the baseline Arduino board. Besides that, the Arduino Uno Board is excellent if you would like to begin with electronics and coding. Furthermore, the Arduino Uno is a cheap board, so it will cost you a few dollars/euros to start over again if you do something wrong.

Before the pins overview on an Arduino Uno Board, we will divide the pins into three categories. Digital, analog, and power pin. The common elements of an Arduino board are described below.

Arduino Board Elements

  1. USB-Power: the Arduino Uno board needs them through a USB cable from the computer.
  2. Barrel Jack, POWER: The board can be powered from AC main power supply, such as batteries, by connecting it to the board.
  3. Voltage Regulator: the Arduino Board uses this to regulate the voltage given to the USB-Power or the Barrel Jack.
  4. Crystal Oscillator: the Arduino board uses this to calculate time.
  5. Reset Button: you can hard reset your Arduino by pushing the button. In contrast, you can also use the PIN with the name RESET to attach an external reset button.
  6. 3.3 Volt output: supplies 3.3V output. Most of the external components used with Arduino will work between 3.3V and 5 volts. Examine the datasheet/details of the component to ensure that you use the right voltage?
  7. 5-volt Output: supply 5-volt output to external components.
  8. GND (GROUND): there are several GND pins on the Arduino Uno board. You can use any of those to ground your circuit.
  9. VIN PIN: equals the input voltage to the Arduino board when it is used with an external power source. You can supply voltage through this pin to components as if you supply voltage via the power jack. Remember, the VIN PIN does not regulate voltage, so be aware.
  1. IOREF: This is a voltage corresponding to the i/o of that board, for example, an Uno would supply 5v to this pin, but a Due would supply 3.3v. Sending a signal to this pin does nothing.
  1. ANALOG PINS: there are 5 analog pins on the Arduino Uno board. These pins transform analog signals from sensors into digital readable values that can be read by the microcontroller
  2. Main microcontroller: this is where the brains of the Arduino is. In the case of the Arduino Uno board,it uses an ATMEL chip.
  3. Power LED indicator: this LED should light up when you power your Arduino Uno board.
  4. Digital Pins: the Arduino Uno board has 14 digital pins. 6 pins, with “ ~ “, provide PWM (Pulse Width Modulation) output.

Arduino Digital Pin Headers

The next category of headers is analog pin headers.  These are labeled A0 through A5, giving us six analog pins. As you might have guessed, “A” stands for analog. Before, we said that digital means discrete states – either high or low, one or zero, black or white.  However, analog is a lot more colorful.

When we say something is analog, it means that it can be in any number of states.  Analog embraces all of the various shades of gray between black and white. Many sensors create analog signals.  They’re not just on or off.

However, our integrated circuit only knows digital states.  Therefore, the microcontroller handles analog inputs by using a tool called an analog-to-digital converter, an ADC.

The ADC is part of the integrated circuit, built right into the chip.  The analog pins have access to it. The ADC takes all of the variations in an analog signal and cuts it up into discrete steps.  In other words, instead of having an endless list of possibilities from your low to high limit, the ADC would cut that expanse from the low value to the high into a certain number of “chunks.”

In addition to using the ADC, analog pins can also act just like digital inputs or outputs.  So, they are very versatile.

Arduino Analog Pin Headers

Digital pin headers make up the longest row on the Arduino board. They are numbered from zero to 13.  That means there are a total of 14 digital pins that we can use. Digital pins are used in one of two ways.  They can be used as inputs to do things like reading a voltage.

When they operate as an input, they can only read two different voltage states – HIGH or LOW.  The same is true when they act as outputs.  They can only output two voltage states – five volts (HIGH) or zero volts (LOW).

Just as in anything else in life, there is an exception to this.  You’ll notice that some of these pins have a little mark next to them. There should be six of them, located at pins three, five, six, nine, 10, and 11. These specific pins allow you to use a technique called pulse width modulation, or PWM.

PWM is a technique that we’ll dive into in later tutorials.  It enables us to use digital pins so that they appear as though they are outputting a varying amount of voltage. Again, we’ll get into PWM in much greater depth later.  Right now, I just want to point out those pins and why they are special.

Lastly, pin 13 is also worth noting. That is where an onboard LED is attached.  You can use that LED as though it is externally connected with the Arduino Board.

Power Pin Headers

The last row of pin headers is the power header row.  They are next to the analog headers. There are only a handful of pins I want to point out right now.  The first one is labeled “5V”.

That stands for five volts.  If you have the Arduino hooked up to the computer via USB, or if you have external battery power applied, this pin can provide five volts to a circuit.  We’ll be using this pin extensively throughout the course when we’re setting up our circuits.

The pin next to it is labeled “3.3V”, which stands for 3.3 volts.

Arduino Uno Pin Diagram

I also want to point out two other pins.  Notice that pins zero and one have a “TX” and “RX” next to them with little arrows.  That stands for transmitting and receive.

If you have the Arduino hooked up and supposed to communicate with the computer, you should see these blinking.  If not, it’s a good indication that you probably don’t have the Arduino set up correctly in the IDE, and communication is unsuccessful.

Previous Post
Choosing an Arduino Board
You must be logged in to post a comment.