E40M Review #2 1 M. Horowitz, J. Plummer, R. Howe Electrical - - PowerPoint PPT Presentation

e40m review 2
SMART_READER_LITE
LIVE PREVIEW

E40M Review #2 1 M. Horowitz, J. Plummer, R. Howe Electrical - - PowerPoint PPT Presentation

E40M Review #2 1 M. Horowitz, J. Plummer, R. Howe Electrical Device: MOSFETs Are very interesting devices Come in two flavors pMOS and nMOS Symbols and equivalent circuits shown below Gate terminal takes no


slide-1
SLIDE 1
  • M. Horowitz, J. Plummer, R. Howe

1

E40M Review #2

slide-2
SLIDE 2
  • M. Horowitz, J. Plummer, R. Howe

2

Electrical Device: MOSFETs

  • Are very interesting devices

– Come in two “flavors” – pMOS and nMOS – Symbols and equivalent circuits shown below

  • Gate terminal takes no current (at least no DC current)

– The gate voltage* controls whether the “switch” is ON or OFF pMOS nMOS

Ron gate gate * actually, the gate – to – source voltage, VGS

slide-3
SLIDE 3
  • M. Horowitz, J. Plummer, R. Howe

3

Building Logic Gates from MOS Transistors

  • pMOS connect to Vdd;

nMOS connect to Gnd – Otherwise need voltage > Vdd, or < Gnd to turn them on

  • Need to connect output to either Vdd, or Gnd
  • For the gate shown below

– The output is connect to Gnd when A and B are true – The output is connected to Vdd when A or B is false

A B

slide-4
SLIDE 4
  • M. Horowitz, J. Plummer, R. Howe

4

Example: CMOS Circuits

  • Find the node voltages and branch currents in the circuit below.
  • Assume Ron for the transistors is 0Ω.
slide-5
SLIDE 5
  • M. Horowitz, J. Plummer, R. Howe

5

Example: CMOS Circuits

  • Find the node voltages and branch currents in the circuit below.
  • Assume Ron for the transistors is 0Ω.

i1 = i2 = 0 ∴ VA = 5V VB = 0V ∴ i3 = 0− 5V 1 kΩ = −5mA i4 = i5 = 0 VC = 5V ∴ i6 = 0

slide-6
SLIDE 6
  • M. Horowitz, J. Plummer, R. Howe

6

Truth Tables & Logic Gates

A B AND 1 1 1 1 1

(A && B) AND (A || B) OR !(A) NOT

A B OR 1 1 1 1 1 1 1 A NOT 1 1

Logic Gate Symbols

slide-7
SLIDE 7
  • M. Horowitz, J. Plummer, R. Howe

7

Example: CMOS Logic Gate

  • Construct a truth table for the CMOS

logic gate shown. What does it do? B !(A) !(B) A !(B) !(A) A B

A B 1 1 1 1

Vdd Vout Vout

slide-8
SLIDE 8
  • M. Horowitz, J. Plummer, R. Howe

8

Example: CMOS Logic Gate

  • Construct a truth table for the CMOS

logic gate shown. What does it do? B !(A) !(B) A !(B) !(A) A B

A B 1 1 1 1 1 1

Vdd Vout Vout XOR Gate

slide-9
SLIDE 9
  • M. Horowitz, J. Plummer, R. Howe

9

Binary Numbers

Operation Output Remainder

23/27 23 23/26 23 23/25 23 23/24 1 7 23/23 7 23/22 1 3 23/21 1 1 23/20 1

23 in binary is 00010111

Carry

1 1

11

1 1 1

3

1 1

Addition (14)

1 1 1

Add by carrying 1s

  • Subtract by borrowing 2s.
slide-10
SLIDE 10
  • M. Horowitz, J. Plummer, R. Howe

10

Generating Two’s Complement Numbers

  • Take your number

– Invert all the bits of the number

  • Make all “0” “1” and all “1” “0”

– And then add 1 to the result

  • Lets look at an example:
  • So -42 in two’s complement is 11010110

