electronics - reed · pdf filea high frequency sine wave and a lower frequency sine wave and...

13
Electronics RC Filter, DC Supply, and 555 0.1 Lab Ticket Each individual will write up his or her own Lab Report for this two-week experiment. You must also submit Lab Tickets individually. You are ex- pected to discuss the plans for the lab with your partner, but we require that all written work to be done on your own. Week 1: A nicely polished, typed, rough draft of the Introduction, Ex- perimental Design and Procedure sections of your lab report. We will grade these and get them back to you during week 2 of the extended projects. Week 2: No lab ticket. Use your spare time to work on writing your lab report. Feel free to meet with me to discuss what you have written. 1 Introduction In this extended project we will continue our study of a variety of electrical circuits. First we’ll revisit our RC filter circuits by designing a filter to separate out signal from noise. Then we’ll extend our study of diodes to include a full-wave rectifier. After that we’ll see how to improve the quality of our DC power supply output and then, finally, take a look at an interesting integrated circuit, the 555 timer. 2 RC Filter Application In this part of the lab we’ll generate a waveform that is a combination of a high frequency sine wave and a lower frequency sine wave and then build a filter to separate them. 1 This type of situation is common and can occur 1 Adapted from Hayes and Horowitz, The Student Manual for the Art of Electronics . 1

Upload: ngomien

Post on 16-Mar-2018

220 views

Category:

Documents


2 download

TRANSCRIPT

Electronics

RC Filter, DC Supply, and 555

0.1 Lab Ticket

Each individual will write up his or her own Lab Report for this two-weekexperiment. You must also submit Lab Tickets individually. You are ex-pected to discuss the plans for the lab with your partner, but we requirethat all written work to be done on your own.

• Week 1: A nicely polished, typed, rough draft of the Introduction, Ex-perimental Design and Procedure sections of your lab report. We willgrade these and get them back to you during week 2 of the extendedprojects.

• Week 2: No lab ticket. Use your spare time to work on writing yourlab report. Feel free to meet with me to discuss what you have written.

1 Introduction

In this extended project we will continue our study of a variety of electricalcircuits. First we’ll revisit our RC filter circuits by designing a filter toseparate out signal from noise. Then we’ll extend our study of diodes toinclude a full-wave rectifier. After that we’ll see how to improve the qualityof our DC power supply output and then, finally, take a look at an interestingintegrated circuit, the 555 timer.

2 RC Filter Application

In this part of the lab we’ll generate a waveform that is a combination ofa high frequency sine wave and a lower frequency sine wave and then builda filter to separate them.1 This type of situation is common and can occur

1Adapted from Hayes and Horowitz, The Student Manual for the Art of Electronics.

1

when high frequency noise contaminates the signal in power outlets. We’dlike to separate out this noise, as shown in Fig. 1, from our lower frequencysignal and can do so with a simple RC filter.

t

V

Figure 1: Voltage versus time snapshot of a sine wave contaminated withhigh frequency noise.

Our goal here is to design a filter to allow the signal, a 60 Hz sine wave,to pass, and to stop the noise, a much higher frequency sine wave. We’ll beusing some fancy Agilent arbitrary waveform generators to make our “noisy”waveform. We’ve borrowed them from the Junior Laboratory so please becareful with them. You’ll only be using these waveform generators for thefirst part of the experiment so we’ve pre-configured them with a 60Hz sinewave with 1000Hz noise on it, similar to that in Fig. 1. Just turn them onusing the power button in the lower left-hand corner of the front panel andyou should be ready to go.

VoutAgilentWaveformGenerator

YourRC

Filter

Figure 2: Block diagram of circuit used for testing your filter design.

2

We need to design a filter to separate out the high frequency noise fromthe signal we want, the 60 Hz sine wave. Your task is to choose which type ofRC filter to use, high-pass or low-pass, and then to choose the appropriatecomponents to retain the signal we want and to remove the noise we don’twant. In other words you have to choose R and C for your filter such thatf3db is between the signal and noise. This may seem relatively arbitrary sinceyou could choose it to occur anywhere, however keep in mind the shape ofthe gain curves you measured for RC filters in Lab 5. Select f3db so thatyou retain most of the signal while removing as much noise as possible.

