Chapter 4. Arduino Technical Details

This chapter describes the general physical and electrical characteristics of specific Arduino boards, from the Diecimila through recent types like the Leonardo, Esplora, and Micro. Topics covered include pinout descriptions and the physical dimensions of most current Arduino models, from the so-called baseline types like the Uno, to the large form-factor Mega boards and the unique Esplora, to the small-outline boards such as the Mini, Micro, and Nano models.

Arduino Features and Capabilities

Table 4-1 is a comparison of the most common Arduino board types. If you compare this table with the tables in Chapter 1 it is obvious that the basic capabilities of an Arduino board are the capabilities supplied by its microcontroller. However, because the Arduino designs allocate certain pins on the AVR processors to specific functions, or don’t bring out all of the processor’s pins, not all of the capabilities of the microcontrollers are available at the terminals of an Arduino.

Note

The term “pin” is used in this and other sections when referring to the pin sockets on an Arduino. This is mainly to maintain consistency with the terminology encountered elsewhere, but it’s not completely technically correct. The connection points on an Arduino board are sockets, and the jumpers and shields that plug into these sockets are the actual pins. You can think of a “pin” as a connection point of some sort, be it a lead on an IC package, a position on a 0.1 inch (2.54 mm) socket header, or the pins extending from the bottom of a shield PCB.

Table 4-1. Arduino hardware features
Board name Processor VCC (V) Clock (MHz) AIN pinsa DIO pinsb PWM pins USBc

ArduinoBT

ATmega328

5

16

6

14

6

None

Duemilanove

ATmega168

5

16

6

14

6

Regular

Duemilanove

ATmega328

5

16

6

14

6

Regular

Diecimila

ATmega168

5

16

6

14

6

Regular

Esplora

ATmega32U4

5

16

-

-

-

Micro

Ethernet

ATmega328

5

16

6

14

4

Regular

Fio

ATmega328P

3.3

8

8

14

6

Mini

Leonardo

ATmega32U4

5

16

12

20

7

Micro

LilyPad

ATmega168V

2.7–5.5

8

6

14

6

None

LilyPad

ATmega328V

2.7–5.5

8

6

14

6

None

Mega

ATmega1280

5

16

16

54

15

Regular

Mega ADK

ATmega2560

5

16

16

54

15

Regular

Mega 2560

ATmega2560

5

16

16

54

15

Regular

Micro

ATmega32U4

5

16

12

20

7

Micro

Mini

ATmega328

5

16

8

14

6

None

Mini Pro

ATmega168

3.3

8

6

14

6

None

Mini Pro

ATmega168

5

16

6

14

6

None

Nano

ATmega168

5

16

8

14

6

Mini-B

Nano

ATmega328

5

16

8

14

6

Mini-B

Pro (168)

ATmega168

3.3

8

6

14

6

None

Pro (328)

ATmega328

5

16

6

14

6

None

Uno

ATmega328

5

16

6

14

6

Regular

Yún

ATmega32U4

5

16

12

20

7

Host (A)

a Analog inputs.

b Digital I/O.

c Pulse-width modulation outputs (alternate DIO pin functions).

Arduino USB Interfaces

Starting with the Leonardo board (2012), the ATmega32U4 XMEGA microcontroller has been used as the primary processor. This part has a built-in USB interface, which eliminates the need for the additional chip seen on earlier Arduino models with a USB interface. The Leonardo (2012), Esplora (2012), Micro (2012), and Yún (2013) all use the ATmega32U4 processor.

The older Arduino models with USB used an FTDI interface chip (the FT232RL), an ATmega8 (Uno), or an ATmega16U2 (Mega2560 and Uno R3). The FT232RL converts between standard serial (such as RS-232) and USB. In the Uno, Uno R3, and Mega2560 the additional small ATmega processors are preprogrammed to serve as a USB interface. The operation of these parts is transparent when using the Arduino IDE to create and load program sketches.

Those boards that do not have a USB interface must be programmed using an external adapter.

Arduino types that use the FTDI FT232RL serial-to-USB interface chip are essentially identical internally, and consist of a DC voltage regulation circuit and two ICs. Figure 4-1 shows a block diagram of the Diecimila and Duemilanove models with an FTDI interface chip.

aian 0401
Figure 4-1. FTDI USB interface