42 1 1 1 Flip 1 and 0 1 1 1 1 1 Add 1 1 1 1 1 1

slide-11
SLIDE 11
  • M. Horowitz, J. Plummer, R. Howe

11

Example:

Base 10: 11 – 23 = -12 6 bits + sign bit: 11 = 0001011 23 = 0010111 2’s complement negative number:

  • 23 = 1101000 (first bit is sign bit)

+ 1 à 1101001 Sum: 0001011 +1101001 = 1110100 Check: subtract 1 à 1110011;then flip bits: 0001100

slide-12
SLIDE 12
  • M. Horowitz, J. Plummer, R. Howe

12

Time Division Multiplexing

  • If we use time division multiplexing to drive the LED array

– How do you light up the red LEDs?

T0 T1 T2 T3 N0 N1 N2 N3 Time Vdd

Time slot #1: Time slot #2:

slide-13
SLIDE 13
  • M. Horowitz, J. Plummer, R. Howe

13

Time Division Multiplexing

  • If we use time division multiplexing to drive the LED array

– How do you light up the red LEDs?

T0 T1 T2 T3 N0 N1 N2 N3 Time Vdd

Time slot #1: N1 at Gnd. Time slot #2: N0, N1 and N2 at Gnd.

slide-14
SLIDE 14
  • M. Horowitz, J. Plummer, R. Howe

14

Duty Cycle Code

  • For things that take real power

– And where some elements can average – Can control output

  • By changing duty cycle of input
  • Examples

– Motor (inductance)

  • Switch voltage, current drives motor

– Power supply converter (inductance)

  • Switch voltage, inductance/cap filter

– LED (eyes)

slide-15
SLIDE 15
  • M. Horowitz, J. Plummer, R. Howe

15

  • If we have a circuit with an input voltage that varies with time,

we can figure out what the output of that circuit will be by considering the individual frequency components of the input signal.

  • Superposition will give us the resulting output.

Frequency Domain Analysis

+ Circuit Output

slide-16
SLIDE 16
  • M. Horowitz, J. Plummer, R. Howe

16

Example: Frequency Decomposition

60 120 600 F [Hz] 1 V 0.5 V 0.1 V 2 1

  • 1
  • 2

See annotated notes

slide-17
SLIDE 17
  • M. Horowitz, J. Plummer, R. Howe

17

Example: Frequency Decomposition

100 200 600 F [Hz] 1 V 0.5 V 0.1 V 0.5 0.25

  • 0.25
  • 0.5

Output voltage: 1 V, 100 Hz and 0.5 V, 200 Hz sinusoids are multiplied by 0.2; the 0.1 V, 600 Hz is unchanged t [ms] 10 20 30 0.2 V 0.1 V See annotated notes

slide-18
SLIDE 18
  • M. Horowitz, J. Plummer, R. Howe

18

Impedance

  • Impedance is a concept that is a generalization of resistance:

R is simply a number with the units of Ohms.

  • What about capacitors and inductors? If V and i are sine waves,

R = V i ZC = V i = V CdV /dt = VOsin 2πFt

( )

2πFCVOcos 2πFt

( )

ZC = V i = 1 j* 2πFC

ZL = V i = Ldi / dt i = 2πFLio cos 2πFt

( )

io sin 2πFt

( )

ZL = V i = j∗2πFL

slide-19
SLIDE 19
  • M. Horowitz, J. Plummer, R. Howe

19

Analyzing RC, RL Circuits Using Impedance vin vout R C

ZC = 1 j∗2πFC ZR =R

  • If the circuit had two resistors then we would know how to analyze it
  • So we can still use the voltage divider approach with impedances

Vout Vin = R2 R1+R2

  • r more generally, Vout

Vin = Z2 Z1+ Z2

slide-20
SLIDE 20
  • M. Horowitz, J. Plummer, R. Howe

20

Asymptotic Circuit Analysis

Find the power in the 2A current source when F = 0 Hz and when F à infinity i(t) = (2 A) cos(2πFt)

i(t)

slide-21
SLIDE 21
  • M. Horowitz, J. Plummer, R. Howe