Choose your filter components and then build your filter. Hook up your“noisy” waveform to your RC filter and then observe how well your filterperforms by viewing both Vin (the “noisy” waveform), and Vout (the outputof your filter) on the DataStudio oscilloscope. Is the 60 Hz sine wave reducedin voltage at all as it passes through your filter? If so, could you have chosenan f3db so that the 60 Hz signal would pass through unchanged?

How reduced is the 1k Hz noise? Is there a choice of f3db that wouldlead to an even greater reduction in the amplitude of the noise?

Reduce your f3db by half and note the change in the output of the filter.Then double your original f3db and note the change in the output of thefilter. Given our limited selection of capacitors you’ll likely have to changethe R in your filter to change f3db to the value you want.

As you have likely observed, there are tradeoffs when choosing f3db fora filter. If you choose it close to the noise in order to preserve the signalwe want then the noise isn’t reduced by much. If you choose it closer tothe signal then the signal itself is reduced significantly by the filter. Thelatter is the best choice when designing a filter since it’s easy to amplify thepost-filtered signal again once you’ve removed the noise.

3 Full-wave Rectifier

In Lab 6 we took a quick look at a diode circuit, the half-wave rectifier.Using it we were able to build a reasonable approximation of a DC powersupply by adding a capacitor at the output of the rectifier. Many of younoted, however, that we were just throwing away the negative portion ofour input sine wave, a good consideration when designing a power supply tooperate efficiently. A similar but slightly more complex circuit, the full-waverectifier, uses a total of 4 diodes to make use of the negative portion of theinput sine wave.

Fig. 3 shows the half wave rectifier circuit you built in Lab 6. Build

3

4.7kΩ Vout

PascoPower Amp

Figure 3: Half-wave rectifier circuit.

that circuit again on your breadboard and observe the output of the circuitwhen driven with the output from the DataStudio Power Amplifier set toprovide a 60 Hz sine wave at 10V amplitude. Now construct the full-waverectifier shown in Fig. 4 on your breadboard as well and drive it with thesame input signal. Try to construct the circuit similar to how it appearsin Fig. 4 so that you’ll have an easier time troubleshooting if necessary.Observe both outputs using two Voltage Sensors. You should see that thefull-wave rectifier circuit does a much better job at turning the oscillatingAC signal into a positive signal with a frequency twice that of the original.

4.7kΩ Vout

Pasco Power Amp

Figure 4: Full-wave rectifier circuit.

Note, also, the voltage differences between the outputs of the two recti-fiers. The full wave rectifier will have an output slightly smaller than thatof the half-wave. Can you trace the current through the full-wave rectifiercircuit to see why the output is two “diode drops” below the input for afull-wave rectifier instead of just one “diode drop” as with the half-waverectifier? Recall that current can’t just stop but must flow in a completeloop.

4

4 DC Power Supply

Now, as we did in Lab 6 with the half-wave rectifier, add a 22 microfaradcapacitor across the output of your full-wave rectifier (in parallel with theresistor). These capacitors are known as electrolytic capacitors and havea polarity that must be observed. Make sure that the arrow on the whiteband points to the lower voltage part of your circuit.

Observe the output in the DataStudio oscilloscope. We hope that you’llfind a reasonable approximation of a DC voltage as your output. In fact, itought to have half the “ripple”, or variation in the output waveform, as thehalf-wave rectifier from Lab 6. So, aside from the additional “diode drop”we’ve managed to get a much better DC voltage using a full-wave rectifierthan we got with a half-wave rectifier.

V

I

Zener Voltage

Figure 5: Current versus voltage curve for a typical Zener diode.

As you can see, though, the output from the full-wave rectifier still isn’tthat great of a DC voltage. It’s not flat at all compared to the DC voltagesoutput by the Pasco Power Amplifier you’ve been using in previous labs.With the addition of a single component, a Zener diode, you can turn yourpassable DC voltage into a reasonably stable DC voltage.

