SlideShare a Scribd company logo
1 of 33
Download to read offline
MATLAB with Arduino Interface
Dr. Shimi S L
Assistant Professor, NITTTR,
Chandigarh, India
Intelligent
Controllers
Smart Sensors –
Not Only Intelligent,
but Adaptable
Intelligent Actuators
Plant
Chris Hoffmann's Ryno Motors
Lauren
Dragon Ball video game
This is the original sketch that Lauren Hoffmann drew for
her dad that day in the car six years ago
sports motorcycle tire and rim
A digital gyroscope module connected to
an Arduino Uno board
A gyroscope in operation with
freedom in all three axes. The
rotor will maintain its spin axis
direction regardless of the
orientation of the outer frame.
gyroscope is a device for measuring
or maintaining orientation, based on
the principles of angular momentum
https://www.youtube.com/watch?v=tGgXO1AMb9A
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
For a 16 MHz Arduino the ADC clock is set to 16 MHz/128
= 125 KHz. Each conversion in microcontroller takes 13
ADC clocks so 125 KHz /13 = 9615 Hz (9615 samples per
second ).
A 10-bit resolution means ADC can detect the 1024
individual level of the highest voltage signal it is designed
to sense, like in case of ARDUINO it may be 5V if you use
normal code and dont specify ADC reference or it can be
3.3V if you board is running at 3.3V. Then for 10-bit
resolution it will be able to sense 1024 different voltage
levels between 0 and 5 V, it will simple truncate any
voltage signal above and below this range.
The least voltage that will be successfully converted to
digital form will be:
A/D prescale factor is set to 128
http://www.mathworks.in/matlabcent
ral/fileexchange/32374-matlab-
support-for-arduino--aka-arduinoio-
package-
1000µF
50V
1000µF
50V
100µF
25V
100µF
25V
1000µF
50V
13 12
GND
load
Complete Setup
Rectifier Circuit
MOSFET Bridge Circuit
Control Circuit using Arduino
Gate Trigger Pulse
3 level Inverter waveform on CRO
26
Thank you.
Questions, Comments, …?
shimi.reji@gmail.com
www.slideshare.net/shimireji
9417588987
https://in.mathworks.com/help/simulink/ug/typ
es-of-sample-time.html
http://www.makeproto.com/projects/
fuzzy/matlab_arduino_FIST/index.php
Full Wave Controlled Bridge Rectifier
For a 16 MHz Arduino the ADC clock is set to 16 MHz/128
= 125 KHz. Each conversion in microcontroller takes 13
ADC clocks so 125 KHz /13 = 9615 Hz.
A 10-bit resolution means ADC can detect the 1024
individual level of the highest voltage signal it is designed
to sense, like in case of ARDUINO it may be 5V if you use
normal code and dont specify ADC reference or it can be
3.3V if you board is running at 3.3V Then for 10-bit
resolution it will be able to sense 1024 different voltage
levels between 0 and 5 V, it will simple truncate any
voltage signal above and below this range.
The least voltage that will be successfully converted to
digital form will be:
5/1024=0.00488 V
A/D prescale factor is set to 128
clear a;
global a;
a=arduino('COM3');
a.pinMode(13,'output');
global a;
a.digitalWrite(13,1);
global a;
a.digitalWrite(13,0);
a = arduino('COM3');
interv = 1000;
passo = 1;
t=1;
x=0;
while(t<interv)
b=a.analogRead(0);
x=[x,b];
plot(x);
axis([0,interv,0,1024]);
grid
t=t+passo;
drawnow;
end

More Related Content

Similar to arduino.pdf

Arduino windows remote control
Arduino windows remote controlArduino windows remote control
Arduino windows remote controlVilayatAli5
 
Interface stepper motor through Arduino using LABVIEW.
Interface stepper motor through Arduino using LABVIEW.Interface stepper motor through Arduino using LABVIEW.
Interface stepper motor through Arduino using LABVIEW.Ankita Tiwari
 
Arduino Model's
Arduino Model'sArduino Model's
Arduino Model'sAli Izmir
 
QuickSilver Controls QCI-DS032 QCI-N2-MX
QuickSilver Controls QCI-DS032 QCI-N2-MXQuickSilver Controls QCI-DS032 QCI-N2-MX
QuickSilver Controls QCI-DS032 QCI-N2-MXElectromate
 
IRJET- Android based Home Automation System with Power Optimization Modes
IRJET-  	  Android based Home Automation System with Power Optimization ModesIRJET-  	  Android based Home Automation System with Power Optimization Modes
IRJET- Android based Home Automation System with Power Optimization ModesIRJET Journal
 
selfridge_alec_chipspec
selfridge_alec_chipspecselfridge_alec_chipspec
selfridge_alec_chipspecAlec Selfridge
 
Contactless digital tachometer using microcontroller
Contactless digital tachometer using microcontroller Contactless digital tachometer using microcontroller
Contactless digital tachometer using microcontroller IJECEIAES
 
