SlideShare a Scribd company logo
1 of 23
Download to read offline
Signal Processing in So.ware
and Electric Field Sensing
CSE 466: So.ware for Embedded Systems
Winter 2009
B. Mayton <bmayton@cs.washington.edu>
University of Washington CSE & Intel Research SeaMle
CSE 466 Winter 2009 1
Electric Field Sensing
Labs 3 and 4: Building a Sensor
• You’ll build an electric field sensor with basic
components and your AVR microcontroller
– Can sense your hand above the board without
actually touching it
– Transmit and receive signals are generated and
demodulated in so.ware
– Will send the sensor readings to a PC for further
processing and moving around in a color space
CSE 466 Winter 2009 2
Electric Field Sensing
E‐Field Sensing in Nature
• Generates an electric
field around 1 kHz
• Uses E‐field to detect
prey, avoid objects,
and communicate
CSE 466 Winter 2009 Electric Field Sensing 3
Black Ghost Knifefish
(Apteronotus albifrons)
Electric Field Sensors: Applicacons
• CSE 466 Winter 2008
– added 4‐channel E‐field sensor
(the “AirScck”) to the iMote 2
to allow control of a soccer
player in a mulcplayer game
CSE 466 Winter 2009 Electric Field Sensing 4
Electric Field Sensors: Applicacons
• Personal Roboccs at Intel Research SeaMle
CSE 466 Winter 2009 Electric Field Sensing 5
• E‐Field adds sense of
“Pretouch” to a robot hand
and arm, allowing it to detect
that it is close to objects
without touching them
Theory of Operacon
• Create an AC electric field with constant amplitude
with transmit electrode
• Measure current induced in receive electrode
• Nearby grounded objects shunt some current to
ground, reducing the received current.
CSE 466 Winter 2009 Electric Field Sensing 6
Transmit
Receive
Object in range
of sensor
Parts of the Sensor
CSE 466 Winter 2009 Electric Field Sensing 7
Transmit Antenna
Receive Antenna
Analog Front‐End
Transmit Resonator
Waveform Generacon
(Timer 0 Output Compare)
Sampling (ADC)
Demodulacon (So.ware)
Transmikng an Electric Field
• Use cmer hardware on AVR to generate a
square wave; frequency can be tuned with
prescaler value and output compare value
• Resonator circuit boosts 5V square wave to a
sine wave with an amplitude of around 100V
• Transmit in the tens of kHz range; higher
frequencies work beMer but give less cme to
process interrupts
CSE 466 Winter 2009 Electric Field Sensing 8
Resonant Circuits
• Driving a resonant circuit with small amounts of
energy at the right cmes (at the resonant
frequency) will cause high‐amplitude oscillacons
CSE 466 Winter 2009 Electric Field Sensing 9
• The LC resonator on the
sensor board allows the AVR
to create a large electric field
from a supply of only 5V
• The resonant frequency of
an LC circuit is
€
f =
1
2π LC
Amplifying the Received Signal
• Transimpedance amplifier converts current flowing into
received electrode into voltage
• Voltage gain stage amplifies the signal to levels that
work well with the ADC in the AVR
CSE 466 Winter 2009 Electric Field Sensing 10
Operaconal Amplifiers
• Very useful, versacle, and ubiquitous analog circuit
devices
– amplify voltages
– can turn high‐impedance signals into low‐impedance
signals (weak signals into robust signals)
– perform mathemaccal operacons on signals in the analog
domain (used to be how most signal processing was done)
• Signal processing has moved into the digital domain,
but op amps are scll useful, parccularly when it comes
to interfacing sensors with microcontrollers
CSE 466 Winter 2009 Electric Field Sensing 11
Operaconal Amplifiers
• Two input terminals: invercng (‐) and
non‐invercng (+)
– almost no current flows into the inputs
(they are high impedance)
• Voltage at output terminal is the
difference between the two inputs
mulcplied by some gain
• Output changes to try to keep the
voltages at both inputs equal to each
other
• Output is low impedance: we can draw
some current from it without affeccng
its voltage significantly
CSE 466 Winter 2009 Electric Field Sensing 12
The Analog Front‐End
• Now that we know about op amps, we’ll look at the two stages of
the analog front‐end.
• AGND is at 2.5V; this will add a DC offset to the output voltage,
bringing “zero” into the middle of our usable range for the ADC
CSE 466 Winter 2009 Electric Field Sensing 13
The Transimpedance Amplifier
• Converts current
entering the receive
electrode into a
voltage signal
– When no current is
flowing in from the
le., there is no
voltage drop across
the resistor, and the
output voltage will be
the same as the two
input terminals.
CSE 466 Winter 2009 Electric Field Sensing 14
0 µA
0 V
+ ‐
2.5 V
2.5 V
The Transimpedance Amplifier
• Converts current entering
the receive electrode into
a voltage signal
– Current entering from the
le. can’t go into the
invercng input, so it goes
through R3 and creates a
voltage drop
– In order to keep the
voltage at the invercng
input equal to the non‐
invercng input, the output
voltage must be decreased
CSE 466 Winter 2009 Electric Field Sensing 15
1 µA
1 V
+ ‐
2.5 V
1.5 V
The Voltage Amplifier
• Amplifies (and inverts)
the input voltage.
• Basic invercng op‐amp
configuracon
• Output voltage for the
circuit at the right is
CSE 466 Winter 2009 Electric Field Sensing 16
€
vout = −vin
R5
R4
Where are we now?
• We’ve created an electric field and it’s induced
a current in our receive electrode.
• We’ve amplified the received signal and
brought it into a usable range for our AVR’s
ADC to sample.
• Now, we need to make sense of the signal
CSE 466 Winter 2009 Electric Field Sensing 17
Demodulacon
• We’ll be receiving our signal, but there will
also be a lot of noise.
• Need to recover the amplitude of our signal,
but ignore the noise.
CSE 466 Winter 2009 Electric Field Sensing 18
Demodulacon: Basic Idea
• Instead of one sample, we’ll
accumulate mulcple samples in
an intelligent manner.
• Sample at mulcple points on the
received waveform
• If we add samples when we’re
transmikng a posicve signal and
subtract signals when we’re
transmikng negacve signal, we
cancel out a lot of unwanted
noise (and the DC offset)
• Accumulate about 20 to 255
samples for a measurement
• Result of accumulacon represents
amplitude
CSE 466 Winter 2009 Electric Field Sensing 19
+ ‐ + ‐ ...
What about phase shi.s?
• If the samples aren’t perfectly in phase with the received
waveform, we’re missing out on signal‐to‐noise
• Gekng perfectly lined up is difficult—at high transmit
frequencies, even one instruccon cycle shi.s the sample by
quite a bit
• Solucon: also sample at 90˚ and 270˚ in addicon to 0˚ and
180˚, in a separate accumulator
• The accumulator for 0˚ and 180˚ is the in‐phase
component, and the 90˚ and 270˚ accumulator is the
quadrature component
• We can now recover the magnitude of the received signal
regardless of its phase:
CSE 466 Winter 2009 Electric Field Sensing 20
€
magnitude = inphase2
+ quad2
Timing Issues
• The ADC isn’t fast enough to make all these samples on every
period of the received waveform.
• Lining up the samples with the right parts of the waveform is a
challenge.
CSE 466 Winter 2009 Electric Field Sensing 21
• The ADC takes some cme to perform conversions, but the actual
sample‐and‐hold window is short and can be precisely placed.
• We can make the ADC’s samples synchronous with the transmiMed
waveform by using free‐running mode and sekng up the prescalers
so that the ADC samples every n + ¼ periods of the transmiMed
waveform.
but...
Timing
• The result is that we’re only
sampling every few periods of
the waveform, but we stay lined
up because we’re using the
same clock for the transmiMed
signal and the ADC.
• Since we set up the ADC to
sample every n + ¼ periods of
the transmiMed waveform, each
sample will be offset by 90˚.
• Each set of four samples gives
us the posicve and negacve
values to add to each of our two
accumulators.
CSE 466 Winter 2009 Electric Field Sensing 22
Implementacon in Labs 3 and 4
• For labs 3 and 4, you will:
– calculate prescaler and output compare values to enable synchronous
undersampling and demodulacon
– calculate the capacitor value needed to make the transmiMer resonant
at your transmit frequency
– build the e‐field sensor hardware
– use SPI and USB to send the values of the in‐phase and quadrature
accumulators to a PC
– use the PC to compute the magnitude of the received waveform from
its components
– use the value from the sensor as a virtual knob to move around in a
color space
– display a color wheel indicacng the current color on the PC screen, and
send it back to your AVR to be displayed on your tri‐color LED
CSE 466 Winter 2009 Electric Field Sensing 23

