0% found this document useful (0 votes)
22 views68 pages

EE250Unit6 ADC

Uploaded by

花海
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views68 pages

EE250Unit6 ADC

Uploaded by

花海
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 68

EE 250 | ADC / Sensing | Unit 6 |

EE 250 Unit 6
Sensing and Analog-to-Digital Conversion (ADC)

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 2

IoT Architecture

https://www.quicsolv.com/internet-of-things/how-iot-works/

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 3

Basic Embedded Device Architecture

SENSORS

LOW POWER WIRELESS


ENERGY SOURCE
MICROPROCESSOR RADIO TRANSCEIVER

ACTUATORS

This Photo by Unknown Author is


licensed under CC BY-SA
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 4

Sensing is data => Data is information => Information is valuable

IMPORTANCE OF SENSING

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 5

I3, an IoT Community


Marketplace for Smart Cities

For more details, please visit http://i3.usc.edu/

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 6

Internet of Things (IoT) in Cities


• Applications and uses for IoT, involving real-time data
streams, are growing:
▪ Vehicular traffic sensing
▪ Parking Meters
▪ Security
▪ Air quality monitoring
▪ Smart Trash Cans

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 7

Challenges of IoT 1.0


● Each application is developed independently, as a Silo

● Different agencies simultaneously adopting different


applications and use cases

● Cloud vendors have been developing proprietary solutions


and pitching to cities

● Concerns about vendor lock-in and interoperability

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 8

The I3 Consortium

http://i3.usc.edu/

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 9

The I3 Consortium

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 10

I3 as the narrow waist


Interoperability at the Data Layer Apps and devices are no
longer siloed and locked
From: To:
in.

IOT data can be accessed


App App App App App App by apps as needed and in
a shared environment

IOT devices are not tied to


apps; migration to new
I3 apps can be managed

IOT device owners control


data dissemination and
access to actuation
Dev Dev Dev Dev Dev Dev resources

ecosystem ecosystem ecosystem

10
http://i3.usc.edu/

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 11

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 12

I3 Prototype
I3 Platform Admin
Seller

Marketplace Buy data


Buyer
Website Frontend

Website
BACnet client Subscriber Client
Database

Parser Access
Database

Broker Log

Publisher Client
Visualization
Backend
Pub-Sub Broker

Authentication
Plugin https://github.com/anrgusc/i3-core
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 13

Interfacing sensors to digital processors

ANALOG TO DIGITAL CONVERTERS

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 14

Motivation / Orientation
• Look at sparkfun.com and the Sensor section, pick a sensor or two
that sound interesting and any documentation for the part (or chips
used)
▪ How do you interface to it?
▪ What terms are unfamiliar? What questions does it make you ask?
• Look at the ATMega328P (Arduino processor) manual, chapter 24
introduction (page 246) to see some of the related terminology and
concepts regarding ADCs that we will cover

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 15

REVIEW FROM EE109

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 16

Analog to Digital Conversion


• 1 Analog signal can be converted to a set of digital signals
(0’s and 1’s)
• 3 Step Process
▪ Sample
▪ Quantize (Measure)
▪ Digitize
11000

1
volts 0
1
Analog to 0
1
Digital 0
1
Converter 0
1
0

time time

Analog Digital
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 17

Sampling
• Measure (take samples) of the signal's voltage at a regular time
interval
• Sampling converts the continuous time scale into discrete time
samples

∆t
Original Analog Signal Sampled Signal
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 18

Quantization
• Voltage scale is divided into a set of finite numbers (e.g. 256 values: 0 – 255)
• Each sample is rounded to the nearest number on the scale
• Quantization converts continuous voltage scale to a discrete (finite) set of
numbers

5V 5V 255

227

0V 0V 000
∆t
Sampled Signal Each sample is quantized
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 19

Digitization
• The measured number from each sample is converted to a set of 1’s
and 0’s

Measurement Scale
255
Sample

227 227 = 11100011

000
Each sample is quantized Quantized value is converted
to bits
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 20

ADC Voltage Reference & Sampling


