Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:iot-open:hardware2:arduino [2023/11/07 17:57] – [Table] ktokarzen:iot-open:hardware2:arduino [2024/05/27 11:31] (current) ktokarz
Line 1: Line 1:
-=== Arduino General Overview === +<pagebreak> 
-<box #84b96a></box> +====== Arduino General Overview ====== 
-<box #84b96a></box> +{{:en:iot-open:czapka_b.png?50| General audience classification icon }}{{:en:iot-open:czapka_e.png?50| General audience classification icon }}\\
 No doubt, Arduino became the most widespread name in the development boards world, particularly among enthusiasts, educators, amateurs, and hobbyists, driving de-facto the embedded systems market for years.  No doubt, Arduino became the most widespread name in the development boards world, particularly among enthusiasts, educators, amateurs, and hobbyists, driving de-facto the embedded systems market for years. 
  
 Using cheap Atmel AVR microcontrollers, delivered along with development board and peripherals of almost any kind, including sensors and actuators, where you do not need to develop your PCB nor solder to obtain the fully functional device, all that triggered a new era where almost anyone can afford to have a development set and start playing the way only professionals used to do. Moreover, Arduino was not only the hardware but also the programming idea, delivering a simple development environment that is easy to use for beginners. Perhaps the most crucial impact of the Arduino on daily use was to spread the idea of taking automation control from the industry and bringing it on a massive scale to regular life, homes, cars, and toys to automate daily life. Using cheap Atmel AVR microcontrollers, delivered along with development board and peripherals of almost any kind, including sensors and actuators, where you do not need to develop your PCB nor solder to obtain the fully functional device, all that triggered a new era where almost anyone can afford to have a development set and start playing the way only professionals used to do. Moreover, Arduino was not only the hardware but also the programming idea, delivering a simple development environment that is easy to use for beginners. Perhaps the most crucial impact of the Arduino on daily use was to spread the idea of taking automation control from the industry and bringing it on a massive scale to regular life, homes, cars, and toys to automate daily life.
  
-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, evolved into more sophisticated products, integrating, i.e. Arduino Mega 2560 and ESP8266 SoC into one development board.+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, evolved into more sophisticated products, integrating, e.g. Arduino Mega 2560 and ESP8266 SoC into one development board.
  
 Initially, all Arduino development boards were using ATMEL's MCUs. It is no longer the case due to the demand for integrated radio communication that ATMEL's MCUs lack. Initially, all Arduino development boards were using ATMEL's MCUs. It is no longer the case due to the demand for integrated radio communication that ATMEL's MCUs lack.
Line 20: Line 19:
  
 == Hardware == == Hardware ==
-The Arduino boards work by reacting on signals at **inputs** that are received from various sensors and, after executing a **set of instructions**, an **output** is generated to respond to the environment. The input signal can be generated by pressing a button, receiving the radio or light signal, hearing the sound, perceiving an image of the situation using a cameraresulting from the environmental sensor measurement, and many others. The output actions on the environment are done using output elements like actuators, blinking LEDs, audio devices, and others. The set of instructions which is executed to handle both sensors and actuators is created using the **Arduino programming language** that is based on an open-source programming framework called **Wiring** and the **Arduino Software** (IDE) that is based on **Processing**. +The Arduino boards work by reacting on signals at **inputs** that are received from various sensors, and after executing a **set of instructions**, an **output** is generated to respond to the environment. The input signal can be generated by pressing a button, receiving the radio or light signal, hearing the sound, perceiving an image of the situation using a camera resulting from the environmental sensor measurement, and many others. The output actions in the environment use output elements like actuators, blinking LEDs, audio devices, and others. The set of instructions executed to handle both sensors and actuators is created using the **Arduino programming language** based on an open-source programming framework called **Wiring** and the **Arduino Software** (IDE) based on **Processing**. 
-In the IoT and embedded devices built nowadays the most important element is the microcontroller or System on Chip. It is not common to add peripheral elements external to the microcontroller, so the choice of this element influences almost all hardware parameters and the set of peripherals of the board. Because there are many versions of Arduino boards available, only the selection of them is presented in the following chapters.+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, so the choice of this element influences almost all hardware parameters and the set of peripherals of the board. Because many versions of Arduino boards are available, only their selection based on the AVR family of microcontrollers is presented in the following chapters.
  
