If you look at the pin connections on the board you will see a few letters next to each pin. These are indications of what the pins can do, but they are not very explicit to someone who does not know much about electronics.
In this Tutorial, we will decrypt them one by one, and by the end, you should be able to know what to plug where and why for your future circuits!
You can think of the microcontroller chip itself as the “brains” of the board. The chip used in the Arduino Uno is the ATmega328, made by Atmel. It’s the large, black component in the center of the board. This chip is known as an integrated circuit, or IC. This chip can come in different forms, referred to as packages.
The microcontroller socket connects all the legs of the ATmega328 microcontroller chip to other sockets, referred to as header sockets, which have been arranged around the board and labeled for ease of use. They are the black sockets that go around the edge of the Arduino board. These are divided up into three main groups: digital pins, analog input pins, and power pins.
All these pins transfer a voltage, which can either be sent as output or received as an input. They allow additional circuitry to be connected to the board quickly and easily and allow additional boards, called shields, to be plugged neatly on top of your Arduino board. This same process of sending and receiving electrical signals is going on inside modern computers, but difficult to access. The Arduino provides direct access to input and output signals, and a large library of open sources software support is available for these kind of interfaces with different devices. Further, XOD provides a visual programming interface that allows simple access to these resources.
All of your hardware parts have a minimum of 3 pins to plug in the board. Those are VCC, GND and Signal.
Basically, the board is powered by either a computer or an external power supply. Current flows through the hardware part and make it work. VCC (usually 5V, but sometimes 3.3V for some components) is where the power comes from. GND is where it ends (It's basically the point of 0V). Current will always flow from VCC to GND and activate whatever is in between. The signal pin in between is the pin through which the board communicates with the device. Let's learn about the specificities of the other Pins.
Pins A0 to A5
Analog pins are input pins. They transmit to the board a signal that comes from a sensor and is continuous (Meaning it can have an infinite amount of values within a given range). Most sensors are analog sensors and can send an infinite amount of values to the board. The board then converts them in values ranging from 0 to 1023 to communicate with the Digital Pins. Most sensors in the kit are analog sensors which means that they provide measured values as continuous changes in voltage variations. Switches that go either on or off, are examples of digital inputs, however.
Pins D0 to D13
Digital pins have a discreete and finite amount of values that they can deal with. Digital Pins can receive Inputs and produce outputs (unlike Analog Pins who only receive inputs). Digital pins are used for Most Digital Pins have othe abilities that we are going to describe more in the following paragraphs.
Pins D3, D5, D6, D9, D10 & D11
Pulse-With-Modulation (PWM) is a way to translate analog signal into a digital signal that the micro controller can interpret and use. This is what allows you to dim the brightness of an LED with a potentiometer, even though a potentiometer is an analog input and an LED a Digital output.
Pins SDA and SCL
I2C or "Inter-Integrated Circuits" are a standard to connect external devices to a Master microcontroller using only two lines in addition to the GND and VCC cables.
The lines are the "Serial Clock Line" (SCL from next section) and "Serial Data Line" (SDA from the section right after).
As in the I2C standard, the data are synchronised in time, you can connect several I2C devices parallel to one another and identify them with an 'address' wich relates to the clock. Addresses will be in the format 27h; 38h ...
Serial Clock Line, or SCL is part of the I2C bus. This line essentially clocks the informations that arrive to it and serves to syncrhonise them.
Serial Data Line or SDA sends bits in state either HIGH or LOW and depending on their state at each count of the clock; those bits get translated into informations to be interpreted by the board.
Pins TX and RX
UART stands for Universal Asynchronous Receiver-Transmitter. It is a component that communicates with the computer through the serial port without using a clock to time the data but rather the instructions all have a start and a stop bit for the microcontroller to interpret them correctly. It is particularly useful for debugging because this protocol communicates with the serial monitor of the computer (or the 'watch' nodes of the XOD software in our case). UART also uses the TX and RX lines.
TX is the Transmitter line of TTL (Transistor-transistor Logic) which allows two computers/microcontrollers to communicate
RX is the Receiver line of TTL (Transistor-transistor Logic) which allows two computers/microcontrollers to communicate
Serial Peripheral Interface (SPI) is a synchronous serial data protocol, hence relying on a clock to organise information. It is used to communicate with peripheral devices or with another microcontroller. SPI relies on a Master and Slave system, meaning that the board you are using is a Master able to sent instructions to one or several 'Slave' devices. Three lines are common to all slave devices: MISO, MOSI and CLK. Each slave has a Slave Select (SS) line unique to it that the Master uses to send instruction to it specifically.
When a device's Slave Select pin is low, it communicates with the master. When it's high, it ignores the master. This allows you to have multiple SPI devices sharing the same MISO, MOSI, and CLK lines.
Pin 12 or MISO on the extension board
Master In Slave Out - The Slave line for sending data to the master in a SPI protocol
Pin 11 or MOSI on the extension board
Master Out Slave In - The Master line for sending data to the peripherals in an SPI protocol.
Pin 13 or SCK on the extension board
Serial Clock - The clock pulses which synchronize data transmission generated by the master
As its name indicates, the IOREF is the Input-Output Reference and is used to send the correct voltage to peripheral devices. On our board, this voltage is 5V, on other similar devices it may be a different voltage (it is 3.3V on the Arduino DUE for instance). This pin will not do anything if you plug a device into it.
This Reset pin is to be connected to a button and to reset the board remotely. This is particularly useful if the board is part of a device and is either not very accessible or hidden away in a box.
This unlabelled pin has no function, but is there for compatibility reasons. It is there to ensure that the board would stay compatible with next generation shields. It Will not send or receive data.
(Click to enlarge diagrams)