This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:iot-open:hardware2:arduino [2023/11/07 17:51] – [Table] ktokarz | en:iot-open:hardware2:arduino [2024/05/27 11:31] (current) – ktokarz | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | === Arduino General Overview === | + | < |
- | <box # | + | ====== Arduino General Overview |
- | <box # | + | {{: |
No doubt, Arduino became the most widespread name in the development boards world, particularly among enthusiasts, | No doubt, Arduino became the most widespread name in the development boards world, particularly among enthusiasts, | ||
Using cheap Atmel AVR microcontrollers, | Using cheap Atmel AVR microcontrollers, | ||
- | The beginnings of the Arduino are dated to the year 2003 in Italy. Their most popular development board was delivered to the market in the fall of 2010. While AVRs microcontrollers are considered to be embedded systems more than IoT, and most of the early Arduino boards didn't offer any network interface, even then, it is essential to understand the idea of how to work with SoCs, so we start our guide here. However, many extension boards are suitable for the standard development boards (so-called shields) that offer wired and wireless networking for Arduino. Also, their clones, made mainly by Chinese manufacturers, | + | The beginnings of the Arduino are dated to the year 2003 in Italy. Their most popular development board was delivered to the market in the fall of 2010. While AVRs microcontrollers are considered to be embedded systems more than IoT, and most of the early Arduino boards didn't offer any network interface, even then, it is essential to understand the idea of how to work with SoCs, so we start our guide here. However, many extension boards are suitable for the standard development boards (so-called shields) that offer wired and wireless networking for Arduino. Also, their clones, made mainly by Chinese manufacturers, |
Initially, all Arduino development boards were using ATMEL' | Initially, all Arduino development boards were using ATMEL' | ||
Line 20: | Line 19: | ||
== Hardware == | == Hardware == | ||
- | The Arduino boards work by reacting on signals at **inputs** that are received from various sensors | + | The Arduino boards work by reacting on signals at **inputs** that are received from various sensors, |
- | In the IoT and embedded devices built nowadays | + | The microcontroller or System on Chip is the most crucial element in the IoT and embedded devices built nowadays. It is not common to add peripheral elements external to the microcontroller, |
- | == Processor | + | == AVR microcontrollers |
- | The initial, still very popular version of the Arduino board - Arduino Uno is based on the ATmega328P microcontroller. The same chip is used in e.g. Arduino Nano, and Pro Mini. Arduino Leonardo or Micro is based on ATmega32u4 which has a USB interface | + | The initial, still very popular version of the Arduino board - Arduino Uno, is based on the ATmega328P microcontroller. The same chip is used in, e.g. Arduino Nano and Pro Mini. Arduino Leonardo or Micro is based on ATmega32u4, which has a built-in USB interface. The Arduino Mega board is created with an extended microcontroller ATmega2560, which has many more interface pins. |
== Memory == | == Memory == | ||
- | There are three different types of memory on the Arduino board: flash memory, SRAM and EEPROM. | + | There are three different types of memory on the Arduino board: flash memory, SRAM and EEPROM. |
- | The **flash memory** stores the Arduino code, and it is a non-volatile type of memory. That means the information in the memory is not deleted when the power is turned off. | + | The **flash memory** stores the Arduino code, a non-volatile type of memory. That means the information in the memory is not deleted when the power is turned off. |
- | The **SRAM** (static random access memory) is used for storing values | + | The **SRAM** (static random access memory) is used for storing |
The **EEPROM** (electrically erasable programmable read-only memory) is a non-volatile type of memory that can be used as long-term memory storage. | The **EEPROM** (electrically erasable programmable read-only memory) is a non-volatile type of memory that can be used as long-term memory storage. | ||
Line 37: | Line 36: | ||
<table Memory> | <table Memory> | ||
< | < | ||
- | ^ ^ <fs xx-small> | + | ^ ^ Uno ^ Leonardo |
- | | <fs xx-small> | + | | Microcontroller |
- | | <fs xx-small> | + | | Flash (kB) | 32 | 32 | 32 | 256 | 32 | 32 | |
- | | <fs xx-small> | + | | SRAM (kB) | 2 | 2 | 2.5 | 8 | 2 | 2 | |
- | | <fs xx-small> | + | | EEPROM (kB) | 1 | 1 | 1 | 4 | 1 | 1 | |
</ | </ | ||
== Peripherals== | == Peripherals== | ||
- | **Peripherals** are all functional units which play the roles of external elements of the CPU. In Arduino boards, they are mainly implemented internally in the microcontroller, | + | Peripherals are all functional units which play the roles of external elements of the CPU. Arduino boards are mainly implemented internally in the microcontroller, |
== Networking == | == Networking == | ||
- | The basic Arduino boards do not implement any networking connectivity. This capability to use Ethernet, WiFi, Bluetooth, ZigBee, and other wireless protocols can be added with an external module or shield. Example shields are Arduino Ethernet Shield, WiFly Shield, Arduino | + | The basic Arduino boards do not implement any networking connectivity. This capability to use Ethernet, WiFi, Bluetooth, ZigBee, and other wireless protocols can be added with an external module or shield. Example shields are Arduino Ethernet Shield, WiFly Shield, Arduino |
== Communication Interfaces == | == Communication Interfaces == | ||
Line 54: | Line 53: | ||
== Timers == | == Timers == | ||
- | Timers are implemented as the essential elements of almost every microcontroller. In selected Arduino boards there are 8-bit and 16-bit timers, an additional real-time clock with a separate generator, and a watchdog timer that can work as a supervisory unit which resets the microcontroller in case of software hang-up. | + | Timers are implemented as the essential elements of almost every microcontroller. These units can operate in timer mode or counter mode. In the first mode, they count pulses generated internally in the microcontroller. This makes it possible to generate square signals of specified frequency, signal periodic interrupts, or generate pulse width modulated signals at PWM outputs. In counter mode, counting the number of external pulses is possible. In selected Arduino boards, there are 8-bit and 16-bit timers, an additional real-time clock with a separate generator, and a watchdog timer that can work as a supervisory unit which resets the microcontroller in case of software hang-up. The list of interfaces and timers is presented in table {{ref> |
- | < | + | < |
- | < | + | < |
- | ^ ^ <fs xx-small> | + | ^ ^ Uno ^ Leonardo |
- | | <fs xx-small> | + | | USB | 1 USB B | 1 Micro | 1 Micro | 1 USB B | 1 Mini | – | |
- | | <fs xx-small> | + | | UART |
- | | <fs xx-small> | + | | I2C | 1 | 1 | 1 | 1 | 1 | 1 | |
- | | <fs xx-small> | + | | SPI | 1 | 1 | 1 | 1 | 1 | 1 | |
- | | <fs xx-small> | + | | 8-bit Timer | 1 | 1 |
- | | <fs xx-small> | + | | 16-bit Timer |
- | | <fs xx-small> | + | | Watchdog Timer | 1 | 1 |
- | | <fs xx-small> | + | | Real-time clock | 1 | - | - |
</ | </ | ||
== Video subsystem == | == Video subsystem == | ||
- | Arduino boards do not contain specialised video chips. | + | Arduino boards do not contain specialised video chips. |
- | Connecting the camera is even more complicated. None of the microcontrollers used in basic Arduino boards have an adequate camera port to convey high-speed video signals. An answer to this challenge is the Arducam which implements the camera | + | Connecting the camera is even more complicated. None of the microcontrollers used in basic Arduino boards have an adequate camera port to convey high-speed video signals. An answer to this challenge is the Arducam, which implements the camera and the hardware to capture the image to the RAM. It can be connected to an Arduino board with an SPI interface, allowing it to read and process the image data at the main processor speed. |
== Hardware connectors == | == Hardware connectors == | ||
- | **Digital Input/ | + | **Digital Input/ |
- | Digital input/ | + | Digital input/ |
- | **Pulse Width Modulation** | + | **Pulse Width Modulation** |
- | Pulse Width Modulation (PWM) is a function of a pin to generate a square wave signal, with a variable length of the HIGH level of the output signal. The PWM is used for digital pins to simulate the analogue output. | + | Pulse Width Modulation (PWM) is a function of a pin to generate a square wave signal with a variable length of the HIGH level of the output signal. The PWM is used for digital pins to simulate the analogue output. |
- | **Analog Pins** | + | **Analog Pins**\\ |
- | Analog pins convert the analogue input value to a 10-bit number, using Analog Digital Converter (ADC). This function maps the input voltage between 0 and the reference voltage to numbers between 0 and 1023. By default, the reference voltage is set to a microcontroller operating voltage. Usually, it is 5 V or 3.3 V. Also, other internal or external reference sources | + | Analog pins convert the analogue input value to a 10-bit number using Analog Digital Converter (ADC). This function maps the input voltage between 0 and the reference voltage to numbers between 0 and 1023. By default, the reference voltage is set to a microcontroller operating voltage. Usually, it is 5 V or 3.3 V. Also, other internal or external reference sources, for example, AREF pin, can be used. |
+ | |||
+ | A list of pins and hardware interfaces for popular Arduino boards is present in table {{ref> | ||
- | < | + | < |
< | < | ||
- | ^ | + | ^ ^ Uno ^ Leonardo ^ Micro ^ Mega ^ Nano ^ Pro Mini ^ |
- | |<fs xx-small> | + | | Digital I/O | 14 | 20 | 20 | 54 | 22 | 14 | |
- | | <fs xx-small> | + | | PWM | 6 | 7 | 7 | 12 | 6 | 6 | |
- | | <fs xx-small> | + | | Analog pins | 6 | 12 | 12 | 16 | 8 | 6 | |
</ | </ | ||
- | **Power and Other Pins** | + | **Power and Other Pins**\\ |
- | + | * Power pins on the Arduino board connect the power source to the microcontroller and/or voltage regulators. They can also be a power source for external components and devices. | |
- | *Power pins on the Arduino board connect the power source to the microcontroller and/or voltage regulators. They can also be used as a power source for external components and devices. | + | * The VIN pin connects |
- | + | * The 5V pin is used to supply a microcontroller with the regulated 5 V from the external source or is used as a power source for the external components in the case when the board is already powered using the USB interface or the VIN pin. | |
- | *The VIN pin is used to connect | + | * The 3V3 pin provides the regulated 3.3 V output for the board components and external devices. The GND (ground pin) is where the negative terminal of the power supply is applied. |
- | + | * The reset pin and button reset the Arduino board and the program. Resetting using the reset pin is done by connecting it to the GND. | |
- | *The 5V pin is used to supply a microcontroller with the regulated 5 V from the external source or is used as a power source for the external components in the case when the board is already powered using the USB interface or the VIN pin. | + | |
- | + | ||
- | *The 3V3 pin provides the regulated 3.3 V output for the board components and external devices. The GND (ground pin) is where the negative terminal of the power supply is applied. | + | |
- | + | ||
- | *The reset pin and the reset button | + | |