-== 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 Nanoand Pro Mini. Arduino Leonardo or Micro is based on ATmega32u4 which has a USB interface built in. The Arduino Mega board is created with an extended microcontroller ATmega2560 which has many more interface pins.+The initial, still very popular version of the Arduino board - Arduino Unois based on the ATmega328P microcontroller. The same chip is used ine.g. Arduino Nano and Pro Mini. Arduino Leonardo or Micro is based on ATmega32u4which has a built-in USB interface. The Arduino Mega board is created with an extended microcontroller ATmega2560which has many more interface pins.
  
 == Memory == == Memory ==
-There are three different types of memory on the Arduino board: flash memory, SRAM and EEPROM. All of them are usually built into the main microcontroller so their type determines amount of the memory available.+There are three different types of memory on the Arduino board: flash memory, SRAM and EEPROM. They are usually built into the main microcontrollerso their type determines the amount of memory available. A list of memory sizes regarding the microcontroller type is presented in table {{ref>Memory}}.
  
-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 of variables when the program of Arduino is running. This is the volatile memory that keeps information only until the power is turned offor the board is reset.+The **SRAM** (static random access memory) is used for storing variables' values when the Arduino program is running. This volatile memory keeps information only until the power is turned off or the board is reset.
  
 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>
 <caption>The Comparison of Basic Arduino Boards by Microcontroller Type and Memory Size</caption> <caption>The Comparison of Basic Arduino Boards by Microcontroller Type and Memory Size</caption>
-^                                    ^ <fs xx-small>Uno</fs>         ^ <fs xx-small>Leonardo</fs>    <fs xx-small>Micro</fs>       ^ <fs xx-small>Mega</fs>        <fs xx-small>Nano</fs>        <fs xx-small>Pro Mini</fs>    ^ +^                                    ^ Uno         ^ Leonardo    ^ Micro       ^ Mega        ^ Nano        ^ Pro Mini    ^ 
-<fs xx-small>Microcontroller</fs>  <fs xx-small>ATmega328p</fs>  <fs xx-small>ATmega32u4</fs>  <fs xx-small>ATmega32u4</fs>  <fs xx-small>ATmega2650</fs>  <fs xx-small>ATmega328p</fs>  <fs xx-small>ATmega328p</fs>  | +| Microcontroller  | ATmega328p  | ATmega32u4  | ATmega32u4  | ATmega2650  | ATmega328p  | ATmega328p 
-<fs xx-small>Flash (kB)</fs>       | <fs xx-small>32</fs>          <fs xx-small>32</fs>          <fs xx-small>32</fs>          <fs xx-small>256</fs>         | <fs xx-small>32</fs>          <fs xx-small>32</fs>          | +| Flash (kB)       | 32          | 32          | 32          | 256         | 32          | 32          | 
-<fs xx-small>SRAM (kB)</fs>        <fs xx-small>2</fs>           | <fs xx-small>2</fs>           | <fs xx-small>2.5</fs>         | <fs xx-small>8</fs>           | <fs xx-small>2</fs>           | <fs xx-small>2</fs>           | +| SRAM (kB)        | 2           | 2           | 2.5         | 8           | 2           | 2           | 
-<fs xx-small>EEPROM (kB)</fs>      <fs xx-small>1</fs>           | <fs xx-small>1</fs>           | <fs xx-small>1</fs>           | <fs xx-small>4</fs>           | <fs xx-small>1</fs>           | <fs xx-small>1</fs>           |+| EEPROM (kB)      | 1           | 1           | 1           | 4           | 1           | 1           |
 </table>  </table> 
  
 == 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, so the number and type of peripherals depend on the microcontroller version. Peripherals include Timers, Communication and networking interfaces, GPIOs, Analog comparators and converters, and supervisory units.+Peripherals are all functional units which play the roles of external elements of the CPU. Arduino boards are mainly implemented internally in the microcontroller, so the number and type of peripherals depend on the microcontroller version. Peripherals include Timers, Communication and networking interfaces, GPIOs, Analog comparators and converters, and supervisory units.
  
 == 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 Wi-Fi Shield, Electric Imp Shield, XBee Shield, Cellular Shield SM5100B and GPS Shield. In the simplest version, the WiFi module like Espressif ESP01S can be connected to Arduino's serial port and programmed with a set of AT commands.+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 WiFi Shield, Electric Imp Shield, XBee Shield, Cellular Shield SM5100B and GPS Shield. In the simplest version, the WiFi module like Espressif ESP01S can be connected to Arduino's serial port and programmed with AT commands.
  
 == 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 boardsthere 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>Timers}}.
  