Since around 2010, the Uno R2 and Uno SMD boards have employed the ATmega16U2 part instead of the FTDI FT232RL for the USB interface. The Uno R3 also has the ATmega16U2 serving as the USB interface. The ATmega16U2 incorporates a built-in USB 2.0 interface and is basically the same as the ATmega32U4, just with less memory. Figure 4-2 shows a block diagram of the Uno R2 with an ATmega16U2 providing the USB interface. The Uno, with an ATmega8, has the same internal functional arrangement as the Uno R2, just with a different MCU serving as the USB interface.

Arduino Physical Dimensions

Arduino boards come in a variety of shapes and sizes, but generally they can be organized into four groups: full-size or baseline boards, mega-size boards, small form-factor boards, and special-purpose boards.

aian 0402
Figure 4-2. ATmega16U2 USB interface
Note

The board dimensions given in this section, while generally close, are approximate, as there may be some slight variations between boards from different sources. Refer to the PCB layout from Arduino.cc, which is available for each board, if you need accurate dimensions. Or better yet, just take the measurements from an actual board.

To give some idea of scale, Figure 4-3 shows a lineup of several common Arduino boards. Shown here in clockwise order from the lower left are a Duemilanove, a Leonardo, a clone Mega2560 with an extended I/O pin layout from SainSmart, and an official Arduino Mega2560, with an Arduino Nano sitting in the center.

aian 0403
Figure 4-3. Comparison of Arduino and clone boards

Full-Size Baseline Arduino PCB Types

Figure 4-4 shows the physical layouts for six different baseline Arduino boards, from the Diecimila to the Leonardo. In between there are the Duemilanove and Uno variants. Baseline, in this context, refers to the “classic” Arduino PCB layout that determines the physical design of most shields and other add-on components. The functions of the I/O and other pins on each PCB are described in “Arduino Pinout Configurations”.

With the Diecimila, the Duemilanove, the Uno R2 (revision 2), and the Uno SMD the arrangement of the I/O socket headers along the edges of the PCBs is unchanged. This book refers to this as the baseline Arduino form factor. Also, starting with the Uno R2 a new block of six pins appeared on the PCB, in addition to the block that already existed on earlier boards. This is the ICSP (In-Circuit Serial Programming) interface for the ATmega16U2 processor that is used for the USB interface. The Uno SMD also has this new ICSP interface.

The Uno R3 introduced the new extended I/O pin configuration. This is a backward-compatible extension, meaning that a shield intended for an older model like a Duemilanove will still work with the newer boards. The extension only adds new signal pin sockets, but no new signals, and it doesn’t alter any of the pin functions found in the baseline layout. The Leonardo PCB uses the ATmega32U4 processor, which has built-in USB support, so there is only one microcontroller IC on a Leonardo PCB and only one ICSP port. It has the same I/O pin layout as earlier boards, although the actual microcontroller ports used are different.

aian 0404
Figure 4-4. Full-size baseline Arduino PCB types

All full-size baseline Arduino boards have the same physical dimensions, as shown in Figure 4-5. The locations of the mounting holes for the PCB vary slightly between models depending on the version of the board, but the overall exterior dimensions are consistent.

Mega Form-Factor Arduino PCB Types

The Mega form-factor boards incorporate the baseline pinout along with additional pins to accommodate the extended capabilities of the ATmega1280 and ATmega2560 microcontrollers (these devices are described in “ATmega1280/ATmega2560” in Chapter 3).

Mega and Mega2560

The Mega and Mega2560 are essentially the same layout, with the primary difference being the type of AVR device on the boards. The Mega2560 replaces the Mega, which is no longer produced by Arduino.cc, although some second-source clone boards are still available. Considering the enhanced memory of the Mega2560, there really isn’t any reason to purchase a Mega.

aian 0405
Figure 4-5. Baseline and extended board dimensions

Figure 4-6 shows the overall dimensions of a Mega or Mega2560 board. Note that a baseline (Uno, Leonardo, etc.) shield will work with a Mega board. The I/O pins on the Mega are arranged such that the basic digital I/O and the A/D inputs 0 through 5 are compatible with the baseline pin layout.

Mega ADK

The Mega ADK is based on the Mega2560, but features a USB host interface that allows it to connect to Android phones and similar devices. Other than an additional USB connector located between the B type USB connector and the DC power jack, it is identical to the Mega2560 in terms of dimensions. Like with the Mega2560, a standard baseline-type shield can be used with the Mega ADK.

Small Form-Factor Arduino PCB Types

The full-size Arduino boards were the first to make an appearance around 2005, and by 2007 the layout had settled into the baseline and extended forms seen today. But the Arduino team and their partners realized that the full-size board just wouldn’t work for some applications, so they came up with the miniature formats.