21

Asymptotic Circuit Analysis: F = 0 Hz

F = 0 Hz à current source is 2 A, DC

  • pen

short short

+

  • vi
slide-22
SLIDE 22
  • M. Horowitz, J. Plummer, R. Howe

22

Asymptotic Circuit Analysis: F = 0 Hz

Vi = (2 A)(5 || 15 Ω) = 7.5 V à P = - (2 A)(7.5 V) = - 15 W F = 0 Hz à current source is 2 A, DC

  • pen

short short

+

  • vi
slide-23
SLIDE 23
  • M. Horowitz, J. Plummer, R. Howe

23

Asymptotic Circuit Analysis: F à ∞ Hz

F à ∞ Hz

short

  • pen
  • pen

+

  • vi

i(t)

slide-24
SLIDE 24
  • M. Horowitz, J. Plummer, R. Howe

24

Asymptotic Circuit Analysis: F à ∞ Hz

Vi = [i(t)] (5 Ω) à P(t) = - (2 A)2(5 Ω) cos2(2πFt) = - (20 W) cos2(2πFt)

F à ∞ Hz

short

  • pen
  • pen

+

  • vi

i(t)

slide-25
SLIDE 25
  • M. Horowitz, J. Plummer, R. Howe

25

RC Low Pass Filters vin vout

C=0.1µF

0.2 0.4 0.6 0.8 1 500 1000 1500 2000

Vout Vin = 1 j∗2πFC R + 1 j∗2πFC = 1 1+ j∗2πFRC

Vout/Vin

F (Hz)

RC = 1.1 ms Fc = 1/[2pRC] =145 Hz

R=11KW

= 1 + jF/Fc 1 FC = 1/[2pRC]

slide-26
SLIDE 26
  • M. Horowitz, J. Plummer, R. Howe

26

Bode Plots

  • Plot of log (gain = Vout/Vin) vs. log of frequency
  • Why plot log?

– Log converts multiplication to addition – Makes the plots very simple

  • If gain proportional to F, the slope of the line is 1
  • If gain is constant, the slope of the line is 0
  • If gain is proportional to 1/F, the slope of the line is -1
  • If gain is proportional to 1/F2, the slope of the line is -2
slide-27
SLIDE 27
  • M. Horowitz, J. Plummer, R. Howe

27

Plotting dB vs. Frequency

  • Consider the simple low pass filter we looked at earlier

vin vout

R = 11kΩ C = 0.1 µF

Gain = Vout Vin = 1 1+ j* 2πFRC = 1 1+ jF / F

c

GaindB = 20log10 1 1+ jF / F

c

⎛ ⎝ ⎜ ⎜ ⎞ ⎠ ⎟ ⎟ = 20log10 1

( ) − 20log10 1+ jF / F

c

( )

≅ 0− 20log10 F / F

c

( )

(assuming F is large and neglecting the phase)

  • 20
  • 40

Freq Hz 103 104 102 10 1 Gain dB RC = 1.1 ms Fc = 1/[2pRC] =145 Hz

slide-28
SLIDE 28
  • M. Horowitz, J. Plummer, R. Howe

28

vin vout R L

Vout Vin = j∗2πFL R + j∗2πFL = j∗2πF L R 1+ j∗2πF L R

RL High Pass

F

C =

1 2π L R

  • 20
  • 40

Freq Hz Gain dB

20dB/decade

If R = 1 kΩ and L = 1 mH, then F

c ≅159 kHz 103 104 105 106 107

slide-29
SLIDE 29
  • M. Horowitz, J. Plummer, R. Howe

29

Example: Filter and Bode Plot

vin vout C1 10nF C2 15nF R1 4.7kΩ

Vout Vin = ZR1|| ZC2 ZC1+ ZR1|| ZC2 ZR1|| ZC2 = ZR1∗ ZC2 ZR1+ ZC2 = R1 1+ 2πFR1C2 Vout Vin = R1 1+ 2πFR1C2 1 2πFC1 + R1 1+ 2πFR1C2 = 2πFR1C1 1+ 2πFR1 C1+C2