A Zener diode is a special type of diode that is made to have a specificbreakdown voltage. Fig. 5 shows an I-V curve for a Zener diode. You cantell that, at a particular reverse-bias voltage (the cathode voltage higherthan the anode voltage) the diode starts to conduct. We can use this to

5

our advantage with our full-wave rectifier as shown in the circuit in Fig.6. By adding a resistor in series (Why do you think we need to do this?)and the Zener diode in parallel to the output we will effectively short theoutput that is greater than the Zener breakdown voltage to ground whichwill hold our output constant at the Zener diode voltage, in other words,we’ve “regulated” the output voltage.

4.7kΩ Vout

PascoPower Amp

+

220Ω

Zener Diode

Figure 6: Basic regulated DC Power Supply using Zener Diode as regulator.

Build the circuit in Fig. 6 and look at the output on your Datastudiooscilloscope. Note that the output is both a bit flatter and lower in voltagethan without the Zener in place. We’ve chosen a Zener diode with a 5.1Vbreakdown voltage and, we hope, your circuit reflects this.

You may be wondering why we still aren’t achieving a really flat output.It’s a very reasonable question and has to do with the variable resistance inthe breakdown region on the Zener diode. Our Zener diode I-V curve wasa little optimistic about the shape of the curve after the diode breaks downin reverse-bias and it’s less vertical than we portrayed.

If the Zener diode circuit leaves you unsatisfied with the flatness of yourDC voltage then we have one more circuit that might appease you. It’scalled, unsurprisingly, a voltage regulator. It’s a three-terminal integratedcircuit (IC) that does just that using a lot of transistors (more on those inPhysics 202) and a cool circuit feature called feedback. It’s far more complexthan we’re going to go into now, but we want to introduce you to them sincethey’re super easy to use and work really well.

Fig. 7 shows the voltage regulator we’ll be using, the 7805. It’s got threeterminals: input, ground, and output from left to right if you’re viewing itfrom the front (where the writing is). The pins on the 7805 should fit intothe holes on your breadboard but make sure that the pins are electricallyisolated from each other when you insert it.

Note that we’ve added capacitors to the input and output of the 7805

6

7805

Input Output

Ground

Figure 7: Pinout of a three-terminal voltage regulator, the 7805.

regulator. Since the circuit uses feedback these are required to prevent noiseoscillations that can form. Capacitors are used in this capacity throughoutmost commercially produced circuits (not only on regulators) to preventoscillations and noise from dominating circuit performance. Also note thatwe no longer need the two resistors that we used in the Zener diode circuit;the 7805 takes care of all of that for us!

Vout

PascoPower Amp

+

22µF 0.22µF

In Out

Ground

7805

Figure 8: DC power supply circuit using a 7805 voltage regulator.

Build the circuit shown in Fig. 8 and apply the same 10V, 60 Hz. sinewave you’ve been using to the input. Look at both the input and outputon the Datastudio oscilloscope. We hope that you now see a very nicelyregulated 5V DC output and are beginning to see the power of integratedcircuits to simplify circuit building. Voltage regulator ICs are about assimple as ICs come but, as you can see, they do a great job with a rathercomplex task. We now move on to discuss a more complex, but also verycommon, IC, the 555 Timer.

7

5 555 Timer

The 555 timer is a cheap, important and relatively simple integrated circuit(IC) that produces very accurate sequences of digital signals2, called “pulsetrains” (for example, a square wave is an example of a periodic pulse train).Among their many uses, 555 timers can be used to control everything fromsimple robotic motors called servos to complex electrical circuits.

5.1 555 operation

Figure 9: a) The 555 timer chip with pin numbers and names. b) Thepin configuration of the 555. Note that Pin 3 is the output, Pin 5 is notconnected, and Pin 1 is connected to ground.