aian 0406
Figure 4-6. Mega and Mega2560 dimensions

The miniature boards include the Mini, Micro, Nano, and Fio layouts. These PCBs are smaller in both width and length, but still have the same AVR processors as the full-size types.

Mini

The Mini is intended for use on breadboards or in other applications where space is limited. It does not have a USB connector, and an external programmer interface must be used to transfer executable code to the microcontroller. Its dimensions are shown in Figure 4-7.

Pro Mini

The Pro Mini is similar to the Mini with regard to pin layout and form factor, but unlike the Mini it is intended for permanent or semipermanent installation. The Pro Mini was designed and manufactured by SparkFun Electronics. Its dimensions are shown in Figure 4-8.

aian 0407
Figure 4-7. Arduino Mini dimensions
aian 0408
Figure 4-8. Arduino Pro Mini dimensions

Nano

Similar to the Mini, the Nano is a small form-factor board suitable for use with solderless breadboards and as a plug-in module for a larger PCB. It was designed and produced by Gravitech. Its dimensions are given in Figure 4-9.

Fio

The Fio is intended for wireless applications, primarily XBee, and as such it lacks some of the direct connection programmability of other Arduino types. A Fio can be programmed using a serial-to-USB adapter or wirelessly using a USB-to-XBee adapter. It was designed and manufactured by SparkFun Electronics; its dimensions are shown in Figure 4-10.

aian 0409
Figure 4-9. Arduino Nano dimensions
aian 0410
Figure 4-10. Arduino Fio dimensions

Micro

The Micro employs a DIP (dual in-line pin) form factor and uses an ATmega32U4 processor, which is identical to the Leonardo board. Like the Nano, the Micro is suitable for use with a solderless breadboard and as a plug-in module using a conventional IC socket. It was developed in conjunction with Adafruit. The Micro’s dimensions are shown in Figure 4-11.

aian 0411
Figure 4-11. Arduino Micro dimensions

Special-Purpose PCB Types

Arduino boards aren’t limited to simple shapes like rectangles. The LilyPad is a small disk with connection points arranged around the edge. It can be integrated into clothing to build wearable creations. The Esplora is physically configured like a conventional game controller, although as it is an Arduino it can be programmed to do much more than just play games.

LilyPad

The LilyPad and its variations are intended for wearable applications. The board itself measures about 2 inches (50 mm) in diameter, as shown in Figure 4-12.

aian 0412
Figure 4-12. Arduino LilyPad dimensions

Esplora

The Esplora is supplied with four pushbuttons, a switch-type joystick, and a micro USB connector. Four mounting holes are available to affix the board to a chassis or panel. The Esplora PCB dimensions are shown in Figure 4-13.

Arduino Pinout Configurations

When creating a shield board for the Arduino, the convention is to follow the common baseline pin layout pattern described here. This configuration is found on the “standard” baseline Arduino boards built between 2007 and 2012. Boards using the newer “extended” pin layout (the Uno R3 and Leonardo), as well as the “Mega” boards, also support the baseline connections, but add new capabilities by extending the rows of terminals along the sides of the PCBs.

aian 0413
Figure 4-13. Arduino Esplora dimensions

The Baseline Arduino Pin Layout

The baseline Arduino pin layout as it exists today appeared with the Diecimila model. Over the years it has become a de facto standard upon which numerous shield boards have been based. The Arduino boards that utilize the baseline pin layout are listed in Table 4-2.

Table 4-2. Baseline layout Arduino boards
Board name Year Microcontroller

Diecimila

2007

ATmega168

Duemilanove

2008

ATmega168/ATmega328

Uno (R2 and SMD)

2010

ATmega328P

Figure 4-14 shows the pinout of a full-size baseline Arduino board. This includes the Diecimila, Duemilanove, Uno R2, and Uno SMD models. The gray boxes in Figure 4-14 give the chip pin number and port designations for the ATmega168/328 parts.

The common baseline I/O and power pin layout for the Arduino consists of 14 discrete digital I/O pins, an analog reference, 3 ground pins, 6 analog input pins, pins for 3.3V and 5V, and a reset line. As shown in Figure 4-14, these pins are arranged as two eight-position connectors and two six-position connectors along the sides of the PCB.

aian 0414
Figure 4-14. Pin functions of standard baseline Arduino boards

From a programming perspective, each interface pin on a Diecimila, Duemilanove, Uno R2, or Uno SMD PCB has a predefined name used to identify it in software. These names are reflected by the labels screened onto the Arduino PCB. Table 4-3 lists the pin assignments for a baseline or R2 Arduino with an ATmega168 or ATmega328 MCU. See the pin assignments for the Arduino Ethernet (Table 4-3) for the Uno SMD board.

