Lab #2: Capacitors and the 555 Timerecee.colorado.edu/~mcleod/pdfs/IADE/labs/ECEN 1400 Lab 2...

8
[ECEN 1400] Introduction to Digital and Analog Electronics R. McLeod Lab #2: Capacitors and the 555 Timer 1 Introduction The goal of this lab is to introduce capacitors in their role as elements of timing circuits and to convert an analog oscillation into a digital oscillation with a simple timer IC. For your convenience, things that should be included and discussed in your report are introduced in a unique color. 2 Components and Tools Required From Your Kit: Breadboard Wires Wire Cutters and Pliers Various Resistors and Capacitors A Cat From Your TA: A 555 Chip On The Lab Bench: Variable DC Power Supply Function Generator Oscilloscope 3 Meet your New Instruments 3.1 Function Generator The function generator allows you to create time-varying voltages with different shapes and frequencies. Although the waveform generator has many capabilities, we will concentrate on a few of the main ones that are common to most waveform generators. The main parameters for specifying the waveform are: Frequency (or its inverse, Period) Shape (e.g. square, sinusoidal) Amplitude (the magnitude of the signal in volts) Figure 1: Function Generator Version 2.0, September 10, 2014 Page 1

Transcript of Lab #2: Capacitors and the 555 Timerecee.colorado.edu/~mcleod/pdfs/IADE/labs/ECEN 1400 Lab 2...

Page 1: Lab #2: Capacitors and the 555 Timerecee.colorado.edu/~mcleod/pdfs/IADE/labs/ECEN 1400 Lab 2 Capacito… · [ECEN 1400] Introduction to Digital and Analog Electronics R. McLeod Lab

[ECEN 1400] Introduction to Digital and Analog Electronics R. McLeod

Lab #2: Capacitors and the 555 Timer

1 Introduction

The goal of this lab is to introduce capacitors in their role as elements of timing circuits and to convert an analogoscillation into a digital oscillation with a simple timer IC.

For your convenience, things that should be included and discussed in your report are introduced in a uniquecolor.

2 Components and Tools Required

• From Your Kit:

Breadboard

Wires

Wire Cutters and Pliers

Various Resistors and Capacitors

A Cat

• From Your TA:

A 555 Chip

• On The Lab Bench:

Variable DC Power Supply

Function Generator

Oscilloscope

3 Meet your New Instruments

3.1 Function Generator

The function generator allows you to create time-varying voltages with different shapes and frequencies. Althoughthe waveform generator has many capabilities, we will concentrate on a few of the main ones that are common tomost waveform generators. The main parameters for specifying the waveform are:

• Frequency (or its inverse, Period)

• Shape (e.g. square, sinusoidal)

• Amplitude (the magnitude of the signal in volts)

Figure 1: Function Generator

Version 2.0, September 10, 2014 Page 1

Page 2: Lab #2: Capacitors and the 555 Timerecee.colorado.edu/~mcleod/pdfs/IADE/labs/ECEN 1400 Lab 2 Capacito… · [ECEN 1400] Introduction to Digital and Analog Electronics R. McLeod Lab

[ECEN 1400] Introduction to Digital and Analog Electronics R. McLeod

3.1.1 Changing the frequency

First, we will change the frequency of the to 4 kHz. To change the frequency, push the PARAMETERSbutton, then the frequency soft-key. Type in a frequency on the keypad or change it with the knob, then finishby selecting units with the soft-keys. See Figure 2 for these steps.

(a) First, select parameters. (b) Selecting frequency.

(c) Adjust the frequency with the keypad orknob. (d) Select the units with the soft keys.

Figure 2: Changing the frequency of a function generator.

3.1.2 Changing the waveform shape

The second aspect of the waveform is its shape. Change the waveform shape to a square wave. Thisgenerator can produce a large number of shapes including ones supplied by the user. Press the WAVEFORMbutton and select the square wave.

(a) First, press waveform. (b) Then, select square wave.

Figure 3: Changing the waveform of a function generator.

Version 2.0, September 10, 2014 Page 2

Page 3: Lab #2: Capacitors and the 555 Timerecee.colorado.edu/~mcleod/pdfs/IADE/labs/ECEN 1400 Lab 2 Capacito… · [ECEN 1400] Introduction to Digital and Analog Electronics R. McLeod Lab

[ECEN 1400] Introduction to Digital and Analog Electronics R. McLeod

3.1.3 Changing the amplitude and offset.

Change the peak-to-peak amplitude to 5 V. This means that the voltage will swing from +2.5V to -2.5V.Press the UNITS button and use the soft-key to make sure you are in the Amp/Offs (amplitude and offset) mode,not the High/Low mode. Set the Vpp amplitude to 5 V and the offset to 0 V.

(a) First, press the soft key for ampli-tude.