-<table Interface+<table Timers
-<caption>The Comparison of Arduino Boards by Interface and Timers Available</caption> +<caption>The Comparison of Arduino Boards by Interfaces and Timers Available</caption> 
-^                                    ^ <fs xx-small>Uno</fs>      <fs xx-small>Leonardo</fs>  <fs xx-small>Micro</fs>    <fs xx-small>Mega</fs>     ^ <fs xx-small>Nano</fs>    <fs xx-small>Pro Mini</fs>  ^ +^                                    ^ Uno      ^ Leonardo  ^ Micro    ^ Mega     ^ Nano    ^ Pro Mini  ^ 
-<fs xx-small>USB</fs>              |  <fs xx-small>1 USB B</fs> <fs xx-small>1 Micro</fs>   | <fs xx-small>1 Micro</fs>  <fs xx-small>1 USB B</fs>  <fs xx-small>1 Mini</fs>  <fs xx-small></fs>         | +| USB              |  1 USB B | 1 Micro   | 1 Micro  | 1 USB B  | 1 Mini  | –         | 
-<fs xx-small>UART</fs>             | <fs xx-small>1</fs>        <fs xx-small>1</fs>         | <fs xx-small>1</fs>        <fs xx-small>4</fs>        <fs xx-small>1</fs>       | <fs xx-small>1</fs>         | +| UART             | 1        | 1         | 1        | 4        | 1       | 1         | 
-<fs xx-small>I2C</fs>              <fs xx-small>1</fs>        <fs xx-small>1</fs>         | <fs xx-small>1</fs>        <fs xx-small>1</fs>        <fs xx-small>1</fs>       | <fs xx-small>1</fs>         | +| I2C              | 1        | 1         | 1        | 1        | 1       | 1         | 
-<fs xx-small>SPI</fs>              <fs xx-small>1</fs>        <fs xx-small>1</fs>         | <fs xx-small>1</fs>        <fs xx-small>1</fs>        <fs xx-small>1</fs>       | <fs xx-small>1</fs>         | +| SPI              | 1        | 1         | 1        | 1        | 1       | 1         | 
-<fs xx-small>8-bit Timer</fs>      <fs xx-small>1</fs>        <fs xx-small>1</fs>         | <fs xx-small>1</fs>        <fs xx-small>2</fs>        <fs xx-small>1</fs>       | <fs xx-small>1</fs>         | +| 8-bit Timer      | 1        | 1         | 1        | 2        | 1       | 1         | 
-<fs xx-small>16-bit Timer</fs>     | <fs xx-small>2</fs>        <fs xx-small>2</fs>         | <fs xx-small>2</fs>        <fs xx-small>4</fs>        <fs xx-small>2</fs>       | <fs xx-small>2</fs>         | +| 16-bit Timer     | 2        | 2         | 2        | 4        | 2       | 2         | 
-<fs xx-small>Watchdog Timer</fs>   | <fs xx-small>1</fs>        <fs xx-small>1</fs>         | <fs xx-small>1</fs>        <fs xx-small>1</fs>        <fs xx-small>1</fs>       | <fs xx-small>1</fs>         | +| Watchdog Timer   | 1        | 1         | 1        | 1        | 1       | 1         | 
-<fs xx-small>Real-time clock</fs>  <fs xx-small>1</fs>        <fs xx-small>-</fs>         | <fs xx-small>-</fs>        <fs xx-small>1</fs>        <fs xx-small>1</fs>       | <fs xx-small>1</fs>         |+| Real-time clock  | 1        | -         | -        | 1        | 1       | 1         |
 </table>  </table> 
  
 == Video subsystem == == Video subsystem ==
