# E72 Lab - Redo questions at end

Diodes, Transformers and Regulators... oh my!

In this lab you will be introduced to an extremely common non-linear device, the diode, and some of its more common uses. You will also learn a little bit about transformers, a component that is in almost every piece of electronic equipment that you own.  All of the equipment for this lab is in Singer 246.

## Diodes

The diode is a passive non-linear circuit element that, ideally, passes current in only one direction. Its symbol is shown below, as well as an image of some real diodes.

On the real diode the cathode is marked by a stripe (on the right side of both diodes in the image).

For an ideal diode current can flow in only one direction, anode to cathode, and there is no forward voltage drop across the diode. An accurate model of a diode obeys the relationship

where Is and n are two parameters that define the characteristics of the diode. Is is called the saturation current, n is the emission coefficient (1<n<2) and v and i are voltage and current as defined above. The quantity VT=kT/q is called the thermal voltage and is equal to about 25 mV at room temperature; q is the charge on an electron, k is Boltzman's constant, T is absolute temperature. We will call this model the "real" model of the diode. Another, simpler, model of a diode (made from Si, as are all those in the lab) states that if v=0.6 volts the diode is on and conducts current in the direction of the arrow, if v<0.6 volts it is off and does not conduct current. The current-voltage relationships for the three models are shown below.

We will normally use the 0.6 volt model which represents a good compromise between the oversimplifications inherent in the ideal model and the great difficulties inherent in using the transcendental relationship in the more accurate model.   The quantity of 0.6 volts is an approximation, and 0.5 or 0.7 volts may often be more appropriate.  Some kinds of diodes have lower voltages  (e.g., germanium=0.3 V), and some are higher (e.g., Light Emitting Diodes=1.0).

### Zener Diode

There is a special kind of diode called a zener diode that acts like a regular diode when the voltage across it is positive. But, if there is a large enough negative voltage across it then it will conduct in the reverse direction. The symbol for the zener diode and its I-V characteristic are shown below.

In addition to forward conduction at 0.6 volts, the zener diode also conducts in the reverse direction when the voltage gets to Vz, called the zener or "knee" voltage. This voltage depends on the way the diode is constructed and can be manufactured from about 2 to 20 volts, depending on the intended use.

### The Light Emitting Diode (LED)