Table 4-3. Arduino ATmega168/328 pin assignments
Digital
pin (Dn)
Analog
pin (An)
AVR pin AVR port AVR function(s) AVR PWM

0

2

PD0

RxD

1

3

PD1

TxD

2

4

PD2

INT0

3

5

PD3

INT1, OC2B

Yes

4

6

PD4

T0, XCK

5

11

PD5

T1

Yes

6

12

PD6

AIN0

Yes

7

13

PD7

AIN1

8

14

PB0

CLK0, ICP1

9

15

PB1

OC1A

Yes

10

16

PB2

OC1B, SS

Yes

11

17

PB3

OC2A, MOSI

Yes

12

18

PB4

MISO

13

19

PB5

SCK

14

0

23

PC0

15

1

24

PC1

16

2

25

PC2

17

3

26

PC3

18

4

27

PC4

SDA

19

5

28

PC5

SCL

The Extended Baseline Pin Layout

Starting with the R3 version of the Uno, four additional pins appeared on the Arduino PCB. Two of these are near the relocated reset button and provide additional connections for I2C (the SCL and SDA lines). The other two appeared next to the reset connection on the opposite side of the board. One is designated as IOREF (the nominal I/O voltage, may be either 3.3V or 5V depending on board type) and the other is not presently connected. Table 4-4 lists the extended baseline layout boards.

Table 4-4. Extended layout Arduino boards
Board name Year Microcontroller

Uno R3

2010

ATmega328

Ethernet

2011

ATmega328

Leonardo

2012

ATmega32U4

Uno R3

Like the Uno R2 and Uno SMD, the Uno R3 utilizes a second microcontroller to handle USB communications. The Arduino Ethernet does not have built-in USB. Figure 4-15 shows the block diagram for the Uno R3 and Uno SMD boards.

The pin functions for the Uno R3 are shown in Figure 4-16.

The extended baseline (R3) Arduino boards with the ATmega328 MCU have the same pin assignments as given in Table 4-3, but with the additional pins for ADC4 and ADC5 (A4 and A5). The Leonardo pin functions are defined in “Leonardo”.

aian 0402
Figure 4-15. ATmega16U2 USB interface
aian 0416
Figure 4-16. Uno R3 pin functions

Ethernet

The Ethernet deviates from the Arduino conventions seen up through the Uno R3 with its inclusion of a 100Mb Ethernet interface and an RJ45 jack. It has no USB interface. The MCU is a surface-mount version of the ATmega328, with different pin functions and numbering from the ATmega328. A WIZnet W5100 chip is used for the Ethernet interface. Figure 4-17 shows a block diagram of the Ethernet board.

aian 0417
Figure 4-17. Arduino Ethernet block diagram

An FTDI-type interface is used to program the Ethernet with an adapter, like the SparkFun or Adafruit FTDI-type devices. This interface is brought out on a right-angle six-pin header along one edge of the PCB next to the microSD carrier. Figure 4-18 shows the pinouts of the Ethernet board.

This product has been retired by Arduino.cc, but it is still available from multiple sources. Ethernet connectivity can be obtained by using an Ethernet shield (see Chapter 8 for more details on shields).

Table 4-5 lists the pin assignments for the Arduino Ethernet. Note that pins 10, 11, 12, and 13 are reserved for the Ethernet interface and are not available for general-purpose use.

Table 4-5. Arduino Ethernet pin assignments
Digital
pin (Dn)
Analog
pin (An)
AVR pin AVR port AVR function(s) AVR PWM

0

30

PD0

RxD

1

31

PD1

TxD

2

32

PD2

INT0

3

1

PD3

INT1, OC2B

Yes

4

2

PD4

T0, XCK

5

9

PD5

T1, OC0B

Yes

6

10

PD6

AIN0, OC0A

Yes

7

11

PD7

AIN1

8

12

PB0

CLK0, ICP1

9

13

PB1

OC1A

Yes

10

14

PB2

OC1B, SS

Yes

11

15

PB3

OC2A, MOSI

Yes

12

16

PB4

MISO

13

17

PB5

SCK

14

0

23

PC0

15

1

24

PC1

16

2

25

PC2

17

3

26

PC3

18

4

27

PC4

SDA

19

5

28

PC5

SCL

Leonardo

