6.101 Course Update · • Hb& HbO2have almost same absorptions at the isobetric point of 805nm...
Transcript of 6.101 Course Update · • Hb& HbO2have almost same absorptions at the isobetric point of 805nm...
• Course update• 555• Pulse‐Oximetry• Fiber Optics• DAC• ADC
6.101 Spring 2020 Lecture 11 1
6.101 Course Update
• Course information source:– Course website mit.edu/6.101– Note will be posted on piazza when new information on course website is posted
• Staff communications– Email– Telephone– Video conference– Hours will be surveyedand posted
6.101 Spring 2020 Lecture 11 2
0 1 2 3 4 5 6
CATXFL
MAILNYAZGANJ
NMOHTNUT
Home State
Remaining course material• New lectures posted on line with detailed notes including
video tutorial on pcb layout
• Lab 5, lab 6: physical lab replaced with LTspice simulation and output will replace physical lab
• Quiz: Open book quiz, 3 hour limit; quiz posted 1pm EST, uploaded by 4:04pm– Wed 4/1 or alternative date selected by class
• Final project (Technical)– Single person or team – Proposal, block diagram, checklist, etc.. review/conferences as
scheduled (video conference)– Design verified with LTspice– PCB layout required
6.101 Spring 2020 Lecture 11 3
Final Project (CIM)
• Abstract and proposal uploaded as scheduled• Design presentation view with Dave and Laura• Presentation via video conference with staff• Final report
6.101 Spring 2020 Lecture 11 4
Flash Update
2MHz scope available for loan
Have $100 budget for project
Can order from Digikey (need to setup business account under MIT)
6.101 Spring 2020 Lecture 11 5
Flash update
• 2MHz scope available for loan• Have $100 budget for project• Can order from Digikey
– setup business account under MIT– Email tax certificate to [email protected]– Ship to home address– Email [email protected] and [email protected] for approval– Applies to PCB.
6.101 Spring 2020 Lecture 11 6
6.101 Spring 2020 Lecture 11 7
PCB Sources
• www.smart‐prototyping.com (China)– 10 boards, 10cm x 10cm 2 layer $9.90 + $20 shipping– Typically 7 day delivery via AIR– Accepts Gerber files
• www.PCBWay.com– 10 boards, 10cm x 10cm 2 layer $5 + $18, – shipping is 3‐5 days,– Accepts Gerber files
6.101 Spring 2020 Lecture 11 8
6.101 Spring 2020 9
555 Timers• Simple, versatile, low cost IC
for timing applications:– oscillators, – one-shot pulse generator, – pulse width modulator, – missing pulse detector
• Circuit: two comparators, flip flop, resistor divider and a discharge transistor.
• CMOS version available
• $0.25
555 Datasheet
6.101 Spring 2020 Lecture 11 10
Wide supply range
Small temperaturedrift
voltage independence
two outputs
6.101 Spring 2020 11
555 Block Diagram
trigger threshold Reset Output
1/3 1 high
2/3 1 low
NA NA 0 Low
6.101 Spring 2020 12
Vc
RC Equation
dtdVC c
cc V
dtdVRC
Vs = 5 V
Switch is closed t<0
Switch opens t>0
Vs = VR + VC
Vs = iR R+ Vc iR =
Vs =
R
C
Vs = 5 V
RC
t
sc eVV 1
RCt
c eV 15
6.101 Spring 2020 13
Monostable Circuit
Ra
6.101 Spring 2020 14
Oscillator (Astable)
Rb
MOSFET Design Lab
• The objective: design a touch sensitive switch which turns on a LED light for approximately 30 seconds.
• The resistance between two electrodes when touched by a finger is between 5kΩ and 20mΩ, depending on the amount of moisture on the finger and humidity.
• Off current <100ua
6.101 Spring 2020 15
Component count Points2 mosfets or less 23 mosfets 1
Pulse‐Oximetery
• A non‐invasive photoplethysmographicalapproach for measuring pulse rate and oxygen saturation in blood.
• Oximetry developed in 1972, by TakuoAoyagi and Michio Kishi
• Commercialized by Biox in 1981 and Nellcorin 1983.
6.101 Spring 2020 Lecture 11 16
Pulse‐Oximetry Sensor
6.101 Spring 2020 Lecture 11 17
http://energymicroblog.files.wordpress.com/2012/11/figure-1.png
Why plastic DB-9?
finger
Reflective PPG*
Fitbit Patent: US 2014/0275852 Wearable Heart Rate Monitor
Pulse‐Oximetry
• Two measurements:– Pulse rate– Oxygen saturation – Challenge: measuring 5‐20 nA!
• Lab 6 – Photoplethysmogram (PPG): generate tone with each pulse or flash a Teensy/TFT display.
6.101 Spring 2020 Lecture 11 19
Frequency Spectrum
6.101 Spring 2020 Lecture 11 20
Pulse‐Ox LEDs ‐ TI
6.101 Spring 2020 Lecture 11 21
IR
Pulse‐Ox Photodiode
6.101 Spring 2020 Lecture 11 22
Photodiode Model
6.101 Spring 2020 Lecture 11 23
)1( kTqv
sD
D
eII
• Photovoltaic: diode forward biased
• Photoconductive: diode reversed biased– Better linearity, larger
dynamic range, better speed over photovoltaic
– IDARK = diode current under reverse bias without light
• Diode current 5‐10 nA
* HP Optoelectronics Handbook
Typical Photodiode VI Curve*
6.101 Spring 2020 Lecture 11 24
* HP Optoelectronics Handbook
Transimpedance Amplifier(Current to Voltage Converter)
6.101 Spring 2020 Lecture 11 25
Ir
Ir = Ip
Vout = Ip Rf
http://en.wikipedia.org/wiki/File:TIA_simple.svg
Transimpedance Amplifier(Current to Voltage Converter)
6.101 Spring 2020 Lecture 11 26
Idiode
At low frequency
outV
3RIV diodeout
mvVxRxI
out
diode
201043105 69
0.96V
Probe Interface
6.101 Spring 2020 Lecture 11 27
Virtual ground at 4.5V not shown
negative battery terminal
add resistor
Pulse‐Ox Lab
6.101 Spring 2020 Lecture 11 28
negative battery terminal
20-30 dB gain
Dark Current Compensation Technique #1
6.101 Spring 2020 Lecture 11 29
transimpedance output
LPF output
LPF
virtual ground
• LPF output is compared against virtual ground
• Difference added to input to LPF• C3 R7 time constant ~2‐10 sec• R7/R6 gain 2‐10
Dark Current Compensation Technique #2
6.101 Spring 2020 Lecture 11 30
transimpedance output
LPF outputLPF
virtual ground
• Implement HPF• Set corner frequency to 0.1hZ• One fewer op‐amp adder
Pulse Ox ‐ Design Problem
• Design a circuit that flashes the Teensy TFT or generate a tone with each heart beat without noise/false beats or missing beats. (Generating a tone will result in a higher grade.)
6.101 Spring 2020 Lecture 11 31
Component count 1 LF353 = 2 op‐amp Points
(5) op‐amps + BJT’s / MOSFET’s with Teensy 4(4) op‐amps + BJT’s / MOSFET’s + tone 3
(>4) op‐amps + BJT’s / MOSFET’s + tone 2
6.101 Spring 2020 Lecture 11 32
Use 7805 to generate 5V. Add filter caps.
Ensure digital signals <5V.
Analog-only pins (A10-A14) are 3.3V only.
Level shifting required for PPG and accelerometer.
Teensy ‐ Lab 6
Mems Accelerometer
6.101 Spring 2020 Lecture 11 33
The objective is to design a circuit to sense a capacitive MEMS accelerometer and display the change on a Teensy/TFT or generate a tone. The accelerometer is composed of two copper plates separated by springs.
MEMS Circuit
6.101 Spring 2020 Lecture 11 34
When the plate is depressed a voltage will be generated at the transimpedance output. The signal will be small and similar to the PPG output.
Note: the circuit operates on 9V, use a 7805 (and filter caps) to generate the 5V needed for the Teensy. Be sure the digital input signal to the Teensy is no higher than 5V! The analog-only pins (A10-A14) are 3.3V only.
Lab 6 Full Credit555 Ramp Generator 2MOSFET Design 2Plethysmography 4Accelerometer 3Report 2Total Lab 13
Component count 1 LF353 = 2 op‐amp Points(5) op‐amps + BJT’s / MOSFET’s with Teensy 3(4) op‐amps + BJT’s / MOSFET’s + tone 2(>4) op‐amps + BJT’s / MOSFET’s + tone 1
Oxygen Saturation – SpO2
• To determine blood oxygen saturation, two different wavelengths LED are used 660nm (red) and 905 nm (infrared)
• The two LEDs are alternately pulsed. Hemoglobin (present in oxygenated blood) and deoxyhemoglobin (present in deoxygenated blood) have different absorption for different wavelengths of light
• The oxygenation level determined by comparing the ratio of the two wavelengths absorbed by the blood, running some calculations and . then using a lookup table. Thus SpO2 determination is more suitable for digital processing.
6.101 Spring 2020 Lecture 11 35
Red Blood Cell Functional Hemoglobin Types
Functional Arterial Oxygen Saturation, SaO2:
Reduced Hemoglobin
Red Blood Cell
Oxygenated Hemoglobin
2HbO
Hb
Reduced Hemoglobin
Red Blood Cell
Oxygenated Hemoglobin
2HbO
Hb
Maximum of four Oxygen Molecules can attach to the Hemoglobin Molecule
%1002
22
HbHbO
HbOa CC
COS
• Oxygenated blood HbO2 has wavelength‐dependent absorption characteristic (fig below).
• Absorption also depends on oxygen saturation level.• Hb & HbO2 have almost same absorptions at the isobetric point of 805nm
Wavelength‐Dependent Light Absorption TI – Pulse‐Ox Design
6.101 Spring 2020 Lecture 11 38
H Bridge
• Circuit to apply voltage/current in either direction• Used in pulse‐ox and motor controllers
6.101 Spring 2020 Lecture 11 39
PhotonicsWhat is “photonics”?
Answer: the generation and manipulation of photons for applications such as sensing, communication, or information processing (analogous to electronics, which is the manipulation of electrons for the same purpose)
Clarification: Isn’t that the same as “optics”?– Some might say it is the same; convention seems to say it isn’t– Optics is, more generally, the study of light. To work with
photonics therefore requires understanding of optics.– You’ll see lots of terms like these used almost interchangeably.
Some almost interchangeable adjectives:• Optic vs Photonic vs Lightwave• Electro‐optic vs Opto‐electronic
6.101 Spring 2020 Lecture 11 40
Acknowledgement: Edward Ackerman, Photonic Systems, Inc.
Optical Fiber – Size Weight
6.101 Spring 2020 Lecture 11 41
250 feet of typical coax vs optical fiber
Acknowledgement: Edward Ackerman, Photonic Systems, Inc.
~$3/ft
Fiber Optic Properties• Attenuation
– Absorption: by the basic constituent atoms of the material itself (intrinsicabsorption) or by impurity atoms
– Radiative loss: caused by bending– Rayleigh scattering: arises from variations in the material density
• Dispersion– Intermodal dispersion: different spatial modes travel at different velocities– Chromatic dispersion: different wavelengths travel at different velocities– Polarization‐mode dispersion: different polarizations travel at different
velocities• Nonlinearity
– Stimulated Brillouin scattering: arises when the photons generate acoustic waves along the fiber length, producing periodic variations in refractive index
– Stimulated Raman scattering: absorption of photons and re‐emission at a longer wavelength
6.101 Spring 2020 Lecture 11 42
Acknowledgement: Edward Ackerman, Photonic Systems, Inc.
Fiber Optics
6.101 Spring 2020 Lecture 11 43
Fiber spool
Single-mode optical fiber
Multi-mode optical fiber
Polarization-maintaining optical fiber
Acknowledgement: Edward Ackerman, Photonic Systems, Inc.Source: C. Cox, Analog Optical Links, Cambridge University Press, 2004.
Electronic (e.g. coaxial‐cable) vs Photonic (e.g. fiber‐optic)
6.101 Spring 2020 Lecture 11 44
LNA LNA
LO
Electronic Mixer
LO
Electronic Mixer
Coax Link with RF Amplification
Coax
Low-noise Amplifier
(LNA)
Coax
Low-noise Amplifier
(LNA)
EDFAOptical Source
Photodetector
Fiber-optic Link with Optical Amplification
Optical Fiber
Erbium-Doped Fiber Amplifier
(EDFA)
Optical Fiber
Modulator EDFAErbium-Doped Fiber Amplifier
(EDFA)
Acknowledgement: Edward Ackerman, Photonic Systems, Inc.
Analog Photonic LinkDirect Modulation
6.101 Spring 2020 Lecture 11 45
RFInput
RFInput
PhotodetectorDiodeLASERor LED
RFOutput
RFOutput
DC
Optical Propagation Medium(e.g., optical fiber)
Direct Modulation Photonic Link
DC
45
Acknowledgement: Edward Ackerman, Photonic Systems, Inc.
Fiber Optics
• Fiber optic transmitters/receivers inexpensive• No fiber stripping• Mates with standard fiber cable• $5‐20
6.101 Spring 2020 Lecture 11 46
Video Over Fiber
6.101 Spring 2020 Lecture 11 476.101 Spring 2020 48
Important Missing Links
• The real world is an analog world. However, computing is best perform via digital systems (i.e. the processing of data with 0’s and 1’s).
• Digital-Analog conversion
• Analog-Digital Conversion
6.101 Spring 2020 49
Analog vs Digital
• Analog systems/devices work with information in a continuous stream: clock with hands, mercury thermometer, vinyl records, analog meters, calipers.
• Digital systems/devices work with information in a discontinuous stream (0,1): digital thermometer, digital meters, computers.
6.101 Spring 2020 50
Music – An Example
• CD’s are digital systems that sample and stores audio data– sampling rate: 44.1 khz
(3 samples/line)×(490 lines/frame) ×(30 frames/s) = 44.1 kHz
– data stored in 16 bit format; implies 216 = 65,536 possible output levels
• DVD Audio samples at 96-192kHz/24 bits
• Analog records have an infinite number of output levels.
Do Bits Matter? Quantization*
How many bits are needed to represent 256 shades of gray (from white to black)?
6.101 Spring 2020 51
Bits Range Bits Range1 2 5 322 4 6 643 8 7 1284 16 8 256
* Acknowedgement: Quantization slides and photos by Prof Denny Freemen 6.003
Quantization: Images
6.101 Spring 2020 52
Converting an image from a continuous representation to a discrete representation involves the same sort of issues.
This image has 280 × 280 pixels, with brightness quantized to 8 bits.
Quantizing Images
6.101 Spring 2020 53
8 bit image 7 bit image
Quantizing Images
6.101 Spring 2020 54
8 bit image 6 bit image
Quantizing Images
6.101 Spring 2020 55
8 bit image 5 bit image
Quantizing Images
6.101 Spring 2020 56
8 bit image 4 bit image
Quantizing Images
6.101 Spring 2020 57
8 bit image 3 bit image
Quantizing Images
6.101 Spring 2020 58
8 bit image 2 bit image
Quantizing Images
6.101 Spring 2020 59
8 bit image 1 bit image
Quantizing Colors
6.101 Spring 2020 60
4 bit – 16 colors
8 bit – 256 colors24 bit – 16M colors
6.101 Spring 2020 61
D-A Conversion (DAC)• Problem: take a digital signal and convert to an analog voltage: R-2R ladder
0001 -> 1/16 * 5 volt 0010 -> 2/16 * 5 volt0011 -> 3/16 * 5 volt. . .1101 -> 14/16 * 5 volt1111 -> 15/16 * 5 volt
• Note that the outputs are at discrete levels – not continuous!
R
R
+5
R
+5
R
+5
R
+5
2R 2R 2R 2R
Vo
Bo B3B2B1
031223 2
121
21
21 BBBB 5
6.101 Spring 2020 Lecture 11 62
Analog to Digital Conversion (ADC)
• Successive approximate conversion steps– Scale the input to 0-3 volts (example)– Sample and hold the input– Internally generate and star case ramp and compare
• Flash Compare– Compare voltage to one of 2n possible voltage levels. 8
bit ADC would have 255 comparators.
• Note that most ADC have quantizing errors (number of bits resolution)
Digital to Analog
6.101 Spring 2020 Lecture 11 63
• Common metrics:• Conversion rate – DC to ~500 MHz (video) • # bits – up to ~24 • Voltage reference source (internal / external; stability)• Output drive (unipolar / bipolar / current) & settling time• Interface – parallel / serial• Power dissipation
• Common applications: • Real world control (motors, lights)• Video signal generation• Audio / RF “direct digital synthesis”• Telecommunications (light modulation)• Scientific & Medical (ultrasound, …)
6.101 Spring 2020 Lecture 11 64
Successive Approximation AD
Sigma Delta ADC
6.101 Spring 2020 Lecture 11 65
integrator
1‐bit DAC
+ +‐ Bit stream
‐+
Analoginput
1‐bit ADC
DecimatorBit stream samples
REFV
REFINREF VVV
0: add VREF, 1: subtract VREF
With VREF=1V: VIN=0.5: 1110…, VIN=‐0.25: 00100101…, VIN=0.6: 11110
http://designtools.analog.com/dt/sdtutorial/sdtutorial.html#instructions
Average of bit stream (1=VREF, 0=‐VREF) gives voltage
Computes average, produces N‐bit result
Only need to keep enough samples to meet Nyquist rate
6.101 Spring 2020 Lecture 11 66
http://www.analog.com/en/design-center/interactive-design-tools/sigma-delta-adc-tutorial.html
6.101 Spring 2020 Lecture 11 67
So, what’s the big deal?
• Can be run at high sampling rates, oversampling by, say, 8 or 9 octaves for audio applications; low power implementations
• Feedback path through the integrator changes how the noise is spread across the sampling spectrum.
Signal
Noise
Power
2sk
Spectrum of modulator’s output
Frequencies attenuated by LPF2
s
6.101 Spring 2020 Lecture 11 68
Binary codeAn
alo g
Ideal
Offseterror
Offset – a constant voltage offset that appears at the output when the digital input is 0
Binary code
Analog
Ideal
Gainerror
Gain error – deviation of slope from ideal value of 1
Binary code
Ana log
Ideal
Integralnonlinearity
Integral Nonlinearity – maximum deviation from the ideal analog output voltage
Differential nonlinearity – the largest increment in analog output for a 1‐bit change
Binary code
Analog
Ideal
Non‐monoticity
Non‐idealities in Data Conversion
Look for team mates!Project ideas?
6.101 Spring 2020 Lecture 11 69