Another type of diode that we will use is the light emitting diode, or LED.  The LED has similar characteristics to a standard Silicon diode but it has a higher voltage drop, typically between 1 and 2 volts, depending on the color (LED's at higher wavelengths (and hence energies) have higher voltage drops).  Standard colors for LED's include (infrared), red, orange, yellow, green, and blue.

Some applications of diodes are shown later in the procedure section.

## Transformers

Transformers can be used to increase or decrease AC voltages. They are used in electrical equipment to convert the 120 Volts coming from the wall socket to lower and safer voltages for use in equipment. The schematic diagram and defining equation for a transformer are shown below.

Where V1, V2, I1 and I2 are defined as shown, and N1 and N2 are the number of windings on the primary and secondary coils, respectively. Power transformers are usually not described in terms of N1 and N2, but instead are described in terms of the voltage output, and assume a 120 volt input. Also specified is the maximum current output which is limited by the size of the wire used in the transformer.

The transformer shown above is called a single tap transformer because there is only one output. It is possible to build transformers with multiple taps, and a common way of doing that is to make a connection to the middle of coil 2; this is called a center-tapped transformer.

In this lab you will be using a 12.6 Volt center tapped transformer (which can also be hooked up as two 6.3 volt transformers with a common connection in the middle). Note that the two 6.3 V outputs (V2) will be in phase with each other so that the voltage at the top node (on the right) will always be equal in magnitude, but opposite in sign, to the voltage at the bottom node, when measured with respect to the middle node, which is usually grounded. Remember also that all of these voltages are RMS (Root-Mean-Square) values -- the peak voltages will be the square root of 2 times larger.

## Tips for the lab writeup:

The bottom of this document has a list of questions to answer.  The easiest way to do the lab is probably to start a Word document, and to fill in the answers to the questions (with appropriate screenshots...) as you go.  That way when you've finished the lab, the writeup will also be done.  You should plan on spending several hours on the lab (but almost nothing on the writeup).  Therefore, you might want to consider doing the lab in several parts.  The instructions themselves are split into three parts 1) Power Supplies, 2) The Superdiode, and 3) Build it (building a PCB).

## Procedure:

The transformers are in the drawers of the cabinets under the bench in the front of the room; the diodes, capacitors, op-amps and resistors are in the cabinets that are on the wall at the back of the classroom portion of room 310.  The parts necessary for the PCB are scattered, I may have to help you find them all.

### Part 1) Power supplies

The transformer can be found in the large cabinets at the back of the lab.  Other components are in the parts cabinets on the wall.

1) Hook up the circuit shown below with R=470Ω (it doesn't matter which transformer output you use as long as you connect ground to the center pin), and use a 1N400X diode (the X can be any number). Look at the input voltage (on the anode of the diode) and output voltage (on the cathode) and explain the output. This circuit is called a half-wave rectifier. Note especially that the rectified output remains about 0.6 to 0.7 volts below the input while the diode is on (in accordance with a diode modeled by a constant forward voltage drop).   Do a neat job with your wiring, you will be making modifications to this circuit for parts 2 through 9.  This circuit is called a half-wave rectifier.

2) Get a 47 μF capacitor and measure it's value (there is a capacitance meter in the E11 lab, and also as part of many of the multimeters in Singer 246). Repeat 1) with three 47 μF capacitor placed in parallel with the resistor. Note that you will have to use an electrolytic capacitor which has a preferred polarity (if there is no polarity marked but there is a label "BP" or "NP" then polarity is unimportant). Make sure that the positive lead of the capacitor is connected to the diode, and the negative lead to ground. If you hook it up backwards, unpleasant liquids may ooze from the capacitor. Explain the output.  Measure the ripple (the amplitude of the variation in the output voltage), and derive an equation to predict it (approximately). Compare your calculation with the measured value.

3) Get a 330 μF capacitor and measure it's value.  Repeat 2) with a 330 μF capacitor in place of the 47 μF capacitor. What you have built is a simple power supply to convert AC power to DC power. Note that it is not ideal because there is still ripple at the output. Measure the ripple (the amplitude of the variation in the output voltage), and derive an equation to predict it (approximately). Compare your calculation with the measured value.

4) Connect the circuit shown below, and print vi, vo and vx (each measured relative to ground). Obviously this is a better power supply. we have added some regulation to the crude power supply from the previous step, but decreased the output voltage. Make sure you use a 1/2 Watt resistor for the 120 Ω resistor, else you'll burn out the resistor with too much current (they are in bottom row of resistor cabinets).  Use a 6.2V zener diode, 1N4735.

5) Add another 470 Ω resistor in parallel with the first one (for a total combined resistance of 235 Ω) and repeat the previous part. Compare the quality of the voltage regulation with 470Ω and 235 Ω, and explain any differences. If you haven't seen a large change in output, keep adding 470 Ω  resistors until you see a distinct change in the output voltage as seen on the oscilloscope.  How many 470 Ω resistors did you use before seeing distortion?

6) Consider replacing the single diode (in first circuit) with a diode bridge, as shown using a  DF01 or DF04 full wave bridge rectifier module (you needn't actually construct it).  The module has four diodes and is oriented as shown (The "~" markers are where AC power is applied, the "+" and "-" markers correspond to the positive or negative rectified signal).  Predict Vout.

7) If you were to put a 47 μF capacitor across the output would it have more or less ripple  than the half-wave rectifier (part 2)?  How about peak voltage?

### Part 2) Precision Rectifiers - the superdiode

8) Build a precision rectifier (shown below) using an op amp with R=10kΩ and Vi=2 V peak to peak at 1 kHz. For this part of the lab use a "switching diode" (such as the 1N914) in lieu of the 1N400X that you have been using. A switching diode is faster than a rectifier (1N400X) but can't handle as much current. Look closely at the output of the circuit and note that you get rectification without the 0.6 volt drop associated with a diode (as in the normal rectifier circuit). Why? Get a printout of that shows the input, the output of the circuit (Vo) and the output of the opamp.  When analyzing this circuit, note that there is only negative feedback when the diode is conducting, not when the diode is off.