( )

F

c =

1 2πR1 C1+C2

( )

=1.35kHz GaindB @HighF = 20log C1 C1+C2 ⎛ ⎝ ⎜ ⎜ ⎞ ⎠ ⎟ ⎟ = −7.96dB

Gain dB

  • 20
  • 40

Freq Hz 103 104 102 10 1

slide-30
SLIDE 30
  • M. Horowitz, J. Plummer, R. Howe

30

Op-Amps

  • Are very high gain amplifiers

– Have more gain then we need (1M) – Use feedback to get the gain we want

  • Two ways to figure out output voltage

– Write equations for V+ and V-

  • As a function of input and output voltages
  • Solve the equations

– Vout = A(V+ - V-)

– Use ideal Op-Amp equations

  • Assume A = infinite
  • Find the output voltage that makes V+ = V-
slide-31
SLIDE 31
  • M. Horowitz, J. Plummer, R. Howe

31

Ideal Op Amps

No current into op-amp inputs No voltage difference between

  • p-amp input terminals

The Two Golden Rules for circuits with ideal op-amps*

* when used in negative feedback amplifiers

1. 2.

slide-32
SLIDE 32
  • M. Horowitz, J. Plummer, R. Howe

32

Example - Find The Gain

100k 100k 20k 10k

Vin

Vout +

  • vx

vn = vp = 0 à ifa = (0 – vx)/100k in = ip = 0 à iin = ifa = (vin – 0)/10k KCL at vx node: ifa = i20 + ifb

  • vx /100k = vx/20k + (vx – vout)/100k

vout = 100k[1/100k + 1/20k + 1/100k]vx = 7vx vin/10k = -vx/100k à vx = - 10vin vout = 7(-10)vin = -70vin

ifa iin i20 ifb

slide-33
SLIDE 33
  • M. Horowitz, J. Plummer, R. Howe

33

Example: Diode in the Feedback Loop

Given – the diode current is: iD = (100 fA)e

  • vD/(0.025V)

Find vo as a function of vs

slide-34
SLIDE 34
  • M. Horowitz, J. Plummer, R. Howe

34

Example: Diode in the Feedback Loop

iD = (100 fA)e

  • vD/(0.026V)

vn = vp = 0 is = vs / Rs in = 0 à is = iD vs / Rs = (100 fA)e

is

  • vD/(0.026V)

vD = (26 mV) ln[ vs / (50pV)] vo = - vD = - (60 mV) log[ vs / (50pV)]

slide-35
SLIDE 35
  • M. Horowitz, J. Plummer, R. Howe

35

Adding Capacitors

Sinusoidal voltage

Cf

  • Suppose we add a

capacitor in the feedback

  • We can treat this exactly as

we did the earlier circuits by using impedances.

  • Our earlier analysis

showed

vo = −vs Rf Rs

Zs = Rs

Zf = 1 1 Rf + j∗2πFCf

∴vo = −vs Zf Zs = − 1 1 Rf + j∗2πFCf Rs = −vs Rf Rs 1 1+ j∗2πFRfCf ⎛ ⎝ ⎜ ⎜ ⎞ ⎠ ⎟ ⎟

slide-36
SLIDE 36
  • M. Horowitz, J. Plummer, R. Howe

36

Sinusoidal voltage

C

Example: Time Domain Analysis

vo vin

  • What is the transfer function

in the time domain?

i1+i2 = 0 ∴− vin Rs + C dVc dt = 0

+

  • ∴− vin

Rs = C dVo dt ∴ dVo dt = − vin RsC or vo = − 1 RsC vin dt

t

This is an op amp integrator!

slide-37
SLIDE 37
  • M. Horowitz, J. Plummer, R. Howe

37

Finite State Machines – Useless Box

  • SwitchOn is either true or false; Limit is either true of false;
  • Can represent Motor using two Boolean variables

– Forward is either true or false; Reverse is either true or false

  • It is an error is both are true
  • What is the Boolean expression for this FSM (Finite State Machine)

– Forward: on – Reverse !on && !limit