More Related Content

Similar to signal processing in software and electric field sensing

Operational amplifier UA741
Operational amplifier UA741Operational amplifier UA741
Operational amplifier UA741unni krishnan
 
OP AMP Applications
OP AMP ApplicationsOP AMP Applications
OP AMP Applicationsaroosa khan
 
Electrical measurement & measuring instruments [emmi (nee-302) -unit-5]
Electrical measurement & measuring instruments [emmi  (nee-302) -unit-5]Electrical measurement & measuring instruments [emmi  (nee-302) -unit-5]
Electrical measurement & measuring instruments [emmi (nee-302) -unit-5]Md Irshad Ahmad
 
Bipolar junction transistor characterstics biassing and amplification, lab 9
Bipolar junction transistor characterstics biassing and amplification, lab 9Bipolar junction transistor characterstics biassing and amplification, lab 9
Bipolar junction transistor characterstics biassing and amplification, lab 9kehali Haileselassie
 
Bipolar junction transistor characterstics biassing and amplification, lab 9
Bipolar junction transistor characterstics biassing and amplification, lab 9Bipolar junction transistor characterstics biassing and amplification, lab 9
Bipolar junction transistor characterstics biassing and amplification, lab 9kehali Haileselassie
 
Introduction to Electrickery
Introduction to ElectrickeryIntroduction to Electrickery
Introduction to ElectrickerySkep Theist
 
