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

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-6
SLIDE 6
  • M. Horowitz, J. Plummer, R. Howe

6

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-7
SLIDE 7
  • M. Horowitz, J. Plummer, R. Howe

7

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-8
SLIDE 8
  • M. Horowitz, J. Plummer, R. Howe

8

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-9
SLIDE 9
  • M. Horowitz, J. Plummer, R. Howe

9

Example:

Base 10: 11 – 23 = -12

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

10

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-11
SLIDE 11
  • M. Horowitz, J. Plummer, R. Howe

11

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-12
SLIDE 12
  • M. Horowitz, J. Plummer, R. Howe

12

  • 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-13
SLIDE 13
  • M. Horowitz, J. Plummer, R. Howe

13

Example: Frequency Decomposition

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

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

14

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

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

15

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-16
SLIDE 16
  • M. Horowitz, J. Plummer, R. Howe

16

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-17
SLIDE 17
  • M. Horowitz, J. Plummer, R. Howe

17

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-18
SLIDE 18
  • M. Horowitz, J. Plummer, R. Howe

18

Asymptotic Circuit Analysis: F = 0 Hz

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

  • pen

short short

+

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

19

Asymptotic Circuit Analysis: F à ∞ Hz

F à ∞ Hz

short

  • pen
  • pen

+

  • vi

i(t)

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

20

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-21
SLIDE 21
  • M. Horowitz, J. Plummer, R. Howe

21

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-22
SLIDE 22
  • M. Horowitz, J. Plummer, R. Howe

22

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

  • 20
  • 40

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

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

23

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-24
SLIDE 24
  • M. Horowitz, J. Plummer, R. Howe

24

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-25
SLIDE 25
  • M. Horowitz, J. Plummer, R. Howe

25

Example: Filter and Bode Plot

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

Gain dB

  • 20
  • 40

Freq Hz 103 104 102 10 1

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

26

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-27
SLIDE 27
  • M. Horowitz, J. Plummer, R. Howe

27

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-28
SLIDE 28
  • M. Horowitz, J. Plummer, R. Howe

28

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-29
SLIDE 29
  • M. Horowitz, J. Plummer, R. Howe

29

Example - Find The Gain

100k 100k 20k 10k

Vin

Vout +

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

30

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-31
SLIDE 31
  • M. Horowitz, J. Plummer, R. Howe

31

Example: Diode in the Feedback Loop

iD = (100 fA)e

  • vD/(0.025V)
slide-32
SLIDE 32
  • M. Horowitz, J. Plummer, R. Howe

32

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-33
SLIDE 33
  • M. Horowitz, J. Plummer, R. Howe

33

Sinusoidal voltage

C

Example: Time Domain Analysis

vo vin

  • What is the transfer function

in the time domain?

+

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

34

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