# Gas station without pumps

## 2014 May 6

### Audio amp lab

Filed under: Circuits course — gasstationwithoutpumps @ 20:55
Tags: , , ,

As I expected, no one came to lab today with their prelab homework done. There was a lot this week, as they needed to figure out the sensitivity of the microphone, decide how to bias it, figure out the AC voltage out of the microphone for 60dB sound input, add a DC-blocking filter (perhaps with a corner frequency above the resonant frequency of the loudspeaker), figure out when the amplifier would start clipping because it couldn’t drive the loudspeaker, determine the maximum gain for the amplifier, and determine the component values needed to implement all that.

Only one group finished  the design, built, and debugged their amplifier within the 3-hour lab time, but the rest are fairly close and will build and test their amplifiers on Thursday.  The group that finished today will probably work on adding either a volume control or a tone control for bonus points.

The MCP6004 op amps don’t really have the oomph to power the loudspeaker—with only about a 25mA output, they can’t do much more than 5mW into an 8Ω load. Even with an optimally matched load (maybe 240Ω?), they probably couldn’t output more than 150mW.

In a couple of weeks, we’ll do a more ambitious lab, in which the students will design and build a class-D power amplifier.  I’m a little worried about whether they’ll have the ability to work through the multiple stages of that design, since they were having a lot of trouble with the much simpler op-amp design. I might move the pressure-sensor instrumentation amp before the power amp, to give them more practice with multi-stage block diagrams before the power amp.

## 2014 May 5

### Block diagrams and audio amps

Filed under: Circuits course — gasstationwithoutpumps @ 21:08
Tags: , , , , ,

In today’s lecture, I introduced the notion of block diagrams as having two types of objects: functional blocks and connections between them. I emphasized that both parts were equally important, though computer programmers tended to focus more on the connections and electrical engineers more on the blocks.  I pointed out that basic action of decomposing an engineering design problem into separable subproblems was common to all forms of engineering, and so block diagrams were a common notation in almost all branches of engineering.

I also pointed out that block diagrams were only useful as a tool if they had a reasonable number of blocks (say 3–10), so that the system was broken into manageable pieces, but could still be viewed as one coherent system, not a rats’-nest of tiny components and wires.

As a class, we then developed a block diagram for and audio amplifier, starting from the overall task (sound in, louder sound out) and working our way inwards.

I spent quite a bit of time at each connection.  For example, for the sound in we talked about dB, dBA, and sound pressure levels.  I did not remember the reference value for 0dB of sound, but I have it in the lab handout (20µPa RMS).

We then talked about the sensitivity of the microphone, which we treated as a sound-to-current converter (with units being A/Pa).  I pointed out that the data sheet for the microphone we used did not give sensitivity in that form, but in dB for a reference of 1v/Pa, even though the microphone is a current output, not a voltage output device!  I explained that the data sheet used a current-to-voltage conversion of 2.2kΩ, though there is no particular reason to choose that value.  We also talked about the DC voltage or current bias needed for the microphone, which is much larger than the small AC signal.

The students realized that they needed a high-pass filter for blocking the DC, and realized (after a moment) that the voltage divider circuit meant that the input and output of the DC blocker meant that the microphone’s current output needed to be converted to a voltage.  Luckily, they’ve already designed a simple pullup resistor for current-to-voltage conversion, as well as a simple RC high-pass filter, so they should have no trouble doing so again.

We then jumped to the other end of the circuit and looked at the model for speaker.  I talked them into using the simplest possible model (just an 8Ω resistor), which is reasonable if we limit the frequency to 200Hz to 10kHz (adequate for speech, but not for music).  If we directly connected the circuit so far to the speaker, the students estimated that the signal would be less than a microwatt, so clearly not of much use for driving a 10w speaker. We also looked at the maximum voltage or current we’d want to apply to the speaker, to keep within the 10W RMS limit.

We then added a gain stage, which the students initially wanted to make a gain of about 4000.  I pointed out that voltage out of the op amp was limited to staying between the power rails, and that the MCP6004 op amps they have don’t have a very wide power supply range. I also pointed out that we did not want to exceed the current limits for the op amp, as that could clip the signals and distort them.  So they will need to choose a gain that will amplify the loudest sounds at the microphone to stay within the current limit of the op amp driving an 8Ω load.

Here is the block diagram they came up with:

Audio amplifier using an electret mic.

One student asked a very good question—what do you do if you want more sound than the maximum current from the op amp? I told him that we would address that question in a later lab: the class-D power amp lab.

I told the students to flesh out their block diagram to a detailed schematic (with component values!) before tomorrow’s lab, so that they could spend the lab time building, testing, and debugging the amplifier. I think that they will try, but they will bog down somewhere in the multi-step process of designing the amplifier. I’m guessing that half of the class will have the structure right, but that no one will get reasonable values for all the components.

I have told them that I expect them to come up with expectations for what they should see at each point of their circuit, so that they can compare what they see on the oscilloscope with what they expect, and use the discrepancies to help them debug.

## 2014 May 2

### First op amp lecture

Filed under: Circuits course,Uncategorized — gasstationwithoutpumps @ 19:06
Tags: , , ,

Today’s lecture was the first introduction of op amps to the students.  I managed to present

• The basic notion of a differential amplifier: $V_{out} = A (V_{pa} - V_{ma})$.
• Generic negative feedback amplifier.

Generic negative-feedback amplifier design using op amps.

• Formula for voltage divider when none of the nodes are ground. (I had the students derive this.)
• Formula for negative feedback with effectively infinite open-loop gain (deriving $V_{out}= (V_{p}-V_{m}) Z_{f}/Z_{i} + V_{p}$)
• Inverting, non-inverting, and unity-gain configurations.

I even had the students figure out how to make an amplifier with a gain of 0.5. The design they came up with was a unity-gain buffer followed by a voltage divider, though they started with a voltage-divider followed with a unity-gain buffer.  If we had had more time, I would have gotten them (eventually) to come up with a pair of inverting amplifiers.

We’ve talked about the voltage limits on Vout, and about Vp having an extremely large input impedance, but we’ve not talked about the input impedance of inverting amplifiers, about current limitations of the output nor output impedance, nor about slew rate or gain-bandwith product.

We will  talk about current limitations on Monday, since those do matter for the audio amplifier design they’ll be doing next week.

« Previous Page