EE40 Lecture 17 Josh Hug

8/04/2010

EE40 Summer 2010 Hug 1 Logistics • HW8 will be due Friday • Mini-midterm 3 next Wednesday – 80/160 points will be a take-home set of design problems which will utilize techniques we’ve covered in class • Handed out Friday • Due next Wednesday – Other 80/160 will be an in class midterm covering HW7 and HW8 • Final will include Friday and Monday lecture, Midterm won’t – Design problems will provide practice

EE40 Summer 2010 Hug 2 Project 2 • Booster lab actually due next week – For Booster lab, ignore circuit simulation, though it may be instructive to try the Falstad simulator • Project 2 due next Wednesday – Presentation details to come [won’t be mandatory, but we will ask everyone about their circuits at some point]

EE40 Summer 2010 Hug 3 Project 2 • For those of you who want to demo Project 2, we’ll be doing demos in lab on Wednesday at some point – Will schedule via online survey

EE40 Summer 2010 Hug 4 CMOS/NMOS Design Correction • (Sent by email) • My on-the-fly explanation was correct, but not the most efficient way – If your FET circuit is implementing a logic function with a bar over it, i.e. • 푍 = 퐴 + 퐵퐶 + 퐷 + 퐸퐹 퐺 + 퐻 – Then don’t put an at the output, it just makes things harder and less efficient • Sorry, on-the-fly-explanations can be dicey

EE40 Summer 2010 Hug 5 CMOS • CMOS Summary: – No need for a pull-up or pull-down resistor • Though you can avoid this even with purely NMOS logic (see HW7) – Greatly reduced static power dissipation vs. our simple NMOS only logic • In reality, are never truly off, and static leakage power consumes >50% of chip power – Dynamic power is still hugely significant – Uses twice the number of transistors as our simple purely NMOS logic

EE40 Summer 2010 Hug 6 Tradeoffs in Digital Circuits • Processor can do more work per second if 푓 is high

– Increasing 푉푆 and lowering 푉푇 give faster rise and fall times, letting us increase 푓 – Dynamic power (and heat) in CMOS scales as 2 퐶퐿푉푆 푓 – Subthreshold leakage power (and heat) gets larger as 푉푇 gets smaller and as heat increases • Smarter hardware takes more transistors – More area means fewer chips per wafer – More transistors means more power consumption

EE40 Summer 2010 Hug 7

Model Corner Cases • What happens if:

– 푉𝑖푛 = 0.99푉 – 푉𝑖푛 = 1.01푉 – 푉𝑖푛 = 1푉

• Real MOSFET model is more complicated – Switch can be semi-on

– 푖퐷푆 saturates for large 푉푡,푛 = 1푉 푉퐷푆 [not really a resistor] 푉푡,푝 = −4푉

EE40 Summer 2010 Hug 8

Real MOSFET Model • If we have time this week, we’ll discuss a more realistic model of the MOSFET

• Useful for understanding invalid input voltages in logic circuits • More importantly, tells us how we can utilize MOSFETs in analog circuits – Op-amps are built from transistors EE40 Summer 2010 Hug 9 Nonlinear Elements • This more realistic MOSFET model is nonlinear • MOSFETs are three terminal nonlinear devices. We will get back to these briefly on Friday – Functionality is similar to what we’ve seen before (op-amps) – Analysis isn’t too bad, but will take too long to go through. If you’re curious see chapters 7 and 8. • We’ll instead turn to – Interesting new function – Analysis is easier

EE40 Summer 2010 Hug 10 Physical Behavior and Shockley Equation

Physical Device Symbol I N P I - + - + 푉퐷 푉퐷 Quantitative I-V characteristics: Qualitative I-V characteristics: I V positive, 푉퐷/푛푉푇 퐼 = 퐼푂(푒 − 1) high 푘푇 푉 = = 0.026푉 conduction 푇 푞 푛: 1 to 2 V D 퐼 : 10−15퐴 to 10−12퐴 V negative, 푂 low conduction Allows significant current flow in only one direction

EE40 Summer 2010 Hug 11 The pn Junction I vs. V Equation