Data converter fundamentals
Data converter fundamentalsData converter fundamentals
Data converter fundamentalsAbhishek Kadam
 
Transistor cb cc ce power point transistor
Transistor cb cc ce power point transistorTransistor cb cc ce power point transistor
Transistor cb cc ce power point transistor2004akkuu
 
Ecd302 unit 04 (analysis)
Ecd302 unit 04 (analysis)Ecd302 unit 04 (analysis)
Ecd302 unit 04 (analysis)Xi Qiu
 
Ec6412 linear-integrated-circuit-laboratory
Ec6412 linear-integrated-circuit-laboratoryEc6412 linear-integrated-circuit-laboratory
Ec6412 linear-integrated-circuit-laboratoryPRADEEPJ30
 
Basic Electronic UNIT-IV PPT
Basic Electronic UNIT-IV PPTBasic Electronic UNIT-IV PPT
Basic Electronic UNIT-IV PPTPraveen Kunda
 
Design of CMOS operational Amplifiers using CADENCE
Design of CMOS operational Amplifiers using CADENCEDesign of CMOS operational Amplifiers using CADENCE
Design of CMOS operational Amplifiers using CADENCEnandivashishth
 
Integrated Circuit Applications
Integrated Circuit ApplicationsIntegrated Circuit Applications
Integrated Circuit ApplicationsUMAKANTH22
 
Ajal op amp
Ajal op ampAjal op amp
Ajal op ampAJAL A J
 
Difference amplifier and subtractor
Difference amplifier and subtractorDifference amplifier and subtractor
Difference amplifier and subtractorBhaveshChaudhari30
 

Similar to signal processing in software and electric field sensing (20)

Operational amplifier UA741
Operational amplifier UA741Operational amplifier UA741
Operational amplifier UA741
 
amplifiers
amplifiersamplifiers
amplifiers
 
OP AMP Applications
OP AMP ApplicationsOP AMP Applications
OP AMP Applications
 
Electrical measurement & measuring instruments [emmi (nee-302) -unit-5]
Electrical measurement & measuring instruments [emmi  (nee-302) -unit-5]Electrical measurement & measuring instruments [emmi  (nee-302) -unit-5]
Electrical measurement & measuring instruments [emmi (nee-302) -unit-5]
 
Bipolar junction transistor characterstics biassing and amplification, lab 9
Bipolar junction transistor characterstics biassing and amplification, lab 9Bipolar junction transistor characterstics biassing and amplification, lab 9
Bipolar junction transistor characterstics biassing and amplification, lab 9
 
