Embedded Microcomputer Systems Lecture 9 1 Recap from last time Analog circuit design Noise Microphone interface Objectives Active low pass filter Nyquist Theorem and aliasing Speaker amplifier Looking at noise observe system with known input Magnitude Type 1 DVM AC mode good for quantitative level 2 Scope Peak peak rough measure of quantitative level Shape type of noise 3 Spectrum analyzer Signal to noise ratio Type by Jonathan W Valvano Embedded Microcomputer Systems Lecture 9 2 dbFS 20log10 V 1 5 Filter types Analog LPF BPF HPF Digital Extremely flexible Butterworth Filters 2 pole Butterworth analog filter 1 select the cutoff frequency fc 2 divide the two capacitors by 2 fc let C1A C2A be the new capacitor values C1A 141 4 F 2 fc C2A 70 7 F 2 fc 3 locate two standard value capacitors with the 2 1 ratio with the same order of magnitude as the desired values let C1B C2B be these standard value capacitors let x be this factor C1B C1A x C2B C2A x 4 adjust the resistors to maintain the cutoff frequency R 10k x 141 4 F 10k Vin R 10k C1 C2 R 70 7 F Vout Vout 1 Vin 1 f 4 fc Two pole Butterworth low pass analog filter Capacitor specification low leakage impedance accuracy tolerance low temperature coefficient temperature range voltage range frequency range Extremely High Quality Capacitors Teflon polystyrene Polypropylene 1 2 3 5 Medium Quality Capacitors 5 10 20 tolerance Class 1 C0G ceramic 5 30ppm oC 0 3 over 55 to 125 oC Class 2 X7R ceramic 10 15 over 55 to 125 oC Class 3 Z5U ceramic 20 22 to 56 over 10 to 86 oC Performance Tip If you choose standard value resistors near the desired values you will save money and the circuit will still be a Butterworth filter The only difference is that the cutoff frequency will be slightly off from the original specification Show LPF XLS Show TI FilterPro by Jonathan W Valvano Embedded Microcomputer Systems Lecture 9 3 General Instrumentation Control System Real world Transducer x t y t Primary sensing Variable conversion Measurand Analog Filter Analog Preamp and Calibration Signal Amplification z t Actuator applies energy Electromagnetic Electrical Thermal Sound Optical ADC Microcomputer Quantitative DAS thermometer in EE445L range rx resolution x precision nx in alternatives frequencies of interest fmin to fmax Qualitative DAS sound recording in EE345M sounds good looks pretty feels right Other qualitative DAS s involve the detection of events true positive TP baby stops breathing and apnea monitor detects it false positive FP baby is breathing OK but apnea monitor alarms false negative FN baby stops breathing but monitor does not alarm Prevalence Sensitivity Specificity PPV NPV TP FN TP TN FP FN TP TP FN TN TN FP TP TP FP TN TN FN Using Nyquist Theory to Determine Sampling Rate Voltage quantizing n precision nz 2 Time quantizing 32 28 24 20 16 Discrete digital signal 12 8 Continuous analog signal 4 0 0 1 2 3 4 timer 5 6 7 8 9 10 Time s by Jonathan W Valvano Embedded Microcomputer Systems Lecture 9 4 Nyquist theory states that if the signal is sampled at fs then the digital samples only contain frequency components from 0 to fs Conversely if the analog signal does contain frequency components larger than fs then there will be an aliasing error Aliasing is when the digital signal appears to have a different frequency than the original analog signal Show FFT16 XLS The choice of sampling rate fs is determined by the maximum useful frequency contained in the signal fs 2 fmax A low pass analog filter may be required to remove frequency components above 0 5fs A digital filter can not be used to remove aliasing Analog Filter Let the gain of the analog filter be G3 H3 s Then the system should pass with little error as seen by the ADC for signal frequencies between fmin and fmax n 2 1 n 2 1 n 2 1 n 2 Ideal G3 Z2 Filter with no A D error properly represented 0 707 z 0 0 f max f f c f min 0 5 f s c frequency Frequency Ideal and practical filter responses To prevent aliasing no measurable signal above 0 5fs Speaker interface 3 3V SSI0 SSI0Fss SSI0Clk SSI0Tx SSI0Rx 10k Vdd CS MAX5353 SClk Out Din nc 0 1 F R10 10 k REF Gnd FB 3 3 V R11 4 7 F 0 1 F 10 k C5 1 F 20k 3 V 2 FC 5 1 k 1 233V LM4041CILP 5V MC34119 4 6 VVcc 4 7 F 1 CD 5 VO1 8 VO2 Gnd undetectable 7 EE445Lbook figure 10 36 Need an audio amp to connect DAC output to 32 speaker Be careful to limit voltage and power to speaker by Jonathan W Valvano 1 f 2 s aliased Embedded Microcomputer Systems Lecture 9 5 0 V 5V P 200 mW 0 2 W VO1 VO2 2 32 0 2 W VO1 VO2 2 8 VO1 VO2 2 5V VO1 VO2 1 2V Look up maximum current for your board Measure it with an external 5V supply and a current meter Choose Rf Ri so 2 Rf Ri is less than 1 Mount the speaker in a box http www lalena com Audio FAQ Speaker Design choices ADC bits Sampling rate Cheaper cables and electronics cause more noise Analog filters Cheaper microphone and speakers introduce more noise Refer errors to the system specification Quantitative system errors cause inaccuracy Qualitative system errors cause it to sound bad by Jonathan W Valvano
View Full Document
Unlocking...