You are on page 1of 38

Uno, Due, Tre

The Arduino Family of Micro-controller boards


(Ralf Quint for UUASC)

Friday, February 7, 2014


Ground Zero
Made in Italy (or not)

The Arduino* project was started in 2005, at a


technical college (Interaction Design Institute, now
defunct) in Ivrea, Italy (near Turin, formerly the
place for the HQ of Olivetti)

The original goal was to come up with a low-cost


alternative to existing electronics prototyping and
experimenting boards (like the BASICstamp, from
Parallax, at that time about $100 a piece)

*The name is supposedly a reference to a bar/pub called Bar di Re Arduino, which in turn is a reference to Arduino d'Ivrea (955-
1014, Margrave of Ivrea. First Italian king of Italy 1002-1014, opposing the German king Heinrich/Henry II)
Arduino
Can do and don't
All Arduino boards are released as Open Hardware under CC BY-SA 2.5
(Creative Commons Attribution-ShareAlike 2.5 Generic)
However, the name Arduino is reserved and can not be used to directly
refer to a derived or copied design. Arduino (as in the company behind it)
has started to go more aggressively against counterfits (as opposed to
clearly labeled and marketed 'clones').
Hence a lot of boards (and shields) released not directly from Arduino call
them self either Arduino compatible or use a distinct new name
commonly ending in *(d)uino, for example FreeDuino, Sanguino, etc...
Some other embedded/experimenting boards also try to ride on the
popularity of Arduino by using a name implying that they are somehow
related to the project though in fact, they have very little in common with
anything Arduino (like NetDuino for example)...
Old School
Uno (Mega)
The Arduino Uno is the reference board for all things
Arduino at this time. The current Revision 3 boards also
builds the base for the interface description/standard for
Arduino compatible add-on boards, commonly called
shields, referred to as Arduino v1.0.
Hardware wise, it is based on an Atmel ATmega328 8 bit
RISC MCU, with an additional ATmega16u2 providing the
USB connectivity for programming and power. Beside the 5V
through this USB port (standard USB B connector), the board
can be powered either through the VIN pin or a 3.5mm barrel
plug, with the recommended power source in the range of 7V-
12V.
Arduino Uno R3
Arduino Uno
Arduino Mega2560
The Arduino Mega2560 is basically a larger Uno,
in several aspects.
For one, it replaces the MCU with an
ATmega2560, which increases the available
storage capacity to 8KB RAM, 256KB Flash
ROM and 4KB of EEPROM.
It also increases the number of I/O pins to 54, of
which 15 provide PWM and it features now 4
UART ports instead of Uno's 1.
Arduino Mega2560 R3
Arduino Mega2560
Uno e Medio (1.5)
Arduino Leonardo
The Arduino Leonardo is a new(er) variation of the Uno design,
with the same size but instead of using two ATmega chips for
MCU and USB controller, it utilizes the ATmega32u4 as MCU,
which integrates the USB controller in the chip. It also provides a
slightly increased RAM, 2.5KB instead of only 2KB. It is
otherwise compatible to the Arduino Uno, however there are
some minor differences in a couple additional pins and in how to
use/code for the UART port on the Leonardo. This can cause
sometime slight issues with shield libraries and hardware, if
people do not properly read the fine manual which commonly
list any of those subtle differences/changes required when
programming for the Leonardo vs. the Uno (or Mega).
Arduino Leonardo
Arduino Leonardo
Differences between Uno R3 and Leonardo
Beside the obvious difference of the different MCU chips being used, commonly a
socketed chip on the Uno (and therefor replaceable if smoked) and a SMT chip on the
Leonardo there are some more subtle technical differences:
The Leonardo has a 25% larger SRAM
(2560 bytes instead of 2048 bytes, whoohoo!)

Some ports need to be addressed differently in a sketch,


(for example, to use A0 as a digital output in an Uno, you need to write pinMode(14, OUTPUT), but in a Leonardo you need to use
instead pinMode(A0, OUTPUT)

On a Leonardo, the I2C pins are now separate, no longer on A5 and A6 as on an Uno
The serial port on the Leonardo is now a separate port, it needs to be addressed via the
class Serial1 instead of Serial on the Uno

A more detailed description of those differences can be found at the Arduino web site at
http://arduino.cc/en/Guide/ArduinoLeonardoMicro?from=Guide.ArduinoLeonardo#toc1
Uno-Mega-Leonardo
Comparison
Name Processor Operating/ CPU Speed Analog Digital IO/PWM Flash ROM SRAM EEPROM USB No.UARTs
Input In/Out [KB] [KB] [KB]
Voltage
Uno ATmega328 5V/5-12V 16 MHz 6/0 14/6 32(-4) 2 1 regular 1

Mega 2560 ATmega2560 5V/5-12V 16 MHz 16/0 54/15 256(-8) 8 4 regular 4

Leonardo ATmega32u4 5V/5-12V 16MHz 12/0 20/7 32(-4) 2.5 1 micro 1


Uno-La Familia
Odds and sodds
Arduino Nano Arduino Pro
Arduino Micro

Arduino Fio Arduino LilyPad Arduino Esplora


La Familia
Comparison
Name Processor Operating/ CPU Speed Analog Digital IO/PWM Flash ROM SRAM EEPROM USB No.UARTs
Input In/Out [KB] [KB] [KB]
Voltage
Nano ATmega328 5V/5-12V 16 MHz 8/0 14/6 32(-4) 2 1 regular 1

Mini ATmega328 5V/5-12V 16 MHz 16/0 54/15 256(-8) 8 4 regular 4

Fio ATmega328P 5V/5-12V 16MHz 12/0 20/7 32(-4) 2 1 micro 1

ArduinoBT ATmega328 5/5-12V 16MHz 6/0 14/6 32(-4) 2 1 - 1

LilyPad ATmega328V 2.7-5.5V 8 MHz 6/0 14/6 16(-4) 1 512b - -

Micro ATmega32u4 5V/5-12V 16MHz 12/0 20/7 32(-4) 2.5 1 micro 1

LilyPad ATmega32u4 3.3V/3.8- 8 MHz 4/0 9/4 32(-4) 2.5 1 micro -


USB 5V
Esplora ATmega32u4 5V/5-12V 16MHz - - 32-4) 2.5 1 micro -