Bipolar junction transistor characterstics biassing and amplification, lab 9
Bipolar junction transistor characterstics biassing and amplification, lab 9Bipolar junction transistor characterstics biassing and amplification, lab 9
Bipolar junction transistor characterstics biassing and amplification, lab 9
 
Introduction to Electrickery
Introduction to ElectrickeryIntroduction to Electrickery
Introduction to Electrickery
 
Lab1
Lab1Lab1
Lab1
 
Data converter fundamentals
Data converter fundamentalsData converter fundamentals
Data converter fundamentals
 
Testing
TestingTesting
Testing
 
Transistor cb cc ce power point transistor
Transistor cb cc ce power point transistorTransistor cb cc ce power point transistor
Transistor cb cc ce power point transistor
 
Ecd302 unit 04 (analysis)
Ecd302 unit 04 (analysis)Ecd302 unit 04 (analysis)
Ecd302 unit 04 (analysis)
 
Ec6412 linear-integrated-circuit-laboratory
Ec6412 linear-integrated-circuit-laboratoryEc6412 linear-integrated-circuit-laboratory
Ec6412 linear-integrated-circuit-laboratory
 
Basic Electronic UNIT-IV PPT
Basic Electronic UNIT-IV PPTBasic Electronic UNIT-IV PPT
Basic Electronic UNIT-IV PPT
 
Design of CMOS operational Amplifiers using CADENCE
Design of CMOS operational Amplifiers using CADENCEDesign of CMOS operational Amplifiers using CADENCE
Design of CMOS operational Amplifiers using CADENCE
 
chapter 3_bem.pptx
chapter 3_bem.pptxchapter 3_bem.pptx
chapter 3_bem.pptx
 
Integrated Circuit Applications
Integrated Circuit ApplicationsIntegrated Circuit Applications
Integrated Circuit Applications
 
Analog Electronics.pptx
Analog Electronics.pptxAnalog Electronics.pptx
Analog Electronics.pptx
 
Ajal op amp
Ajal op ampAjal op amp
Ajal op amp
 
Difference amplifier and subtractor
Difference amplifier and subtractorDifference amplifier and subtractor
Difference amplifier and subtractor
 

Recently uploaded

Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxUmerFayaz5
 
Botany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdfBotany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdfSumit Kumar yadav
 
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.Nitya salvi
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...Sérgio Sacani
 
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Lokesh Kothari
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTSérgio Sacani
 
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...ssifa0344
 
Pulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceuticsPulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceuticssakshisoni2385
 
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsHubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsSérgio Sacani
 
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...anilsa9823
 
GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)Areesha Ahmad
 
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls AgencyHire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls AgencySheetal Arora
 
VIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PVIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PPRINCE C P
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxgindu3009
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bSérgio Sacani
 
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡anilsa9823
 
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPirithiRaju
 
DIFFERENCE IN BACK CROSS AND TEST CROSS
DIFFERENCE IN  BACK CROSS AND TEST CROSSDIFFERENCE IN  BACK CROSS AND TEST CROSS
DIFFERENCE IN BACK CROSS AND TEST CROSSLeenakshiTyagi
 
Botany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsBotany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsSumit Kumar yadav
 

Recently uploaded (20)

Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptx
 
Botany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdfBotany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdf
 
The Philosophy of Science
The Philosophy of ScienceThe Philosophy of Science
The Philosophy of Science
 
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
❤Jammu Kashmir Call Girls 8617697112 Personal Whatsapp Number 💦✅.
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
 
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOST
 
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
 
Pulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceuticsPulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceutics
 
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsHubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
 
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
 
GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)
 
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls AgencyHire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
 
VIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PVIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C P
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptx
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
 
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
 
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
 
DIFFERENCE IN BACK CROSS AND TEST CROSS
DIFFERENCE IN  BACK CROSS AND TEST CROSSDIFFERENCE IN  BACK CROSS AND TEST CROSS
DIFFERENCE IN BACK CROSS AND TEST CROSS
 
Botany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsBotany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questions
 