Look closely at Vo at the point where the signal starts increasing from 0 volts.  What causes the "glitch" at the rising edge of the rectified output? If you have trouble seeing the glitch, use a smaller and/or faster input. Looking at the op amp output may help you explain it. (Pinout of 411).

9) Sketch Vin vs Vout for the circuit (assume ideal operation). If Vin=sin(ω·t), sketch Vout.

10) The simplest solution to this problem is to use a very high slew rate op amp. (Why?) The circuit below is a more elegant, and cheaper, solution -- though it inverts the signal. Explain why this circuit works better than the previous one (you needn't build it). To figure out how it works consider Vin>0 and Vin<0 and determine the states of the diodes.  If you still can't figure out how it would work, build it (or simulate it) and measure voltages, or come talk to me.  Note: this circuit inverts the signal.

11) Sketch Vin vs Vout for the circuit (assume ideal operation). If Vin=sin(ω·t), sketch Vout.

12) The circuit below is an absolute value (or full-wave rectifier) circuit. Explain how it works (you needn't build it).
Hint: the bottom op amp is just the precision rectifier of part 11 with the input grounded, so an equivalent circuit is shown to the right.  Consider whether or not the diode is on or off when the input voltage is positive, draw an equivalent circuit with the diode replaced by a short circuit, and calculate the gain.  Repeat for a negative input voltage.

If you still can't figure it out, build (or simulate) the circuit and measure various voltages, until you can determine how it works.

13) Sketch Vin vs Vout for the circuit. If Vin=sin(ω·t), sketch Vout.

### Part 3) Build it!

pdf of schematic (refer to page 1)

Note:  The two pins of J3 are connected on the PCB so the two grounds are connected.  Essentially there is one ground for high power circuits, and one for analog circuits.  They are kept apart as much as possible (we will discuss why we do this later in the course). Also U2, U3, U5 and U6 are simply the mounting holes on the board.

14) Obtain one of the E72 PCB's and add:

Important: Do the following steps one at a time.  Do not connect all of the components at once.  There are oscilloscope recordings to be made as you construct the circuit.

• Read the section labeled "Important:" immediately above (i.e., do one step at a time because there are intermediate measurements).
• Do NOT install C1 or U1 until directed (later in lab). Also do not install Cx and C5 (not used).
• Install:
• Capacitors C3 through C7, and C9 through C11 (all 0.1 μF).
• Capacitors C2 and C8, 10 μF. Note polarity - please come see me if there is any confusion (if there is no polarity marked but there is a label "BP" or "NP" then polarity is unimportant).
• Power jack, J4
• Add test points (these parts are small loops of wire to which you can easily attach oscilloscope probles.  These are labeled Gnd, J3_3, JVDD... (the color of the test points is not very important, but use black for ground).  J3 is hard to find - it is right next to C4.
• Resistors R1 and R2
• LED's L1 and L2 (note polarity is important - color is not important).  There is a small flat on the edge of the LED that marks the cathode - match this up with the small flat on the silk screen - please come see me if there is any confusion (also - the lead connected to the anode is longer).  Don't install this part if you are not sure about the polarity.
• Add D1 (A diode bridge - part number DF04).  Be very careful about the polarity of this device.  If you get it backwards you will be in for a world of hurt (UBN4WOH).  Pin 1 of the bridge is to the left of the notch on the silkscreen (and the pad is square).  Pin 1 of the device is on the end that is marked by a faint line - please come see me if there is any confusion.
• Do NOT install C1 or U1 until directed (later in lab). Also do not install Cx and C5 (not used).

Silk Screen and Copper Layers (pdf)

Silkscreen alone, so you can better see part labels.

Connect a 7V "wall wart" transformer (these should be in one of the cabinets - please replace them when you are done)  with a 5.5x2.5 mm jack (next to the diode bridge) and measure VAC and Vbatt  (place a ground from the oscilloscope on "Gnd" and the test leads on JVAC and JVBATT).  You should be able to explain them.   Note that at this point the LED is flashing at 120 Hz, though you can't see it.  Also note that if you disconnect the power supply, the light goes out immediately.

15)  Connect C1 (100 μF - note polarity unless marked "BP" or "NP").  Record VBATT.  In particular, measure the "droop" from the top of the waveform to the bottom.  Note that if you disconnect the power supply, the LED no longer goes out immediately (this explains the same behavior you may have noticed in electronics that you own).

