Skip to Content

Arduino Leonardo Genuine (Original)

The Arduino Leonardo is a microcontroller development board based on the ATmega32U4, featuring an integrated USB interface that allows it to communicate directly with a computer without requiring a separate USB-to-serial converter. One of its main advantages is native USB functionality, which allows the Leonardo to emulate a USB keyboard or mouse when connected to a computer. This makes it suitable for custom input devices, automation controllers, interactive projects, robotics, and embedded applications. The board provides 20 digital input/output pins, including 7 PWM-capable pins, and 12 analog input channels. It operates at 5V with a 16MHz clock speed and is compatible with the Arduino IDE, libraries, and a wide range of Arduino-compatible modules.

Package Includes:

  • 1 x Arduino Leonardo Development Board


Original Arduino Boards
120.00 AED 120.00 AED (Tax included)

Terms and Conditions
30-day money-back guarantee
Shipping: 2-3 Business Days

 

Features:

  • Microcontroller: ATmega32U4 8-bit AVR microcontroller.
  • Native USB Interface: Built-in USB communication without a separate USB-to-serial converter.
  • USB HID Support: Can emulate a keyboard or mouse using compatible Arduino programming libraries.
  • Digital I/O Pins: 20 digital input/output pins.
  • PWM Outputs: 7 PWM-capable digital pins.
  • Analog Inputs: 12 analog input channels with 10-bit ADC resolution.
  • Operating Voltage: 5V.
  • Clock Speed: 16MHz.
  • Communication: Supports native USB, hardware UART, SPI, and I2C.
  • Memory: 32KB Flash, 2.5KB SRAM, and 1KB EEPROM.
  • Programming: Compatible with the Arduino IDE.
  • Expansion: Supports compatible shields, sensors, displays, and external modules.
  • Compact Design: Suitable for prototyping and integration into electronic projects.

Principle of Operation:

The Arduino Leonardo operates using the ATmega32U4 microcontroller, which handles program execution, input/output operations, and USB communication. Unlike the Arduino UNO R3, the Leonardo integrates USB functionality directly into its main microcontroller.

ATmega32U4 Microcontroller: Features, Pinout, and Complete Guide - Fly-Wing

  1. Program Execution: The ATmega32U4 stores and executes the sketch uploaded through the Arduino IDE. The program controls the board's pins and determines how it responds to connected components.
  2. Clock Signal: The microcontroller operates using a 16MHz clock source, synchronizing instruction execution and peripheral operations.
  3. Digital Input and Output: The microcontroller reads digital signals and generates HIGH or LOW output signals through its digital pins.
  4. Analog Input: The onboard ADC converts analog voltage signals into digital values that can be processed by the program.
  5. PWM Control: PWM-capable pins generate pulse-width modulated signals for controlling compatible devices such as LEDs and motor drivers.
  6. Native USB Communication: The ATmega32U4 includes USB hardware that allows the board to communicate directly with a computer. It can operate as a USB serial device or emulate supported USB devices such as keyboards and mice.
  7. UART Communication: Hardware serial communication with external devices is available through digital pins 0 (RX) and 1 (TX), using Serial1 in Arduino sketches.
  8. Memory Management: Flash memory stores program code, SRAM handles temporary data during execution, and EEPROM retains stored information when power is removed.
  9. Interrupt Handling: Hardware interrupts allow the microcontroller to respond to selected external events and internal peripheral requests.

Pinout:

Arduino Leonardo pinout diagram

Digital and Analog Pins:

  • Digital Pins: The Leonardo provides 20 digital I/O pins. These pins can be configured as inputs or outputs using pinMode(), digitalRead(), and digitalWrite().
  • Analog Inputs: The board provides 12 analog input channels, identified as A0 to A11. These can also be used as digital I/O pins where supported by the board's pin mapping.
  • Logic Voltage: The board operates with 5V logic. Do not apply signals exceeding the permitted voltage range to its I/O pins.
  • Internal Pull-up Resistors: Digital inputs can use internal pull-up resistors configured through INPUT_PULLUP.

PWM Pins:

  • PWM Outputs: Digital pins 3, 5, 6, 9, 10, 11, and 13 support PWM output.
  • Resolution: Standard analogWrite() operation provides 8-bit PWM values from 0 to 255.
  • Applications: PWM can be used for LED brightness control, motor driver inputs, and other suitable control applications.

Communication Interfaces:

  • USB: The integrated USB interface supports communication with a computer and USB device emulation, including keyboard and mouse functionality.
  • UART: Hardware serial communication is available through D0 (RX) and D1 (TX), accessed using Serial1.
  • USB Serial: The Serial object is used for USB serial communication with a computer.
  • I2C: Available through the dedicated SDA and SCL pins and the Wire library. On the standard Leonardo pin mapping, these signals correspond to D2 (SDA) and D3 (SCL).
  • SPI: Available through the ICSP header for communication with compatible peripherals.

Power Supply Pins:

  • VIN: External input voltage supplied through the board's power connector or VIN pin. The standard board is designed for a recommended external input range of 7–12V.
  • 5V: Regulated 5V power rail. Applying power directly to this pin bypasses the onboard voltage regulator and requires a properly regulated supply.
  • 3.3V: Regulated 3.3V output for compatible external components. Observe the board's current limitations.
  • GND: Common ground connections for the board and external circuits.
  • IOREF: Provides the board's operating logic voltage reference for compatible shields.
  • RESET: Resets the microcontroller when activated.

LED Indicators:

  • RX LED: Indicates serial data reception.
  • TX LED: Indicates serial data transmission.
  • L LED: Connected to digital pin 13 and can be controlled through a sketch.
  • ON LED: Indicates that the board is receiving power.

ICSP Connector:

The ICSP header provides access to the SPI signals and programming connections of the ATmega32U4. It can be used with compatible external programmers and SPI peripherals.

Applications:

  • Custom USB Keyboards and Mice: Creating programmable input devices and custom computer interfaces.
  • USB HID Controllers: Developing game controllers, macro pads, and specialized computer control devices.
  • Interactive Art Installations: Building installations that respond to user input, sensors, and physical interaction.
  • Home Automation: Developing controllers for lights, appliances, and monitoring systems.
  • Education: Teaching microcontroller programming, USB communication, and electronics.
  • Data Acquisition: Collecting analog and digital measurements from connected sensors.
  • Robotics: Controlling motors, sensors, and actuators in robotic projects.
  • Wearable Technology: Developing compact electronic devices with sensors and user interfaces.
  • Home Security: Building sensor-based monitoring and control systems.
  • MIDI Controllers: Developing custom MIDI input devices and musical interfaces using suitable USB MIDI libraries.
  • IoT Prototyping: Connecting external communication modules for network-enabled projects.
  • Experimental Electronics: Testing circuits and developing custom electronic devices.

Wiring Example:

No external circuit is required for the basic test. The onboard LED connected to digital pin 13 can be used to verify that the Arduino Leonardo is operating correctly.

Getting Started with Arduino IDE:

  1. Install Arduino IDE: Download and install the Arduino IDE from the official Arduino software page.
    Downloading and installation of Arduino IDE
  2. Connect the Board: Connect the Arduino Leonardo to your computer using a suitable micro-USB data cable.
  3. Select the Board: Open Tools > Board and select Arduino AVR Boards > Arduino Leonardo.
  4. Select the Port: Open Tools > Port and select the serial port associated with the board.
    Download Arduino and install Arduino driver | Seeed Studio Wiki
  5. Write or Open a Sketch: Create a new sketch or select File > Examples > 01. Basics > Blink.
  6. Verify the Code: Click Verify to compile the sketch and check for errors.
  7. Upload the Sketch: Click Upload to transfer the program to the Leonardo.
  8. Monitor Serial Output: Open Tools > Serial Monitor to view messages sent through the USB serial connection.

Note: The Leonardo's native USB connection can cause the serial port to disconnect and reconnect during sketch uploading or board reset. If the selected port disappears, wait for the board to reconnect and select the new port if necessary.

Code:

The following example blinks the onboard LED connected to digital pin 13 and prints its status through the USB Serial Monitor.

// Arduino Leonardo LED Blink and Serial Monitor

const int ledPin = 13;

void setup() {
  pinMode(ledPin, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  digitalWrite(ledPin, HIGH);
  Serial.println("LED is ON");
  delay(1000);

  digitalWrite(ledPin, LOW);
  Serial.println("LED is OFF");
  delay(1000);
}

How the code works:

  • ledPin defines digital pin 13 as the LED control pin.
  • pinMode() configures the pin as an output.
  • Serial.begin(9600) initializes USB serial communication.
  • digitalWrite(HIGH) turns the LED on.
  • Serial.println() sends the LED status to the Serial Monitor.
  • digitalWrite(LOW) turns the LED off.
  • delay(1000) pauses the program for one second.

The LED continuously turns on and off every second while its status is displayed in the Serial Monitor. Open the Serial Monitor and select 9600 baud to view the messages.

Specifications:

  • Microcontroller: ATmega32U4
  • Operating Voltage: 5V
  • Recommended External Input Voltage: 7–12V
  • USB Connector: Micro-USB (board version dependent)
  • Digital I/O Pins: 20
  • PWM Outputs: 7
  • Analog Input Channels: 12
  • ADC Resolution: 10-bit
  • Flash Memory: 32KB (4KB used by the bootloader)
  • SRAM: 2.5KB
  • EEPROM: 1KB
  • Clock Speed: 16MHz
  • USB Interface: Native USB support through ATmega32U4
  • UART: Hardware serial through RX and TX pins
  • Logic Voltage: 5V
  • DC Current per I/O Pin: 20mA recommended operating current
  • Built-in LED: Digital pin 13
  • Width: Approximately 53.3mm
  • Length: Approximately 68.6mm
  • Weight: Approximately 20g (board version dependent)

 

Resources:

Comparison: Arduino Leonardo vs Arduino UNO Rev3

Intro to Arduino | Physical Computing

The Arduino Leonardo and Arduino UNO Rev3 are both 5V development boards operating at 16MHz. However, they use different microcontrollers and have different USB communication architectures.

  • Microcontroller: The Leonardo uses the ATmega32U4, while the UNO Rev3 uses the ATmega328P.
  • USB Interface: The Leonardo has native USB functionality integrated into its main microcontroller. The standard UNO Rev3 uses a separate ATmega16U2 USB-to-serial interface.
  • USB HID Support: The Leonardo can emulate USB keyboards and mice through compatible libraries. The standard UNO Rev3 does not provide the same native USB HID functionality.
  • Digital I/O: The Leonardo provides 20 digital I/O pins, while the UNO provides 14.
  • PWM Outputs: The Leonardo provides 7 PWM-capable pins, while the UNO provides 6.
  • Analog Inputs: The Leonardo provides 12 analog input channels, while the UNO provides 6.
  • Flash Memory: Both provide 32KB, although the bootloader allocation differs.
  • SRAM: The Leonardo provides 2.5KB, compared with 2KB on the UNO.
  • EEPROM: Both provide 1KB.
  • Clock Speed: Both operate at 16MHz.
  • UART: The Leonardo provides hardware UART through Serial1, while its Serial interface is used for USB communication. The UNO uses its hardware UART for its USB-to-serial connection and external serial communication.

The Arduino Leonardo is a suitable choice for projects requiring native USB communication, custom keyboards, mice, and additional I/O pins. The Arduino UNO Rev3 remains a practical option for general-purpose prototyping and projects designed around the standard UNO board layout.