signal processing in software and electric field sensing

  • 1. Signal Processing in So.ware and Electric Field Sensing CSE 466: So.ware for Embedded Systems Winter 2009 B. Mayton <bmayton@cs.washington.edu> University of Washington CSE & Intel Research SeaMle CSE 466 Winter 2009 1 Electric Field Sensing
  • 2. Labs 3 and 4: Building a Sensor • You’ll build an electric field sensor with basic components and your AVR microcontroller – Can sense your hand above the board without actually touching it – Transmit and receive signals are generated and demodulated in so.ware – Will send the sensor readings to a PC for further processing and moving around in a color space CSE 466 Winter 2009 2 Electric Field Sensing
  • 3. E‐Field Sensing in Nature • Generates an electric field around 1 kHz • Uses E‐field to detect prey, avoid objects, and communicate CSE 466 Winter 2009 Electric Field Sensing 3 Black Ghost Knifefish (Apteronotus albifrons)
  • 4. Electric Field Sensors: Applicacons • CSE 466 Winter 2008 – added 4‐channel E‐field sensor (the “AirScck”) to the iMote 2 to allow control of a soccer player in a mulcplayer game CSE 466 Winter 2009 Electric Field Sensing 4
  • 5. Electric Field Sensors: Applicacons • Personal Roboccs at Intel Research SeaMle CSE 466 Winter 2009 Electric Field Sensing 5 • E‐Field adds sense of “Pretouch” to a robot hand and arm, allowing it to detect that it is close to objects without touching them
  • 6. Theory of Operacon • Create an AC electric field with constant amplitude with transmit electrode • Measure current induced in receive electrode • Nearby grounded objects shunt some current to ground, reducing the received current. CSE 466 Winter 2009 Electric Field Sensing 6 Transmit Receive Object in range of sensor
  • 7. Parts of the Sensor CSE 466 Winter 2009 Electric Field Sensing 7 Transmit Antenna Receive Antenna Analog Front‐End Transmit Resonator Waveform Generacon (Timer 0 Output Compare) Sampling (ADC) Demodulacon (So.ware)
  • 8. Transmikng an Electric Field • Use cmer hardware on AVR to generate a square wave; frequency can be tuned with prescaler value and output compare value • Resonator circuit boosts 5V square wave to a sine wave with an amplitude of around 100V • Transmit in the tens of kHz range; higher frequencies work beMer but give less cme to process interrupts CSE 466 Winter 2009 Electric Field Sensing 8
  • 9. Resonant Circuits • Driving a resonant circuit with small amounts of energy at the right cmes (at the resonant frequency) will cause high‐amplitude oscillacons CSE 466 Winter 2009 Electric Field Sensing 9 • The LC resonator on the sensor board allows the AVR to create a large electric field from a supply of only 5V • The resonant frequency of an LC circuit is € f = 1 2π LC
  • 10. Amplifying the Received Signal • Transimpedance amplifier converts current flowing into received electrode into voltage • Voltage gain stage amplifies the signal to levels that work well with the ADC in the AVR CSE 466 Winter 2009 Electric Field Sensing 10
  • 11. Operaconal Amplifiers • Very useful, versacle, and ubiquitous analog circuit devices – amplify voltages – can turn high‐impedance signals into low‐impedance signals (weak signals into robust signals) – perform mathemaccal operacons on signals in the analog domain (used to be how most signal processing was done) • Signal processing has moved into the digital domain, but op amps are scll useful, parccularly when it comes to interfacing sensors with microcontrollers CSE 466 Winter 2009 Electric Field Sensing 11
  • 12. Operaconal Amplifiers • Two input terminals: invercng (‐) and non‐invercng (+) – almost no current flows into the inputs (they are high impedance) • Voltage at output terminal is the difference between the two inputs mulcplied by some gain • Output changes to try to keep the voltages at both inputs equal to each other • Output is low impedance: we can draw some current from it without affeccng its voltage significantly CSE 466 Winter 2009 Electric Field Sensing 12
  • 13. The Analog Front‐End • Now that we know about op amps, we’ll look at the two stages of the analog front‐end. • AGND is at 2.5V; this will add a DC offset to the output voltage, bringing “zero” into the middle of our usable range for the ADC CSE 466 Winter 2009 Electric Field Sensing 13
  • 14. The Transimpedance Amplifier • Converts current entering the receive electrode into a voltage signal – When no current is flowing in from the le., there is no voltage drop across the resistor, and the output voltage will be the same as the two input terminals. CSE 466 Winter 2009 Electric Field Sensing 14 0 µA 0 V + ‐ 2.5 V 2.5 V
  • 15. The Transimpedance Amplifier • Converts current entering the receive electrode into a voltage signal – Current entering from the le. can’t go into the invercng input, so it goes through R3 and creates a voltage drop – In order to keep the voltage at the invercng input equal to the non‐ invercng input, the output voltage must be decreased CSE 466 Winter 2009 Electric Field Sensing 15 1 µA 1 V + ‐ 2.5 V 1.5 V
  • 16. The Voltage Amplifier • Amplifies (and inverts) the input voltage. • Basic invercng op‐amp configuracon • Output voltage for the circuit at the right is CSE 466 Winter 2009 Electric Field Sensing 16 € vout = −vin R5 R4
  • 17. Where are we now? • We’ve created an electric field and it’s induced a current in our receive electrode. • We’ve amplified the received signal and brought it into a usable range for our AVR’s ADC to sample. • Now, we need to make sense of the signal CSE 466 Winter 2009 Electric Field Sensing 17
  • 18. Demodulacon • We’ll be receiving our signal, but there will also be a lot of noise. • Need to recover the amplitude of our signal, but ignore the noise. CSE 466 Winter 2009 Electric Field Sensing 18
  • 19. Demodulacon: Basic Idea • Instead of one sample, we’ll accumulate mulcple samples in an intelligent manner. • Sample at mulcple points on the received waveform • If we add samples when we’re transmikng a posicve signal and subtract signals when we’re transmikng negacve signal, we cancel out a lot of unwanted noise (and the DC offset) • Accumulate about 20 to 255 samples for a measurement • Result of accumulacon represents amplitude CSE 466 Winter 2009 Electric Field Sensing 19 + ‐ + ‐ ...
  • 20. What about phase shi.s? • If the samples aren’t perfectly in phase with the received waveform, we’re missing out on signal‐to‐noise • Gekng perfectly lined up is difficult—at high transmit frequencies, even one instruccon cycle shi.s the sample by quite a bit • Solucon: also sample at 90˚ and 270˚ in addicon to 0˚ and 180˚, in a separate accumulator • The accumulator for 0˚ and 180˚ is the in‐phase component, and the 90˚ and 270˚ accumulator is the quadrature component • We can now recover the magnitude of the received signal regardless of its phase: CSE 466 Winter 2009 Electric Field Sensing 20 € magnitude = inphase2 + quad2
  • 21. Timing Issues • The ADC isn’t fast enough to make all these samples on every period of the received waveform. • Lining up the samples with the right parts of the waveform is a challenge. CSE 466 Winter 2009 Electric Field Sensing 21 • The ADC takes some cme to perform conversions, but the actual sample‐and‐hold window is short and can be precisely placed. • We can make the ADC’s samples synchronous with the transmiMed waveform by using free‐running mode and sekng up the prescalers so that the ADC samples every n + ¼ periods of the transmiMed waveform. but...
  • 22. Timing • The result is that we’re only sampling every few periods of the waveform, but we stay lined up because we’re using the same clock for the transmiMed signal and the ADC. • Since we set up the ADC to sample every n + ¼ periods of the transmiMed waveform, each sample will be offset by 90˚. • Each set of four samples gives us the posicve and negacve values to add to each of our two accumulators. CSE 466 Winter 2009 Electric Field Sensing 22
  • 23. Implementacon in Labs 3 and 4 • For labs 3 and 4, you will: – calculate prescaler and output compare values to enable synchronous undersampling and demodulacon – calculate the capacitor value needed to make the transmiMer resonant at your transmit frequency – build the e‐field sensor hardware – use SPI and USB to send the values of the in‐phase and quadrature accumulators to a PC – use the PC to compute the magnitude of the received waveform from its components – use the value from the sensor as a virtual knob to move around in a color space – display a color wheel indicacng the current color on the PC screen, and send it back to your AVR to be displayed on your tri‐color LED CSE 466 Winter 2009 Electric Field Sensing 23