Sunteți pe pagina 1din 13

Building a 1462 Hz Function Generator

Greg Solis-Reyes
#250771462
Thursday Lab Session
Thursday, November 12 1015
TA: ______________________

Purpose
The purpose of this lab is to build a function generator which oscillates at a specific
frequency, in this case 1462 Hz.
The function generator should generate 4 output waves, all of which oscillate at 1462 Hz.
The first wave is a 20V Peak-to-peak square wave. The second wave is a 5V Peak-topeak triangle wave. The third wave is a sine wave. The last wave is a 10V Peak-to-peak sine
wave.
The purpose of this lab is also to learn how to design a circuit; from choosing the
components, to testing a prototype, to designing a PCB, and testing the final result. This project
should be a unique and excellent learning experience.
Theory (Pre-Lab)
The first wave will be produced by a multivibrator circuit with specific resistor and
capacitor values (the U1 block). The second wave will be produced by an integrator circuit
which takes inputs square wave from the U1 block and outputs a triangle wave (the U2 block).
The third wave will be produced by another integrator circuit which inputs the triangle wave
from the U2 block and outputs a sine wave (the U3 block). In between the U2 and U3 blocks
there is a 100nF capacitor to block the DC component of the U2 output wave. The fourth wave
will be produced through an amplifier circuit which inputs the sine wave from the U3 block and
outputs an amplified version of the wave (the U4 block).
To prepare for this project, several tasks were carried out. The first task was to calculate
the values of the resistor and capacitor to be used to generate the first wave through the use of a
multivibrator circuit.
f =1462 Hz
T=

1
2 R 1+ R 2
=2 RC ln
1462
R2

3.11310 s=RC
R=

(Use R1= R2 = 10k)

(Choose C = 33nF)

3.113 104 s
=9433
33109 F

The next task was to calculate the value for the resistor and capacitor to be used in the
two integrator circuits which will generate the second (triangle) and third (sine) output waves.
f =1462 Hz

T=

1
RC
1462

6.84104 =RC
R=

(Choose C = 47nF)

6.84 104 s
=14553
47109 F

The last task was to simulate the circuit using the Micro-Cap software. The circuit had to
be divided into two parts. The first part was the U1 and U2 blocks which generate the first and
second output waves, respectively, in the manner described above. The second part was the U3
and U4 blocks with an ideal triangle wave source as the input for the U3 block. The second part
generated the third and fourth output waves, as described above. The op amps were simulated
using the LM343 op-amp which is similar to the TL082 op-amp which will actually be used to
construct the circuit in the lab. The resulting functional simulations and circuits are included
below.
Figure 1. U1 and U2 Block Circuit Diagram

Figure 2. U1 and U2 Block Transient Analysis

Figure 3. U3 and U4 Block Circuit Diagram

Figure 4. U3 and U4 Transient Analysis

From the Micro-Cap simulation for the U3 and U4 block, the final resistor values for the
amplifier circuit were calculated.
10 V
12 x Gain
.680 V

(Therefore choose 10k and 120k resistors for R1 and R2,

respectively)
Procedure (Bread Board Testing)
To test the designed circuit, the following procedure should be followed in the electrical
lab.
First set up the connections on the lab bread board as outlined in the diagram below.

Figure 5. Whole Project Circuit Breadboard Connections

Note: Since the exact values calculated in the Pre-lab for the capacitor and inductor
values are not available in the lab, the closest available values were chosen and are shown in the
above diagram.
Note: In the lab the TL082 Op Amp will be used, which has connections as shown below.
Figure 6. TL082 Op Amp

Next, connect a 12V DC power source using the power supply shown below.
Figure 7. DC Power Supply

Make sure to set the voltage to 12V. Connect the POS output wire to the VCC+ terminal
of each op amp. Connect the NEG output wire to the VCC- terminal of each op amp. Connect
the COM output wire to the circuits ground node.
Figure 8. Oscilloscope

Next, turn on the oscilloscope (shown above), and attach the CH1 input wire to the first
output wire as shown in the diagram, and the CH2 input wire to the second output wire as shown
on the diagram. Connect the ground alligator clips for each input of the oscilloscope to the
ground node on the breadboard. The oscilloscope should now display the predicted waveforms
with as described above. Use the measurement tool for the oscilloscope to measure the frequency
and amplitude of each waveform, and record these values in the table below (Test Results- Bread
board). Repeat the above procedure for the third and fourth output wires (connecting CH1 to the
3rd output wire and CH2 to the 4th output wire), as shown on the diagram. Record the values in
the table below.
If there are any significant errors, analyze the circuit carefully, fix any issues, and try to
get the circuit to work as expected.
Procedure (PCB Board Testing)
First, solder the appropriate components onto the printed PCB Board. The PCB board is
shown below, in mirror image.

Figure 9. PBC Board

Next, connect the 12V DC power supply shown above to the appropriate terminals as
shown on the PCB board above (POS to +12, NEG to -12V and COM to GND).
Then, using the oscilloscope in a manner similar as described above in the procedure for the
bread board testing, measure the amplitude and frequency for each of the 4 output wires outlined
in the PCB board diagram above. Record the measured values in the table below (Test Results
PCB Board). Also, sketch the resulting waveforms in the graph space provided in the Results
section below.
Results
Lab Resistors
Block
Capacitance (in
Farads)
In Lab Resistance
(in Ohms)

U1
33nF

U2
47nF

U3
47nF

U4
N/A

10k

15k

15k

10k, 120k

Test Results Bread Board


Output Wire
Frequency (in
Hertz)
Amplitude (in
Volts)

Wire 1

Wire 2
1316

Wire 3
1316

Wire 4
1316

5.40

.776

9.44

1316
21.4

Figure 10. U1 an U2 Block Lab Results

Note: Output 1 on top, Output 2 on the bottom

Figure 11. U3 an U4 Block Results

Note: Output 4 on top (CH1), output 3 on the bottom (CH2)

Test Results PCB Board


Output Wire
Frequency (in
Hertz)
Amplitude (in
Volts)

Wire 1

Sketches for PCB Board Testing

Wire 2

Wire 3

Wire 4

Discussion
The discrepancies measured with respect to the calculated frequency and amplitude
values and the frequency and amplitude values measured in the lab are mostly due to the resistors
chosen in the lab not being the exact values which were calculated. Also, all resistors and
capacitors used in the lab have some error, so that error will also affect the final output
waveform. (Most components used in the lab have at least 10% error).
The discrepancies seen between the lab waveforms and the simulated waveforms
occurred for the same reasons as stated above. In the Micro-Cap simulations, all components are
treated as ideal, while in the real lab this is not the case.
The discrepancies between the results in Lab 7 and Lab 10 are due to the wires in Lab 7
being more resistive than the printed wires in the PCB in Lab 10. Since the wires used to test the
breadboard have more internal resistance than the printed wires, this affected the measured

values. The PCB circuit is more ideal than the breadboard prototype circuit, so the values
measured in Lab 10 are closer to the predicted ideal values.

Conclusion
In Lab 7, the prototype did exactly what it was supposed to, outputting the 4 expected
waveforms, agreeing closely with the calculated and simulated values. The project objectives
were achieved for the prototype board.
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________

S-ar putea să vă placă și