SlideShare a Scribd company logo
Arduino
Open Sourcing Imagination
myduino.com 1
Sypnopsis
 This workshop intends to expose participants to a much
simpler approach to microcontroller based on practical
problem-based approach.
 Enable participants to gain real-world experience to
monitor and control engineering processes and develop
competent skills.
 It has been specially designed for beginners and
educators
myduino.com 2
Microcontroller
 Microcontrollers are dedicated to
one task and run one specific
program.
 Examples of tasks could be:
i. Received from inputs via ports
(read from external hardware)
ii. Stored data in file registers &
arithmetic operations (added,
subtracted, logic gates)
iii. Sent out data (control external
hardware)
 Processor, Storage and RAM all in
one tiny package
myduino.com 3
myduino.com 4
With & Without A Microcontroller
Internal Architecture
Program
Memory Register
RAM EEPROM PORTS
Program Memory: Where all commands, written by users are stored
Register: To determine what action the uC takes in reference to the
program commands
RAM: Temporarily store data of any action
EEPROM: The data is retain even after power is switched-off
Ports: Bidirectional pins of Input and Output
myduino.com 5
myduino.com 6
Arduino Uno Specifications
 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 (ATmega328) of which 0.5
KB used by bootloader
 SRAM: 2 KB (ATmega328)
 EEPROM: 1 KB (ATmega328)
 Clock Speed: 16 MHz
myduino.com 7
Arduino Terminology
 “sketch” – a program you write to run on an
Arduino board
 “pin” – an input or output connected to
something. e.g. output to an LED, input from
a knob.
 Analog signals – directly measurable
quantities in terms of some other quantity
 Digital Signals – have only two states. For
digital computers, we refer to binary states, 0
and 1. “1” can be on, “0” can be off
myduino.com 8
Workshop Summary
 Introduction to Arduino
 Setting up your Arduino Environment
 First Arduino sketch
 Making LEDs glow and blink
 How to read buttons/switches
 Analog Signals
 Serial Communication
 Digital Thermometer
myduino.com 9
Participant Manifest
 Thumb drive with notes, arduino software for
Windows and source code (“sketches”) used
in class
 Arduino Starter Kit:
Arduino Uno Tactile push button
Half size breadboard Liquid Crystal Display
Jumper wires Piezo Buzzer
LEDs USB Cable
Resistors Temperature Sensor
Potentiometer
myduino.com 10
Breadboard
 A breadboard (or protoboard)
is a construction base for
prototyping of electronics
 Wires and components are
simply pushed into the holes to
form a completed circuit and
power can be applied.
myduino.com 11
Components: LED
 LED (Light Emitting Diode)
 What it Does: Emits light
when a small current is passed
through it.
 Leads: 2 (one longer, this one
connects to positive)
 Things to watch out for: Will
only work in one direction
 Looks like a mini light bulb. -
Requires a current limiting
resistor
myduino.com 12
Resistors
 What it Does: Restricts
the amount of current
that can flow through a
circuit.
 Leads: 2
 Things to watch out
for: Easy to grab the
wrong value
 Cylinder with wires
extending from either
end. The value is
displayed using a color
myduino.com 13
Potentiometer
 What it Does: Produces a
variable resistance dependant
on the angular position of the
shaft.
 Leads: 3
 Things to watch out for:
 Identifying: - Accidentally
buying logarithmic scale.
 They can be packaged in
many different form factors,
look for a dial to identify.
myduino.com 14
Pushbutton
 What it Does: Completes a
circuit when it is pressed. 4
 Leads: 4
 A little square with leads out
the bottom and a button on the
top.
myduino.com 15
Piezo Element
 What it Does: A pulse of
current will cause it to click. A
stream of pulses will cause it
to emit a tone.
 Leads: 2
 Things to watch out for:
Difficult to misuse.
 In this kit it comes in a little
black barrel, but sometimes
they are just a gold disc
myduino.com 16
Temperature Sensor (LM35)
 The LM35 series are precision integrated-circuit
temperature sensors, whose output voltage is linearly
proportional to the Celsius (Centigrade) temperature.
 The LM35 is rated to operate over a −55° to +150°C
temperature range, and has a linear + 10.0 mV/°C scale
factor.
myduino.com 17
Liquid Crystal Display
 An LCD has the advantage of
displaying alpha-numeric
characters and even user-
defined graphics.
 It also offers the ability for
lower power consumption,
making it ideal for battery
operated systems.
 It comes in a wide variety of
shapes and sizes with line
lengths of 8, 16, 20, 24, 32 and
40 characters, in one, two and
four line versions.
myduino.com 18
What is Electricity
 A fan contains a small battery,
a couple of wires, a switch and
an electric motor.
 If you turn the switch on, the
motor will start to spin
 Battery is both a water
reservoir and a pump, the
switch is a tap, and the motor
is one of those wheels that you
see in watermills.
 When you open the tap, water
flows from the pump and
pushes the wheel into motion.
myduino.com 19
The hydraulic system
 Increasing the size of the pipes
allows a greater flow of water
to go through them, effectively
reduced the pipes' resistance
to the flow of water.
 This approach works up to a
certain point, at which the
wheel won't spin any faster,
because the pressure of the
water is not strong enough.
 When we reach this point, we
need the pump to be stronger.
myduino.com 20
Voltage, Current & Resistance
 So when you read that a battery's voltage is 9 V, think of this voltage
like the water pressure that can potentially be produced by this little
"pump".
 The flow rate of water relates to current, and is measured in
amperes.
 Finally, the resistance opposing the flow of current over any path
