In much the same way that GNU, Linux, and other open source software turned the programming world on its head, open-source hardware platforms that support Arduino are starting to rewrite the rules of engagement for many embedded applications. Originally developed for the do-it-yourself (DIY) and hobbyist communities, the Arduino open-source electronics prototyping platform is based on flexible, easy-to-use hardware and software. While still wildly popular among artists, tinkerers, and other creative types, its low cost of entry, and a rapidly-growing ecosystem of royalty-free crowd-sourced IP are winning the loyalty of many commercial developers. In this brief survey, we will review the hardware and software behind Arduino, and some of the applications it is powering.
Figure 1: Priced at a small fraction of the cost of a traditional CNC machine, MakerBot’s Thing-O-Matic 3D printer uses Arduino processor boards to control its stepper motors, thermal print head and other electromechanical elements. This product turns inexpensive ABS filament feedstock into finished objects for prototyping or low-volume production with dimensional tolerances approaching 0.02 mm. (Courtesy of MakerBot Industries)
Arduino is not so much a specific product or technology, but an ecosystem of hardware, software, tools and human resources that have grown up around Atmel’s megaAVR family of 8-bit MCUs. Its compact boards, C++-derived programming language and programming environment owe much of their versatility and ease of use to the Wiring open-source prototyping platform created in 2003 by Hernando Barrag, a Colombian artist and programmer. Barrag’s goal was to simplify the development of electronic systems for hobbyists, artists, researchers, and other non-engineers while providing easy access to all the bells, whistles and hacks that seasoned developers need. Based on the ATmega1281
microcontrollers, the compact, inexpensive Wiring/WiringMini processor boards have been used to create everything from interactive toys and soccer-playing robots to controllers for scanning electron microscopes.
The Arduino platform was originally developed in Italy by Massimo Banzi and David Cuartielles in 2005 as a tool for student design projects. It expanded on the Wiring platform’s capabilities, adding some new programming features and a standard interconnect system, allowing the CPU board to be connected to a variety of interchangeable add-on modules (known as shields).
Like its predecessor, the Arduino open-source hardware platform is based on Atmel’s versatile ATmega MCU family
(Figure 2). ATmega’s modified Harvard-style AVR processor core combines a rich instruction set with 32 general purpose working registers. All 32 registers are directly connected to the Arithmetic Logic Unit (ALU), allowing two independent registers to be accessed in a single instruction cycle. ATmega MCUs are available with either 4 K or 8 Kbytes of in-system programmable flash (with read-while-write capabilities) plus various combinations of EEPROM (256/ 512/ 512/ 1 Kbytes) and SRAM (512/ 1 K/1 K/ 2 Kbytes).
Figure 2: A block diagram of Atmels’ ATmega MCU. (Courtesy of Atmel Microelectronics)
The AVR CPU is complimented with a powerful set of hardware functions and I/O capabilities. Although some MCUs have a slightly different configuration, with most devices include:
Form factors for all occasions
- 23 general purpose I/O lines
- a 6- or 8-channel 10-bit ADC
- six PWM Channels
- a serial programmable USART
- a byte-oriented 2-wire Serial Interface
- an SPI serial port
- three flexible Timer/Counters (with compare modes)
- a real Time Counter with Separate Oscillator
- a programmable Watchdog Timer with internal Oscillator
The Arduino bestiary is populated with an ever-growing number of processor boards that have been developed to accommodate a specific form factor or application. Most designs include a regulated power supply and a set of connections to assess its bus signals and control-oriented I/O. One of the most popular boards created by the Arduino team is the Uno (Figure 3). The board includes a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. Its on-chip regulator allows it to be powered with an AC-to-DC adapter or battery, or from a USB cable connection.
Figure 3: Arduino Uno board. (Courtesy of Arduino.cc)
The Uno Board’s I/O female pin connectors provide access to the MCU’s 14 digital input/output pins and six analog inputs. Six of the I/O pins can be used as PWM outputs, a handy feature for everything from lighting dimmers to motor controllers. These connectors also make it possible to add auxiliary boards, known as shields, which can contain additional electronics and I/O connections.
The Arduino Nano
is a slightly more compact board based on the ATmega328 or ATmega168 that was designed specifically to be dropped onto breadboards (Figure 4a). For applications where space is at an even greater premium, the Arduino Mini (Figure 4b) is also available. Other variants feature breadboard areas for small circuits or on-board communication capabilities such as Bluetooth or Ethernet (Figure 4c). One of the most unique members of the Arduino family is the LilyPad, a board designed specifically for use in “smart apparel” and e-textiles (Figure 4d). The washable/wearable processor board can be sewn to fabric and connected to similarly-mounted power supplies, sensors and actuators using conductive thread.
Figure 4: Popular variants of the Arduino platform include the Nano (4a), the Mini (4b), the Arduino Ethernet (4c), and the washable/wearable LilyPad (4d). (Courtesy Arduino.cc)
Most of the “official” Arduino board designs are available as preassembled boards
, quick-build kits
and often as bare boards. Commercial designers (and hard-core DIY-ers) can roll their own boards from open-source hardware CAD files and download the Arduino software for use under an open-source license agreement.
The Arduino hardware platform is supported by an open-source software package consisting of an integrated development environment (IDE), a standard programming language compiler and a boot loader that runs directly on the board.
Software development is performed using the Arduino IDE, a cross-platform application written in Java, based on the Processing programming language and the Wiring project. Although originally designed to introduce programming to artists and other newcomers unfamiliar with software development, it has features and extensions that allow more experienced programmers to be comfortable and productive. The code editor includes features such as Syntax Highlighting, Brace matching, and automatic indentation, and is also capable of compiling and uploading programs to the board with a single click.
Arduino programs are written in C/C++, although users need to define only two functions to make a runnable program:
- setup() – a function run once at the start of a program that can initialize settings
- loop() – a function called repeatedly until the board powers off
The IDE also includes a C/C++ function library, which supports most common input/output operations.
The complete IDE, an extensive collection of extensions and example code, and a set of comprehensive tutorials on programming are available for free at the Arduino.cc web site.
I/O expansion (shields)
Nearly all Arduino boards can be easily expanded using mezzanine-style add-on cards known as 'shields
' that connect to the MCU’s bus and I/O signals using simple 0.10” pin headers
. The shield’s stackable mix-and-match connection system makes it easy to add I/O or other expansion circuitry using commercial pre-assembled boards available from several manufacturers or one of the many pin-compatible expansion shield kits
on the market.
The Arduino platform has caught the interest of both the hobbyist and commercial embedded communities, resulting in a large number of specialized shields including relay boards, high-resolution multi-channel D/A or A/D converters, AC or DC power controllers, and motor controllers (Figure 5). Connecting an Arduino board to a wired network is easy, thanks to several Ethernet shields that are commercially available.
Figure 5: Rated for operating voltages of up to 30 V and 2.8 A peak output, this commercially-available Arduino-based motor control shield can drive two DC motors for robotics or motion control applications. (Courtesy of RuggedCircuits)
It is also easy to add wireless capability to your Arduino design. Shields that support ZigBee
, Bluetooth and 801.11 wireless protocols are available. There are also several shields that contain a complete GSM-based cellular transceiver that supports GPRS services and run on Arduino Uno and Mega boards using the voltage provided by a computer’s USB port.
In much the same way Linux migrated from the open-source community to the commercial software market, Arduino’s low cost and versatility is beginning to build a loyal following among commercial hardware developers. While many initial applications have been developed by hobbyists and academics, it is expected that the Arduino technology used to create them will quickly find its way into commercial products.
Resources and References
“Making Things Talk Arduino – Practical Methods for Connecting Objects” Published by O’Reilly Press.