HERE explores the working principle and applications of an Arduino
board. This also explores on how it can be used as a tool for study and
research works. Arduino board can provide a quick tool in development
of VLSI test bench especially of sensors. Main advantages are fast
processing and easy interface. Today, with increasing number of people
using open source software and hardware devices day after day,
technology is forming a new dimension by making complicated things
look easier and interesting. These open sources provide free or
virtually low costs, highly reliable and affordable technology.
1. INTRODUCTION
Arduino is an open source microcontroller which can be easily
programmed, erased and reprogrammed at any instant of time.
inexpensive and easy way for hobbyists,
using sensors and actuators.
Based on simple micro controller boards,
it is an open source computing platform
that is used for constructing and programming electronic devices.
It is also capable of acting as a mini computer just like other
microcontrollers by taking inputs and controlling the outputs for a
variety of electronics devices.
It is also capable of receiving and sending information over the internet
with the help of various Arduino shields,
Arduino uses a hardware known as the Arduino development board and
software for developing the code known as the Arduino IDE (Integrated
Development Environment).
Built up with the 8-bit Atmel AVR microcontroller's that are
manufactured by Atmel or a 32-bit Atmel ARM, these microcontrollers
can be programmed easily using the C or C++ language in the Arduino
IDE.
role of Arduino for their own projects.
This development board can also be used to burn (upload) a new code
to the board by simply using a USB cable to upload.
The Arduino IDE provides a simplified integrated platform which can
run on regular personal computers and allows users to write programs
for Arduino using C or C++.
2. NEED FOR ARDUINO
1. Inexpensive
2. Cross-platform (Windows, Macintosh OSX, and
Linux )
3. Simple, clear programming environment (easy-to-
use for beginners, flexible enough for advanced
users)
4. Open source and extensible software
5. Open source and extensible hardware
Why is there a need to use Arduino in specific? or
What makes it different from others?
1) Active User Community: A group of people using
a similar product can hold posted message
conversations and share their experiences or solve
the problems of the other users in the communities
with their own experiences
2) Growth of Arduino: Arduino was developed with
intent to provide an economical and trouble-free
way for hobbyists, students and professionals to
build devices that interact with their situation using
sensors and actuators. This makes it perfect for
newcomers to get started quickly
3) Inexpensive Hardware: Since Arduino is an open
source platform the software is not purchased and
only the cost of buying the board or its parts is
incurred, thus making it very cheap. The hardware
designs are also available online for free from its
official website
4) Arduino Board as a Programmer: To make
Arduino board function easy and also making it
available everywhere these boards come with a
USB cable for power requirements as well as
functioning as a programmer
5) Multi-platform Environment: The Arduino IDE
is capable of running on a number of platforms
including Microsoft, Linux and Mac OS X making
the user community even larger
3. TYPE OF ARDUINO BOARDS
Arduino boards are available with many different
types of built-in modules in it. Boards such as
Arduino BT come with a built-in Bluetooth module,
for wireless communication.
These built-in modules can also be available
separately which can then be interfaced (mounted) to
it. These modules are known as Shield.
Some of the most commonly used Shields are:
Arduino Ethernet shield: It that allows an
Arduino board to connect to the internet using
the Ethernet library and to read and write an SD
card using the SD library.
Arduino Wireless shield: It allows your
Arduino board to communicate wirelessly using
Zigbee.
Arduino Motor Driver Shield: It allows your
Arduino boards to interface with driver of a
motor etc.
Fig. 1.Arduino Shields – Ethernet, Wireless and
Motor Driver.
Here is a list of the different types of Arduino Boards
available along with its microcontroller type, crystal
frequency and availabilities of auto reset facility:
Table 1. Heading
and text fonts
Arduino Type Microcontro Clock Speed
ller
Arduino Uno ATmega328 16 MHz with auto-
reset
Arduino Duemilanove / ATmega328 16 MHz with auto-
ATmega328 reset
Arduino Nano ATmega328 16 MHz with auto-
reset
Arduino Mega 2560 or ATmega256 16 MHz with auto-
Mega ADK 0 reset
Arduino Leonardo ATmega32u 16 MHz with auto-
4 reset
Arduino Mini w/ ATmega328 16 MHz with auto-
ATmega328 reset
Arduino Ethernet Equivalent to Arduino UNO
with an Ethernet
shield
Arduino Fio. ATmega328 8 MHz with auto-
reset
Arduino BT w/ ATmega328 16 MHz with auto-
ATmega328 reset
LilyPad Arduino w/ ATmega328 8 MHz (3.3V) with
ATmega328 auto-reset
Arduino Pro or Pro Mini ATmega328 16 MHz with auto-
reset
Arduino NG ATmega8 16 MHz with auto-
reset
4. ELEMENTS OF ARDUINO BOARDS
Elements of an Arduino Board can be done into two
categories:
Hardware
Software
4.1. Hardware
The Arduino Development Board consists of many
components that together makes it work. Here are
some of those main component blocks that help in its
functioning:
Microcontroller: This is the heart of the
development board, which works as a mini
computer and can receive as well as send
information or command to the peripheral devices
connected to it. The microcontroller used differs
from board to board; it also has its own various
specifications.
External Power Supply: This power supply is
used to power the Arduino development board with
a regulated voltage ranging from 9 – 12 volts.
USB plug: This plug is a very important port in
this board. It is used to upload (burn) a program to
the microcontroller using a USB cable. It also has a
regulated power of 5V which also powers the
Arduino board in cases when the External Power
Supply is absent.
Internal Programmer: The developed software
code can be uploaded to the microcontroller via
USB port, without an external programmer.
Reset button: This button is present on the board
and can be used to resets the Arduino
microcontroller.
Analog Pins: There are some analog input pins
ranging from A0 – A7 (typical). These pins are
used for the analog input / output. The no. of
analog pins also varies from board to board.
Digital I/O Pins: There are some digital input pins
also ranging from 2 to 16 (typical). These pins are
used for the digital input / output. The no. of these
digital pins also varies from board to board.
Power and GND Pins: There are pins on the
development board that provide 3.3, 5 volts and
ground through them
Fig. 2.A labled diagram of an Arduino Board and
an IDE.
4.2. Software
The program code written for Arduino is known as a
sketch. The software used for developing such
sketches for an Arduino is commonly known as the
Arduino IDE. This IDE contains the following parts
in it:
Text editor: This is where the simplified code can
be written using a simplified version of C++
programming language.
Message area: It displays error and also gives a
feedback on saving and exporting the code.
Text: The console displays text output by the
Arduino environment including complete error
messages and other information
Console Toolbar: This toolbar contains various
buttons like Verify, Upload, New, Open, Save and
Serial Monitor. On the bottom right hand corner of
the window there displays the Development Board
and the Serial Port in use.
The Arduino Integrated Development
Environment - or Arduino Software (IDE) - contains a
text editor for writing code, a message area, a text
console, a toolbar with buttons for common functions
and a series of menus.\
THE TOOLBAR
Upload
The Upload button compiles and runs
our code written on the screen. It further
uploads the code to the connected board. Before uploading the sketch,
we need to make sure that the correct board and ports are selected.
We also need a USB connection to connect the board and the computer.
As soon as the uploading is done successfully, we can notice the blink of
the Tx and Rx LED.
Open
The Open button is used to open the already created file. The selected
file will be opened in the current window.
Save
The save button is used to save the current sketch or code.
New
It is used to create a new sketch or opens a new window.
Verify
The Verify button is used to check the compilation error of the sketch or
the written code.
Serial Monitor
The serial monitor button is present on the right corner of the toolbar. It
opens the serial monitor.
When we connect the serial monitor, the board will reset on the operating system
Windows, Linux, and Mac OS X. If we want to process the control characters in our
sketch, we need to use an external terminal program. The terminal program should be
connected to the COM port, which will be assigned when we connect the board to the
computer.
MENU-BAR
o Sketch MENU
When we click on the Sketch button on the Menu bar, a drop-down list
appears. It is shown below:
Let's discuss each option in detail.
Verify/Compile
It will check for the errors in the code while compiling.
The memory in the console area is also reported by
the IDE.
Upload
The Upload button is used to configure the code to the
specified board through the port.
Upload Using Programmer
It is used to override the Bootloader that is present on
the board. We can utilize the full capacity of the Flash
memory using the 'Upload Using Programmer'
option. To implement this, we need to restore the
Bootloader using the Tools-> Burn
Bootloader option to upload it to the USB serial port.
Export compiled Binary
It allows saving a .hex file and can be kept archived.
Using other tools, .hex file can also be sent to the
board.
Show Sketch Folder
It opens the folder of the current code written or
sketch.
Include Library
Include Library includes various Arduino libraries. The
libraries are inserted into our code at the beginning of
the code starting with the #. We can also import the
libraries from .zip file.
Add File...
The Add File... button is used to add the created file in
a new tab on the existing file.
For example, let's add 'Blink' file to the 'Javatpoint'
file. The tab will now appear as:
We can also delete the corresponding file from the tab by clicking on the small
triangle -> Delete option.
Tools MENU
When we click on the Tools button on the Menu bar, a drop-down list
appears. It is shown below:
Let's discuss each option in detail.
Auto Format
The Auto Format button is used to format the written code. For example,
lining the open and closed curly brackets in the code.
Archive Sketch
The copy of the current sketch or code is archived in the .zip format. The
directory of the archived is same as the sketch.
Fix Encoding and Reload
This button is used to fix the inconsistency between the operating
system char maps and editor char map encoding.
Manage Libraries...
It shows the updated list of all the installed libraries. We can also use
this option to install a new library into the Arduino IDE.
Serial Monitor
It allows the exchange of data with the connected board on the port.
Serial Plotter
The Serial Plotter button is used to display the serial data in a plot. It
comes preinstalled in the Arduino IDE.
WiFi101/WiFiNINA Firmware Updater
It is used to check and update the Wi-Fi Firmware of the connected
board.
Board
We are required to select the board from the list of boards. The selected
board must be similar to the board connected to the computer.
Processor
It displays the processor according to the selected board. It refreshes
every time during the selection of the board.
Port
It consists of the virtual and real serial devices present on our machine.
Get Board Info
It gives the information about the selected board. We need to select the
appropriate port before getting information about the board.
Programmer
We need to select the hardware programmer while programming the
board. It is required when we are not using the onboard USB serial
connection. It is also required during the burning of the Bootloader.
Burn Bootloader
The Bootloader is present on the board onto the microcontroller. The
option is useful when we have purchased the microcontroller without
the bootloader. Before burning the bootloader, we need to make sure
about the correct selected board and port.
4.3. Features of Arduino IDE
The project file or the sketches for a project are saved
with the file extension .ino
Features such as cut / copy / paste are supported in
this IDE.
There also is a facility for finding a particular word
and replacing it with another by pressing the Ctrl +
F buttons on the keyboard
The most basic part or the skeleton of all Arduino code will
have two functions
5. PROGRAMMING BASICS
Now we’ll discuss about the programming techniques
of Arduino sketch in the Arduino IDE. There are two
main parts every sketch will always have, they are:
void setup ()
void loop ()
1) void setup():
This is the first routine that begins when the Arduino
starts functioning. This function is executed only once
throughout the entire program functioning.
The setup function contains the initialization of every
pin we intend use in our project for input or output.
Here is an example of how it should be written:
Here the pin is the no. of the pin that is to be defined.
INPUT / OUPUT correspond to the mode in which the
pin is to be used.
It also contains the initialization of the Serial Monitor.
A serial monitor is used to know the data that are
being sent serially to any peripheral device.
Before using any variables for programming it is
necessary to define them above the function “void
setup()”
2) void loop():
This function is the next important function in the
Sketch. It consists of that part of the code that needs to
be continuously executed unlike the part of the code
written in the setup function.
An example of a void loop is as follows:
Here digitalWrite is a function that writes a high or a
low value to a digital pin. If the pin has been
configured as an OUTPUT with pin Mode(), its
voltage will be set to the corresponding value: 5V (or
3.3V on 3.3V boards) for HIGH, 0V (ground) for
LOW.
Similarly if there is a need for delay in the sketch then
there is another function that creates a delay in the
execution of the code
This creates a delay in the execution of the program
for the time period specified (in milliseconds). Using
the above two function lets create a sketch for
blinking a led.
Fig. 3.Arduino Shields – Ethernet, Wireless and
Motor Driver.
6. APPLICATIONS
Arduino has endless applications as it has been used
extensively for creating projects by hobbyist,
amateurs and professional in various fields of
engineering. Here are some of those amazing projects
that have been developed on an Arduino platform:
1. Arduino Satellite (ArduSat)
ArduSat is an open source satellite completely based
on Arduino to create a stage for space discoveries.
Built by Spire previously known as NanoSatisfi,
ArduSat collects various types of information’s from
the space environment, with the help of numerous
sensors that includes temperature sensors, pressure
sensors, cameras, GPS, spectrometer, and
magnetometer etc with its programmable Arduino
processors.
This platform also allows common public to
experiment their projects in space. ArduSat can be
used for photography from space, making a
spectrograph of the sun, detecting high energy
radiation, compiling temperature readings and
observing meteors etc.
Fig. 4. Actual model of an Ardusat
Fig. 5. Ardusat and its major components.[7]
2. ArduPilot (ArduPilotMega - APM)
ArduPilot is an unmanned aerial vehicle (UAV) based
on the open source platform and built using Aruino
Mega which is able to control independent
multicopters, fixed-wing aircraft, traditional
helicopters and ground rovers.
It was created by the DIY Drones community in 2007
and was also an award winning platform of 2012.
3. Lilypad Arduino
Just like the Google wearable’s, Lilypad Arduino is a
wearable version of Arduino developed and designed
by Leah Buechley and SparkFun Electronics with the
aim of building interactive electronic textiles or e-
textiles.
Fig. 6.Lily Arduino and so add-on components that can
be sewn together and a Lilypad Arduino pillow.
These designs involve use of a number of modules
sewn on the cloth with conductive thread to give it the
required electrical connections. The microcontroller
can be programmed just like the normal Arduino
boards using the usb-to-serial connection. This is a
perfect illustration of a user community determined
project with the business version of the kit designed
by Leah and SparkFun Electronics.
This is an example of such designs, here is a jacket
with turn signals that will let people know where
you're going when on a bike.
Fig. 7. Examples of jackets with tum signals
powered by Lilypad Arduino sewn onto them
CONCLUSIONS
we have studied the working principle of Arduino, its
hardware / software features and its applications as to
where it is currently being used and where all it can
be used. We have also learnt how to write sketches
for Arduino in its own IDE (software). Developing
new ideas with Arduino is endless, we have learnt to
build new devices of our own to create and
implement innovative things. From wearable fashion
to space research, the possibilities of using an
Arduino to learn and develop new ideas is infinite.
Though it does have its own limitations, it is a great
tool that can be used in learning.