The Arduino Leonardo ETH is a microcontroller board with an ATmega32U4 and a Wiznet W5500 TCP/IP Embedded Ethernet Controller. It has 20 digital input/output pins (of which seven can be used as PWM outputs and 12 as analog inputs), a 16 MHz crystal oscillator, an RJ45 connection, a micro-USB connector, a power jack, an ICSP header, and a Reset button. All support circuitry is on board, so you need only to connect it to a computer with a USB cable or power it with an AC-to-DC adapter or battery to get started.
An optional Power-over-Ethernet module can be added to the board as well.
The Arduino Leonardo ETH differs from the previous Arduino Ethernet board in a few ways. Its ATmega32U4 has built-in USB communication, eliminating the need for an external USB-to-serial converter. This allows the Leonardo ETH to appear to a connected computer as a mouse and keyboard, in addition to a virtual (CDC) serial / COM port. This also has other implications for the behavior of the board. Plus, it has the newer W5500 TCP/IP Embedded Ethernet Controller instead of the older W5100. This is the same interface found on the Ethernet Shield 2.
An on-board microSD card reader, which can be used to store files for serving over the network, is accessible through the Arduino SD Library. Pin 10 is reserved for the Wiznet interface; SS for the SD card is on Pin 4.
Arduino Leonardo ETH Board Features
- Microcontroller: ATmega32U4
- Operating Voltage: 5V
- Input Voltage Plug (recommended): 7-12V
- Input Voltage Plug (limits): 6-20V
- Input Voltage PoE (limits): 36-57V
- Digital I/O Pins: 20 (of which 7 provide PWM output)
- Arduino Pins reserved: 4 used for SD card select; 10 for W5500 select
- Analog Input Pins: 12
- DC Current per I/O Pin: 40mA
- DC Current for 3.3V Pin: 1A (only when powered via external supply)
- Flash Memory: 32 KB on ATmega32U4, of which 4 KB is used by bootloader
- SRAM: 2.5 KB on ATmega32U4
- EEPROM: 1 KB on ATmega32U4; can be read/written using Arduino EEPROM library
- Clock Speed: 16 MHz
- W5500 TCP/IP Embedded Ethernet Controller
- Power-over-Ethernet ready Magnetic Jack
- microSD card slot with active voltage translators
- PCB Dimensions: 2.7 × 2.1 inches (connectors extend beyond)
Powering the Board The board can be powered via an external power supply, an optional Power-over-Ethernet (PoE) module, or by using the micro-USB connection.
External power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted in the Gnd and Vin pin headers of the POWER connector.
The board can operate on an external supply of 6V to 20V. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7V to 12V.
The power pins are as follows:
- Vin — The input voltage to the Arduino board when it's using an external power source (as opposed to 5V from the USB connection or other regulated power source). You can supply voltage through this pin, or, if supplying voltage via the power jack, have access to it through this pin.
- 5V — This pin provides a regulated 5V output from the regulator on the board. The board can be supplied with power either from the DC power jack (7-12V), the USB connector (5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board. Thus it is not recommended.
- 3.3V — A 3.3V supply generated by the on-board regulator. Maximum current draw is 50 mA.
- GND — Ground pins.
- IOREF &mash; This pin on the Arduino board provides the voltage reference with which the microcontroller operates. A properly configured shield can read the IOREF pin voltage and select the appropriate power source or enable voltage translators on the outputs for working with the 5V or 3.3V.
Input and Output Each of the 14 digital pins on the Leonardo ETH can be used as an input or output, using pinMode(), digitalWrite(), and digitalRead() functions. They operate at 5V. Each pin can provide or receive a maximum of 40mA and has an internal pull-up resistor (disconnected by default) of 20-50 kΩ. In addition, some pins have specialized functions:
- Serial: 0 (RX) and 1 (TX) — Used to receive (RX) and transmit (TX) TTL serial data using the ATmega32U4's hardware serial capability. Note that on the Leonardo ETH, the Serial class refers to USB (CDC) communication; use the Serial1 class for TTL serial on pins 0 and 1.
- TWI: 2 (SDA) and 3 (SCL) — These support TWI communication using the Wire library.
- External Interrupts: 3 (interrupt 0), 2 (interrupt 1), 0 (interrupt 2), 1 (interrupt 3) and 7 (interrupt 4) — These pins can be configured to trigger an interrupt on a Low value, a rising or falling edge, or a change in value. See the attachInterrupt() function for details.
- PWM: 3, 5, 6, 9, 10, 11, 13 — These provide 8-bit PWM output with the analogWrite() function.
- SPI: on the ISCP header — These pins support SPI communication using the SPI library. Note that the SPI pins are not connected to any of the digital I/O pins like they are on an Arduino Uno; they are available only on the ICSP connector. This means that if you have a shield that uses SPI but does not have a 6-pin ICSP connector that connects to the Leonardo ETH's 6-pin ICSP header, the shield will not work.
- LED: 13 — There is a built-in LED connected to digital pin 13. When the pin is High value, the LED is on; when the pin is Low, it's off.
- Analog Inputs: A0-A5, A6-A11 (on digital pins 4, 6, 8, 9, 10, 12) — The Leonardo ETH has 12 analog inputs, labeled A0 through A11, all of which also can be used as digital I/O. Pins A0-A5 appear in the same locations as on the Uno; inputs A6-A11 are on digital I/O pins 4, 6, 8, 9, 10, and 12 respectively. Each analog input provides 10 bits of resolution (i.e. 1024 different values). By default, they measure from ground to 5V, though is it possible to change the upper end of their range using the AREF pin and the analogReference() function.
- Reset — Bring this line Low to reset the microcontroller. Typically it is used to add a reset button to shields or enclosures which block the one on the board.
See also the mapping between Arduino pins and ATmega32U4 ports reference.
Communication The Leonardo ETH has a number of facilities for communicating with a computer, another Arduino, or other microcontrollers. The ATmega32U4 provides UART TTL (5V) serial communication, which is available on digital pins 0 (RX) and 1 (TX). The 32U4 also allows for serial (CDC) communication over USB and appears as a virtual COM port to software on the computer. The chip also acts as a full-speed USB 2.0 device, using standard USB COM drivers. On Windows, a .inf file is required (included with the IDE; see below). The Arduino software includes a serial monitor which allows simple text-based data to be sent to and from the Arduino board. The RX and TX LEDs on the board will flash when data are being transmitted via the USB connection to the computer (but not for serial communication on pins 0 and 1).
The SoftwareSerial library allows for serial communication on any of the Leonardo ETH's digital pins. The ATmega32U4 also supports I2C (TWI) and SPI communication. The Arduino software includes a Wire library to simplify use of the I2C bus. For SPI communication, use the SPI library.
The Leonardo ETH appears as a generic keyboard and mouse, and can be programmed to control these input devices using the Keyboard and Mouse classes.
The board also can connect to a wired network via Ethernet. When connecting to a network, you will need to provide an IP address and a MAC address. The Ethernet 2 library is fully supported.
The on-board microSD card reader is accessible through the SD library. When working with this library, SS is on Pin 4.
Programming The Leonardo ETH can be programmed with the Arduino software. Select Arduino Leonardo ETH from the Tools → Board menu. For details, see the Arduino Reference and Basic Concepts.
The ATmega32U4 on the Leonardo ETH comes pre-burned with a bootloader that allows you to upload new code to it without the use of an external hardware programmer. It communicates using the AVR109 protocol. It is possible to bypass the bootloader and program the microcontroller through the ICSP header instead; see these instructions for details.
Example sketches for the Arduino Ethernet Shield 2 are equally compatible with the Leonardo ETH. Remember to change the network settings in any example sketch so that they match your network.
Automatic (Software) Reset and Bootloader Initiation Rather than requiring a physical press of the reset button before an upload, the Leonardo ETH is designed in a way that allows it to be reset by software running on a connected computer. The reset is triggered when the board's virtual (CDC) serial/COM port is opened at 1200 baud and then closed. When this happens, the processor will reset, breaking the USB connection to the computer (meaning that the virtual serial/COM port will disappear). After the processor resets, the bootloader starts, remaining active for about eight seconds. The bootloader also can be initiated by pressing the reset button on the Leonardo ETH. When the board first powers up, however, it will jump straight to the user sketch (program) if present, rather than initiating the bootloader.
Because of the way the Leonardo ETH handles reset, it's best to let the Arduino software try to initiate the reset before uploading code, especially if you are in the habit of pressing the reset button before uploading on other boards. If the software can't reset the board, you can always start the bootloader by pressing the reset button on the board.
USB Overcurrent Protection The Leonardo ETH has a resettable polyfuse that protects your computer's USB ports from shorts and overcurrent. Although most computers provide their own internal protection, this fuse provides an extra layer of protection. If more than 500mA is applied to the USB port, the fuse will break the connection until the short or overload is removed.
About Arduino Arduino is an open-source platform based on boards featuring an Atmel AVR microcontroller with a pre-programmed bootloader and a development environment that implements the Processing/Wiring language. Arduino can be used to develop stand-alone interactive objects, or can be connected to software on your computer (e.g. Flash, Processing, MaxMSP). The open-source IDE can be downloaded for free (currently for Mac OS X, Windows, and Linux).
Arduino Leonardo ETH Documentation
Note about options below If you choose the GSM/GPRS Module for Arduino add-on board below, you also will need a compatible antenna which is not included.
Optional Recommended Products for this Item
|GSM/GPRS Module for Arduino||+|| US$103.00|
|Arduino ScrewShield Kit - Screw Terminal Block Add-On||+|| US$14.95|
|Power Supply 3-12V DC, U.S. plug, 6 connection tips||+|| US$11.00|
|Power Supply 3-12V DC, US/UK/Euro/AU Plugs, 100-240VAC||+|| US$13.00|
|Ethernet Cable, CAT5E 350MHz Unshielded, 7ft.||+|| US$3.60|
|Ethernet Crossover Cable, CAT5E 350MHz Unshielded, 5ft.||+|| US$7.00|
|Atmel AVR ISP Adapter, 10-pin to 6-pin (Atmel Butterfly)||+|| US$7.50|
|Pack of 12 Prototyping Wires for 0.025-inch Square Pins||+|| US$6.90|
|Arduino Stackable Female Header Kit, for R3 & newer||+|| US$1.50|
|Arduino Stackable Female Header - 10 Pin||+|| US$0.50|
|Arduino Stackable Female Header - 8 Pin||+|| US$0.50|
|Arduino Stackable Female Header - 6 Pin||+|| US$0.50|