• ADC's can only measure voltages within the reference range
▪ ADC's will have inputs that define the HIGH (Vhi,ref) and LOW (Vlow,ref) reference voltages
▪ Any voltage outside that range will yield the min. or max. digital value (referred to as clipping or
saturating)
▪ Voltages between the limits are converted linearly to digital values.
• The ADC must also define a sampling rate
Vref_Hi = Vdd 4095 = $FFF
3999 4095 4095
Input
Voltage

Vhi,ref 2273 Digital MAX (e.g. 1023)


0x3ff = 915 1900 1023
1500 862 Digitized number
Input 1023
0x1ff = 511 from ADC
voltage
0 0
Vref_Lo = GND 0 = $000
Vlow,ref 230 Digital MIN (e.g. 0)
12-bit ADC
scale
ADC Sampling CLK
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 21

Sampling Rates and Quantization Levels

• Higher sampling rates and quantization levels produce


more accurate digital representations

∆t

Lower sampling rate Higher sampling rate and


and quantization levels more quantization levels
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 22

Digital Sound
• CD Quality Sound
▪ 44.1 Kilo-samples per second
▪ 65,536 quantization levels (16-bits
per sample)
▪ 44.1KSamples * 16-bits/sample =
705 Kbps
• MP3 files compress that
information to 128Kbps – 320
Kbps

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 23

SIGNALING AND QUANTIZATION ERROR

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 24

Relating Analog to Digital


• If 𝑉𝑟𝑒𝑓− = 𝑉𝐿𝑂 = 1𝑉 and 𝑉𝑟𝑒𝑓+ = 𝑉𝐻𝐼 = 5𝑉 and we use a 4-bit ADC that
implies each digital unit corresponds to:
𝑉𝐻𝐼 −𝑉𝐿𝑂 4
= = 0.25𝑉
24 16
• A digital value of x would correspond to :
𝑥∙ 𝑉𝐻𝐼 −𝑉𝐿𝑂
𝑉𝐿𝑂 +
24

Analog Voltage Digital Value


𝑉𝐻𝐼 2𝑛 − 1

𝑉𝐿𝑂 0
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 25

Quantization Error
• The precision of the ADC (and error) is defined by the
number of bits used and the voltage range 4.445V
4.45V 227 227
4.43V 226
▪ 8-bit ADC implies 256 levels
4.41V 225
▪ 10-bit ADC implies 1024 levels
• In the diagram to the right, 1 digital unit is equivalent to
what ΔV? The sample value must be
rounded to the nearest
▪ 0.02V
"representable"
• When a signal is sampled it must be "rounded" to one of (in this case integer) value.

the potential digital (discrete) values


• If a reading of 227  4.45V, what range could the
ACTUAL voltage have been? 4.45V 227
▪ 4.45V ± 0.01V ??? V
4.43V 226 226
• Thus, due to the ADC introducing error by rounding, we 225
say the reading has an error of ±½ LSB [the digital unit]
(i.e. ½ of whatever voltage corresponds to 1 digital unit
= ½ of 0.02V = 0.01V)
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 26

Differential vs. Single-Ended


• Most ADC's allow conversion of
▪ Single-ended: One signal whose amplitude we measure relative to GND or
some reference
▪ Differential signals: two signals whose difference is what we want to
measure (within some min or max voltage range)
o Differential signals have
some desirable properties
(including better noise
immunity) which we will
study in a future unit

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 27

Choosing the sampling rate…

NYQUIST THEOREM

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 28

Nyquist's Sampling Theorem


• Recall: The bandwidth (BW) of a signal is the range of frequencies
present in the signal
▪ BW = 𝑓𝑚𝑎𝑥 − 𝑓𝑚𝑖𝑛

• Nyquist theorem: To correctly digitize an analog signal (and be


able to recover the original analog signal) requires the sampling
frequency, 𝑓𝑠 to be twice the maximum frequency component,
𝑓𝑚𝑎𝑥 , in the signal (i.e. 𝑓𝑠 ≥ 2𝑓𝑚𝑎𝑥 )
▪ If 𝑓𝑠 < 2𝑓𝑚𝑎𝑥 then the original signal cannot be faithfully reproduced from the
digitized signal; or put another way, the digitized signal has lost aspects of
information present in the original signal
▪ 𝑓𝑚𝑎𝑥 is referred to as the Nyquist frequency or Nyquist rate
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 29