I-V characteristic of PN junctions In EECS 105, 130, and other courses you will learn why the I vs. V relationship for PN junctions is of the form 푘푇 퐼 = 퐼 (푒푉퐷/푛푉푇 − 1) 푉 = = 0.026푉 푂 푇 푞

where I0 is a constant related to device area and materials used to make the diode, q  electronic charge 1.610-19, k is Boltzman constant, and T is absolute temperature. -12 -15 a typical value for I0 is 10 - 10 A

We note that in forward bias, I increases exponentially and is in the A-mA range for voltages typically in the range of 0.6-0.8V. In reverse bias, the current is essentially zero.

EE40 Summer 2010 Hug 12 Shockley Equation for the Diode

Symbol 푉퐷/푛푉푇 I 퐼 = 퐼푂(푒 − 1)

푘푇 - + 푉 = = 0.026푉 푉퐷 푇 푞 푽푫 (volts) I (amps) For typical values: -1 −0.000000000001 푇 = 300퐾 -0.1 −0.0000000000098 −12 퐼푂 = 10 퐴 0 0 0.1 0.000000000045 Real Diodes will eventually 0.3 0.000000102 become linear for large 푉퐷, 0.6 0.01 and for really large 푉퐷 0.7 0.49 they’ll die 0.8 23 0.9 1080 EE40 Summer 2010 Hug 13 Large Voltage Limits of the Diode

Qualitative I-V characteristics: (large V)

Qualitative I-V characteristics: (small V) I Diode dies I V positive, high conduction Linear

VD VD V negative, low conduction Diode dies

Green LEDs in lab: Linear for ≥ 2.3V

EE40 Summer 2010 Die at ≈ 6V Hug 14 Solving diode circuits • How do we solve this circuit assuming zoomed-in region? • KCL at the top right node: 푉푇ℎ − 푉 푉 = 퐼푂 푒0.026 − 1 푅푇ℎ Quantitative I-V characteristics: I RTh 퐼 = 퐼 (푒푉퐷/푉푇 − 1) + 푂 + n=1 VTh - V No algebraic solution! –

EE40 Summer 2010 Hug 15 Load Line Analysis Method 1. Graph the I-V relationships for the non-linear element and for the rest of the circuit 2. The operating point of the circuit is found from the intersection of these two curves.

I I RTh +

+ VTh/RTh operating point VTh - V – V

VTh 푉 − 푉 푉 푇ℎ The I-V characteristic of all of the circuit except = 퐼푂 푒0.026 − 1 푅푇ℎ the non-linear element is called the load line

EE40 Summer 2010 Hug 16 Load Line Example: Power Conversion Circuits • Converting AC to DC • Potential applications: Charging a battery

V =V cos (wt) R V I m o

• Can we use phasors? • Example on board

EE40 Summer 2010 Hug 17 Simple Model of a Diode • Just as we did with MOSFETs, we will utilize a simpler model – Goal: Accurate enough that we can design circuits • For Diodes, we started with the “real” model and are now simplifying • For MOSFETs, we started with the simplest model, and added complexity – Omitted real model for MOSFETs because it’s not very intuitive [unlike real diodes]

EE40 Summer 2010 Hug 18 Simpler Diode Model

I (A) I V positive, high conduction forward bias reverse bias VD VD (V) V negative, VDon low conduction

Goal: To give us Symbol I approximately the right answer for most inputs - + 푉퐷 EE40 Summer 2010 Hug 19 Voltage Source Model Circuit symbol I-V characteristic VS model I I (A) I + + + - VDon V VD forward bias D

reverse bias – VD (V) – VDon

For a Si pn diode, VDon  0.7 V

ON: When ID > 0, VD = VDon Diode behaves like a voltage OFF: When VD < VDon, ID = 0 source in series with a switch: • closed in forward bias mode • open in reverse bias mode

EE40 Summer 2010 Hug 20 How to Analyze Diode Circuits with Method of Assumed States A diode has only two states:

• forward biased: ID > 0, VD = 0.7 V (or some other 푉퐾)

