1c - Slide - Arduino and ATmega328p Architecture

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 27

Architecture of Arduino development

board

www.arduino.cc
What do you need to start working with
Arduino?
1. Arduino board

2. USB cable

3. Computer with USB interface

4. USB driver and Arduino application


(to be downloaded from https://www.arduino.cc/en/software)
What is Arduino?
• The Arduino is a programmable hardware board that runs an 8-bit /16 Mhz
microcontroller with a special bootloader that allows users to upload programs
to the microcontroller.
+ It has digital input pins for input from switches and output to Actuators (LEDS or
electrical motors)
+ It also has analog pins to accept inputs from voltagebased sensors.

• Arduino can be used to develop stand-alone interactive objects or can be


connected to software on your computer.
What is Arduino?
Open Source
• Open Source Hardware
The Arduino system is open source - all hardware (made by Arduino
distributors) has the schematics and PCB layouts available online.
• Open Source Bootloader
The bootloader is what runs on the chip before the program is run. It
boots the chip and executes the program.
• Open Source Development Kit
The development kit - what you use to program an Arduino board - is
also available online. It is free, open-source.
Arduino Terminology
• I/O Board - The I/O Board is the "brain" of the operation (main
microcontroller you program it from your computer).
• Shield - A Shield is a device that plugs into an I/O Board. These extend
the capabilities of the I/O Board.
• Sketch - A Sketch is a program written for the board and shields.
• Sensor - components (Gas, etc.)
• Modules - serial data (GPS module, etc.)
• pin – an input or output connected to something.
• Digital – value is either HIGH or LOW.
• Analog – value ranges, usually from 0-255.
Arduino Types
Many different versions depend
on the number of input/output
pin or processor.

• Uno (number one)


• Leonardo
• Due
• Micro/Nano
• LilyPad
• Esplora
•…
Arduino Uno
The pins are in three groups:

• 6 analog inputs
(can be used as digital outputs).

• 14 digital input/output pins


(of which 6 can be used as PWM outputs).

• Power
Shields
Shields connect to the I/O board to extend it's functionality.
More Shields…
Communication shields - XBee, Ethernet, and Wifi
Modules
Modules send serial data strings to the Arduino.

RFID Module
Sensors and Modules
Shields aren't the only way to extend an Arduino board - you
can hook sensors to it!
Sensors
Photoresistor, infared, force sensitive resistor, Hall effect (varies its output
voltage in response to a magnetic field), Piezo, tilt sensor..
Arduino Uno Board
Overview
Arduino Uno/ATmega328 Technical Specifications
Microcontroller ATmega328
Operating Voltage 5 V
Input Voltage
(recommended) 7-12 V
Input Voltage (limits) 6-20 V
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 (ATmega328) of which 2 KB used by bootloader
SRAM 2 KB (ATmega328)
EEPROM 1 KB (ATmega328)
Clock Speed 16 MH
Components of the Arduino
• ATMega168/328.

• 16MHz crystal/filtering capacitors.

• Onboard power regulators.

• FTDI USB <-> Serial Chip.

• Hardware (Board).
Necessary parts for any circuit
• ATMega168/328.

• The ‘brains’ of the Arduino.

• Program is loaded onto the chip.

• Runs main loop until power is removed.


Timing
• 16Mhz Crystal.

• The ‘heartbeat’ of the ATMega chip.

• Speed of crystal determines chip speed


.
• ATMega series has onboard oscillator.
Power Supply
• 5 Volt and 3.3 volt regulators.
• Filtering capacitors.
• Automatic switching between
external and USB Power.
• Leave it out if you have a
filtered 5 Volt power supply.
FTDI USB Chip
• Allows your Arduino to
communicate with your
computer over a simple
USB link.

• ATmega16u2 replaces
FT232RL for USB-serial
communication / Arduino
Uno R3
Digital or Analog
• Digital – may take two values only: ON or OFF (1 or 0 / binary signal)
• Analog – has many (infinite) values (continuous signal)
• Output pins can provide 40 mA of current
Input voltage to the Arduino board
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 5 volts from the USB connection or other
regulated power source). You can supply voltage through this pin, or, if
supplying voltage via the power jack, access it through this pin. (7v-12v)
• 5V. The regulated power supply used to power
the microcontroller and other components on
the board. This can come either from Vin via
an on-board regulator, or be supplied by USB
or another regulated 5V supply.
• 3V3. A 3.3 volt supply generated by the on-
board FTDI chip. Maximum current draw is 50
mA.
• GND. Ground pins.
Serial Communication
• RX blinks when the Arduino is receiving data.
• TX blinks when the Arduino is transmitting data.
Serial data transfer with Arduino UNO
• Universal asynchronous
receiver/transmitter
(UART)
• Serial Peripheral Interface
(SPI)
• Inter-integrated Circuit
(I2C) or Two-Wire
Interface (TWI)
Serial Communication - UART
• All Arduino boards have at least one serial port (also known as a
UART). It communicates on digital pins 0 (RX) and 1 (TX) as well as
with the computer via USB.
• Used for communication between the Arduino board and a computer
or other devices.
Serial Communication (other)
SPI I2C
Software Serial
• It is possible to have multiple software serial ports (UART)
with speeds up to 115200 bps.
• If using multiple software serial ports, only one can receive
data at a time.

You might also like