(b) Then, input 5 and select the units ofvolts.

(c) Lastly, set the offset in parametersto be 0 V

Figure 4: Changing the amplitude and offset of a function generator.

Change the output termination. Like voltmeters and ammeters, the resistance of the source matters. Thisis a detail you will learn in later classes. For now, press the CHANNEL key to open the channel configurationscreen. Press Output Load, then Set to High Z as shown in Figure 5.

(a) First, press the soft key for channel. (b) Make sure the output load is Set to HIGH Z.

Figure 5: Changing the output impendance of a function generator.

Now you need some way to see if you have the waveform you want. That brings us to the oscilloscope.

Version 2.0, September 10, 2014 Page 3

Page 4: Lab #2: Capacitors and the 555 Timerecee.colorado.edu/~mcleod/pdfs/IADE/labs/ECEN 1400 Lab 2 Capacito… · [ECEN 1400] Introduction to Digital and Analog Electronics R. McLeod Lab

[ECEN 1400] Introduction to Digital and Analog Electronics R. McLeod

3.2 Oscilloscope

An oscilloscope (or scope for short) is used to display a waveform or trace. This particular oscilloscope has theability to show 4 different traces simultaneously. The connectors for the four channels are in the lower right-handside of the picture. You will use the oscilloscope probe found in your lab kit for connecting your circuit to thescope.

Figure 6: Oscilloscope

Turn on both the function generator and the oscilloscope. Connect the oscilloscope to the function generator.At this point, you will probably not see anything displayed.

(a) This is a scope probe. Thepointy bit is positive and theclip is negative.

(b) This is a BNC-to-banana plugadapter.

Figure 7: Identifying the connectors to be used.

(a) Plug the end of your scope probeinto channel 1 of the oscilloscope.

(b) Plug the BNC end of your BNC-to-banana plug adapter intochannel 1 of the function generator.

(c) To complete the circuit between thefunction generator and the oscillo-scope, we must connect the ends.

Figure 8: Hooking up the function generator and oscilloscope together.

Version 2.0, September 10, 2014 Page 4

Page 5: Lab #2: Capacitors and the 555 Timerecee.colorado.edu/~mcleod/pdfs/IADE/labs/ECEN 1400 Lab 2 Capacito… · [ECEN 1400] Introduction to Digital and Analog Electronics R. McLeod Lab

[ECEN 1400] Introduction to Digital and Analog Electronics R. McLeod

To view an output of your function generator on the oscilloscope, you have to turn the output ON.

(a) First, select the soft key channel. (b) Then, toggle the output to ON.

Figure 9: Turning on the output of the function generator.

With the older scopes, you would now start the process of finding the trace, however you are luckier. Pressthe AUTOSCALE button. You should see a square wave on the screen with voltage on the vertical axis andtime on the horizontal axis.

Figure 10: Finding the AUTOSCALE button.

Set the trigger level. The trace should be stationary on the screen, which means that the scope has detectedthe rising edge of the square wave and placed it in the same place on the screen each cycle. Without this triggering,the trace will sweep randomly in the time axis. This is controlled by the trigger level, set with the knob on theright-hand side of the scope. Use the TRIGGER LEVEL knob to change the function voltage which the triggersthe scope to reset the plot on the screen. You should see an indicator on the main screen move. Examine whathappens when the trigger level is outside of the voltage range of the function generator.

Figure 11: Finding the TRIGGER LEVEL button.

Version 2.0, September 10, 2014 Page 5

Page 6: Lab #2: Capacitors and the 555 Timerecee.colorado.edu/~mcleod/pdfs/IADE/labs/ECEN 1400 Lab 2 Capacito… · [ECEN 1400] Introduction to Digital and Analog Electronics R. McLeod Lab

[ECEN 1400] Introduction to Digital and Analog Electronics R. McLeod

Set the time and voltage scales. The AUTOSCALE function has picked time and voltage increments foryou that are probably reasonable. But you should know how to change them. Find the Horizontal and Verticalcontrols. There is a large knob for scale and a small knob for offset on each. Adjust these to understand whatthey do. If you lose the trace, just use AUTOSCALE again to get things back. Pick appropriate scales for thetime and voltage increments and record them.

(a) Find the HORIZONTAL knob. (b) Find the VERTICAL knob

Figure 12: Locating the horizontal and vertical adjustment knobs.

Measure features of your function. Older, analog scopes were capable of displaying traces and not muchmore. This digital scope can do much more. One very useful feature is measuring various quantities. Pressthe MEASURE button, then either the VOLTAGE or TIME soft-keys. Find the VOLTAGE PEAK-TO-PEAK and FREQUENCY), then change them on the function generator to confirm that they track on thescope. Note that you need at least one period of the waveform on the scope for the measurements to be performedcorrectly.