• reverse biased: ID = 0, VD < 0.7 V Procedure: 1. Guess the state(s) of the diode(s), drawing equivalent circuit given diode states 2. Check to see if your resulting voltages and currents match assumptions. 3. If results don’t match assumptions, guess again 4. Repeat until you get a consistent guess Example: If v (t) > 0.7 V, diode is forward biased + s v (t) + v (t) s - R If v (t) < 0.7 V, diode is reverse biased – s

EE40 Summer 2010 Hug 21 Bigger Examples on Board • DC Source with 2 Diodes • Half-wave rectifier • Full-wave rectifier • See written notes

EE40 Summer 2010 Hug 22 That’s all for today • Next time, maybe a little more diodes and then physics and how solar cells, diodes, and MOSFETs work • Time permitting we may talk about real model of a MOSFET

EE40 Summer 2010 Hug 23 Extra Slides

EE40 Summer 2010 Hug 24 Diode Logic: AND Gate • Diodes can be used to perform logic functions: AND gate output voltage is high only if Inputs A and B vary between 0 both A and B are high Volts (“low”) and Vcc (“high”) Vcc Between what voltage levels does C vary?

V RAND OUT

5 A C EOC

Slope =1 B Shift 0.7V Up

0

5 VIN 0

EE40 Summer 2010 Hug 25 Diode Logic: OR Gate • Diodes can be used to perform logic functions: OR gate output voltage is high if Inputs A and B vary between 0 either (or both) A and B are high

Volts (“low”) and Vcc (“high”) Between what voltage levels does C vary? A

VOUT

5 B C

EOC ROR

Slope =1 Shift 0.7V Down

0 5 VIN 0 0.7V

EE40 Summer 2010 Hug 26 Diode Logic: Incompatibility and Decay • Diode Only Gates are Basically Incompatible: AND gate OR gate output voltage is high only if output voltage is high if both A and B are high either (or both) A and B are high

Vcc A

RAND B COR A C AND ROR B

Signal Decays with each stage (Not regenerative)

EE40 Summer 2010 Hug 27 Switch Model Circuit symbol I-V characteristic Switch model I I (A) I + +

V VD forward bias D

reverse bias – VD (V) –

For a Si pn diode, VDon  0.7 V

ON: When ID > 0, VD = 0 Diode behaves like a voltage OFF: When VD < VDon, ID = 0 source in series with a switch: • closed in forward bias mode • open in reverse bias mode

EE40 Summer 2010 Hug 28 VSR Model Circuit symbol I-V characteristic VSR model I I (A) + +

I V V D forward bias + V D - Don reverse bias – VD (V) V Don –

ON: When VD ≥ VDon, then 퐼퐷 = (푉퐷 − 푉퐷표푛)/푅표푛

OFF: When VD < VDon, ID = 0

Typical 푅표푛 = 10Ω

EE40 Summer 2010 Hug 29 Design Problems • ALL WORK MUST BE DONE COMPLETELY SOLO! • Maximum allowed time will be 5 hours – Will be written so that it can be completed in approximately 2 hours • Allowed resources: – May use any textbook (incl. Google Books) – Anything posted on the EE40 website – Only allowed websites are Google Books, wikipedia, and EE40 websites – Not allowed to use other websites like facebook answers, yahoo answers, etc. even if you are reading other people’s responses – When in doubt, email me or text me – We will be very serious about cheating on this!

EE40 Summer 2010 Hug 30 Example Design Problem • Design a circuit which will sum three sinusoidal input voltages and attenuate any frequencies above 10,000 Hz by at least 20 dB

EE40 Summer 2010 Hug 31 Example: Diodes in Lab • What happens if we connect our DC source in the lab to a diode? – Will it blow up?

I I RTh +

+ VTh/RTh operating point VTh - V – V

VTh 푉 − 푉 푉 푇ℎ The I-V characteristic of all of the circuit except = 퐼푂 푒0.026 − 1 푅푇ℎ the non-linear element is called the load line

EE40 Summer 2010 Hug 32 Peak Detection • Let’s go back to our sinusoidal source connected to a diode • This time, let’s add a capacitor in parallel with our output resistor and see what happens

Without Capacitor:

EE40 Summer 2010 Hug 33 EE40 Summer 2010 Hug 34