16)  Connect U1 - MCP1702500.  This is a 5 volt "voltage regulator" it performs the same function as R1 and the zener diode in the circuit you built earlier (but is more efficient and more accurate).  Measure VBATT and VDD.  VBATT will have ripples, VDD should not (or they should at least be significantly smaller).  The ripples in VBATT should be bigger here than in the previous step - why?

Connect U4  - MCP1702330 (make sure you use this part # and not just any 3.3 V regulator).  Measure J3_3 - it should be a steady 3.3 Volts.

You may claim a drawer, or cabinet, in 310 to store the circuit board for use in later labs.

### Part 4) Going further -optional

17) Build the circuit shown below using 2  470 Ω resistors, and a full wave bridge rectifier module.  Be very careful with your location of grounds -- it is easy to melt a new spot in the breadboards.   Note that the wiring of transformer and diode bridge have changed substantially.   Print out Vout1 and Vout2 (measured with respect to ground), and make sure you understand how the circuit works.

18) Design (but don't build) a power supply that will generate both +5V and -5V at 50 mA (imagine a 100Ω, 1/2 Watt resistor as your load).   Use the 50 mA current rating to specify a capacitor.  You will need both a +5 V regulator, (7805, datasheet) and a -5 V regulator (7905, datasheet).   You will need to consider the "dropout voltage" of the regulator.

In order for the 7805 to work, the input voltage must be greater than the output voltage.  The regulator is guaranteed to work as long as the input is greater than the output by an amount specified by the dropout voltage.  For example, if the dropout voltage was 1.5 volts, the input would have to stay above 6.5 volts (5 V output plus 1.5 V dropout).  This can help you determine the amount of allowable ripple voltage, which can help you choose the size of the capacitor.

## To turn in:

Include (at least) the following for the specified steps of the procedure.  Each part requires only a few (2 or 3) sentences and, perhaps, a graph or two.  Try to be specific in your responses - use data from the lab when possible.  The writeup shouldn't take too long and you may want to do it most of it as you are doing the lab.

Any oscilloscope output with more than 1 trace on it should have the traces clearly labeled.

1) Show Vin and Vout as measured in lab.  Explain.

2) Show Vin and Vout.  Derive an expression for the ripple, and use it to calculate an expected valure of the ripple.  Compare this to your measurement of ripple.  Explain discrepancies. (Note, the calculation of the ripple will likely be an overestimate of the measured ripple).

3) Show Vin and Vout.  Calculate the ripple.  Compare this to your measurement of ripple.  Explain discrepancies.

4) Show vi, vo and vx. Explain.

5) Present your results, and explain why they circuit fails when it does.  In particular why did it fail after 2 resistors were added and not 1, or 3?

6) Sketch your prediction of Vout.

7) If you were to put a 47 μF capacitor across the output would it have more or less ripple  than the half-wave rectifier (part 2)?  How about peak voltage?

8) Show a graph with Vin, Vout and the output of the op-amp.  Explain why this works as a precision rectifier.  Also explain what causes the "glitch" at the rising edge of the rectified outputBuild a precision rectifier

9) Sketch Vin vs Vout for the superdiode circuit. If Vin=sin(ω·t), sketch Vout.

10) Explain how this circuit works and how it avoids the "glitch" of the previous circuit.

11) Sketch Vin vs Vout for the improved circuit. If Vin=sin(ω·t), sketch Vout.

12) Explain how the circuit works to generate an absolute value (i.e., full-wave rectification).

13) Sketch Vin vs Vout for the absolute value circuit.

14) Show VBATT without C1.  Explain its shape.

15) Show VBATT with C1.  Estimate and then measure the droop.  An LED has a diode drop of about 1.5 to 2 Volts.

16) Why are the ripples in VBATT bigger here than in the previous step.