The Arduino Uno is a microcontroller board based on the ATmega328P. The Uno board has 14 digital input/output pins (6 of which can be used as PWM outputs), a USB connector, an ICSP header, a 16MHz quartz crystal, a power jack, and a reset button. The board contains everything needed to support the microcontroller, all is required is to connect it to a computer via a USB cable or power it with an AC-to-DC adapter or battery to get started. Anyone can tinker with the Uno without worrying too much about messing up the board since the chip can be replaced for a few dollars. The word “Uno” means one in Italian and it was chosen to mark the initial release of the Uno board and version 1.0 of the Arduino Software (IDE) which were the reference versions of the Arduino, now evolved to newer releases. The Uno board is the first in a series of USB Arduino boards and the reference model for the Arduino platform.
The Board Specifications:
|Input Voltage (recommended)||7-12V|
|Input Voltage (limit)||6-20V|
|Digital I/O Pins||14 (of which 6 provide PWM output)|
|PWM Digital I/O Pins||6|
|Analog Input Pins||6|
|DC Current per I/O Pin||20 mA|
|DC Current for 3.3V Pin||50 mA|
|Flash Memory||32 KB (ATmega328P) of which 0.5 KB used by bootloader|
|SRAM||2 KB (ATmega328P)|
|EEPROM||1 KB (ATmega328P)|
|Clock Speed||16 MHz|
The Anatomy of the Uno Board:
Fig 1: Parts of the Arduino Uno Board
Input & Output Pins:
Each of the 14 digital pins on the Uno can be used as input or output, using pinMode(), digitalWrite(), and digitalRead() functions. They operate at 5V and each pin can provide or receive 20mA as recommended operating condition and also has an internal pull-up resistor (which is disconnected default) of 20-50KΩ. A maximum of 40mA is the value that must not be exceeded on any I/O pin to avoid permanent damage to the microcontroller.
Pins with specialized functions:
- Serial 0 (RX) and 1 (TX): These pins are used to receive (RX) and transmit (TX) TTL serial data and are connected to the corresponding pins of the ATmega8U2 USB-to-TLL serial chip.
- External Interrupts 2 & 3: These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value.
- PWM 3, 5, 6, 9, 10 & 11: These pins provide 8-bit Pulse-Width-Modulation (PWM) output with the analogWrite() function.
- SPI 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK): These pins support SPI communication using the SPI library.
- LED 13: There is a built-in LED driven by digital pin 13. When the pin is at HIGH value, the LED is on and when the pin is LOW, it’s off.
- TWI A4 or SDA pin & A5 or SCL pin: These pins support I2C (TWI) communication using the wire library.
- Analog pins (A0 – A5): These pins provide 10 bits of resolution (i.e. 1024 different values). By default they measure from ground to 5V though it is possible to change the upper end of their range using the AREF pin and the analogReference() function.
- AREF: This is the Reference voltage for the analog inputs. It is used with analogReference() function.
- Reset: This pin brings the LOW to reset the microcontroller. Typically it is used to add a reset button to shields which block the one on the board.
Powering the Uno:
The UNO board can be powered via the USB connection or with an external power supply. The power source is selected automatically. External (non-USB) power can come either from an AC-to-DC adapter or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board’s power jack. The leads from a battery can be inserted in the GND and Vin pin headers of the Power connector. The board can operate on an external supply from 6 to 20V. If supplied with less than 7V however, the 5V pin may supply less than 5V and the board may become unstable. If more than 12V is supplied, the voltage regulator may overheat and damage the board. The recommended range is 7-12V.
Below are the power pins on the UNO board:
- Vin: The input voltage to the Arduino/Genuino board when it’s using an external power source (as opposed to 5V from the USB connection or other regulated power source). You can supply voltage through this pin or if supplying voltage via the power jack, access it through this pin.
- 5V: This pin outputs a regulated 5V from the regulator on the board. The board can be supplied with power either from the DC power jack (7-12V), the USB connector (5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator and can damage your board. This is not advisable.
- 3V3: A 3.3V supply generated by the on-board regulator. Maximum current draw is 50mA.
- GND: Ground pins.
- IOREF: This pin allows the shield to adapt to the voltage provided from the board. It provides the voltage reference with which the microcontroller operates. A properly configured shield can read the IOREF pin voltage and select the appropriate power source or enable voltage translators on the outputs to work with 5V or 3.3V.
Programming the Arduino Uno:
The Uno can be programmed with the Arduino Software (IDE). For details see “Chapter 03”…
- ATmega328: This comes preprogrammed with a bootloader that allows you to upload new code to it without the use of an external hardware programmer. It communicates using the original STK500 protocol. You can also bypass the bootloader and program the microcontroller through the ICSP (In-Circuit Serial Programming) header using Arduino ISP or similar.
The ATmega328has 32KB (with 0.5KB occupied by the bootloader). It also has 2KB of SRAM and 1KB of EEPROM (which can be read and written with the EEPROM library).
Communicating with the Uno board:
The Arduino Uno has different ways of communicating with a computer, another Arduino/Genuino board, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega16U2 on the board channels this serial communication over USB and appears as a virtual com port to software on the computer. The 16U2 firmware uses the standard USB COM drivers, and no external driver is needed. However, on Windows, an .inf file is required. The Arduino Software (IDE) includes a serial monitor which allows simple textual data to be sent to and from the board. The RX and TX LEDs on the board will flash when data is being transmitted via the USB-to-serial chip and USB connection to the computer (but not for serial communication on pins 0 and 1). A SoftwareSerial library allows serial communication on any of the Uno’s digital pins.
The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino Software (IDE) includes a Wire library to simplify use of the I2C bus. For SPI communication, use the SPI library.
The Arduino Uno is open-source hardware, This means you can build your version of the board using the following files: