0% found this document useful (0 votes)
3 views10 pages

leonardo_arduino

The document presents a detailed overview of the Arduino Leonardo, a microcontroller board based on the ATmega32U4, featuring 23 digital input/output pins and built-in USB communication. It discusses the board's specifications, programming capabilities, and various communication protocols, highlighting its applications in industrial automation, health systems, and more. The document also compares the Leonardo with the Arduino Uno, emphasizing their differences in controller type and pin configuration.

Uploaded by

Marin Marinov
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
3 views10 pages

leonardo_arduino

The document presents a detailed overview of the Arduino Leonardo, a microcontroller board based on the ATmega32U4, featuring 23 digital input/output pins and built-in USB communication. It discusses the board's specifications, programming capabilities, and various communication protocols, highlighting its applications in industrial automation, health systems, and more. The document also compares the Leonardo with the Arduino Uno, emphasizing their differences in controller type and pin configuration.

Uploaded by

Marin Marinov
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 10

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/328233526

Presentation of Arduino Leonardo based onATmega32U4

Article · October 2018

CITATIONS READS

0 2,833

1 author:

Mohamed Fezari
Badji Mokhtar - Annaba University
138 PUBLICATIONS 423 CITATIONS

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Lung Sounds analysis View project

Our research interests include Control systems and Automation, Fault Diagnosis and Isolation, Fault Tolerant Control and Supervisory systems with Advanced Quality
Control. View project

All content following this page was uploaded by Mohamed Fezari on 12 October 2018.

The user has requested enhancement of the downloaded file.


Presentation of Arduino Leonardo based onATmega32U4

Author: Mohamed FEZARI

Today, we will discuss the detailed presentation of Arduino Leonardo. It is a


microcontroller board based on the ATmega32U4 and comes with 23 digital input/output
pins. It is developed by Arduino.cc, aiming to provide easy to use interface with the ability
to perform a number of functions on a single chip.
It incorporates everything required to drive the automation in the relevant project. Simply
connect this device with the USB cable or power it up using DC adapter and start playing
with it

In this post, we will try to cover each and everything related to Arduino Leonardo, so we
don’t need to wrestle our mind browsing the whole internet and find all the information in one
place. Let’s dive right in and get down to the nitty-gritty of this tiny module.

Presentation of Arduino Leonardo


 Arduino Leonardo is a microcontroller board developed by Arduino.cc. It is based on the
ATmega32U4 and comes with 23 digital input/output pins that are enough to connect with
external devices and turn wer innovation into reality. The Microcontroller on the board
incorporates a built-in USB communication, setting we free from the use of a secondary
processor. The USB communication helps Leonardo disguise the mouse or keyboard
when it is connected to a computer. The module supports the crystal oscillator with the
frequency up to 16 MHz that is enough to generate clock pulses with decent pace required
for the synchronization of all the internal operations.
In-circuit programming (ISP) header is added in the device that gives us the flexibility to tweak the
already written code after its installation in the relevant project. This board supports common
communication protocol like UART, SPI, and I2C. The UART is a serial communication protocol
mainly used for transferring and receiving serial data using two pins called TX and RX.
While I2C is a two-wire interface that involves two main lines known as SDA and SCL where former
is s serial data line that carries the data and later is serial clock line that is used to synchronize all
data transfers over the I2C bus.

 Serial Peripheral Interface (SPI) is a third communication protocol added on the board that is
commonly used to send data between microcontrollers and small peripherals such as sensors,
shift registers, and SD cards using separate clock and data lines, layered with a select line to
pick the device for communication.

Main Features on Arduino Leonardo


If we aim to work on our desired project, we must know the common features this device holds in
order to avoid any hassle in future, getting us a clear idea if the ratings of the device are quite in line
and stand fit for our project. Following table shows the main features of the Arduino Leonardo.
Microcontroller ATmega32U4
CPU 8-Bit
Digital I/O Pins 23
PWM Output 7
Analog Input 12
Flash Memory (Program Memory) 32 KB (Out of which 4 KB is used by bootloader)
SRAM 2.5 KB
EEPROM 1 KB
Input Voltage 7-12 V
Operating Voltage 5V
Oscillator up to 16 MHz
Software Used Arduino Software (IDE)
Reset Button Yes
ICSP Header Yes
USB Port 1
UART (Serial Communication) Yes

 USB jack, Power Jack and Reset button are quite in line with each other and are surfaced on one
side of the board. Nonetheless, all components and pins on the board are designed in a regular
pattern, giving a compact and symmetrical interface.

Memory
The ATmega32u4 has 32 KB (with 4 KB used for the bootloader). It also has 2.5 KB of SRAM and
1 KB of EEPROM (which can be read and written with the EEPROM library).

Arduino Leonardo Pin Description

We have got a clear idea about some of the basic functions of this Arduino Module. In this section,
we will break down pinout of the board with different images and describe them in terms of pin
description of the board. Let’s get started.

Analog Input Pins


There are 12 analog pins added on the board. As per the nature of these pins, they can
utilize any number of values, unlike digital signals that are designed to deal with only two
values: HIGH and LOW. The following figure shows the placement of these analog pins on
the board.

PWM output
we place the board with power jack pointing upward, these pins appear on the right side of the
board. PWM is a process for getting analog results with digital means. We can see these pins in the
figure below.

Serial Communication

Three communication protocols including SPI, UART and I2C are incorporated on the board.
We can see them on the figure below. It is important to note that SPI communication is not
available on the digital I/O pins like other boards instead, it houses in the ICSP header.

Power Source

Mainly, the board operates at 5V while 3.3V is the operating voltage of each pin. The Vin is the input
voltage that ranges between +7 to +12 V. This voltage comes from the external power source. There
are two ground pins on the board. The AREF is an Analogue reference voltage, mainly used for
analog pins.

The IOREF is useful for powering and developing a compatibility between this board and Arduino
Shields. As the shield is connected with this pin, it (shield) wears the I/O voltage provided by the
Board. The Shield using IOREF pin will be compatible with both 3V3 and 5V.

We can see the power source in the figure below.

Programming

The Leonardo can be programmed with the Arduino software (download). Select "Arduino Leonardo
from the Tools > Board menu (according to the microcontroller on the board). For details, we can
see the reference and tutorials. The ATmega32U4 on the Arduino Leonardo comes preburned with
a bootloader that allows us to upload new code to it without the use of an external hardware
programmer. It communicates using the AVR109 protocol. We can also bypass the bootloader and
program the microcontroller through the ICSP (In-Circuit Serial Programming) header using Arduino
ISP or similar; see these instructions for details.

ICSP Programming
ICPS stands for In-Circuit Serial Programming – A feature used for programming Arduino with
another Arduino. ICSP header is added that helps in connecting the board with a computer for
uploading a sketch in case USB port is not available.

 Arduino.cc has introduced its own official software, called Arduino IDE, for programming the
Arduino module. This software supports common operating systems like Windows, Linux or MAC.
Before we download this software, we make sure that required software version is compatible
with the system i.e. if we aim to download App version, we must have Windows 10 installed in
our system as app version is not compatible with Windows 7 or 8.1.
We are ready to use the software as we install it. Some simple LED programs are already available
on the software, giving us the flexibility to start working on the board.
 Arduino IDE comes with a compilation option that allows us to see the code compilation on the
bottom of the screen as we upload the code. It generates hex file of the code which then is
transferred into the board.

 No external burner is required to burn the code inside the module as it comes with a built-in
bootloader. Having said that, if we intend to insert a new controller on the module, we need to
install the bootloader again using IDE software.
The Serial Monitor is added in Arduino Software, that helps us to see the code working in real time
after we verify and upload the code.

Main difference between Arduino Leonardo and Arduino Uno

There is a slight difference between these two boards in terms of controller used, number of digital
pins, PWM pins, and the pins reserved for SPI communication.

 Arduino Uno incorporates ATmega328 while Arduino Leonardo comes with ATmega32U4.
Similarly, Uno has 20 digital I/O pins, out of them 6 are analog input pins and Leonardo has 23
digital I/O pins, out of which 12 are analog input pins.

 There are 7 PWM output pins available on the Leonardo and 6 are added on the Uno board.
Uno comes with SPI protocol on the digital I/O pins while Leonardo contains SPI communication on
the ICSP header pins.
6. Arduino Leonardo Projects and Applications
We can not write off the importance of Arduino Modules if we are developing a project that comes
with a remote connection with automation. Arduino Leonardo comes with a wide range of
applications and incorporates a number of peripherals, setting us free from spending money for
buying and integrating additional components.

Applications

Following are some major applications can be developed using Arduino Leonardo:

 Industrial Automation

 Health and Security Systems

 IR Remote control

 Automatic Pill Dispenser

 Embedded Systems

 Student Projects

 Smart things

 Water Level Meter


 Using an Arduino as an ISP programmer.
Of course the most exciting new feature is direct USB support. That means it can operate as an
actual USB device. It can emulate a computer mouse, keyboard, or both.

The Arduino library has made it really easy to do by creating a two new classes - one for emulating
a mouse, and the other a keyboard.

There are two things we must do before using wer new Leonardo board.

First, we must upgrade wer Arudino IDE to version 1.01. It adds the support needed for this new
board, plus it has a lot of nice new features.

Second, unless we are using Linux, we will need to install USB drivers for the Leonardo.

References
1. http://forum.arduino.cc/index.php?topic=292191.0
2. https://www.arduino.cc/en/Main/Arduino_BoardLeonardo
3. https://www.instructables.com/id/Step-by-Step-Guide-to-the-Arduino-Leonardo/
4. https://www.thingbits.net/products/adafruit-motor-shield-arduino
5. http://elecrab.com/archives/800
6. Le grand livre d'Arduino, Patrick Chantereau et Erik Bartmann, éd. Eyrolles,
2014 (ISBN 978-2212137019)
7. Arduino Workshop: A Hands-On Introduction with 65 Projects, John Boxall,
2013 (ISBN 978-1593274481)
8. Programming Arduino: Getting Started With Sketches, Simon Monk, 2011 (ISBN 978-
0071784221)

View publication stats

You might also like