<<

Electric Circuits, Fall 2015 Project ShanghaiTech University

Audio

Part 1

In this part you will build and analyze a simple AC to DC converter. You will receive a breadboard and necessary electronic components from your TA that you may take out the laboratory and keep until the semester final. Build the circuits carefully to make sure it could survive the final. We will be happy if you add your own creative design, but please inform your TA before you do that. Enjoy your project!

Analyzing The Transformer

The transformer we will use in the project is shown in Figure 1. The primary winding is connected directly to the wall outlet. Place an oscilloscope probe across the secondary winding, plug the transformer into the wall, and sketch Vout. DO NOT SHORT THE SECONDARY WINDING.

What is the maximum voltage you see at Vout? What is the minimum? How does the waveform differ from your expectations, and why is it this way?

Attention: The transformer needs to be connected to a wall plug. This could be dangerous! You must be careful when you do this: Ensure the wires are fastened and covered by insulation tape. Please conduct this step under the guidance of the TA. After your TA’s checkoff, you can bring it out of the lab and continue the following parts.

Adding In The Bridge Rectifier

Now change your circuit to look like Figure 2. We’ve taken the output of the transformer and fed it through a bridge rectifier circuit. Sketch Vout.

What is the maximum voltage you see at Vout? What is the minimum?

What is the of Vout? Why? 1

Electric Circuits, Fall 2015 Project ShanghaiTech University

Figure 1: Transformer circuit

Figure 2: Adding in the bridge rectifier

Figure 3: Loading the bridge reclifier

2

Electric Circuits, Fall 2015 Project ShanghaiTech University

Analyzing The Bridge Rectifier

Usually we place a on the output of the bridge rectifier. We then use this to power another circuit or electric device. The other circuit we power is known as the load and can usually be approximated by placing a on the output of the bridge rectifier.

When we make these two changes to the circuit, we end up with something like Figure 3. Together, the R and C form a low pass filter. Sketch Vout.

What is the average voltage seen at Vout?

Bridge Rectifier Ripple

We like to power our circuits or electronic devices with an constant DC voltage. However, it’s extremely difficult to get a truly constant DC voltage. We can get an approximation to it however, and often we like to compare DC power supplies based on how closely they can approximate this constant DC voltage.

A useful metric to measure the quality of an AC to DC converter is the output voltage ripple, Vripple .

Often the output of a DC power supply will be approximately the DC value we want, but it may rise above or fall below the DC value from time to time. We say that the output voltage “ripples.” We define Vripple as the peak to pick voltage of the ripple.

Use your oscilloscopes to measure Vripple for this very simple AC to DC converter. What is the frequency of this ripple voltage?

3

Electric Circuits, Fall 2015 Project ShanghaiTech University

Figure 4: A simple linear voltage regulator

Figure 5: LM7805CV linear voltage regulator

Linear Voltage Regulator

One way to combat ripple voltage is to use a device called a linear voltage regulator (v-reg). This device is illustrated in Figure 4. In the most simplistic view, a v-reg can be thought of as two variable .

Vout is then obtained from Vin through a simple voltage divider circuit. The v-reg then adjusts the values of the two variable resistors until the output voltage is desirable. If the input voltage changes, it will dynamically adjust the two resistors so that the change is not seen on the output. Using a v-reg is a great way of cleaning up a power supply to generate a constant DC voltage.

The voltage regulator we will use in this lab is an LM7805CV. The 5 suffix means that this v-reg is designed to output 5 volts. The pinout of this voltage regulator is shown in Figure 5.

4

Electric Circuits, Fall 2015 Project ShanghaiTech University

Modify your circuit to look like Figure 6. Notice that the load resistance has been moved to the output of the v-reg. This is because we will power our circuit or electronic device from the v-reg output. Recall that the resistor approximates the load, so it needs to connect to the v-reg output just like another circuit or electronic device would.

Sketch Vout. What is the average value (DC component) of Vout? What is Vripple?

Figure 6:Adding a linear voltagr regulator

Response To A Changing Load

Suppose the v-reg is powering another circuit (the load). Then there will be some current flowing from the v-reg output to the load. Suppose the load suddenly changes. This will cause the current to change, and because the v-reg is just generating the voltage with a voltage divider (Figure 4), the output voltage will change as well. A good v-reg will notice this change and quickly adjust the two variable resistors to compensate. However, this compensation takes some time. Another way to measure the quality of an AC to DC converter is to measure how quickly it can respond to a changing load.

Modify your circuit so that it looks like Figure 7. Note that the pinout for the MOSFET is shown in Figure 8.

Sketch Vout and IL on the same axes. To get IL, measure the voltage across R and use Ohm’s law.

Approximately how long does the v-reg take to stabilize the output voltage?

5