The 555 is relatively simple...for an IC. To describe exactly why the 555works the way it does is beyond the scope of this lab and so we’ll onlyfocus on the basic ideas and rules regarding it’s function here. The mostimportant aspect of the 555, the way we’ll be using it, is that it takes ina DC voltage (5V DC in our case) and outputs a pulse train (think squarewave). It’s also sometimes known as an oscillator chip because of just thisfeature.

2Digital signals, unlike analog signals, can have only one of two voltage values, in thiscase zero and five volts. In general, the lower voltage signal is called “low” or “off” andthe high voltage signal is called “high” or “on.” While not all digital signals operate onthe same voltages, they all operate on this same basic principle.

8

As shown in Fig. 9, the 555 has 8 “pins” which link the internal circuitryto the outside. The second diagram in Fig. 9 shows the manner in which the555 should be setup. This configuration of the 555 is called the “astable”mode and, configured this way, it will generate a periodic pulse train, suchas a square wave.

Pin 6

Output (Pin 3)

Figure 10: The output signal of a 555 timer when the input signal comesfrom an RC circuit in which the capacitor continually charges through bothresistors and discharges through RB to Pin 7, jumping back and forth from2/3 Vcc to 1/3 Vcc. When the capacitor is charging, the output of the 555(Pin 3) is a digital high signal, when it is discharging, the output is a digitallow signal.

The 555 functions in the following manner. Refer to Fig. 9 and Fig. 10for clarification.

1. When the power is first turned on (Vcc = 5V DC is applied to thecircuit) the output pin (Pin 3) is low (zero volts).

2. The capacitor charges through the combined resistance of RA andRB. This forms a simple RC charging circuit with time constant,τ = (RA +RB) ∗ C.

3. When the capacitor charges to a value of 1/3 Vcc, Pin 2 is triggered,causing the output (Pin 3) of the 555 to go high (five volts).

9

4. The capacitor continues to charge until the voltage across it reaches2/3 Vcc, at which point Pin 6 causes the output (Pin 3) go low (zerovolts) and the discharge (Pin 7) to connect to ground. With the dis-charge (Pin 7) connected to ground the capacitor discharges throughRB to ground with time constant τ = RB ∗ C.

5. The capacitor continues to discharge until the voltage across the ca-pacitor reaches 1/3 Vcc, at which point Pin 2 causes the output togo high again the discharge Pin 7 to close (no longer connected toground). Now the capacitor begins to charge again through the com-bined resistance of RA and RB.

6. This charging and discharging continues indefinitely (as long as poweris supplied) and the output (Pin 3) continues to flip-flop between zeroand five volts.

The 555 turns an analog timing signal (the RC charging and dischargingcurve shown as Input in Fig. 10) into a digital, pulsed timing signal. Thetime the output is high, TH (also called the “pulse width”), is controlled bythe values of RA, RB, and C. The pulse width is given by the time it takesthe capacitor to charge from 1/3 to 2/3 Vcc. The time the output is lowTL is controlled by the value of RB and C, and is equivalent to the time ittakes the capacitor to discharge from 2/3 to 1/3 Vcc through RB. TH andTL are given by

TH = Cln(2)(RA +RB) (1)

TL = Cln(2)RB (2)

Note that TH must always be greater than TL (since RA 6= 0), which wecan express this in terms of duty cycle. Duty cycle is the percentage of timethe circuit spends high during one period of operation.

Duty Cycle =TH

TH + TL=

RA +RB

RA + 2RB(3)

In other words, the duty cycle can never be less than 50 percent. Thisis unfortunate since there are many times when it is desirable to have shortpulse widths and low duty cycles, such as when controlling a servo! To getaround this we can simply add a basic digital integrated circuit called aNOT gate (Fig. 11) which “inverts” the input. If the input to the NOTgate is low, the output will be high and If the input to the NOT gate ishigh, the output will be low.

10

Figure 11: This chip contains six NOT gates, each one indicated by a trian-gle/circle symbol. The lead going into the triangle is the input to the gateand the lead coming from the circle is the output. Vcc for the chip shouldbe 5 volts DC.

