Date post: | 30-Dec-2015 |
Category: |
Documents |
Upload: | nevada-skinner |
View: | 25 times |
Download: | 0 times |
Touchpad-ControlledTouchpad-ControlledParametric EqualizerParametric Equalizer
ECE 445ECE 445Group #24Group #24
Anthony MangogniaAnthony MangogniaAlexander SpektorAlexander Spektor
Farsheed Hamidi-ToosiFarsheed Hamidi-Toosi
TA: Chad CarlsonTA: Chad Carlson
IntroductionIntroduction
Goal:Goal: To create a real-time audio To create a real-time audio filtering solution for musicians and filtering solution for musicians and sound engineerssound engineers
Goal:Goal: To provide independent To provide independent control over filter parameters: control over filter parameters: center frequency, bandwidth, and center frequency, bandwidth, and gaingain
Goal:Goal: To create a geometrically- To create a geometrically-intuitive input device for the filterintuitive input device for the filter
Existing AlternativesExisting Alternatives
X-Band EqualizersX-Band Equalizers Sliders or knobsSliders or knobs Limited controlLimited control Takes time to adjustTakes time to adjust Discrete frequency bandsDiscrete frequency bands
Digital Parametric EqualizersDigital Parametric Equalizers Pseudo-continuous frequency sweepPseudo-continuous frequency sweep Cumbersome software-based controlCumbersome software-based control
Design OverviewDesign Overview
Input Device:Input Device: Pressure-sensitive Pressure-sensitive touchpad.touchpad. Horizontal position: center frequencyHorizontal position: center frequency Vertical position: gainVertical position: gain Overall Pressure: bandwidthOverall Pressure: bandwidth
Input-Filter Interface:Input-Filter Interface: RS-232 serial RS-232 serial connectionconnectionFilter:Filter: DSP-implemented algorithm DSP-implemented algorithm Second-order IIR filter (based on Mitra-Second-order IIR filter (based on Mitra-
Regalia topology)Regalia topology) Filter coefficients update in real-timeFilter coefficients update in real-time
Design Block DiagramDesign Block Diagram
Audio In
Audio Out
DSP:Parametric Equalizer Filter
Microcontroller:Positioning Algorithm &
Touchpad DSP interface
Touchpad
1. Touchpad Process1. Touchpad Process
Bias cancellation/Tuning Circuit
830x Amplifier
PIC A/D
Pressure Sensor Voltage Differential
TouchpadTouchpad
Four corner-mounted pressure Four corner-mounted pressure sensors on height-adjustable shelvessensors on height-adjustable shelves
Pressure sensor output voltage Pressure sensor output voltage varies with finger positionvaries with finger position Positioning algorithmPositioning algorithm
Surface much larger than typical Surface much larger than typical commercially-available touchpadscommercially-available touchpads
Touchpad DesignTouchpad Design
Sensor Mount
Sensor Mount
PressureSensors
TouchpadSurface
Slide-in touchpad Bird’s Eye View
Height-adjustablesensor mount
Pressure SensorsPressure Sensors
Honeywell Honeywell 125PC30G1125PC30G1
Pressure range: 0-Pressure range: 0-30 psi30 psi
Sensitivity: Sensitivity: 8.33mV/psi8.33mV/psi
y = -28.116x + 6.814
-50
0
50
100
150
200
250
300
350
-12 -10 -8 -6 -4 -2 0 2
Voltage (V)
Pre
ssu
re (
mm
Hg
)
-12
-10
-8
-6
-4
-2
0
2
-25 25 75 125 175 225 275 325
Pressure (mm Hg)
Vo
ltag
e (V
)
V- GND V+ +10
Amplifier
Touchpad Signal Touchpad Signal AmplificationAmplification
Instrumentation Amplifier: AD622ANInstrumentation Amplifier: AD622AN Low-cost: $4.90Low-cost: $4.90 Gain: 2-1000x, external resistor controlGain: 2-1000x, external resistor control
5656ΩΩ 830x gain 830x gain Easy integration: wide power supply Easy integration: wide power supply
voltage gain (±2.6V-±15V)voltage gain (±2.6V-±15V)
Large gain Large gain Large bias voltage Large bias voltage Solved with 1MSolved with 1MΩΩ pull-down resistors at pull-down resistors at
inputs and 100k potentiometer inputs and 100k potentiometer (calibration)(calibration)
2. Microcontroller-Enabled2. Microcontroller-EnabledTouchpad Touchpad DSP Interface DSP Interface
Four sensor A/D
Positioning Algorithm
Serial Transmission
Analog to Digital Analog to Digital ConversionConversion
8-bit A/D conversion for quicker 8-bit A/D conversion for quicker calculationscalculations 10-bit possible for PIC16F877A, but doubles 10-bit possible for PIC16F877A, but doubles
number of bytes for mathematical operationsnumber of bytes for mathematical operations Decreases resolution to 256 points maximumDecreases resolution to 256 points maximum
More than enough to simulate continuous More than enough to simulate continuous operationoperation
Read 8 values for each sensor and Read 8 values for each sensor and averageaverage Functions as a digital LPFFunctions as a digital LPF
Positioning AlgorithmPositioning Algorithm
Sensor 2: V2
(Xmax, Ymax)
Sensor 3: V3
(Xmax, 0)
Sensor 1: V1
(0, Ymax)
Sensor 0: V0
(0, 0)
Touchpad Surface
(X,Y) – Finger Position
X2 = V2 Xmax / (V2 + V1)
Y2 = V2 Ymax
/ (V2 + V3)
X1 = V3 Xmax / (V3 + V0)
Y1 = V1 Ymax
/ (V1 + V0)
Positioning AlgorithmPositioning Algorithm
Sensor 2: V2
(Xmax, Ymax)
Sensor 3: V3
(Xmax, 0)
Sensor 1: V1
(0, Ymax)
Sensor 0: V0
(0, 0)
Touchpad Surface
X2
Y2
X1
Y1 (Xavg,Yavg) – Average
Positioning AlgorithmPositioning Algorithm
Sensor 2: V2
(Xmax, Ymax)
Sensor 3: V3
(Xmax, 0)
Sensor 1: V1
(0, Ymax)
Sensor 0: V0
(0, 0)
Touchpad Surface
X’ = X1 (Ymax-Yavg) + X2 (Yavg)
Y’ = Y1 (Xmax-Xavg) + Y2 (Xavg)
(X’,Y’) – Weighted Average
Data Sent to DSPData Sent to DSP
Three-byte start sequence: “230” x3Three-byte start sequence: “230” x3
Four sensor readings: S0, S1, S2, S3Four sensor readings: S0, S1, S2, S3
Two one-byte positioning words (x3)Two one-byte positioning words (x3)
One three-byte stop sequence: “232” x3One three-byte stop sequence: “232” x3
230 S0230 230
S1 S2 S3 X
X X Y Y
Y 232 232 232
Serial Data TransmissionSerial Data Transmission
Data transmitted at 38400kbpsData transmitted at 38400kbps Default rate for DSPDefault rate for DSP
Data FormatData Format
Sent over standard serial cableSent over standard serial cable DB-9 connectorDB-9 connector
1 START BIT 8 BIT WORD 1 STOP BIT
RS-232: Voltage Level RS-232: Voltage Level ConversionConversion
PIC output at TTL PIC output at TTL levelslevels ~ 0 - 5V~ 0 - 5V
DSP input at RS-232 DSP input at RS-232 levelslevels ~ ±12V swing~ ±12V swing
Conversion with Conversion with MAX232 line driverMAX232 line driver
MAX232Line Driver
38400kbps serial data atTTL from PIC
38400kpbs serial data atRS-232 to DSP
3. DSP: Audio Filtering3. DSP: Audio Filtering
Receive/Decode Data from Touchpad
Update Filter Coefficients
Apply Filter to Audio Input and Send to Speakers
Filter DesignFilter Design
Based on Mitra-Based on Mitra-Regalia second-order Regalia second-order IIRIIR
Design Equations:Design Equations: ββ = – cos( = – cos(ωωcc)) k = 10k = 10(GAIN/20 dB)(GAIN/20 dB)
αα = = (1 – tan (BW/2)(1 – tan (BW/2)
(1 + tan (BW/2)(1 + tan (BW/2)
Programmed in C for Programmed in C for TI-54x fixed-point TI-54x fixed-point DSPDSP
A(z) = All-Pass LatticeA(z) = All-Pass Lattice
Mitra-Regalia TopologyMitra-Regalia Topology
Src: Montana University Web site. http://www.coe.montana.edu/ee/rmaher/ECEN4002/lab4_020226.pdf
Design Challenges: Design Challenges: TouchpadTouchpad
Pressure sensor noisePressure sensor noise Problem: 30mV peak-to-peak noise levelProblem: 30mV peak-to-peak noise level Solution: 8-point averaging filter after PIC A/DSolution: 8-point averaging filter after PIC A/D
PIC A/D crosstalkPIC A/D crosstalk Problem: Changes in one pressure sensor affected Problem: Changes in one pressure sensor affected
values read for othervalues read for other Solution: Pull-down 0.1Solution: Pull-down 0.1μμF capacitors at A/D input F capacitors at A/D input
pinspins
Serial communication pinsSerial communication pins Problem: PICProblem: PICPC communication and PICPC communication and PICDSP DSP
communication use different DB-9 transmit pinscommunication use different DB-9 transmit pins Solution: Internal rewiring to accommodate bothSolution: Internal rewiring to accommodate both
Design Challenges: FilterDesign Challenges: Filter
Filter type changeFilter type change Problem: Original algorithm (Chamberlin) produced Problem: Original algorithm (Chamberlin) produced
undesirable resonance frequenciesundesirable resonance frequencies Solution: Switched to Mitra-Regalia topologySolution: Switched to Mitra-Regalia topology
IIR InstabilityIIR Instability Problem: Direct form two implementation caused Problem: Direct form two implementation caused
overflowoverflow Solution: Implemented lattice structure to reduce Solution: Implemented lattice structure to reduce
overflowoverflow
QuantizationQuantization Problem: Fixed-point quantization of coefficientsProblem: Fixed-point quantization of coefficients Solution: Lattice structure ensures pole-zero Solution: Lattice structure ensures pole-zero
cancellationcancellation
Internal Component TestInternal Component Test
Pressure Sensor + AmplifierPressure Sensor + Amplifier Unwanted signal oscillation: 60mV peak Unwanted signal oscillation: 60mV peak
to peakto peakDue to conflicting RC networksDue to conflicting RC networks
Too high for 1V sampling rangeToo high for 1V sampling range
Solution: Removed analog smoothing filterSolution: Removed analog smoothing filter
Bandwidth TestBandwidth Test
Center Frequency TestCenter Frequency Test
Gain TestGain Test
GWN Input Boost TestsGWN Input Boost Tests
GWN Input Cut TestsGWN Input Cut Tests
Finished Product TestFinished Product Test
Amplitude test performed Amplitude test performed with oscilloscopewith oscilloscope Input: 11 kHz Sine Wave, 200 Input: 11 kHz Sine Wave, 200
mV peak-to-peakmV peak-to-peak Tests: gain = 2 and gain = .5 at Tests: gain = 2 and gain = .5 at
11kHz by measuring peak-to-11kHz by measuring peak-to-peak voltage of output using the peak voltage of output using the scopescope
Amplitude resolution is .24 dB Amplitude resolution is .24 dB from -6dB to 6dBfrom -6dB to 6dB
Exceeded design requirement Exceeded design requirement which stated 2-3 dB amplitude which stated 2-3 dB amplitude resolutionresolution
GainGain Output Output P-PP-P
11 ~200m~200mVV
22 ~400m~400mVV
0.50.5 ~100m~100mVV
Finished Product TestFinished Product Test
Frequency tests performed with scopeFrequency tests performed with scope Fix bandwidth, set gain = 2Fix bandwidth, set gain = 2 Inputs: Sine at set frequencies, Gaussian White Inputs: Sine at set frequencies, Gaussian White
NoiseNoise Using FFT on scope, can see if frequencies Using FFT on scope, can see if frequencies
boosted by 2x at desired center frequencyboosted by 2x at desired center frequency Proposed frequency resolution: 1 Hz (not Proposed frequency resolution: 1 Hz (not
necessary)necessary) Total of 200 center frequencies possible, Total of 200 center frequencies possible,
distributed them logarithmically since hearing is distributed them logarithmically since hearing is logarithmiclogarithmic
High resolution for low frequencies, less High resolution for low frequencies, less resolution for higher frequenciesresolution for higher frequencies
Results:Results: Filter works for all frequencies within Filter works for all frequencies within hearing range (20Hz-20kHz)hearing range (20Hz-20kHz)
Finished Product TestFinished Product Test
Bandwidth TestsBandwidth Tests As total pressure increases, increase As total pressure increases, increase
bandwidthbandwidth Tested using FFT on scopeTested using FFT on scope Input signals: Gaussian white noise, Input signals: Gaussian white noise,
musicmusic Test to see if bandwidth varies from Test to see if bandwidth varies from
50Hz to 22050Hz as pressure increases50Hz to 22050Hz as pressure increases Passed tests, including aural testsPassed tests, including aural tests
Finished Product TestFinished Product Test
Latency TestsLatency Tests The target of less than 100ms system latency The target of less than 100ms system latency
was achieved was achieved Delay due to pressure sensors negligibleDelay due to pressure sensors negligible Delay due to PIC negligible (assembly code Delay due to PIC negligible (assembly code
minimized cycles)minimized cycles) DSP initially had some latency, but code was DSP initially had some latency, but code was
optimized by eliminating FOR loops (less than optimized by eliminating FOR loops (less than 30000 cycles at ~MHz)30000 cycles at ~MHz)
Usability tests confirm that system latency is Usability tests confirm that system latency is not an issue when using this system, negligible not an issue when using this system, negligible
Finished Product TestFinished Product Test
Usability Tests and ConclusionsUsability Tests and Conclusions Tested on music signals and white noise Tested on music signals and white noise
signalssignals Qualitative analysis: Qualitative analysis:
Was the filtering audible?Was the filtering audible?
Did the touchpad respond as desired?Did the touchpad respond as desired?
How intuitive was it to “find” a desired How intuitive was it to “find” a desired frequency?frequency?
Is this design marketable? If so, why?Is this design marketable? If so, why?
How much would this cost to manufacture?How much would this cost to manufacture?
Final ThoughtsFinal Thoughts
Improvement: Better pressure sensorsImprovement: Better pressure sensors Higher output voltage Higher output voltage Less amplification Less amplification
Improvement: Cascade featureImprovement: Cascade feature A button to keep current settings and use A button to keep current settings and use
new settings in cascadenew settings in cascade
Other applications: Large touchpad has Other applications: Large touchpad has many applicationsmany applications Computer input device for the disabled and Computer input device for the disabled and
kidskids
AcknowledgementsAcknowledgements
Chad Carlson Chad Carlson
Marty & other ECE 445 TAsMarty & other ECE 445 TAs
Profs. Haken & BeauchampProfs. Haken & Beauchamp
Machine Shop: Scott McDonaldMachine Shop: Scott McDonald
Parts ShopParts Shop
Questions?Questions?