Examples
• Telephone system
▪ Voice usually between 300Hz – 3.4kHz
▪ Digitized at fs >= 6.8 kHz (usually 8KHz)
• CD quality sound
▪ Digitized at 44.1 kHz
▪ Implies fmax (Nyquist freq.) <= 22.05 kHz

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 30

Aliasing
• So what happens if we
sample at less than the
Nyquist rate?
• Aliasing!
▪ Occurs when a sampled signal
fits multiple possible signals
▪ Loss of information or
inaccurate results

Figures generated from code available at:


https://www.mathworks.com/matlabcentral/fileexchange/43729-aliasing?s_tid=mwa_osa_a
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 31

Aliasing Example
• The plots below show two cosine waves sampled at 𝑓𝑠 = 100𝐻𝑧
▪ A 60 Hz cosine wave will alias with a 40Hz
▪ A 70 Hz cosine wave will not alias to a 40Hz but a 30Hz cosine wave

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 32

Who Aliases with Whom?


• Given two frequencies, 𝑓1 and 𝑓2 where 𝑓2 > 𝑓1 ,
▪ If 𝑓2 + 𝑓1 𝑚𝑜𝑑 2𝑓𝑁𝑦𝑞𝑢𝑖𝑠𝑡 = 0 or 𝑓2 − 𝑓1 𝑚𝑜𝑑 2𝑓𝑁𝑦𝑞𝑢𝑖𝑠𝑡 = 0
▪ Then, 𝒇𝟏 and 𝒇𝟐 will alias with each other

Frequency
components we
think we have after
sampling
(normalized to fs)

Actual frequency components normalized (to fs)


The Scientist and Engineer's Guide to Digital Signal Processing
by Steven W. Smith, Ph.D., Ch. 3
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 33

Anti-aliasing Filter
• To avoid the effects of aliasing, a low-pass filter (LPF) known as an anti-aliasing filter is
often placed in front of the ADC to remove any unwanted high-frequency components in
the signal to avoid their aliasing effects
▪ Even if your signal is band limited, noise and other interference sources may add high-
frequency components
▪ Suppose we have a signal whose desired frequency components lie below 5 kHz and so we
sample at 10 kHz. However, the signal (due to noise or other causes) has a high frequency
component at 17 kHz. Without an anti-aliasing filter (with 𝑓𝑐𝑢𝑡𝑜𝑓𝑓 = 5 kHz) we would see the
17kHz component at 3 KHz.

The Scientist and Engineer's Guide to Digital Signal Processing


by Steven W. Smith, Ph.D., Ch. 3
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 34

ARCHITECTURES

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 35

Architectures
• We will examine 2 basic ADC architectures
▪ Flash
▪ Successive Approximation
• Others exist
▪ Delta-sigma
▪ Pipelined
▪ Integrating

https://www.eetimes.com/document.asp?doc_id=1276974
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 36

Review: Voltage Dividers


• A shortcut application of KVL, KCL, and Ohm's law
when two or more resistors are in series (must be in + Vtot -
series) i R1 R2

• When two resistors are in series we can deduce an


+V1- +V2-
expression for the voltage across one of them
▪ (1) i = Vtot / (R1 + R2); (2) V1 = i*R1; (3) V2 = i*R2
▪ Substituting our expression for i into (2) and (3)
𝑅1 𝑅2
𝑉1 = 𝑉𝑡𝑜𝑡 𝑎𝑛𝑑 𝑉2 = 𝑉𝑡𝑜𝑡
𝑅1 + 𝑅2 𝑅1 + 𝑅2
• The voltage across one of the resistors is
proportional to the value of that resistor and the
total series resistance
▪ If you need 10 gallons of gas to drive 500 miles, how much gas
you have you used up after driving 200 miles?
o Gas = Voltage, Mileage = Resistance

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 37

Analog Amplifier/Comparators
• A common circuit in an ADC is an analog amplifier
(e.g. an op-amp) used as a comparator
• Characteristic equation when there is no feedback i=0
from the output back to the input is:
𝑉𝑜𝑢𝑡 = 𝐴𝑂 𝑉 + − 𝑉 − where 𝐴𝑂 is very large
• This leads to its use as an analog comparator i=0