Electric Circuits, Fall 2015 Project ShanghaiTech University

Efficiency

We define the efficiency of a power supply to be the ratio of the output power to the input power. It’s interesting to find the efficiency of this simple AC to DC converter. Finding this efficiency does require a few circuit modifications. The modified circuit is shown in Figure 9.

The output power is relatively easy to find. Simply measure the current going through the 50Ω load resistor and use P = V 2/R. Note: the load resistance changed here to provide a slightly higher output power.

The input power is slightly harder to find. Insert a 1Ω shunt resistor as shown in Figure 9. Now, if we measure the voltage across this resistor we will actually be measuring the current flowing into the circuit.

Over one period, make several meaurements of the input current IS and VS. Use the fact that P = IV to get the instantaneous power for each measurement. Now average all your values to get the average power flowing into the circuit.

After doing all this, you should be able to get an efficiency for the circuit to the right of the transformer.

If we know that the transformer is 97% efficient, what is the total efficiency of this AC to DC converter?

Why is this efficiency so low? Where did all the excess power go? How can we build a better AC to DC converter?

Figure 7: AC to DC converter with a dynamic load 6

Electric Circuits, Fall 2015 Project ShanghaiTech University

Figure 8: Pinout for BS-170 MOSFET

Figure 9: Circuit to be used for efficiency measurement

* IMPORTANT: Please make sure your oscilloscope probes are hooked up as shown in the diagram above. The black ground clips should be at the - symbols, and the grey probe tip should be at the plus symbol. Failure to hook this up correctly will short out your transformer, and probably destroy it! (Remember that the black ground clips are shorted together inside the oscilloscope)

Part 2

In this lab we’re going to continue based on what you did last time. We’re going to use your AC to DC converter to power an audio amplifier. Notice that we’re making an audio amplifier in this lab, so an audio source will be necessary. Bring your own audio player such as mobilephone, discman, walkman, iPod, etc.

7

Electric Circuits, Fall 2015 Project ShanghaiTech University

Tips for Lab

Before you begin, one simple bit of advise: build clean, neat circuits. Use the shortest wire possible, use the power rails on your board instead of stringing 5V and ground everywhere, and be methodical when you wire so that you (and your TA) can make sense of it. If you build your circuit in a strange, nonintuitive way, your TA will not be able to help you debug it.

Power Supply You should have saved your AC to DC converter circuit from Part 1. We’ll use that circuit to power the audio amplifier we build in this lab.

Modify your circuit to look like Figure 10. Notice that the load resistor has been removed, and an LED has been added. This LED is simply an indicator that will tell you when the board is powered up. Since we’re going to be using delicate ICs in this lab, you should only touch them when the power is turned off. This LED will serve as your reminder.

Important Note: Figure 10 shows the AC to DC converter being connected to both 5V and ground. These are reference only. Do not actually connect a lab power supply to this. The circuit is providing power to the 5V node, and the ground shown here is intended to be the reference ground for all circuitry on your breadboard. In short, anytime you see a ground symbol connected to a node it simply means that those nodes are to be shorted together and used as the reference ground.Anytime you see a 5V symbol connected to a node it means that those nodes are to be shorted together.

Figure 10: AC to DC converter from part 1.

8

Electric Circuits, Fall 2015 Project ShanghaiTech University

Amplifier System Block Diagram A block diagram for the amplifier system is shown in Figure 11. It consists of a simple tone control circuit followed by a power amplifier.

Figure 11: Amplifier block diagram.

Audio Amp Circuit

The circuit used to implement Figure 11 is rather complicated,and we’ll built it up in two pieces. The first piece to build is the audio amplifier.

The audio amplifier schematic is shown in Figure 12. You need to assemble this circuit on your breadboard.

Figure 12: circuit.

9

Electric Circuits, Fall 2015 Project ShanghaiTech University

There are a few important notes to go with this assembly:

Male Headphone Jack: You have one male headphone jack in your lab kit. In order to plug this into your breadboard, you need to solder (pronounced saw-der) some wires onto it. Soldering is a process where you touch two wires together and then use a hot iron to melt metal (solder) over the junction. See Figure 13 for an example of a soldered jack. This was build using this simple procedure: 1. Select three long wires from your lab kit. 2. For each wire, use your wire strippers to cut one stripped end to about 3/16”. Leave the other end as it is. 3. Using needle-nosed pliers, bend the 3/16” end to make a hook. Repeat for all 3 wires. 4. Find your male headphone jack. The black plastic bit unscrews from the metal. Take it apart to find three metal tabs. The biggest tab is ground, and the other two are the left and right channels. 5. Carefully hook a wire into each of the three tabs. Make a note of which wire is hooked into the ground tab. This will be the wire you connect to ground in the amp circuit. 6. Use a soldering iron to melt a very small bit of each hook. See Figure 13 for an example of the result.