5.2 555 Experiment

Now that you’ve got a basic understanding of the 555 timer IC set it up onyour breadboard as described below.

1. Hook up the 555 on your breadboard as shown in Fig. 9. It’s best if youorient your breadboard horizontally and then place the 555 timer IC sothat the legs span the large trough down the center of the breadboardwith the scalloped end of the chip oriented to the left. Some chipsmay have a spot on them instead of the scallop shown in Fig. 9, justorient them with the spot to the left. Using your DataStudio PowerAmplifier supply 5V DC to Pins 4 and 8 (Vcc). Also don’t forget toconnect Pin 1 to ground. Hook up the remainder of the pins as shownin Fig. 9.

2. Use values for the resistors of between 5kΩ and 10kΩ for RA and RB

and a value between 0.1 and 1 µF for the capacitor, C. Use valueswhich give the circuit a duty cycle between 50 and 80 percent.

3. Use two voltage sensors to help analyze the circuit. Place one acrossthe capacitor (from Pin 6 to ground) and hook the other one up tothe output of the 555 timer, Pin 3 (Fig. 9). View both outputs on asingle oscilloscope using DataStudio.

11

4. If you’re interested you may hook up a variable resistor (also called apotentiometer) in place of RB to vary the pulse width.

How close are TH and TL, for both the RC circuit charging/dischargingand the digital output, to what is predicted by (1) and (2). Is the dutycycle what you expected it to be? Are these values within uncertainty ofthe components used (Resistors are ±5% and the capacitor is ±10%)? Doesthe potential on the capacitor jump back and forth from 1/3 Vcc to 2/3 Vcccontinually?

Now, choose values for the resistors which make the duty rate around 90percent.

Now that you’ve achieved a duty cycle of 90% we’ll use a NOT gate toinvert it to obtain a duty cycle of 10%, not possible with just the 555 timeralone.

Set-up one of the NOT gates from the 7404 IC chip by applying 5V DCto Pin 14 (Vcc) and ground to Pin 7. Note that the long rectangular chiphas 6 NOT gates as shown in Fig. 11, but we’ll only use one. Now attachthe output of the 555 timer (Pin 3) to the input of one of the NOT gates(such as Pin 1 on the NOT gate chip).

Now, using two Voltage Sensors and the DataStudio oscilloscope, observethe output of the 555 timer (Pin 3) and the output of the NOT gate (if youused Pin 1 on the NOT gate as your input, then observe Pin 2 on the NOTgate using your second Voltage Sensor). Is the NOT gate acting like aninverter, changing the duty cycle from about 90% to about 10%?

5.3 555 to control servo motor

Using the circuit we’ve built with the 555 timer and NOT gate we can nowdrive a servo motor. The angular position of the shaft on servo motors iscontrolled by the spacing between pulses applied to the input. By varyingthe time between pulses we can vary the position of the shaft.

This particular servo, called an HS-303 and used in many robotic ap-plications, is controlled by a signal of a periodic pulse train with a pulsewidth from one to two milliseconds with a time between pulses of 20 to 30milliseconds. The time between pulses controls the position of the servo.For example, it might be the case that with a time between pulses of 20milliseconds the servo is at an angular position of zero degrees, while witha time between pulses of 30 milliseconds the servo is at an angular positionof 180 degrees.

Of the three wires coming out of the servo the black wire should begrounded, the red wire should be hooked up to a voltage source (the 5V DC

12

supply you’re powering your 555 and NOT gate with should work fine) andthe yellow wire is where the controlling signal (output of the NOT gate) isattached. Choose RA = 10kΩ and RB to be a 10kΩ variable resistor, whichwill allow you to easily control the servo. For C use a 1µF capacitor.

Set up your 555 timer with the resistor and potentiometer as describedand view the output of the NOT gate on the oscilloscope. Can you see thetime between pulses change when you turn the dial of the potentiometer?If so then go ahead and hook up the output to the servo motor. Now theservo motor should move as you turn the potentiometer.

13