▪ If V+ > V-, then output voltage will quickly saturate at


Vs+
https://electrosome.com/opamp/
▪ If V+ < V-, then output voltage will quickly saturate at
Vs-
▪ If we connect a reference voltage Vref to V- and an Vout
input voltage, Vin, to V+ then the circuit will output a Vs+
Vs+ when Vin > Vref and Vs- otherwise
• The input resistance of V+ and V- can be considered Vs-
(V+ - V-)
infinitely large so that no current is consumed at the
inputs (this is important as we'll see on the next slide)
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 38

Flash ADC
Graphic typo: An additional resistor should

• By using a resistor ladder to form a large


be here between Vref and the comparator
input

voltage divider with 2n-1 comparators (𝟐𝒏 − 𝟏)


𝟎 Suppose Vin =
0.7V, and Vref =
we can generate reference voltages at 𝟐𝒏
∙ 𝑽𝒓𝒆𝒇 1.0V
𝟎
increments of: (𝟐𝒏 − 𝟐)
∙ 𝑽𝒓𝒆𝒇
(1) 𝟐𝒏
▪ ∙ 𝑉𝑟𝑒𝑓 𝟏
2𝑛 (𝟐𝒏 − 𝟑)
• Each increment of the reference voltage 𝟐𝒏
∙ 𝑽𝒓𝒆𝒇
𝟏 𝟏
will be compared to the input voltage
𝟏
▪ This will generate "thermometer" code 0
𝟏
▪ These values can then be encoded to 𝟐 𝟏
binary ∙𝑽
𝟐𝒏 𝒓𝒆𝒇

• A 10-bit ADC will require how many 𝟏


∙𝑽
𝟏
𝟐𝒏 𝒓𝒆𝒇
comparators?
▪ 1023!! (Size scales poorly)
https://www.allaboutcircuits.com/textbook/
digital/chpt-13/flash-adc/

https://www.electronics-tutorial.net/analog-integrated-circuits/data-converters/flash-type-adc/index.html
https://www.maximintegrated.com/en/app-notes/index.mvp/id/810
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 39

Successive Approximation ADC


• Iterative approach using only 1 result[1 to n] // bit array
VDAC = Vlo_ref

Algorithm:
analog comparator and Vref = Vhi_ref – Vlo_ref
for i=1 to n
generating 1-bit of the result at Vcomp = VDAC + Vref/2i
if Vin >= Vcomp
a time result[i] = 1
VDAC = Vcomp
• Uses a DAC to generate else
result[i] = 0
different voltages to compare
with the input
• Performs a "binary-like search"
to approximate the input
voltage

https://www.maximintegrated.com/en/app-
notes/index.mvp/id/1080
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 40

Successive Approximation ADC


• Below is a block diagram of a successive approximation
ADC

Examples showing successive


iterations:

VComp Vin Cmp Reg


0.5*Vref 0.35*Vref 0 0---
0.25*Vref 0.35*Vref 1 01--
0.375*Vref 0.35*Vref 0 010-
0.3125*Vref 0.35*Vref 1 0101
0.34375*Vref 0.35*Vref 1 0101 1

After rounding: 0110


6/16*Vref = 0.3125*Vref

https://www.maximintegrated.com/en/app-notes/index.mvp/id/1080
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 41

Successive Approximation ADC


• Notice that while the analog voltage is sampled at one
rate, 𝑓𝑠 , the ADC must work at a higher rate to compute
the approximation
• For n-bits of resolution, the ADC must work at a rate of
𝑛 ∗ 𝑓𝑠

Other ADC architectures exists (e.g. Delta-Sigma, etc.)


with various pros and cons
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 42

ADC Architecture Comparison


Flash SAR Delta-Sigma
Data rate Very high-speeds Medium (5-20 Low to medium
(Gsps) Msps) (usually Ksps)
Resolution Usually limited to Good resolution High resolution
8-10 bits (8-18 bits) (24 bits) if lower
data rates are
acceptable)
Size Area increases Areas increases Area is roughly
exponentially linearly with constant for
with increased increased increased
resolution resolution resolution
Power Very high Low Medium