Figure 13: A soldered male headphone jack

10

Electric Circuits, Fall 2015 Project ShanghaiTech University

For your convenience, the pin out of the OP07 is shown in Figure 14.

Figure 14: Pinout of the OP07CP op-amp

Female Headphone Jack: There is no need to solder wires onto the female headphone jack. It will fit into the breadboard. Note that, like the male headphone jack, only one of the channels is used here. Connect the audio output to either the left or the right channel (your pick), and leave the other channel open.

Once your amp circuit is built, check it over very carefully. We’re going to be plugging into another audio device (ex: MP3 player), and we don’t want to ruin the other device just because of a wiring error. When you are satisfied with your circuit, plug in your audio device and your and power it up. Play with the volume knob. How does it sound?

Tone Control Circuit We now will build the tone control part of this audio system. The tone control will allow you to adjust the bass and treble contents of your audio signal. Modify your amp circuit to look like Figure 15. This circuit uses what’s called a Baxandall tone control circuit.

This circuit has a lot of discrete components. Build it carefully and double check all your connections. Note also that this circuit uses an LM358P op-amp. For your convenience, the pin out of the LM358P is shown in Figure 16.

11

Electric Circuits, Fall 2015 Project ShanghaiTech University

Figure 15:The complete audio amplifier

Figure 16: Pinout of LM358P power amplifier chip

12

Electric Circuits, Fall 2015 Project ShanghaiTech University

Understanding the Tone Control Circuit

The tone control circuit is rather complicated. Before you build anything, it is always a good idea to understand how it works. This gives you an intuition for what to look at if something goes wrong and you need to debug, and it also makes the whole process much more fun. For a description of what’s happening in the tone control circuit, see Figure 17 and read below.

Figure 17: Examing the tone control circuit.

The positive input to the OP07CP is simply half of the power supply due to the 10k resistors. The 10F capacitor seen at the positive input merely helps keep the node stable (free of AC variations). The purpose of the 1F capacitor is to block any DC component of the input audio signal. DC voltages don’t contain any information about sound, therefore it unnecessary. The rest of the passive components are involved in the feedback path. The key to understanding the bass and treble gains lies in the .

If our input signal is very low in frequency, the top controls the gain. Because the 22 nF capacitor appears as an open, our input signal simply divides inside the potentiometer. Note that for low , the 560 pF capacitor is effectively and open and doesn’t feed signal through from the bottom potentiometer.

When the input signal is high in frequency, no voltage develops across the top potentiometer because the 22 nF capacitor appears as a short. However, the bottom potentiometer divides the input signal and feeds it through the 560 pF capacitor (which now appears as a short) to the input. So for high frequencies, the gain is controlled by the lower potentiometer.

13

Electric Circuits, Fall 2015 Project ShanghaiTech University

Playing With It

Once you have this built, reconnect your audio player and power it up. Play with the volume, bass, and treble knobs. How does it sound?

Measuring the Transfer Function Recall that the transfer function of a circuit is simply a plot the output voltage divided by the input voltage for a range of frequencies. We could simply plot Vout /Vin or we could plot the same thing in decibels (20 log10 (Vout /Vin )). In the case of this audio circuit, it is more meaningful to plot the transfer function in decibels since this directly relates to the change in volume.

Set the treble, bass, and volume knobs to something interesting (not a flat response – distort it slightly). Now disconnect your audio player and headphones. Connect the signal generator in place of your audio amplifier. Use 100mVpp, 0V offset. Connect two oscilloscope probes to the circuit, one at the input (male headphone jack) and one at the output (female headphone jack). Use the oscilloscope to measure the peak to peak voltage at both the input and the output. Follow the template given in the lab write-up to sweep the input frequency, and use the attached graph to sketch the transfer function of this circuit.

Show Your Creativity You have just implemented the audio amplifier. Is that too simple for you? Now try to add more functions to this circuit to make it cooler. You can look up information via internet and library, and the electrical components needed will be supplied by the laboratory. You can get some bonus points that depend on your extra work. So, just show your creativity.

14

Electric Circuits, Fall 2015 Project ShanghaiTech University

Report

1. Measuring the Transfer Function Set the treble, bass, and volume knobs to something interesting (not a flat response–distort it slightly). Set up the signal generator and oscilloscope as described in the lab guide, and measure the transfer function.

15

Electric Circuits, Fall 2015 Project ShanghaiTech University

2. What’s the efficiency of the AC to DC converter?

16

Electric Circuits, Fall 2015 Project ShanghaiTech University

TA: Question One : of 15 Pt. Question Two : of 5 Pt. Well-working cuicuit of 80 Pt.

Total : of 100 Pt.

17