-Arduino boards do not contain specialised video chips. The size of their memory does not allow them to generate, capture, or even store complex high-resolution images. The most common approach to display images is connecting the LCD, OLED or TFT display with an SPI port.  +Arduino boards do not contain specialised video chips. Their memory size does not allow them to generate, capture, or even store complex high-resolution images. The most common approach to display images is connecting the LCD, OLED or TFT display with an SPI port.  
-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 itself 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.+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 Arducamwhich implements the camera and the hardware to capture the image to the RAM. It can be connected to an Arduino board with an SPI interfaceallowing it to read and process the image data at the main processor speed.
  
 == Hardware connectors == == Hardware connectors ==
-**Digital Input/Output Pins**  +**Digital Input/Output Pins** \\ 
-Digital input/output (I/O) pins are contacts on the Arduino board that can receive or transmit a digital signal. The status of the pin can be set either to 0 which represents //LOW// signal or to 1 – //HIGH// signal. The maximum current of the pin output is 40 mA.+Digital input/output (I/O) pins are contacts on the Arduino board that can receive or transmit a digital signal. The status of the pin can be set either to 0which represents //LOW// signal or to 1 – //HIGH// signal. The maximum current of the pin output is 40 mA.
  
-**Pulse Width Modulation**  +**Pulse Width Modulation** \\ 
-Pulse Width Modulation (PWM) is a function of a pin to generate a square wave signalwith 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 numberusing 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 can be used, for example, AREF pin. +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>DigitalIO}}.
    
-<table Digital.I/O>+<table DigitalIO>
 <caption>The Comparison of Basic Arduino Boards by the Number of Pins in Hardware Interfaces</caption> <caption>The Comparison of Basic Arduino Boards by the Number of Pins in Hardware Interfaces</caption>
-^   <fs xx-small>Uno</fs> <fs xx-small>Leonardo</fs> <fs xx-small>Micro</fs> <fs xx-small>Mega</fs> <fs xx-small>Nano</fs> <fs xx-small>Pro Mini</fs> +^   ^ Uno ^ Leonardo ^ Micro ^ Mega ^ Nano ^ Pro Mini ^ 
-|<fs xx-small> Digital I/O</fs> |  <fs xx-small>14</fs> <fs xx-small>20</fs> <fs xx-small>20</fs> <fs xx-small>54</fs> <fs xx-small>22</fs> <fs xx-small>14</fs> +| Digital I/O |  14 | 20 | 20 | 54 | 22 | 14 | 
-<fs xx-small>PWM</fs> |  <fs xx-small>6</fs> <fs xx-small>7</fs> <fs xx-small>7</fs> <fs xx-small>12</fs> <fs xx-small>6</fs> <fs xx-small>6</fs> +| PWM |  6 | 7 | 7 | 12 | 6 | 6 | 
-<fs xx-small>Analog pins</fs> |  <fs xx-small>6</fs> <fs xx-small>12</fs> <fs xx-small>12</fs> <fs xx-small>16</fs> <fs xx-small>8</fs> <fs xx-small>6</fs> |+| Analog pins |  6 | 12 | 12 | 16 | 8 | 6 |
 </table>  </table> 
  
-**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 external power source to the internal regulator to provide the regulated 5 V output. The input voltage of the board must be within the specific range, mainly between 7 V and 12 V. 
- +  * 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 external power source to the internal regulatorto provide the regulated 5 V output. The input voltage of the board must be within the specific range, mostly between 7 V and 12 V. +  * 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 are used to reset the Arduino board and the program. Resetting using the reset pin is done by connecting it to the GND.+
  
en/iot-open/hardware2/arduino.1699379841.txt.gz · Last modified: 2023/11/07 17:57 by ktokarz
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0