<<

E40M

RC Filters

M. Horowitz, J. Plummer, R. Howe 1 Reading

• Reader: – The rest of Chapter 7 • 7.1-7.2 is about log-log plots • 7.4 is about filters

• A & L – 13.4-13.5

M. Horowitz, J. Plummer, R. Howe 2 EKG (Lab 4)

• Concepts – Amplifiers – Impedance – Noise – Safety – Filters

• Components – In this project we will build an – electrocardiagram (ECG or EKG). This is a – Instrumentation and noninvasive device that measures the Operational Amplifiers electrical activity of the heart using electrodes placed on the skin.

M. Horowitz, J. Plummer, R. Howe 3 RC Circuit Analysis Approaches

1. For finding and currents as functions of time, we solve linear differential equations or run EveryCircuit.

2. For finding the response of circuits to sinusoidal signals,* we use impedances and “” analysis

*superposition can be used to find the response to any periodic signals

M. Horowitz, J. Plummer, R. Howe 4 Key Ideas on RC Circuit Frequency Analysis - Review

• All voltages and currents are sinusoidal

• So we really just need to figure out – What is the amplitude of the resulting sinewave – And sometimes we need the phase shift too (but not always)

• These values don’t change with time – This problem is very similar to solving for DC voltages/currents

M. Horowitz, J. Plummer, R. Howe 5 Key Ideas on Impedance - Review

• Impedance is a concept that generalizes resistance: – For sine wave input mag(V ) Z = Add j to represent mag(i) 90o phase shift • Z for a is just R – It does not depend on frequency, it is simply a number.

• What about a ?

V V VO sin 2πFt Z = = = ( ) C i CdV /dt 2 FCV cos 2 Ft π O ( π ) V 1 Z = = C i j∗ 2πFC

M. Horowitz, J. Plummer, R. Howe 6 Analyzing RC Circuits Using Impedance - Review

• The circuit used to couple sound into your Arduino is a simple RC circuit.

• This circuit provides a DC of Vdd/2 at the output.

• For AC (sound) signals, the capacitor will block low frequencies but pass high frequencies. (High pass filter).

• For AC signals, the two are in parallel, so the equivalent circuit is shown on the next page.

M. Horowitz, J. Plummer, R. Howe 7 Analyzing RC Circuits Using Impedance – Review (High Pass Filter)

C=0.1µF V R j∗ 2πFRC out = = V 1 1+ j∗ 2πFRC vin vout in R + j∗ 2πFC R=110kW RC = 11ms; 2pRC about 70ms 1

0.8

0.6 Vout/Vin 0.4

0.2

0 0 50 100 150 F (Hz) 200

M. Horowitz, J. Plummer, R. Howe 8 RC FILTERS

M. Horowitz, J. Plummer, R. Howe 9 RC Circuits Can Make Other Filters

• Filters are circuits that change the relative strength of different frequencies

• Named for the frequency range that passes through the filter

– Low pass filter: • Passes low frequencies, attenuates high frequency

– High pass filter • Passes high frequencies, attenuates low frequencies

– Band pass filter • Attenuates high and low frequencies, lets middle frequencies pass

M. Horowitz, J. Plummer, R. Howe 10 RC Low Pass Filters

R=11 kW • Let’s think about this before we do any vin vout math

C=0.1 µF • Very low frequencies à

RC = 11 x 103 x 0.1 x 10-6 s = 1.1 ms • Very high frequencies à 2π RC = 6.9 ms 1/(2π RC ) = 145 Hz

M. Horowitz, J. Plummer, R. Howe 11 RC Low Pass Filters

R=11KW 1 v vin out Vout j∗ 2πFC 1 1 = = = V 1 1+ j∗ 2πFRC 1 + jF/Fc in R + C=0.1µF j∗ 2πFC

FC = 1/[2pRC] 1

0.8

0.6 Vout/Vin 0.4

0.2

RC = 1.1 ms 0 0 500 1000 1500 2000 F = 1/[2pRC] =145 Hz c F (Hz)

M. Horowitz, J. Plummer, R. Howe 12 RC Filters – Something a Little More Complicated

C • Let’s think about this before we v vin out do any math

R 10C • Very low frequencies à

• Very high frequencies à Vout/Vin capacitive divider

F

M. Horowitz, J. Plummer, R. Howe 13 RC Filters – Something More Complicated

C 1 Z1 = vin vout j∗ 2πFC 1 R Z = = 2 1 1+ j∗ 2πF10RC R 10C + j∗ 2πF10C R

R Z1 V 1+ j∗ 2πF10RC out = V R 1 in + Z2 1+ j∗ 2πF10RC j∗ 2πFC j∗ 2πFRC j∗ 2πFRC = = j∗ 2πFRC + (1+ j∗ 2πF10RC) 1+ j∗ 2πF11RC

M. Horowitz, J. Plummer, R. Howe 14 RC Filters – Something More Complicated

Vout = à Simplify using Fc = 1 / [2π R11C] = 13 Hz Vin

0.1 Vout/Vin 0.08

