lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/smart 2010/pdflectr… ·...
TRANSCRIPT
![Page 1: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/1.jpg)
Lecture 5
Capacitors
![Page 2: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/2.jpg)
SMART 2010SMART 2010
Capacitors 1• Store electric charge• Consists of two plates of a conducting material
separated by a space filled by an insulator• Measured in units called farads, F
![Page 3: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/3.jpg)
SMART 2010SMART 2010
Capacitors 2
Negative lead (-)Electrolytic
Mylar Ceramic
![Page 4: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/4.jpg)
SMART 2010SMART 2010
Capacitor Symbols
Fixed capacitor
Polarized capacitor
Variable capacitor
+
![Page 5: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/5.jpg)
SMART 2010SMART 2010
How to Read Capacitor Value
• The first two figures give us 10, the third figure gives us 0000, and the letter 10%. We normally express this as 0.1µF.
![Page 6: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/6.jpg)
SMART 2010SMART 2010
Example: Capacitor Value 1
![Page 7: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/7.jpg)
SMART 2010SMART 2010
Example: Capacitor Value 2
![Page 8: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/8.jpg)
SMART 2010SMART 2010
Example: Capacitor Value 3
![Page 9: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/9.jpg)
SMART 2010SMART 2010
Example: Capacitor Value 4
![Page 10: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/10.jpg)
Lecture 6
Optoelectronics
![Page 11: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/11.jpg)
SMART 2010SMART 2010
Photoresistors
•Light sensitive resistors •Resistance decreases when light intensity increases
Symbol
![Page 12: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/12.jpg)
SMART 2010SMART 2010
Photoresistor: How It Works
![Page 13: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/13.jpg)
SMART 2010SMART 2010
Simple Light Meter
![Page 14: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/14.jpg)
SMART 2010SMART 2010
Light Sensitive Voltage Divider
![Page 15: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/15.jpg)
SMART 2010SMART 2010
Light Activated Relay
![Page 16: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/16.jpg)
SMART 2010SMART 2010
Photoresistor with BS2
•Usually connect with a capacitor•Use RCTime command to find out light intensity
![Page 17: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/17.jpg)
SMART 2010SMART 2010
RC CircuitR
C
+
Vo
-
+
Vi
-
11
)()(
+=
RCssVsV
i
o
RC is time constant, τ τ
![Page 18: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/18.jpg)
SMART 2010SMART 2010
Rctime with BS2
• Software version of analog to digital converter
• Pbasic rctime command– Rctime Pin#, state, variable
• Example code– High 5– Pause 3– Rctime 5,1, tau
![Page 19: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/19.jpg)
SMART 2010SMART 2010
Photodiode• Transforms light energy to
electric current• Very linear• More sensitive than
photoresistor
Symbol
![Page 20: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/20.jpg)
SMART 2010SMART 2010
Photodiode: How It Works
![Page 21: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/21.jpg)
SMART 2010SMART 2010
Photodiode Applications
![Page 22: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/22.jpg)
SMART 2010SMART 2010
Photodiode with BS2
• Polarity: cathode connects to the ground
![Page 23: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/23.jpg)
SMART 2010SMART 2010
Phototransistor
•
• The base lead of a BJT is replaced by a light sensitive surface
Phototransistor Photo FET
![Page 24: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/24.jpg)
SMART 2010SMART 2010
Phototransistor: How It Works
![Page 25: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/25.jpg)
SMART 2010SMART 2010
Phototransistor Applications
![Page 26: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/26.jpg)
SMART 2010SMART 2010
Tachometer
![Page 27: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/27.jpg)
SMART 2010SMART 2010
Optoisolators 1
Closed Pair
![Page 28: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/28.jpg)
SMART 2010SMART 2010
Optoisolators 2
Slotted Pair Reflective Pair
![Page 29: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/29.jpg)
SMART 2010SMART 2010
Optoisolators 3
Integrated Optoisolators
![Page 30: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/30.jpg)
SMART 2010SMART 2010
Optoelectronic Sensors Experiments
Experiments ChaptersWhat’s micro controller
Basic A and D 8
Process Control
Smart Sensors
Boe Bot Robotics
Others
![Page 31: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/31.jpg)
Lecture 7
ADC
![Page 32: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/32.jpg)
SMART 2010SMART 2010
Rctime with BS2
• Software version of analog to digital converter
• Pbasic rctime command– High 3– Pause 3– Rctime 3,1, tau
P3
![Page 33: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/33.jpg)
SMART 2010SMART 2010
Analog to Digital Conversion
• Process of converting an analog signal to a digital number
• Three step procedure– Sampling (sample and hold)– Quantization– Coding
![Page 34: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/34.jpg)
SMART 2010SMART 2010
Sampling
![Page 35: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/35.jpg)
SMART 2010SMART 2010
Quantization and Coding
111 7110 6101 5100 4011 3010 2001 1000 0
Vo
Vi0 1.25 2.5 3.75 5 6.25 7.5 8.75 10
0V ~ 10V
V25.18
10=
![Page 36: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/36.jpg)
SMART 2010SMART 2010
ADC
• Analog to digital converter• 8-bit successive analog to
digital converter• 0V to 5V input range• Single 5V power supply
![Page 37: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/37.jpg)
SMART 2010SMART 2010
ADC Pin Description
Pin Description
Pin 1 ADC is ready to do conversion when it is low
Pin 2 0 to 5V analog input need to be digitized
Pin 3 Zero offset adjustment
Pin 4 Ground
Pin 5 Span adjustment
Pin 6 8 bit ADC output
Pin 7 Clock signal from BS2
Pin 8 Regulated 5V (Power supply)
Identifier
![Page 38: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/38.jpg)
SMART 2010SMART 2010
ADC with BS2-1
• 0V to 5V analog input using a potentiometer
• Output is from 0 to 255– 8 bit resolution
![Page 39: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/39.jpg)
SMART 2010SMART 2010
Sample Code for ADC 1
adcbits var byte High 0Low 0Shiftin 2, 1,MSBPOST, [adcbits\8]High 0
Shiftin Data_pin, Clock_pin, mode, [variable\bits]
Serial communication
![Page 40: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/40.jpg)
SMART 2010SMART 2010
Sample Code for ADC 2
Q var wordR var wordQ = 13 /5R = 13 // 5Debug ? QDebug ? R
Debug window shows;
Q= 2R= 3
Quotient
Remainder
![Page 41: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/41.jpg)
SMART 2010SMART 2010
ADC with BS2-2
• 2V to 5V limited analog input using a potentiometer
• Output is from 102 to 255– 8 bits resolution
25525555
10225552
=×
=×
VVVV
![Page 42: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/42.jpg)
SMART 2010SMART 2010
ADC with BS2-3
• Using two potentiometers zero and span can be adjusted to get full 8 bit resolution
2552553
)25(
02553
)22(
=×−
=×−
VV
VV
Set zero to 2V Set span to 3V
![Page 43: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/43.jpg)
SMART 2010SMART 2010
ADC with BS2-4
• 0V to 4V limited analog input using a potentiometer
• Output is from 0 to 204– 8 bits resolution
20425554
025550
=×
=×
VVVV
![Page 44: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/44.jpg)
SMART 2010SMART 2010
ADC with BS2-5
• Using another potentiometer to span can be adjusted to get full 8 bit resolution
Set to 4V255255
44
025540
=×
=×
VVVV
![Page 45: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/45.jpg)
SMART 2010SMART 2010
ADC with BS2-6
• 2V to 4V limited analog input using a potentiometer
• Output is from 102 to 204– 8 bits resolution
20425554
10225552
=×
=×
VVVV
![Page 46: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/46.jpg)
SMART 2010SMART 2010
ADC with BS2-7
• Using 2 potentiometers zero and span can be adjusted to get full 8 bit resolution
Set zero to 2V Set span to 2V
255255)24()24(
0255)24()22(
=×−−
=×−−
VVVV
![Page 47: Lecture 5 - engineering.nyu.eduengineering.nyu.edu/mechatronics/smart/pdf/SMART 2010/PDFLectr… · SMART 2010 How to Read Capacitor Value • The first two figures give us 10, the](https://reader033.vdocuments.site/reader033/viewer/2022052000/6012b5c15af0d945975ad8e5/html5/thumbnails/47.jpg)
SMART 2010SMART 2010
ADC0831 ExperimentsExperiments Chapters
What’s micro controllerBasic A and D 1, 3
Process Control
Smart Sensors
Boe Bot Robotics
Others