that it travels is called resistance, and is measured in ohms.
 Relationship: A higher voltage (pressure) lets you spin a wheel
faster; a higher flow rate (current) lets you spin a larger wheel.
 Ohms Law, V = IR
myduino.com 21
myduino.com 22
myduino.com 23
myduino.com 24
 Breadboards have small holes for jumper wires and
components to be plugged into.
Construct Circuit 1
myduino.com 25
Construct Circuit 2
myduino.com 26
myduino.com 27
Select Board & Com Port
myduino.com 28
Blinking an LED
digitalWrite
 The Arduino board comes with
an LED preinstalled. It's
marked "L". You can also add
your own LED
 Tell Arduino what to do.
 This is done through code, that
is, a list of instructions that we
give the microcontroller to
make it do what we want.
 Blink an LED is the Hello
World of physical computing
myduino.com 29
myduino.com 30
myduino.com 31
Status Bar
myduino.com 32
myduino.com 33
Built-in Examples
myduino.com 34
myduino.com 35
Push Button – digitalRead
myduino.com 36
Pulse Width Modulation (PWM)
 If you blink the LED fast
enough, you don't see it blink
any more, but you can change
its brightness by changing the
ratio between the on time and
the off time.
 This technique also works with
devices other than an LED.
For example, you can change
the speed of a motor in the
same way
 analogWrite(9,128) will set the
brightness of an LED
connected to pin 9 to 50%.
myduino.com 38
myduino.com 39
Arduino PWM
8 Bits
Data Vout
x 0.0196
0
To
255
0
To
5V
PWM Output (Vout) = Data
5V 255
PWM Output (Vout) = Data x 5 V
255
= Data x 0.0196
Ex: If Data = 128; Vout = 128 x 0.0196 = 2.5088 V
analogWrite (PWM_pin, 128); // Will give an output of 2.5088 V
myduino.com 40
Analogue Input
 This is the difference
between an on/off
sensor (which tells us
whether something is
there) and an analogue
sensor, whose value
continuously changes.
 By using the
analogRead() function,
we can read the voltage
applied to one of the
pins. This function
returns a number
between 0 and 1023,
which represents
voltages between 0 and
5 volts
myduino.com 41
myduino.com 42
Number of iterations (steps) for an ADC is
calculated as follows:
2N
= Number of steps.
Where N corresponds to the number of bits
Ex: 2 bits, 22
= 4
Resolution = Voltage Range = 5V = 1.25
No of steps 4
Vin Dout
0 – 1.25 0
1.25 – 2.5 1
2.5 – 3.75 2
3.75 - 5 3
Arduino ADC Calculations
 10 bit ADC, 210
= 1024 steps
 The resolution of an ADC is calculated as follows:
Resolution = Voltage Range = 5V = 0.00488 V
No of steps 1024
 The output of the ADC is calculated as follows:
ADC Output (dout) = Vin = 3.3 = 676
Resolution 0.00488
myduino.com 43
ADC Output (dout) = Vin = 3.3 = 676
Resolution 0.00488
myduino.com 44
ADC Arduino
10 bits
vin dout
÷ 0.00488
x 0.00488
Vin = dout x Resolution = 676 x 0.00488 = 3.3
myduino.com 45
Producing Variable Voltage
Temperature Sensor (LM35)
 The LM35 series are precision integrated-circuit
temperature sensors, whose output voltage is linearly
proportional to the Celsius (Centigrade) temperature.
 The LM35 is rated to operate over a −55° to +150°C
temperature range, and has a linear + 10.0 mV/°C scale
factor.
myduino.com 46
myduino.com 47
Liquid Crystal Display
 An LCD has the advantage of
displaying alpha-numeric
characters and even user-
defined graphics.
 It also offers the ability for
lower power consumption,
making it ideal for battery
operated systems.
 It comes in a wide variety of
shapes and sizes with line
lengths of 8, 16, 20, 24, 32 and
40 characters, in one, two and
four line versions.
myduino.com 48
myduino.com 49
myduino.com 50
Connecting your LCD (Backlight)
myduino.com 51
Connecting your Power & Contrast
myduino.com 52
Connecting your Bus Wiring
myduino.com 53
LCD 14 13 12 11 10 9 8 7 6 5 4 3 2 1
7 6 5 4 3 GND 2 POT 5V GND
myduino.com 54
Reconnecting your LM35
Arduino Library
 A library is a big collection of related procedures.
 If you, say, want to control a motor, you may want
to find a Motor Control Library: a collection of
procedures that have already been written for you
that you can use without having to do the dirty
work of learning the nuances of motors.
 One of the best features of the Arduino project is
the ability to add on pre-crafted libraries that add
hardware support. There's tons of them, and you
can pick and choose which to install.
Arduino Library
 A library is a folder with some files in it, the files will end
