Arduino Unocontroller is built onATmega328... The platform has 14 digital I/Os (6 of which can be used as PWM outputs), 6 analog inputs, a 16 MHz crystal oscillator, a USB connector, a power connector, an ICSP connector, and a reset button. To work, you need to connect the platform to a computer using a USB cable, or supply power using an AC/DC adapter or battery.
The difference from the original version is in a different USB to COM converter and in the type of microcontroller caseMEGA328P... The microcircuit is applied hereCH340instead of FTDI and microcontroller caseTQFP32.
"Uno" is translated as one from Italian and the developers are thus hinting at the upcoming release of Arduino 1.0. The new board has become the flagship of the Arduino board line.
Characteristics
Microcontroller
|
ATmega328
|
Working voltage
|
5 in
|
Input voltage (recommended)
|
7-12V
|
Input voltage (limit)
|
6-20V
|
Digital Inputs/Outputs
|
14 (6 of which can be used as PWM outputs)
|
Analog inputs
|
6
|
Constant current through input/output
|
40 mA
|
DC current for 3.3V pin
|
50 mA
|
Flash memory
|
32 KB (ATmega328) of which 0.5 KB used for bootloader
|
RAM
|
2 KB (ATmega328)
|
EEPROM
|
1 KB (ATmega328)
|
Clock frequency
|
16 MHz
|
Food
Arduino Unocan be powered via a USB connection or from an external power source. The power supply is automatically selected.
External power (not USB) can be supplied via an AC/DC converter (power supply) or battery. The voltage converter is connected via a 2.1 mm plug with a center positive pole. The battery wires are connected to the Gnd and Vin pins of the power connector.
The platform can operate with an external power supply of 6V to 20V. If the supply voltage is below 7V, the 5V pin may output less than 5V, and the platform may be unstable. When using voltages above 12V, the voltage regulator may overheat and damage the board. The recommended range is 7V to 12V.
Power pins:
-
VIN... The input is used to supply power from an external source (in the absence of 5V from a USB connector or other regulated power supply). The supply voltage is supplied through this pin.
-
5V... A regulated voltage source used to power the microcontroller and components on the board. Power can be supplied from the VIN pin via a voltage regulator, or from a USB connector or other regulated 5V voltage source.
-
3V3... The voltage at the 3.3V pin is generated by the onboard regulator on the board. Maximum current consumption 50 mA.
-
GND... Ground leads.
Memory
The ATmega328 microcontroller has 32 KB of flash memory, of which 0.5 KB is used to store the bootloader, as well as 2 KB of RAM (SRAM) and 1 KB of EEPROM.
Inputs and Outputs
Each of the 14 digital pins of the Uno can be configured as input or output using the functions pinMode(), digitalWrite(), anddigitalRead(),. The pins operate at 5 V. Each pin has a pull-up resistor (disabled by default) of 20-50 kΩ and can pass up to 40 mA. Some pins have special functions:
-
Serial bus: 0 (RX) and 1 (TX)... The pins are used to receive (RX) and transmit (TX) TTL data. These pins are connected to the corresponding pins on the ATmega8U2 USB-to-TTL serial chip.
-
External interrupt: 2 and 3... These pins can be configured to trigger an interrupt on either a low value, a rising or falling edge, or when the value changes. Details are in the function descriptionattachInterrupt().
-
PWM: 3, 5, 6, 9, 10, and 11.Any of the conclusions providesPWMwith a resolution of 8 bits using the functionanalogWrite().
-
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). Through these pins, SPI communication is carried out, for which it is usedSPI library.
-
LED: 13. Built-in LED connected to digital pin 13. If the pin is high, the LED is on.
The Uno platform has 6 analog inputs (labeled A0 .. A5), each with a 10-bit resolution (ie 1024 different values). As standard, the pins have a measuring range of up to 5 V with respect to ground, however, it is possible to change the upper limit by means of the AREF pin and the functionanalogReference()... Some pins have additional functions:
-
I2C: 4 (SDA) and 5 (SCL).Through the pins, I2C (TWI) communication is carried out, for the creation of which is usedthe Wire library.
Additional pair of platform pins:
-
AREF.Reference voltage for analog inputs. Used with the functionanalogReference().
-
Reset. A low signal level at the pin reboots the microcontroller. Usually used to connect a reset button on an expansion board, which prevents access to the button on the Arduino board itself.
Pay attention to the connection between the pinsArduino and ATmega328 ports.
Communication
On the platformArduino Unoseveral devices are installed to communicate with a computer, other Arduino devices or microcontrollers. The ATmega328 supports UART TTL (5V) serial interface via pins 0 (RX) and 1 (TX). Microcircuit installed on the boardCH340directs this interface through USB, programs on the computer side "communicate" with the board through a virtual COM port. The Serial Monitor of the Arduino software allows you to send and receive text data when connected to the platform. The RX and TX LEDs on the platform will flash when transmitting data through the UART TTL or USB connection (but not when using serial transmission on pins 0 and 1).
With the SoftwareSerial library it is possible to create serial data transmission through any of the Uno digital pins.
The ATmega328 supports I2C (TWI) and SPI interfaces. The Arduino includes a Wire library for the convenience of using the I2C bus.
Programming
The platform is programmed using Arduino software. From the menu Tools > Board"Arduino Uno" is selected (according to the installed microcontroller). Details are inreference bookandinstructions.
The ATmega328 microcontroller comes with a pre-recorded bootloader, making it easy to write new programs without using external programmers. Communication is carried out by the original STK500 protocol.
It is possible not to use a bootloader and program the microcontroller via ICSP pins (in-circuit programming). Details are inof this manual.
Automatic (software) reboot
Unois designed in such a way that before writing a new code, the reboot is carried out by the Arduino program itself on the computer, and not by pressing a button on the platform. One of the CH340 DTR lines that control the data flow (DTR) is connected to the reset pin of the ATmega328 microcontroller through a 100 nF capacitor. Activation of this line, i.e. giving a low level signal, reboots the microcontroller. The Arduino program, using this function, uploads the code with one click of the Upload button in the programming environment itself. The low-level signaling on the DTR line is coordinated with the start of the code recording, which reduces the bootloader timeout.
The function has another use. The Uno reboots every time it is connected to the Arduino program on a Mac X or Linux computer (via USB). The bootloader is running for the next half second after the reboot. During programming, the first few bytes of the code are delayed to prevent the platform from receiving incorrect data (all except the code of the new program). If you perform a one-time debugging of a sketch written to the platform, or enter any other data at the first start, you need to make sure that the program on the computer waits for a second before transferring data.
On the Uno, it is possible to disable the automatic reload line by breaking the corresponding line. The pins of the microcircuits at both ends of the line can be connected for recovery purposes. The line is marked "RESET-EN". It is also possible to disable auto-reset by connecting a 110 ohm resistor between the 5 V supply and this line.
USB connector overcurrent protection
INArduino Unoa self-restoring fuse (automatic) is built-in, which protects the USB port of the computer from short-circuit currents and overcurrents. Although virtually all computers have this type of protection, this fuse nonetheless provides an additional barrier. The fuse is triggered when a current of more than 500 mA passes through the USB port and opens the circuit until the normal values of the currents are restored.
physical characteristics
The length and width of the Uno PCB are 6.9 and 5.3 cm, respectively. USB and power connectors are outside of these dimensions. Four holes in the board allow it to be fixed to a surface. The distance between digital pins 7 and 8 is 0.4 cm, although it is 0.25 cm between the other pins.