The Leonardo introduced the ATmega32U4 processor, which contains a built-in USB interface and enhanced functionality. This simplified the PCB layout, as can be seen in Figure 4-19. Also, note that the Leonardo uses a mini-USB connector instead of the full-size type B connector found on older Arduino boards. This was a much-needed change, and it allows the Leonardo to work with shields that would have interfered with the B type USB connector on the older models.

The Uno R3 and the Leonardo both use the same PCB pin layout, but some of the microcontroller functions are different. In the Arduino IDE this is handled by using a set of definitions specific to each board type to map functions to specific pins.

aian 0418
Figure 4-18. Pin functions of Arduino Ethernet board
aian 0419
Figure 4-19. Pin functions of Arduino Leonardo board

Table 4-6 lists the pin assignments for an extended or R3 Arduino with an ATmega32U4 MCU.

Table 4-6. Arduino ATmega32U4 pin assignments
Digital
pin (Dn)
Analog
pin (An)
AVR pin AVR port AVR function(s) AVR PWM

0

20

PD2

INT3, RxD1

1

21

PD3

INT2, TxD1

2

19

PD1

INT1, SDA

3

18

PD0

INT0, OC0B, SCL

Yes

4

25

PD4

ICP1, ADC8

5

31

PC6

OC3A, OC4A

Yes

6

27

PD7

OC4D, ADC10, T0

Yes

7

1

PE6

INT6, AIN0

8

28

PB4

ADC11

9

29

PB5

OC1A, ADC12, *OC4B

Yes

10

30

PB6

OC1B, ADC13, OC4B

Yes

11

12

PB7

OC0A

Yes

12

26

PD6

*OC4D, ADC9, T1

Yes

13

32

PC7

OC4A, ICP3

Yes

14

0

36

PF7

TDI

15

1

37

PF6

TDO

16

2

38

PF5

TMS

17

3

39

PF4

TCK

18

4

40

PF1

19

5

41

PF0

The Mega Pin Layout

The Mega series (which use the ATmega1280 and ATmega2560 processors) also incorporate the standard pinout pattern, but include additional pins to accommodate the extended I/O capabilities of the larger processors. The Mega pin layout is shown in Figure 4-20. The boards that utilize this layout are listed in Table 4-7. Most common shields will work with the Mega boards.

aian 0420
Figure 4-20. Pin functions of the Arduino Mega series boards
Note

In Figure 4-20, the PCINT pin functions are not shown for the sake of clarity. Also note that the R3 version of the Mega2560 contains pins not found on earlier versions, but these do not interfere with baseline layout–style shields.

Table 4-7. Mega pin layout boards
Board name Year Microcontroller

Mega

2009

ATmega1280

Mega2560

2010

ATmega2560

Mega ADK

2011

ATmega2560

Nonstandard Layouts

In terms of nonstandard pinout configurations (nonstandard in the sense of being physically incompatible with conventional Arduino shields), the most radical is the LilyPad, with its circular form factor and use of solder pads for connections. The small form-factor Nano, Mini, Mini Pro, and Micro have pins soldered to the underside of the board, and are suitable for use with a solderless breadboard block or as a component on a large PCB. The Fio uses solder pads with spacing compatible with standard header pin strips, and the Esplora has a game controller–type form factor. None of the nonstandard layout boards can be used directly with a standard shield. The boards that fall into this category are listed in Table 4-8, and the pin functions for these boards are shown in Figures 4-21 through 4-27 in the following sections.

Table 4-8. Nonstandard pin layout boards
Board name Year Microcontroller

LilyPad

2007

ATmega168V/ATmega328V

Nano

2008

ATmega328/ATmega168

Mini

2008

ATmega168

Pro Mini

2008

ATmega328

Fio

2010

ATmega328P

Esplora

2012

ATmega32U4

Micro

2012

ATmega32U4

LilyPad

aian 0421
Figure 4-21. Pin functions of the Arduino LilyPad

Nano

aian 0422
Figure 4-22. Nano pin functions

Mini

aian 0423
Figure 4-23. Mini pin functions

Pro Mini

aian 0424
Figure 4-24. Pro Mini pin functions

Fio

aian 0425
Figure 4-25. Fio pin functions

Esplora

aian 0426
Figure 4-26. Esplora pin functions

Micro

aian 0427
Figure 4-27. Micro pin functions

For More Information

The Atmel website offers a selection of datasheets, example software, and other resources for working with the AVR microcontrollers. Note that these are only for the AVR, not the Arduino.

Additional information about the various Arduino boards can be found on the Arduino website.

Get Arduino: A Technical Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.