https://www.electronicdesign.com/adc/what-s-difference-between-sar-and-delta-sigma-adcs
© 2024 by Mark Redekopp. This content is protected and may not behttps://www.maximintegrated.com/en/app-notes/index.mvp/id/2094
shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 43

CC 2538 CASE STUDY

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 44

CC 2538
• Uses a sigma-delta ADC
▪ 𝑓𝑆 = 4MHz
▪ Can trade data rate and 𝑓𝐷
• Section 15.2.7 in PDF (and page 379)
▪ http://www.ti.com/lit/ug/swru319c/swru319c.pdf
• TCONV = (decimation rate + 16) × 0.25 μs.

Effective Resolution Decimation Tsamp Fsamp


7-bits 64 20us =50kHz

9-bits 128 36us =27.78 kHz

10-bits 256 68us =14.705 kHz

12-bits 512 132us = 7.758 kHz

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 45

REVIEW EXERCISES

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 46

Review Questions 1
• Show how the operation of a 3-bit successive approximation ADC
with VLO=1V and VHI=6V would convert an input of 5V.

• If the ADC used a FLASH architecture what reference voltages would


be generated as input to each analog comparator?

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 47

Review Questions 2
• A signal is digitized at 5 Megasamples/second, where would a noise
source at 8.1 MHz appear in the frequency domain of the digitized
signal?

• What would you use in an attempt to remove the noise source?

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 48

SENSOR TYPES

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 49

Electric Signals
• Information is represented
electronically as a time-varying
voltage
▪ Each voltage level may represent
a unique value
▪ Frequencies may represent
unique values (e.g. sound)

Sound converted to electronic signal


(voltage vs. time)

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 50

Microphone
• Vibrations cause the coil to move changing the magnetic
field which induces a voltage according to Faraday's law

https://www.electronics-tutorials.ws/io/io_8.html
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 51

Images
• Digital Camera
▪ CCD’s (Charge-Coupled Devices) Color Filters

output a voltage proportional to CCD’s

the intensity of light hitting it


▪ 3 CCD’s filtered for measuring
Red, Green, and Blue light
produce 1 color pixel

More info: http://www.science.ca/scientists/scientistprofile.php?pID=129


http://www.microscopy.fsu.edu/primer/digitalimaging/concepts/ccdanatomy.html
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 52

Thermal Sensing
• Thermistor
▪ Changes its resistance based on temperatures (e.g. 10kΩ at 25⁰C,
100Ω at 100⁰C)
• Resistive Temperature Detectors
▪ Like a thermistor but with greater linearity
• Thermocouple
▪ Use two different types of metal joined at one point
▪ The junction of two different metals (materials) will create a small
voltage across the junction
▪ This voltage is also dependent on temperature
▪ So by measuring the junction voltage, temperature can be inferred
• Several others exist

https://www.electronics-tutorials.ws/io/io_3.html
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 53

Linearity
• Often it is desirable for the sensor to
exhibit linearity over the desired range
of inputs
• Non-linear sensors may lead to less
accurate results or require more
processing to convert

Temp./Resistance Relationship
for a sample thermistor

https://eecs.oregonstate.edu/education/docs/datasheets/10kThermistor.pdf
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 54

Photoresistor
• Photoresistor causes the resistance
of a material to change based on
the amount of photons striking it
▪ Full moon at night: 0.3-0.5 lux
▪ Common indoor lighting: 300-500 lux
▪ Overcast day: 1000 lux
▪ Full daylight (not direct sunlight):
10000 or more

Source: https://learn.adafruit.com/photocells/measuring-light
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 55

Accelerometer
• GrovePi accelerometer
sensor range can detect -1.5g
to +1.5g on each axis
• Each axis value can be
digitized by a 6-bit ADC
• Result is a 6-bit 2's
complement
▪ 0g = 00000
▪ -1.5g = 100000
▪ +1.453g = 011111
• Some sensors have built in
ADCs and provide a serial
(I2C, SPI, UART) or other
digital interface that can
easily be connected to a
microcontroller

https://www.explainthatstuff.com/accelerometers.html
https://raw.githubusercontent.com/SeeedDocument/Grove-3-Axis_Digital_Accelerometer-1.5g/master/res/MMA7660FC.pdf
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 56

Other Sensor Types


