Arduino Structure
Arduino Structure
Arduino Structure
Mechanical Engineering
ME 425
Microcontroller Structure
www.mikroe.com/chapters/view/1
http://www.electronicshub.org/pic-microcontroller-architecture/
Faculty Of Engineering 3
Mechanical Engineering
What is a Microcontroller?
Faculty Of Engineering 4
Mechanical Engineering
What is a Development Board?
A printed circuit board designed
to facilitate work with a particular
microcontroller.
Faculty Of Engineering 6
Mechanical Engineering
The Many Flavors of Arduino:
Cortino (ARM)
Xduino (ARM)
LeafLabs Maple (ARM)
BeagleBoard (Linux)
Wiring Board (Arduino predecessor)
ChipKit Uno32/Max32
Faculty Of Engineering 8
Mechanical Engineering
Arduino Add-ons (Shields):
Faculty Of Engineering 9
Mechanical Engineering
Components of the Arduino:
ATMega168/328
16MHz crystal/filtering
capacitors
Onboard power
regulators
FTDI USB <-> Serial
Chip
Hardware
Faculty Of Engineering 10
Mechanical Engineering
Where to Get an Arduino
Board:
Purchase from online
vendor (available
worldwide)
Sparkfun
Adafruit
DFRobot
Faculty Of Engineering 11
Mechanical Engineering
Schematic
Faculty Of Engineering 12
Mechanical Engineering
Necessary parts for any circuit
ATMega168/328
The brain of the
Arduino
Program is loaded onto
the chip
Runs main loop until
power is removed
Thats it! All other parts
are optional!
Faculty Of Engineering 13
Mechanical Engineering
Optional parts: Timing
16Mhz Crystal
The heartbeat of the
ATMega chip
Speed of crystal
determines chip speed
Possible to
over/underclock
depending on application
ATMega series has
onboard oscillator; less
precise
Faculty Of Engineering 14
Mechanical Engineering
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
Faculty Of Engineering 15
Mechanical Engineering
FTDI USB Chip
Allows your Arduino to
communicate with your
computer over a simple
USB link
Abstraction
Only necessary for
communicating with
USB
Faculty Of Engineering 16
Mechanical Engineering
Hardware
Circuit Board
Headers
USB port
Sockets
All optional, use them
if you need them
Faculty Of Engineering 17
Mechanical Engineering
The Arduino Development Board
Faculty Of Engineering 19
Mechanical Engineering
How to work with Arduino?
Faculty Of Engineering 21
Mechanical Engineering
Phases of Circuit Design
Arduino Approach Stand-alone approach
Idea Idea
Sketch Sketch
Read datasheets Read datasheets
Gather materials Gather materials
Prototype Prototype
Testing Testing
Optional ----------------> Refining
Testing
Release to manufacture
Faculty Of Engineering 22
Mechanical Engineering
Getting Started
Check out: http://arduino.cc/en/Guide/HomePage
www.todbot.com/blog/bionicarduino
Faculty Of Engineering 24
Mechanical Engineering
Elements of the Arduino IDE:
Text editor
syntax and keyword
Coloring
Automatic indentation
Programming shortcuts
Compiler
Hardware Interface
Uploading programs
Communicating with
Arduino via USB
Text editor
syntax and keyword
Coloring
Automatic indentation
Programming shortcuts
Compiler
Hardware Interface
Uploading programs
Communicating with
Arduino via USB
Faculty Of Engineering 27
Mechanical Engineering
Status Messages:
www.todbot.com/blog/bionicarduino
Faculty Of Engineering 28
Mechanical Engineering
Using the Arduino IDE:
Faculty Of Engineering 29
Mechanical Engineering
Arduino Reference:
Faculty Of Engineering 30
Mechanical Engineering
Arduino Sketch Structure:
Faculty Of Engineering 31
Mechanical Engineering
Uploading and Running the
Blink Sketch:
http://www.wikipedia.org/ Notes:
Resistor is needed to limit current
Resistor and LED may be interchanged (but
polarity of LED is important)
Pin 13 is special: has built-in resistor and LED
Change program and upload
Faculty Of Engineering 34
Mechanical Engineering
Creating and Saving a Sketch:
Using the Breadboard
Faculty Of Engineering 35
Mechanical Engineering
Creating and Saving a Sketch:
Now connect your own LED
Faculty Of Engineering 36
Mechanical Engineering
Assignment # 2:
Faculty Of Engineering 37
Mechanical Engineering