in .cpp (C++ code file) and .h (C++ header file).
 Two optional files are keywords.txt (this is a hints file to
tell the Arduino IDE how to colorize your sketch and
examples folder, which may have some handy test-
sketches.
How to Install Library
 Download your desired library
(normally in a compressed zip file)
 Find the zip file on your local computer
(wherever downloaded files end up).
Under Windows, you should be able to
double click on the file to open it up.
Older windows, winrar or winzip will
pop-up.
 Copy the file and paste in inside the
libraries folder in your Arduino
directory.
Arduino Shield
myduino.com 58
Arduino Tracker
59
GOOD SITES:
1. myduino.com
2. http://www.facebook.com/groups/arduinomalaysia/?
ref=ts&fref=ts
3. http://tronixstuff.wordpress.com/
4. http://bildr.org/
5. http://www.instructables.com
6. http://www.jeremyblum.com/category/arduino-tutorials/
7. http://letsmakerobots.com/start
8. http://hackaday.com
9. http://playground.arduino.cc/

More Related Content

What's hot (20)

Introduction to arduino!
Introduction to arduino!Introduction to arduino!
Introduction to arduino!
Makers of India
 
DHT11 Digital Temperature and Humidity Sensor
DHT11 Digital Temperature and Humidity SensorDHT11 Digital Temperature and Humidity Sensor
DHT11 Digital Temperature and Humidity Sensor
Raghav Shetty
 
Arduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIYArduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIY
Vishnu
 
Arduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic ArduinoArduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic Arduino
Vishnu
 
03 analogue anrduino fundamentals
03   analogue anrduino fundamentals03   analogue anrduino fundamentals
03 analogue anrduino fundamentals
Wingston
 
Arduino by yogesh t s'
Arduino by yogesh t s'Arduino by yogesh t s'
Arduino by yogesh t s'
tsyogesh46
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
baabtra.com - No. 1 supplier of quality freshers
 
Advanced view arduino projects list use arduino for projects (3)
Advanced view arduino projects list  use arduino for projects (3)Advanced view arduino projects list  use arduino for projects (3)
Advanced view arduino projects list use arduino for projects (3)
WiseNaeem
 
Lab2ppt
Lab2pptLab2ppt
Lab2ppt
Zhentao Xu
 
Introduction to Arduino & Robotics
Introduction to Arduino & Robotics Introduction to Arduino & Robotics
Introduction to Arduino & Robotics
Zubayer Al Billal Khan
 
02 General Purpose Input - Output on the Arduino
02   General Purpose Input -  Output on the Arduino02   General Purpose Input -  Output on the Arduino
02 General Purpose Input - Output on the Arduino
Wingston
 
Fading leds via pwm
Fading leds via pwmFading leds via pwm
Fading leds via pwm
HIET
 
Arduino slides
Arduino slidesArduino slides
Arduino slides
sdcharle
 
Lecture6
Lecture6Lecture6
Lecture6
Mahmut Yildiz
 
Getting Started With Arduino How To Build A Twitter Monitoring Alertuino
Getting Started With Arduino   How To Build A Twitter Monitoring AlertuinoGetting Started With Arduino   How To Build A Twitter Monitoring Alertuino
Getting Started With Arduino How To Build A Twitter Monitoring Alertuino
Adrian McEwen
 
Porte à puce - Smart Safety Door based on Arduino UNO R3
Porte à puce - Smart Safety Door based on Arduino UNO R3Porte à puce - Smart Safety Door based on Arduino UNO R3
Porte à puce - Smart Safety Door based on Arduino UNO R3
Meifani Sumadijaya
 
Monitoring temperature rumah dengan display lcd dan recording
Monitoring temperature rumah dengan display lcd dan recordingMonitoring temperature rumah dengan display lcd dan recording
Monitoring temperature rumah dengan display lcd dan recording
Yuda Wardiana
 
Porte à puce - Automatic Door based on Arduino UNO R3
Porte à puce - Automatic Door based on Arduino UNO R3Porte à puce - Automatic Door based on Arduino UNO R3
Porte à puce - Automatic Door based on Arduino UNO R3
Meifani Sumadijaya
 
ARDUINO AND ITS PIN CONFIGURATION
 ARDUINO AND ITS PIN  CONFIGURATION ARDUINO AND ITS PIN  CONFIGURATION
ARDUINO AND ITS PIN CONFIGURATION
soma saikiran
 
Basic Sensors
Basic Sensors Basic Sensors
Basic Sensors
creatjet3d labs
 
Introduction to arduino!
Introduction to arduino!Introduction to arduino!
Introduction to arduino!
Makers of India
 
DHT11 Digital Temperature and Humidity Sensor
DHT11 Digital Temperature and Humidity SensorDHT11 Digital Temperature and Humidity Sensor
DHT11 Digital Temperature and Humidity Sensor
Raghav Shetty
 
Arduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIYArduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIY
Vishnu
 
Arduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic ArduinoArduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic Arduino
Vishnu
 
03 analogue anrduino fundamentals
03   analogue anrduino fundamentals03   analogue anrduino fundamentals
03 analogue anrduino fundamentals
Wingston
 
Arduino by yogesh t s'
Arduino by yogesh t s'Arduino by yogesh t s'
Arduino by yogesh t s'
tsyogesh46
 
Advanced view arduino projects list use arduino for projects (3)
Advanced view arduino projects list  use arduino for projects (3)Advanced view arduino projects list  use arduino for projects (3)
Advanced view arduino projects list use arduino for projects (3)
WiseNaeem
 
02 General Purpose Input - Output on the Arduino
02   General Purpose Input -  Output on the Arduino02   General Purpose Input -  Output on the Arduino
02 General Purpose Input - Output on the Arduino
Wingston
 
Fading leds via pwm
Fading leds via pwmFading leds via pwm
Fading leds via pwm
HIET
 
Arduino slides
Arduino slidesArduino slides
Arduino slides
sdcharle
 
Getting Started With Arduino How To Build A Twitter Monitoring Alertuino
Getting Started With Arduino   How To Build A Twitter Monitoring AlertuinoGetting Started With Arduino   How To Build A Twitter Monitoring Alertuino
Getting Started With Arduino How To Build A Twitter Monitoring Alertuino
Adrian McEwen
 
Porte à puce - Smart Safety Door based on Arduino UNO R3
Porte à puce - Smart Safety Door based on Arduino UNO R3Porte à puce - Smart Safety Door based on Arduino UNO R3
Porte à puce - Smart Safety Door based on Arduino UNO R3
Meifani Sumadijaya
 
Monitoring temperature rumah dengan display lcd dan recording
Monitoring temperature rumah dengan display lcd dan recordingMonitoring temperature rumah dengan display lcd dan recording
Monitoring temperature rumah dengan display lcd dan recording
Yuda Wardiana
 
Porte à puce - Automatic Door based on Arduino UNO R3
Porte à puce - Automatic Door based on Arduino UNO R3Porte à puce - Automatic Door based on Arduino UNO R3
Porte à puce - Automatic Door based on Arduino UNO R3
Meifani Sumadijaya
 
ARDUINO AND ITS PIN CONFIGURATION
 ARDUINO AND ITS PIN  CONFIGURATION ARDUINO AND ITS PIN  CONFIGURATION
ARDUINO AND ITS PIN CONFIGURATION
soma saikiran
 

Similar to Notes arduino workshop_15 (20)

Arduino Workshop (3).pptx
Arduino Workshop (3).pptxArduino Workshop (3).pptx
Arduino Workshop (3).pptx
HebaEng
 
Ardui no
Ardui no Ardui no
Ardui no
Amol Sakhalkar
 
arduinoworkshop-160204051621.pdf
arduinoworkshop-160204051621.pdfarduinoworkshop-160204051621.pdf
arduinoworkshop-160204051621.pdf
AbdErrezakChahoub
 
ARDUINO PROJECTS BOOK
ARDUINO PROJECTS BOOKARDUINO PROJECTS BOOK
ARDUINO PROJECTS BOOK
Monique Carr
 
Arduino Comic-Jody Culkin-2011
Arduino Comic-Jody Culkin-2011Arduino Comic-Jody Culkin-2011
Arduino Comic-Jody Culkin-2011
ΚΔΑΠ Δήμου Θέρμης
 
Arduino comic v0004
Arduino comic v0004Arduino comic v0004
Arduino comic v0004
DO!MAKERS
 
Arduino Introduction Guide 1
Arduino Introduction Guide 1Arduino Introduction Guide 1
Arduino Introduction Guide 1
elketeaches
 
Designers, please mind the gap! Let's get started with Arduino
Designers, please mind the gap! Let's get started with ArduinoDesigners, please mind the gap! Let's get started with Arduino
Designers, please mind the gap! Let's get started with Arduino
Fahed Al Riachi
 
Arduino Workshop Slides
Arduino Workshop SlidesArduino Workshop Slides
Arduino Workshop Slides
mkarlin14
 
Arduino: Libros de proyectos para Arduino
Arduino: Libros de proyectos para Arduino Arduino: Libros de proyectos para Arduino
Arduino: Libros de proyectos para Arduino
SANTIAGO PABLO ALBERTO
 
Making things sense - Day 1 (May 2011)
Making things sense - Day 1 (May 2011)Making things sense - Day 1 (May 2011)
Making things sense - Day 1 (May 2011)
markumoto
 
embedded_in_Arduino_with_basic_embedded.pptx
embedded_in_Arduino_with_basic_embedded.pptxembedded_in_Arduino_with_basic_embedded.pptx
embedded_in_Arduino_with_basic_embedded.pptx
acloudinfo2023
 
Electronz_Introduction.pptx
Electronz_Introduction.pptxElectronz_Introduction.pptx
Electronz_Introduction.pptx
Mokete5
 
Arduino PAPER ABOUT INTRODUCTION
Arduino PAPER ABOUT INTRODUCTION  Arduino PAPER ABOUT INTRODUCTION
Arduino PAPER ABOUT INTRODUCTION
NAGASAI547
 
Intro_to_Arduino_-_v30.pptx
Intro_to_Arduino_-_v30.pptxIntro_to_Arduino_-_v30.pptx
Intro_to_Arduino_-_v30.pptx
CephasMpandikaKalemb
 
Electronics_Tutorial_2022_Slide543404210s.pdf
Electronics_Tutorial_2022_Slide543404210s.pdfElectronics_Tutorial_2022_Slide543404210s.pdf
Electronics_Tutorial_2022_Slide543404210s.pdf
vikknaguem
 
02 Sensors and Actuators Understand .pdf
02 Sensors and Actuators Understand .pdf02 Sensors and Actuators Understand .pdf
02 Sensors and Actuators Understand .pdf
engsharaf2025
 
Microcontroller Programming & Hardware Introduction
Microcontroller Programming & Hardware IntroductionMicrocontroller Programming & Hardware Introduction
Microcontroller Programming & Hardware Introduction
Joseph Sanchez
 
Intro_to_Arduino_with_coding_explained.ppt
Intro_to_Arduino_with_coding_explained.pptIntro_to_Arduino_with_coding_explained.ppt
Intro_to_Arduino_with_coding_explained.ppt
003AmanPratap
 
Intro_to_Arduino_-_v30_1.pdf
Intro_to_Arduino_-_v30_1.pdfIntro_to_Arduino_-_v30_1.pdf
Intro_to_Arduino_-_v30_1.pdf
clementlesiba
 
Arduino Workshop (3).pptx
Arduino Workshop (3).pptxArduino Workshop (3).pptx
Arduino Workshop (3).pptx
HebaEng
 
arduinoworkshop-160204051621.pdf
arduinoworkshop-160204051621.pdfarduinoworkshop-160204051621.pdf
arduinoworkshop-160204051621.pdf
AbdErrezakChahoub
 
ARDUINO PROJECTS BOOK
ARDUINO PROJECTS BOOKARDUINO PROJECTS BOOK
ARDUINO PROJECTS BOOK
Monique Carr
 
Arduino comic v0004
Arduino comic v0004Arduino comic v0004
Arduino comic v0004
DO!MAKERS
 
Arduino Introduction Guide 1
Arduino Introduction Guide 1Arduino Introduction Guide 1
Arduino Introduction Guide 1
elketeaches
 
Designers, please mind the gap! Let's get started with Arduino
Designers, please mind the gap! Let's get started with ArduinoDesigners, please mind the gap! Let's get started with Arduino
Designers, please mind the gap! Let's get started with Arduino
Fahed Al Riachi
 
Arduino Workshop Slides
Arduino Workshop SlidesArduino Workshop Slides
Arduino Workshop Slides
mkarlin14
 
Arduino: Libros de proyectos para Arduino
Arduino: Libros de proyectos para Arduino Arduino: Libros de proyectos para Arduino
Arduino: Libros de proyectos para Arduino
SANTIAGO PABLO ALBERTO
 
Making things sense - Day 1 (May 2011)
Making things sense - Day 1 (May 2011)Making things sense - Day 1 (May 2011)
Making things sense - Day 1 (May 2011)
markumoto
 
embedded_in_Arduino_with_basic_embedded.pptx
embedded_in_Arduino_with_basic_embedded.pptxembedded_in_Arduino_with_basic_embedded.pptx
embedded_in_Arduino_with_basic_embedded.pptx
acloudinfo2023
 
Electronz_Introduction.pptx
Electronz_Introduction.pptxElectronz_Introduction.pptx
Electronz_Introduction.pptx
Mokete5
 
Arduino PAPER ABOUT INTRODUCTION
Arduino PAPER ABOUT INTRODUCTION  Arduino PAPER ABOUT INTRODUCTION
Arduino PAPER ABOUT INTRODUCTION
NAGASAI547
 
Electronics_Tutorial_2022_Slide543404210s.pdf
Electronics_Tutorial_2022_Slide543404210s.pdfElectronics_Tutorial_2022_Slide543404210s.pdf
Electronics_Tutorial_2022_Slide543404210s.pdf
vikknaguem
 
02 Sensors and Actuators Understand .pdf
02 Sensors and Actuators Understand .pdf02 Sensors and Actuators Understand .pdf
02 Sensors and Actuators Understand .pdf
engsharaf2025
 
Microcontroller Programming & Hardware Introduction
Microcontroller Programming & Hardware IntroductionMicrocontroller Programming & Hardware Introduction
Microcontroller Programming & Hardware Introduction
Joseph Sanchez
 
Intro_to_Arduino_with_coding_explained.ppt
Intro_to_Arduino_with_coding_explained.pptIntro_to_Arduino_with_coding_explained.ppt
Intro_to_Arduino_with_coding_explained.ppt
003AmanPratap
 
Intro_to_Arduino_-_v30_1.pdf
Intro_to_Arduino_-_v30_1.pdfIntro_to_Arduino_-_v30_1.pdf
Intro_to_Arduino_-_v30_1.pdf
clementlesiba
 
Ad

Recently uploaded (20)

Fatman Book HD Pdf by aayush songare.pdf
Fatman Book  HD Pdf by aayush songare.pdfFatman Book  HD Pdf by aayush songare.pdf
Fatman Book HD Pdf by aayush songare.pdf
Aayush Songare
 
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Webcrawler_Mule_AIChain_MuleSoft_Meetup_HyderabadWebcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Veera Pallapu
 
Pharmaceutical_Incompatibilities.pptx
Pharmaceutical_Incompatibilities.pptxPharmaceutical_Incompatibilities.pptx
Pharmaceutical_Incompatibilities.pptx
Shantanu Ranjan
 
Stewart Butler - OECD - How to design and deliver higher technical education ...
Stewart Butler - OECD - How to design and deliver higher technical education ...Stewart Butler - OECD - How to design and deliver higher technical education ...
Stewart Butler - OECD - How to design and deliver higher technical education ...
EduSkills OECD
 
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptxSEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
PoojaSen20
 
Search Engine Optimization (SEO) for Website Success
Search Engine Optimization (SEO) for Website SuccessSearch Engine Optimization (SEO) for Website Success
Search Engine Optimization (SEO) for Website Success
Muneeb Rana
 
Dashboard Overview in Odoo 18 - Odoo Slides
Dashboard Overview in Odoo 18 - Odoo SlidesDashboard Overview in Odoo 18 - Odoo Slides
Dashboard Overview in Odoo 18 - Odoo Slides
Celine George
 
Diana Enriquez Wauconda - A Wauconda-Based Educator
Diana Enriquez Wauconda - A Wauconda-Based EducatorDiana Enriquez Wauconda - A Wauconda-Based Educator
Diana Enriquez Wauconda - A Wauconda-Based Educator
Diana Enriquez Wauconda
 
প্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdf
প্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdfপ্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdf
প্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdf
Pragya - UEM Kolkata Quiz Club
 
Adam Grant: Transforming Work Culture Through Organizational Psychology
Adam Grant: Transforming Work Culture Through Organizational PsychologyAdam Grant: Transforming Work Culture Through Organizational Psychology
Adam Grant: Transforming Work Culture Through Organizational Psychology
Prachi Shah
 
TV Shows and web-series quiz | QUIZ CLUB OF PSGCAS | 13TH MARCH 2025
TV Shows and web-series quiz | QUIZ CLUB OF PSGCAS | 13TH MARCH 2025TV Shows and web-series quiz | QUIZ CLUB OF PSGCAS | 13TH MARCH 2025
TV Shows and web-series quiz | QUIZ CLUB OF PSGCAS | 13TH MARCH 2025
Quiz Club of PSG College of Arts & Science
 
Freckle Project April 2025 Survey and report May 2025.pptx
Freckle Project April 2025 Survey and report May 2025.pptxFreckle Project April 2025 Survey and report May 2025.pptx
Freckle Project April 2025 Survey and report May 2025.pptx
EveryLibrary
 
Coleoptera: The Largest Insect Order.pptx
Coleoptera: The Largest Insect Order.pptxColeoptera: The Largest Insect Order.pptx
Coleoptera: The Largest Insect Order.pptx
Arshad Shaikh
 
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
SweetytamannaMohapat
 
Optimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptxOptimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptx
UrmiPrajapati3
 
Cloud Computing ..PPT ( Faizan ALTAF )..
Cloud Computing ..PPT ( Faizan ALTAF )..Cloud Computing ..PPT ( Faizan ALTAF )..
Cloud Computing ..PPT ( Faizan ALTAF )..
faizanaltaf231
 
Swachata Quiz - Prelims - 01.10.24 - Quiz Club IIT Patna
Swachata Quiz - Prelims - 01.10.24 - Quiz Club IIT PatnaSwachata Quiz - Prelims - 01.10.24 - Quiz Club IIT Patna
Swachata Quiz - Prelims - 01.10.24 - Quiz Club IIT Patna
Quiz Club, Indian Institute of Technology, Patna
 
Rai dyansty Chach or Brahamn dynasty, History of Dahir History of Sindh NEP.pptx
Rai dyansty Chach or Brahamn dynasty, History of Dahir History of Sindh NEP.pptxRai dyansty Chach or Brahamn dynasty, History of Dahir History of Sindh NEP.pptx
Rai dyansty Chach or Brahamn dynasty, History of Dahir History of Sindh NEP.pptx
Dr. Ravi Shankar Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
Pragya Champion's Chalice 2025 Set , General Quiz
Pragya Champion's Chalice 2025 Set , General QuizPragya Champion's Chalice 2025 Set , General Quiz
Pragya Champion's Chalice 2025 Set , General Quiz
Pragya - UEM Kolkata Quiz Club
 
Hemiptera & Neuroptera: Insect Diversity.pptx
Hemiptera & Neuroptera: Insect Diversity.pptxHemiptera & Neuroptera: Insect Diversity.pptx
Hemiptera & Neuroptera: Insect Diversity.pptx
Arshad Shaikh
 
Fatman Book HD Pdf by aayush songare.pdf
Fatman Book  HD Pdf by aayush songare.pdfFatman Book  HD Pdf by aayush songare.pdf
Fatman Book HD Pdf by aayush songare.pdf
Aayush Songare
 
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Webcrawler_Mule_AIChain_MuleSoft_Meetup_HyderabadWebcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Veera Pallapu
 
Pharmaceutical_Incompatibilities.pptx
Pharmaceutical_Incompatibilities.pptxPharmaceutical_Incompatibilities.pptx
Pharmaceutical_Incompatibilities.pptx
Shantanu Ranjan
 
Stewart Butler - OECD - How to design and deliver higher technical education ...
Stewart Butler - OECD - How to design and deliver higher technical education ...Stewart Butler - OECD - How to design and deliver higher technical education ...
Stewart Butler - OECD - How to design and deliver higher technical education ...
EduSkills OECD
 
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptxSEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
PoojaSen20
 
Search Engine Optimization (SEO) for Website Success
Search Engine Optimization (SEO) for Website SuccessSearch Engine Optimization (SEO) for Website Success
Search Engine Optimization (SEO) for Website Success
Muneeb Rana
 
Dashboard Overview in Odoo 18 - Odoo Slides
Dashboard Overview in Odoo 18 - Odoo SlidesDashboard Overview in Odoo 18 - Odoo Slides
Dashboard Overview in Odoo 18 - Odoo Slides
Celine George
 
Diana Enriquez Wauconda - A Wauconda-Based Educator
Diana Enriquez Wauconda - A Wauconda-Based EducatorDiana Enriquez Wauconda - A Wauconda-Based Educator
Diana Enriquez Wauconda - A Wauconda-Based Educator
Diana Enriquez Wauconda
 
প্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdf
প্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdfপ্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdf
প্রত্যুৎপন্নমতিত্ব - Prottutponnomotittwa 2025.pdf
Pragya - UEM Kolkata Quiz Club
 
Adam Grant: Transforming Work Culture Through Organizational Psychology
Adam Grant: Transforming Work Culture Through Organizational PsychologyAdam Grant: Transforming Work Culture Through Organizational Psychology
Adam Grant: Transforming Work Culture Through Organizational Psychology
Prachi Shah
 
Freckle Project April 2025 Survey and report May 2025.pptx
Freckle Project April 2025 Survey and report May 2025.pptxFreckle Project April 2025 Survey and report May 2025.pptx
Freckle Project April 2025 Survey and report May 2025.pptx
EveryLibrary
 
Coleoptera: The Largest Insect Order.pptx
Coleoptera: The Largest Insect Order.pptxColeoptera: The Largest Insect Order.pptx
Coleoptera: The Largest Insect Order.pptx
Arshad Shaikh
 
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
IDSP(INTEGRATED DISEASE SURVEILLANCE PROGRAMME...
SweetytamannaMohapat
 
Optimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptxOptimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptx
UrmiPrajapati3
 
Cloud Computing ..PPT ( Faizan ALTAF )..
Cloud Computing ..PPT ( Faizan ALTAF )..Cloud Computing ..PPT ( Faizan ALTAF )..
Cloud Computing ..PPT ( Faizan ALTAF )..
faizanaltaf231
 
Hemiptera & Neuroptera: Insect Diversity.pptx
Hemiptera & Neuroptera: Insect Diversity.pptxHemiptera & Neuroptera: Insect Diversity.pptx
Hemiptera & Neuroptera: Insect Diversity.pptx
Arshad Shaikh
 
Ad

Notes arduino workshop_15

  • 2. Sypnopsis  This workshop intends to expose participants to a much simpler approach to microcontroller based on practical problem-based approach.  Enable participants to gain real-world experience to monitor and control engineering processes and develop competent skills.  It has been specially designed for beginners and educators myduino.com 2
  • 3. Microcontroller  Microcontrollers are dedicated to one task and run one specific program.  Examples of tasks could be: i. Received from inputs via ports (read from external hardware) ii. Stored data in file registers & arithmetic operations (added, subtracted, logic gates) iii. Sent out data (control external hardware)  Processor, Storage and RAM all in one tiny package myduino.com 3
  • 4. myduino.com 4 With & Without A Microcontroller
  • 5. Internal Architecture Program Memory Register RAM EEPROM PORTS Program Memory: Where all commands, written by users are stored Register: To determine what action the uC takes in reference to the program commands RAM: Temporarily store data of any action EEPROM: The data is retain even after power is switched-off Ports: Bidirectional pins of Input and Output myduino.com 5
  • 7. Arduino Uno Specifications  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 (ATmega328) of which 0.5 KB used by bootloader  SRAM: 2 KB (ATmega328)  EEPROM: 1 KB (ATmega328)  Clock Speed: 16 MHz myduino.com 7
  • 8. Arduino Terminology  “sketch” – a program you write to run on an Arduino board  “pin” – an input or output connected to something. e.g. output to an LED, input from a knob.  Analog signals – directly measurable quantities in terms of some other quantity  Digital Signals – have only two states. For digital computers, we refer to binary states, 0 and 1. “1” can be on, “0” can be off myduino.com 8
  • 9. Workshop Summary  Introduction to Arduino  Setting up your Arduino Environment  First Arduino sketch  Making LEDs glow and blink  How to read buttons/switches  Analog Signals  Serial Communication  Digital Thermometer myduino.com 9
  • 10. Participant Manifest  Thumb drive with notes, arduino software for Windows and source code (“sketches”) used in class  Arduino Starter Kit: Arduino Uno Tactile push button Half size breadboard Liquid Crystal Display Jumper wires Piezo Buzzer LEDs USB Cable Resistors Temperature Sensor Potentiometer myduino.com 10
  • 11. Breadboard  A breadboard (or protoboard) is a construction base for prototyping of electronics  Wires and components are simply pushed into the holes to form a completed circuit and power can be applied. myduino.com 11
  • 12. Components: LED  LED (Light Emitting Diode)  What it Does: Emits light when a small current is passed through it.  Leads: 2 (one longer, this one connects to positive)  Things to watch out for: Will only work in one direction  Looks like a mini light bulb. - Requires a current limiting resistor myduino.com 12
  • 13. Resistors  What it Does: Restricts the amount of current that can flow through a circuit.  Leads: 2  Things to watch out for: Easy to grab the wrong value  Cylinder with wires extending from either end. The value is displayed using a color myduino.com 13
  • 14. Potentiometer  What it Does: Produces a variable resistance dependant on the angular position of the shaft.  Leads: 3  Things to watch out for:  Identifying: - Accidentally buying logarithmic scale.  They can be packaged in many different form factors, look for a dial to identify. myduino.com 14
  • 15. Pushbutton  What it Does: Completes a circuit when it is pressed. 4  Leads: 4  A little square with leads out the bottom and a button on the top. myduino.com 15
  • 16. Piezo Element  What it Does: A pulse of current will cause it to click. A stream of pulses will cause it to emit a tone.  Leads: 2  Things to watch out for: Difficult to misuse.  In this kit it comes in a little black barrel, but sometimes they are just a gold disc myduino.com 16
  • 17. Temperature Sensor (LM35)  The LM35 series are precision integrated-circuit temperature sensors, whose output voltage is linearly proportional to the Celsius (Centigrade) temperature.  The LM35 is rated to operate over a −55° to +150°C temperature range, and has a linear + 10.0 mV/°C scale factor. myduino.com 17
  • 18. Liquid Crystal Display  An LCD has the advantage of displaying alpha-numeric characters and even user- defined graphics.  It also offers the ability for lower power consumption, making it ideal for battery operated systems.  It comes in a wide variety of shapes and sizes with line lengths of 8, 16, 20, 24, 32 and 40 characters, in one, two and four line versions. myduino.com 18
  • 19. What is Electricity  A fan contains a small battery, a couple of wires, a switch and an electric motor.  If you turn the switch on, the motor will start to spin  Battery is both a water reservoir and a pump, the switch is a tap, and the motor is one of those wheels that you see in watermills.  When you open the tap, water flows from the pump and pushes the wheel into motion. myduino.com 19
  • 20. The hydraulic system  Increasing the size of the pipes allows a greater flow of water to go through them, effectively reduced the pipes' resistance to the flow of water.  This approach works up to a certain point, at which the wheel won't spin any faster, because the pressure of the water is not strong enough.  When we reach this point, we need the pump to be stronger. myduino.com 20
  • 21. Voltage, Current & Resistance  So when you read that a battery's voltage is 9 V, think of this voltage like the water pressure that can potentially be produced by this little "pump".  The flow rate of water relates to current, and is measured in amperes.  Finally, the resistance opposing the flow of current over any path that it travels is called resistance, and is measured in ohms.  Relationship: A higher voltage (pressure) lets you spin a wheel faster; a higher flow rate (current) lets you spin a larger wheel.  Ohms Law, V = IR myduino.com 21
  • 24. myduino.com 24  Breadboards have small holes for jumper wires and components to be plugged into.
  • 28. Select Board & Com Port myduino.com 28
  • 29. Blinking an LED digitalWrite  The Arduino board comes with an LED preinstalled. It's marked "L". You can also add your own LED  Tell Arduino what to do.  This is done through code, that is, a list of instructions that we give the microcontroller to make it do what we want.  Blink an LED is the Hello World of physical computing myduino.com 29
  • 35. myduino.com 35 Push Button – digitalRead
  • 37. Pulse Width Modulation (PWM)  If you blink the LED fast enough, you don't see it blink any more, but you can change its brightness by changing the ratio between the on time and the off time.  This technique also works with devices other than an LED. For example, you can change the speed of a motor in the same way  analogWrite(9,128) will set the brightness of an LED connected to pin 9 to 50%.
  • 39. myduino.com 39 Arduino PWM 8 Bits Data Vout x 0.0196 0 To 255 0 To 5V PWM Output (Vout) = Data 5V 255 PWM Output (Vout) = Data x 5 V 255 = Data x 0.0196 Ex: If Data = 128; Vout = 128 x 0.0196 = 2.5088 V analogWrite (PWM_pin, 128); // Will give an output of 2.5088 V
  • 41. Analogue Input  This is the difference between an on/off sensor (which tells us whether something is there) and an analogue sensor, whose value continuously changes.  By using the analogRead() function, we can read the voltage applied to one of the pins. This function returns a number between 0 and 1023, which represents voltages between 0 and 5 volts myduino.com 41
  • 42. myduino.com 42 Number of iterations (steps) for an ADC is calculated as follows: 2N = Number of steps. Where N corresponds to the number of bits Ex: 2 bits, 22 = 4 Resolution = Voltage Range = 5V = 1.25 No of steps 4 Vin Dout 0 – 1.25 0 1.25 – 2.5 1 2.5 – 3.75 2 3.75 - 5 3
  • 43. Arduino ADC Calculations  10 bit ADC, 210 = 1024 steps  The resolution of an ADC is calculated as follows: Resolution = Voltage Range = 5V = 0.00488 V No of steps 1024  The output of the ADC is calculated as follows: ADC Output (dout) = Vin = 3.3 = 676 Resolution 0.00488 myduino.com 43
  • 44. ADC Output (dout) = Vin = 3.3 = 676 Resolution 0.00488 myduino.com 44 ADC Arduino 10 bits vin dout ÷ 0.00488 x 0.00488 Vin = dout x Resolution = 676 x 0.00488 = 3.3
  • 46. Temperature Sensor (LM35)  The LM35 series are precision integrated-circuit temperature sensors, whose output voltage is linearly proportional to the Celsius (Centigrade) temperature.  The LM35 is rated to operate over a −55° to +150°C temperature range, and has a linear + 10.0 mV/°C scale factor. myduino.com 46
  • 48. Liquid Crystal Display  An LCD has the advantage of displaying alpha-numeric characters and even user- defined graphics.  It also offers the ability for lower power consumption, making it ideal for battery operated systems.  It comes in a wide variety of shapes and sizes with line lengths of 8, 16, 20, 24, 32 and 40 characters, in one, two and four line versions. myduino.com 48
  • 51. Connecting your LCD (Backlight) myduino.com 51
  • 52. Connecting your Power & Contrast myduino.com 52
  • 53. Connecting your Bus Wiring myduino.com 53 LCD 14 13 12 11 10 9 8 7 6 5 4 3 2 1 7 6 5 4 3 GND 2 POT 5V GND
  • 55. Arduino Library  A library is a big collection of related procedures.  If you, say, want to control a motor, you may want to find a Motor Control Library: a collection of procedures that have already been written for you that you can use without having to do the dirty work of learning the nuances of motors.  One of the best features of the Arduino project is the ability to add on pre-crafted libraries that add hardware support. There's tons of them, and you can pick and choose which to install.
  • 56. Arduino Library  A library is a folder with some files in it, the files will end in .cpp (C++ code file) and .h (C++ header file).  Two optional files are keywords.txt (this is a hints file to tell the Arduino IDE how to colorize your sketch and examples folder, which may have some handy test- sketches.
  • 57. How to Install Library  Download your desired library (normally in a compressed zip file)  Find the zip file on your local computer (wherever downloaded files end up). Under Windows, you should be able to double click on the file to open it up. Older windows, winrar or winzip will pop-up.  Copy the file and paste in inside the libraries folder in your Arduino directory.
  • 60. GOOD SITES: 1. myduino.com 2. http://www.facebook.com/groups/arduinomalaysia/? ref=ts&fref=ts 3. http://tronixstuff.wordpress.com/ 4. http://bildr.org/ 5. http://www.instructables.com 6. http://www.jeremyblum.com/category/arduino-tutorials/ 7. http://letsmakerobots.com/start 8. http://hackaday.com 9. http://playground.arduino.cc/