Cascaded multilevel inverter
Cascaded multilevel inverterCascaded multilevel inverter
Cascaded multilevel inverterAJAL A J
 
Automatic irrigation system using Arduino
Automatic irrigation system using ArduinoAutomatic irrigation system using Arduino
Automatic irrigation system using ArduinoBalajiK109
 
Robotics Report final.compressed (1)
Robotics Report final.compressed (1)Robotics Report final.compressed (1)
Robotics Report final.compressed (1)Kael Kristjanson
 
pdf-obstacle-avoiding-robot.docx
pdf-obstacle-avoiding-robot.docxpdf-obstacle-avoiding-robot.docx
pdf-obstacle-avoiding-robot.docxmaheshwaran79
 
Micro Controller 8051 of Speedo Meter using KEIL Code
Micro Controller 8051 of Speedo Meter using KEIL CodeMicro Controller 8051 of Speedo Meter using KEIL Code
Micro Controller 8051 of Speedo Meter using KEIL CodeSunil Kumar R
 
First fare 2011 overview of electronics-2012
First fare 2011 overview of electronics-2012First fare 2011 overview of electronics-2012
First fare 2011 overview of electronics-2012Oregon FIRST Robotics
 
FIRSTFare 2013 overview of electronics-2014
FIRSTFare 2013   overview of electronics-2014FIRSTFare 2013   overview of electronics-2014
FIRSTFare 2013 overview of electronics-2014Oregon FIRST Robotics
 
Z turn board
Z turn boardZ turn board
Z turn boardmyirtech
 
Stepper motor controller using c
Stepper motor controller using cStepper motor controller using c
Stepper motor controller using cHarnam Singh
 

Similar to arduino.pdf (20)

Arduino windows remote control
Arduino windows remote controlArduino windows remote control
Arduino windows remote control
 
Interface stepper motor through Arduino using LABVIEW.
Interface stepper motor through Arduino using LABVIEW.Interface stepper motor through Arduino using LABVIEW.
Interface stepper motor through Arduino using LABVIEW.
 
Arduino Model's
Arduino Model'sArduino Model's
Arduino Model's
 
QuickSilver Controls QCI-DS032 QCI-N2-MX
QuickSilver Controls QCI-DS032 QCI-N2-MXQuickSilver Controls QCI-DS032 QCI-N2-MX
QuickSilver Controls QCI-DS032 QCI-N2-MX
 
Obstacle Avoidance Robotic Vehicle
Obstacle Avoidance Robotic VehicleObstacle Avoidance Robotic Vehicle
Obstacle Avoidance Robotic Vehicle
 
IRJET- Android based Home Automation System with Power Optimization Modes
IRJET-  	  Android based Home Automation System with Power Optimization ModesIRJET-  	  Android based Home Automation System with Power Optimization Modes
IRJET- Android based Home Automation System with Power Optimization Modes
 
Stepper speed control
Stepper speed controlStepper speed control
Stepper speed control
 
selfridge_alec_chipspec
selfridge_alec_chipspecselfridge_alec_chipspec
selfridge_alec_chipspec
 
Contactless digital tachometer using microcontroller
Contactless digital tachometer using microcontroller Contactless digital tachometer using microcontroller
Contactless digital tachometer using microcontroller
 
Animatronic hand controller
Animatronic hand controllerAnimatronic hand controller
Animatronic hand controller
 
Cascaded multilevel inverter
Cascaded multilevel inverterCascaded multilevel inverter
Cascaded multilevel inverter
 
Automatic irrigation system using Arduino
Automatic irrigation system using ArduinoAutomatic irrigation system using Arduino
Automatic irrigation system using Arduino
 
Robotics Report final.compressed (1)
Robotics Report final.compressed (1)Robotics Report final.compressed (1)
Robotics Report final.compressed (1)
 
pdf-obstacle-avoiding-robot.docx
pdf-obstacle-avoiding-robot.docxpdf-obstacle-avoiding-robot.docx
pdf-obstacle-avoiding-robot.docx
 
Micro Controller 8051 of Speedo Meter using KEIL Code
Micro Controller 8051 of Speedo Meter using KEIL CodeMicro Controller 8051 of Speedo Meter using KEIL Code
Micro Controller 8051 of Speedo Meter using KEIL Code
 
First fare 2011 overview of electronics-2012
First fare 2011 overview of electronics-2012First fare 2011 overview of electronics-2012
First fare 2011 overview of electronics-2012
 
FIRSTFare 2013 overview of electronics-2014
FIRSTFare 2013   overview of electronics-2014FIRSTFare 2013   overview of electronics-2014
FIRSTFare 2013 overview of electronics-2014
 
Z turn board
Z turn boardZ turn board
Z turn board
 
371275588.pptx
371275588.pptx371275588.pptx
371275588.pptx
 
Stepper motor controller using c
Stepper motor controller using cStepper motor controller using c
Stepper motor controller using c
 

Recently uploaded

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 

Recently uploaded (20)

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 

arduino.pdf