0.06

0.04 C = 0.1µF, R =11 kW 0.02

0 F (Hz) 0 100 200 300 400 500

M. Horowitz, J. Plummer, R. Howe 15 What If We Combine Low Pass and High Pass Filters?

• What do you think it will C3=0.1µF R1=11K do?

vin vout • We’ll use a filter that operates like this in the C2=0.1µF R4=110K ECG lab project.

Vout/Vin

F

M. Horowitz, J. Plummer, R. Howe 16 Analysis Options: Nodal Analysis

i 1 i Z3 3 • Let’s first solve it using Z1-Z4 and nodal v1 vout vin analysis Z1 i2 Z Z2 4 i4

Vout − V1 Vout Z4 i3 = i4 ∴ = ∴ Vout = V1 Z3 Z4 Z3 + Z4

V1 − Vin V1 V1 − Vout i1 = i2 + i3 ∴ = + Z1 Z2 Z3

• We have 2 equations in 2 unknowns (V1 and Vout). So we could solve this for Vout/Vin in terms of the impedances.

M. Horowitz, J. Plummer, R. Howe 17 Analysis Options: Using R, C and Voltage Dividers

C3=0.1µF For convenience, let s = j*2πF R1=11K v vout 1 V R sR C vin out = 4 = 4 3 V 1 1+ sR C 1 R + 4 3 C =0.1µF 4 2 R4=110K sC3

We can replace R4, C3 and C2 with Zeqv

1 1 1+ sR C Z = = = 4 3 eqv 1 sC ⎛C ⎞ + sC 3 + sC sC 3 1 sR C 1 2 2 2 ∗⎜ + + 4 3 ⎟ 1+ sR4C3 C R4 + ⎝ 2 ⎠ sC3

1+ sR4C3 ⎛C ⎞ sC 3 1 sR C 2 ∗⎜ + + 4 3 ⎟ V ⎝C2 ⎠ 1+ sR C ∴ 1 = = 4 3 V 1+ sR C ⎛C ⎞ in R + 4 3 1+ sR C + sR C ∗⎜ 3 +1+ sR C ⎟ 1 ⎛C ⎞ 4 3 1 2 ⎜C 4 3 ⎟ sC 3 1 sR C ⎝ 2 ⎠ 2 ∗⎜ + + 4 3 ⎟ ⎝C2 ⎠

M. Horowitz, J. Plummer, R. Howe 18 Output Response

C3=0.1µF R1=11K V R sR C vout out 4 4 3 v1 = = vin V1 1 1+ sR4C3 R4 + sC3 1+ sR C C2=0.1µF R4=110K 4 3 ⎛C ⎞ sC 3 1 sR C 2 ∗⎜ + + 4 3 ⎟ V ⎝C2 ⎠ 1+ sR C 1 = = 4 3 V 1+ sR C ⎛C ⎞ in R + 4 3 1+ sR C + sR C ∗⎜ 3 +1+ sR C ⎟ 1 ⎛C ⎞ 4 3 1 2 ⎜C 4 3 ⎟ sC 3 1 sR C ⎝ 2 ⎠ 2 ∗⎜ + + 4 3 ⎟ ⎝C2 ⎠

Vout VV1 sR C sR C out = 4 3 = 4 3 V VV ⎛C ⎞ 1 s(R C R C R C ) s2R C R C 1 inin 1 sR C sR C 3 1 sR C + 4 3 + 1 2 + 1 3 + 1 2 4 3 + 4 3 + 1 2 ∗⎜ + + 4 3 ⎟ ⎝C2 ⎠

V j∗ 2πFR C Or, out = 4 3 V 2 in 1 j 2 F(R C R C R C ) j 2 F R C R C + ∗ π 4 3 + 1 2 + 1 3 + ( ∗ π ) 1 2 4 3

M. Horowitz, J. Plummer, R. Howe 19 Output Response

C =0.1µF R =11K 3 1 v v1 out V j∗ 2πFR C v out = 4 3 in V 2 in 1 j 2 F(R C R C R C ) j 2 F R C R C + ∗ π 4 3 + 1 2 + 1 3 + ( ∗ π ) 1 2 4 3

C2=0.1µF R4=110K

1.2 Gain of Filters 1

0.8

0.6 Vout/Vin 0.4

0.2

0 0 200 400 600 800 1000

Low Pass High Pass Band Pass F (Hz)

M. Horowitz, J. Plummer, R. Howe 20 So What Are The Answers To These Questions?

How do we design circuits that What determines how fast CMOS respond to certain frequencies? circuits can work?

Why did you put a 200 µF capacitor between Vdd and Gnd on your Arduino?

M. Horowitz, J. Plummer, R. Howe 21 Learning Objectives

• Become more comfortable using impedance – To solve RC circuits

• Understand how to characterize RC circuits – Which are low pass, high pass and bandpass filters

• Be able to sketch the frequency dependence of an RC circuit by reasoning about how capacitors behave at low and high frequencies

M. Horowitz, J. Plummer, R. Howe 22