Introduction to Arduino
Abdul Alim Shakir
Topics
1. What is Arduino?
2. History of Arduino
3. Advantages
4. Features
5. Microcontroller basics
6. ATmega328P
7. Microcontroller vs Microprocessor
What is Arduino?
Arduino is an open-source electronics prototyping platform based on easy-to-use hardware and software.
Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter message - and
turn it into an output - activating a motor, turning on an LED, publishing something online.
Sending a set of instructions to the microcontroller on the board from a computer is very easy.
Single board microcontroller, intended to make the application of interactive objects or environments more
accessible.
Designed to make the process of using electronics multidisciplinary projects more functional.
History of Arduino
Arduin of Ivrea Hernando Barragan Massimo Banzi Arduino
Advantages
Open source and extensible software
Inexpensive
Portable
Low power consumption
Simple and clear programming environment
USB programming interface
No additional programmer/burner hardware required for programming board.
Friendly community support and documentation.
Features
Microcontroller: ATmega328
Operating Voltage: 5V
Input Voltage (recommended): 7-12V
Input Voltage (limits): 6-20V
Digital I/O Pins: 14 (of which 6 provide PWM output)
Analog Input Pins: 6
DC Current per I/O Pin: 40 mA
DC Current for 3.3V Pin: 50 mA
Flash Memory: 32 KB of which 0.5 KB used by boot loader
SRAM: 2 KB (ATmega328P)
EEPROM: 1 KB (ATmega328P)
Clock Speed: 16 MHz
Figure 1.1 : Arduino Layout and pin configuration
Microcontroller
A Microcontroller is a special purpose computer with
programmable input/output peripherals, memory, system Central Processing
Unit(CPU)
clock and a processor that can be used as an embedded
system. Memory
Microcontrollers are dedicated to one task and run one
specific program. System Clock
Microcontrollers are often low power devices.
Microcontrollers are embedded inside some other device. Peripherals
Microcontrollers are small and not costly.
Fundamental Components
Microcontrollers have multiple digital and analog I/O ports.
of a Microcontroller
Peripherals of a Microcontroller
• Digital I/O : Provides the ability to control and read digital outputs.
• A/D Conversion :The ability to measure an analog voltage.
• D/A Conversion :The ability to output analog voltages.
• Serial Interface The serial interface is used to transfer data between devices within a system
and between systems.
• Timers :Provides the ability to measure durations between events.
• Flash Memory Used to store program code.
Volatile Non-Volatile Timer Module
Processor
Memory Memory
Internal Bus
Digital I/O Analog I/O Serial Interface Interrupt
Module Module Module Controller
External Devices
Figure 1.3 : Basic layout of a microcontroller
ATmega328P
Program Memory Type : Flash
Program Memory Size (KB) : 32
CPU Speed (MIPS/DMIPS) : 20
SRAM (Bytes) : 2,048
Data EEPROM/HEF (Bytes) : 1024
Digital Communication Peripherals: 1-UART, 2-SPI, 1-I2C
Capture/Compare/PWM Peripherals : 1 Input Capture, 1 CCP, 6PWM
8-bit Timers : 2
16-bit Timers : 1
Number of Comparators : 1
Operating Voltage Range (V) : 1.8 to 5.5
Pin Count : 32
Low Power : Yes
Figure 1.2 : ATmega328p Block Diagram
Microcontroller vs Microprocessor
Microcontroller Microprocessor
1. It has RAM, ROM and EEPROM. 1. It has no RAM, ROM or EEPROM.
2. Processing speed is 8MHz to 50 MHz . 2. Processing speed is above 1GHz.
3. Power consumption is low. 3. Power consumption is high.
4. Tasks performed by microcontrollers 4. Tasks performed by microprocessors are software
are limited and generally less complex. development, game development, web development,
documents making etc.
5. Microcontroller is compact. 5. Microprocessor is bulky.
6. It is inexpensive. 6. It is very expensive.
7. It is a heart of embedded system. 7. It is the heart of computer system.
What has already made
with Arduino?