Robot ATmega32u4 5V/5V 16MHz 8/0 5/6(?) 32(-4) 2.5 1 (1.5 on


(x2) controller
board)
Examples of Arduino Shields
One of the great, but at times also confusing
features of the whole Arduino eco system
is the availability of a huge number of add-
on shields for all kinds of purposes, from a
huge and every increasing number of
suppliers, thanks to the Arduino pinout and
the board layout being open hardware.

Care needs to be taken about past changes in the


Arduino reference pinouts, as a lot of older shields
might refer to pinouts before the v1.0 reference as
well as to some of the sometime subtle differences
in the programming for example between Uno and
Leonardo boards (due to different MCU's being
used).
Also when working with shields (or any component
connected to the I/O pins of an Arduino is that the
maximum voltage that can be drawn is limited to
40mA, with 20mA being the recommended
maximum, for a total power consumption on all I/O
pins of the boards being limited to 200mA.
Examples of current Arduino shields
The Arduino IDE
The standard way to program any Arduino board is by way
of the Arduino IDE.
This is a Java based IDE borrowed and adapted from the
Processing project, providing a cross-platform IDE on
Windows, Mac OS X and Linux.
While some sources state that programming is done in a
unique language, it is in fact just plain C++ with a set of
default libraries which give access to a set of predefined
objects and their methods.
Current version is 1.0.5r2, though for some newer boards,
you need to use the beta version, which is currently at
version 1.5.5r2. (the r2 release was to provide Windows 8 driver support for the various
boards)

There are also nightly builds which might be required to get some features of newer boards properly
working.
Hello Arduino World!
(a simple example sketch)
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/

// Pin 13 has an LED connected on most Arduino boards.


// give it a name:
int ledpin = 13;

// the setup routine runs once when you press reset:


void setup()
{
pinMode(ledpin, OUTPUT); // initialize the digital pin as an output.
}

// the loop routine runs over and over again forever, or until the power cuts, whatever happens first:
void loop()
{
digitalWrite(ledpin, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(ledpin, LOW); // turn the LED off by changing the voltage to LOW
delay(1000); // wait for a second
}
Due (Galileo)
In early 2013, the folks at Arduino released the first
board not based on an ATmega MCU, named the
Arduino Due.
Due
(Due = Italian for Two, like in second generation/step)

Though still made by Atmel, this chip is a 32bit


RISC CPU AT91SAM3X8E based on the ARM
Cortex-M3, with more than 4x the CPU speed and a
significant larger amount of RAM, using the same
form factor and the increased number of I/O
ports/pins of the Arduino Mega2560
Arduino Due
Arduino Due
Arduino Due
Specs
CPU 32 bit RISC Coretx-M3 AT91SAM3X8E, running at
84 MHz
96KB of SRAM
512KB of Flash ROM
12 Analog, 54 digital I/O pins (12 providing PWM)

In contrast to the ATmega based boards however, the board runs at 3.3V for the
CPU and I/O pins(!), which means while the basic pinout is compliant with the
Arduino v1.0 reference, it can only work with shields that themselves can
operate on 3.3V. Also, any board that would feed back more than 3.3V on any I/O
pin (including VIN!) will fry the board!
The Intel Galileo
Intel Galileo
At the Maker Fair 2013 in Rome, Intel announced (and gave away to some 200

another non ATmega based Arduino pin compatible


lucky b****rds)

board (with some cooperation from Arduino), the Intel Galileo.


Intel also announced that they intend to give away 50,000
boards over the next 2-3 years to universities/colleges.
The Galileo is the first(*) board using Intel's attempt to break
into the embedded market with a new x86 compatible CPU
named Quark X1000, running at 400Mhz and with 512MB of
SRAM and an 8MB Flash ROM (of which 256/512KB are
available for any running sketch).
(A second implementation is the SD card size Edison board presented at the CES in early January in Las Vegas)
Intel Galileo
The Galileo is an Arduino compatible board as it
provides an Arduino v1.0 compatible pinout, which allows
to connect both 5V and 3.3V (not mixed though!) shields.
However, it should be noted that the Galileo is very finicky in regards to the power source. It
requires 5V only and power needs to be applied before any USB device is attached to either
programming or USB host port!

Programming for the Intel Galileo also is done via a


(special version) of the Ardiuno IDE, though this is
available only from Intel's web site and is currently a
couple of minor revisions behind (v1.53 vs v1.55 for the
regular beta version @arduino.cc)
Intel Galileo
Other than the Arduino Due, where effectively only the
MCU used and the lower operating voltages for shields
has changed, the Intel Galileo adds a few new features to
the mix, quite in line to other newer additions to the
Arduino family.
That includes an on-board 100MBit Ethernet port, one
micro USB host port, as well as a microSD card slot, and
a mini PCI Express (mPCIe) slot (on the underside of the
board).
It also features a serial port, strangely enough using a
3.5mm barrel plug to connect to it (!?!).
Due-Galileo
Comparison
Name Processor Operating/ CPU Speed Analog Digital IO/PWM Flash ROM SRAM EEPROM USB No.UARTs
Input In/Out [KB] [KB] [KB]
Voltage

Arduino Atmel 3.3VV/3. 86 MHz 12/2 54/12 512 96 - 2 4


Due AT91SAM3X 3V-5V micro
8E
Intel Intel Quark 3.3V/5V 400 MHz 6/0(5V) 14/6(5V) 256/512KB 512 11 2 1
Galileo X1000 SoC micro
(Yun &) Tre
In early 2013, Arduino introduced the first of a third line
of Arduino boards, named the Arduino Yun (Chinese for
.
heaven/sky)

This line of boards is characterized as being a hybrid


between a traditional ATmega based board (in all existing
implementation, Arduino Leonard compatible, using an ATmega32u4) as well
as a more powerful RISC CPU able to run a Linux
based OS in parallel (addition) to the Arduino sketches
on the ATmega side.
Arduino Yun

The Arduino Yun's Linux part is running on a 400Mhz MIPS based RISC CPU from Atheros
(AR9331), which has been used previously in various low-end wireless routers (ex. TPLink).
The CPU has access to 64MB of SRAM as well as a 16MB Flash RAM, which holds the actual
Linux image, a distro called Linino, which is based on OpenWRT, the OS of choice of before
mentioned Wi-Fi routers. As added peripherals, the Atheros CPU also provides USB host ports,
a microSD card slot, one 100MBit Ethernet port as well as 802.11b/g wireless network.
Linino provides both shell based access via ssh or a web UI based on OpenWRT's LuCI web
framework (web server). The before mentioned peripherals of the AR9331 have no physical
connection to the Atmega32u4 part, nor is any of the I/O pins of that MCU physically connected
to the MIPS CPU. All communication between those two parts has to be done via the bridge.
Arduino Yun
The bridge-connecting two worlds
As mentioned, the I/O options of both parts of the Yun are physically
separated. To exchange any data between those two ports, it is necessary
to utilize what is called the bridge.
Hardware wise, the bridge consists of a serial connection between the
Linino/Atheros and the ATmega32u4 part, running at 250k bits/sec.
Software wise, to use the bridge feature to communicate between the two
worlds, the bridge library needs to be included in any sketch on the AVR
side. On the Linino side, the the bridge is a Python script that gets started
when the bridge is initialized on the AVR side.

There have been some performance/teething issues with using the bridge,
but most of those are being resolved fairly quickly but require you to stay
up to date with the nightly builds of the Beta version of the IDE (which in
turn includes the libraries being used).
Arduino Tre
The Arduino Tre is the latest of the Arduino board
and similar to the Arduino Yun, a hybrid kind of
board.
Just like the Yun, it consists of a Leonardo
compatible AVR part as well as a RISC CPU
based part, running a unique distribution of Linux.
In contrast to the Yun however, there are also
some decisive (but never the less, very
interesting) differences.
While the Yun's Linux part is based on a 400MHz
MIPS based CPU with 64MB of RAM, the Tre has
a 1GHz ARM v7 based CPU from Texas
Instruments, with 512MB of RAM.
Fine
Arduino Resources:
The Arduino home page (www.arduino.cc)
Arduino shield list page (http://shieldlist.org/)
ArduinoInfo Wiki
(http://arduino-info.wikispaces.com/HOME)
LA Arduino Enthusiasts Meetup Group
(http://www.meetup.com/LA-Arduino/)
Glossary
I2C Inter-Integrated Circuit
A bus system to connect various electronic devices

MCU - Micro Controller Unit


basically a CPU with additional system resources on the same die/in the
same chip (=SoC-System On Chip), like RAM, ROM, EEPROM, etc.

PWM Pulse Width Modulation,


method to control electrical devices with a constant voltage by pulses of
current of variable length (width)

SPI Serial Peripheral Interface bus