• Proximity
▪ Often use magnetic field changes to sense movement or objects
• GPS
• Environmental (humidity, barometric pressure)
• Biological
• Imaging
• Flex/force, motion

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 57

Micro-Electro-Mechanical Systems

MEMS

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 58

Idea of MEMS
• MEMS = Micro Electro-Mechanical Systems
• Design and fabricate micro-sensors, micro-actuators, and other
structures usually on the same chip
• Read more:
▪ https://www.memsnet.org/mems/what_is.html

http://sensera.com/2018/wp-content/uploads/2018/04/What-are-MEMS.pdf
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 59

A MEMS Gyroscope

http://memsjournal.typepad.com/.a/6a00d8345225f869e20148c7d54d63970c-pi
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 60

MEMS Mirror Array


• For projection systems

http://www.chipworks.com/about-chipworks/overview/blog/stmicroelectronics-micromirrors-
microvision-and-sony-bring-pico
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 61

MEMS Actuators

https://www.sandia.gov/mstc/_assets/images/mems/gallery/gears/2.jpg
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 62

Other Architectures
• Only if time allows

© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 63

Delta Modulation (If Time Permits)


• Idea: Use only a 1-bit ADC in hardware to build an ADC
with more bits

If 1: select pos. charge,


else select neg. charge

A capacitor:
Stores charge
and the total
charge represents
the voltage level
(can add or
remove charge)

The Scientist and Engineer's Guide to Digital Signal Processing


by Steven W. Smith, Ph.D., Ch. 3
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 64

Delta Modulation
• Sample operation

1 0 1 0 1 1 1 1

10 10 10 10 0 0 0 0 >=

3 2 1 0 1 0 1
0

But our goal is to build an ADC


not generate an approximation of
the analog signal.
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 65

Delta Sigma ADC Idea


• Imagine we took a sample of the analog voltage and charged a capacitor to that
voltage and then iteratively reduced it by
1-bit worth of the voltage range
▪ Note: the illustrated approach is similar but not exactly how delta-sigma ADCs work

Vsample,1=5.2V
VHI 8V
3-bit ADC Vsample,2=2.3V
1111100
Vsample Vin + 1100000
Vsample,1 5.2V
Counter 5
-
∆ ( Σ)
Vhi/2n 2

Vsample,2 2.3V
If 1, remove
Vref
VL 0V
O
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 66

Delta Sigma ADC Concepts


• A delta sigma ADC samples the data and generates a pulse stream at rate of 𝑓𝑆
• Those are fed to a digital filter which "sums" the stream over a moving window
generating samples at a high rate
• Those samples are then "decimated" to produce samples at a rate of 𝑓𝐷 (only
keep 1
of every 𝑓𝑆 /𝑓𝐷 ) samples
• Key Idea: Lower data
rates (higher decimation)
provide more time per
sample and thus greater
accuracy

http://www.ti.com/lit/an/slyt423a/slyt423a.pdf | http://www.ti.com/lit/an/slyt438/slyt438.pdf
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.
EE 250 | ADC / Sensing | Unit 6 | 67

Delta Sigma ADC

The Scientist and Engineer's Guide to Digital Signal Processing by Steven W. Smith, Ph.D., Ch. 3
http://www.ti.com/lit/an/slyt423a/slyt423a.pdf
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed. | http://www.ti.com/lit/an/slyt438/slyt438.pdf
EE 250 | ADC / Sensing | Unit 6 | 68

Modeling Quantization Error


• The sensor may introduce some attenuation or gain and the ADC may introduce noise
▪ Sensor can also introduce noise but let's ignore this for now
• We can model the quantization error as noise with a maximum value of ±½ LSB
1 1
▪ Example: An 8-bit ADC may introduce an error of: of the full-scale ADC range (e.g. 5V). Thus,
2 256

• If we assume the noise is uniformly distributed between [− , + ] LSB, then the standard
1
2
1
2
1
deviation is = 0.29 LSB
12

Actual Sensor ADC


Signal Sensed Signal 𝑦𝑚 𝑡 =
* + 𝑘𝑦 𝑡 + 𝑛(𝑡)
y(t)

𝑘 𝑛2 (𝑡)
© 2024 by Mark Redekopp. This content is protected and may not be shared, uploaded, or distributed.

You might also like