(a) First, press the MEASUREsoftkey.

(b) Use the side screen soft keysto select VOLTAGE.

(c) Then, scroll with the selectionknob (shown) and push whenVpp is highlighted.

(d) Select the TIME measure-ments.

(e) Lastly, select FRE-QUENCY.

Figure 13: Measuring the voltage peak-to-peak and frequency of the signal.

Version 2.0, September 10, 2014 Page 6

Page 7: Lab #2: Capacitors and the 555 Timerecee.colorado.edu/~mcleod/pdfs/IADE/labs/ECEN 1400 Lab 2 Capacito… · [ECEN 1400] Introduction to Digital and Analog Electronics R. McLeod Lab

[ECEN 1400] Introduction to Digital and Analog Electronics R. McLeod

4 The Capacitor

Now lets combine these two new instruments with a circuit to do something useful.Build and take measurements from RC circuit. Construct the circuit below using a 2.2 kΩ resistor and a

0.0047 µF (or 4.7 nF) capacitor from parts in your lab kit. Now set the waveform generator to produce a5 Vpp square-wave, with a 50% duty cycle. Set the frequency to 5 kHz. Record the parameters of thesignal from your function generator. Remember to put (or keep) the waveform generator in HighZ mode. Connect the oscilloscope across the waveform generator just to double check you have the waveformyou expect.

Figure 14: A Simple RC Circuit

Now connect the oscilloscope across the capacitor, so you can measure the voltage as it changes. If you havea second probe, keep one on the source and use a second for the capacitor voltage. Keep the probe wired to thewaveform generator connected to the input marked 1. Wire the second probe across the capacitor and connect itto the scope input marked 2.

Save an image of the screen to a USB memory stick. Insert a USB stick into the front-panel and pressthe SAVE/RECALL button. In the Storage menu, press Storage. Continue to press this button or use the entryknob to select a graphics file format (PNG is a good choice). If you want to save the scope parameters, press ParaSave. Press External to access your USB stick and navigate to the desired folder. Finally, create a New File andpress Save.

Check and record the RC time constant. Using either the measurement traces on the scope screen oryour saved image, find the amount of time a decreasing voltage level takes to fall by e-1 = 36.8% or a rising voltagelevel grows by 1- e-1 = 63.2%. Measure and Record the actual resistance of your 2.2 K resistor andcompare your measured time to the calculated RC time constant.

Observe the impact of increasing frequency. Now double the frequency of the square-wave to 10k Hz.Again, save an image of the waveform for you lab report. Does the overall frequency of the voltageacross the capacitor change? What happens to the amplitude of the voltage across the capacitoras the frequency increases? Try increasing the frequency once again, this time to 15 KHz. Whathappens to the shape of the waveform? This is the basis of filtering in which different frequencies in awaveform can be enhanced or suppressed.

5 The 555 Timer As A Digital Oscillator

Now we will use the rising and falling time response of a charging and discharging capacitor to make a charge/dischargedigital oscillator.

Build and take measurements from timer circuit. Get a 555 timer chip from your TA and assemble thecircuit below. Discuss how you built the circuit and include a picture of what you’ve built. Place ascope probe between RB and C1 (or pin6 or 2) and a second scope probe on the chip output, pin 3.

Version 2.0, September 10, 2014 Page 7

Page 8: Lab #2: Capacitors and the 555 Timerecee.colorado.edu/~mcleod/pdfs/IADE/labs/ECEN 1400 Lab 2 Capacito… · [ECEN 1400] Introduction to Digital and Analog Electronics R. McLeod Lab

[ECEN 1400] Introduction to Digital and Analog Electronics R. McLeod

Figure 15: Astable 555 Timer Circuit

Measure and describe your timer performance and include screen capture of its output. Whenyou have a square wave emerging from your timer, accurately measure the high and low voltages,the high and low times and the frequency. How accurately would you be able to predict thisfrequency from the nominal resistance values? (hint, check the data sheet) Is accurate enough tobe used in your clock?

6 Extra Credit: 10 Points Max

6.1 More Blinking Lights

Select new resistors and a capacitor for your 555 timer to decrease the frequency to several Hz. Drive an LEDwith the output if you dont have enough current, you may need to use your transistor driver circuit from the nextlab. Congratulations, youve made a bike light!

6.2 Build A High Pass Filter

The RC circuit of step 4 is called a low-pass filter because it passes low frequencies and blocks high frequencies, asyou found. Now flip the positions of the resistor and capacitor and measure the voltage across the resistor. Younow have a high-pass filter. Examine both the shape of the waveform and the amplitude as a function of frequencyand try to understand it. In particular, look at relatively low frequency square waves and examine what happenswhen the square wave transitions from one voltage to another.

Version 2.0, September 10, 2014 Page 8