Audio Transmission
In this lab, you will build a series of circuits to modulate a signal, transmit it via light, and then demodulate the signal and play it on your speaker. This will give you the chance to combine most of what you've learned about analog circuits so far to make a functional device. Let's start with a block diagram of the desired circuit. This is a way of showing what you want different parts of a circuit to do functionally, as well as the path that signals will take.
Each block represents a group of components that will be used together to achieve a specific task. This circuit will take an audio signal, modulate a square wave with it, and then convert that signal into infrared light. A receiver picks up the signal, we demodulate it again, and then finally we play it over our speaker. Rather than building the entire circuit all at once and hoping for the best, we'll decompose the activity into three separate tasks:
After getting each of the component parts working, you can then start combining them with a better understanding of what they should be doing, which helps in tracking down any problems.
This lab will involve quite a few op-amp circuits, which is why you may want to use the TL074CN chip, which contains four op-amps in a single chip.
Note that the power is connected along the middle pins instead of opposite corners
DON'T PANIC
Are the letters large and friendly enough?
Your report will not be due until after the last day of lab
This part is the most straightforward, as you've already made a handful of amplifier circuits. Most audio signals are a few hundred mV in amplitude, so you should check how much you'll need to amplify the signal to make the speaker play it audibly.
If you want to use your own audio source from a headphone jack, we do have just the cable for that:
Typically, the tip is connected to the left audio channel, the ring is connected to the right channel, and the sleeve serves as a common ground. Now, you may have noticed an issue here: there are three connections on the headphone side and only two banana connectors. Depending on the cable, you'll either only get one channel of audio (either the left or right) or the two will be passively mixed together (i.e. the signals will be combined using only resistors). The other plug should always be connected to the device's ground. You can use your multimeter to determine which banana plug is connected to which part of the audio plug by touching one of them and seeing which part of the other connector reads zero resistance.
With the circuit we're making nothing bad will happen if you the banana plugs are backwards; the signal will have the polarity flipped but this doesn't change how the speaker plays it.
If you're concerned about the possibility of damaging your audio device but don't want to use the function generator, you can build an op-amp follower circuit to help isolate it. This works because the follower won't draw any current from your device regardless of what happens to the op-amp, even shorting the output to ground won't cause any current in your device.
The most extreme form of protection would be to use an opto-isolator, which uses a photodiode and phototransistor pair (like we'll do later) to make sure that there's no way to affect the source by changing later parts of the circuit.
Your op-amps should be sufficient for driving the speaker provided you put a resistor inline to limit the current to a few mv. You should build one of the amplifiers you've constructed before and connect the speaker to the output.
Create a diagram of your circuit, either with pen and paper, a drawing program, or an online tool (see https://www.falstad.com/circuit/ or https://www.diagrams.net/)
More info about diagrams.net is on the wiki home page
To begin, start with the function generator as your input, and verify that you can play an audible noise from your speaker.
Describe, sketch, or include a screenshot of the output you observe.
Compare the audio from your amplifier circuit to the result you get from connecting the speaker directly to the function generator. Are they reasonably similar?
As further testing, we'll use a more complex waveform to verify that we've got good enough fidelity.
Go the function generator's Menu, and scroll down to the Arbitrary option. Select the Engineering menu and scroll down to the Voice option (Left side, ~5th row from the bottom). You'll need to set the frequency to about 1Hz. Not 1kHz, not 1MHz, but once per second.
Using a sine wave as a base, press the Home button, select Sweep from the left-hand side of the screen, and then choose Linear or Log. You can then alter the frequency range, I'd suggest something from 100 Hz to 10kHz or so, but note that these speakers will have the strongest response in the 1-4kHz range or so.
Compare the audio from your amplifier circuit to the result you get from connecting the speaker network directly to the function generator.
Are they still reasonably similar?
As long as you've got the basics working, you're set for now! Time to work on the next stage.
Now we'll work on the transmission and reception block
We've done both parts of this before, but never together at the same time. To send a signal, we'll use one of our transistors to control an infrared diode in your kit, shown below:
|
|
| Our QED121 Infrared LED. The side with the shorter leg and flattened edge is the cathode, and corresponds to the tip of the arrow in the symbol. | |
|
|
| Our QSD123 phototransistor. The short leg / flattened edge corresponds to the emitter, also the tip of the arrow in the symbol. | |
| qed121_122_123_ir_diode.pdf | qsd123_datasheet.pdf |
For the transmission circuit, we'll revisit the one we used back in lab 4:
For testing the transmitter, you might want to use a slow signal for $V_{in}$ (i.e. a few Hz) and an LED with visible wavelengths before switching to the infrared LED. Starting with an offset near the LED's knee voltage (i.e. 2-3 V) and an amplitude of a couple volts will help make sure that you'll actually turn it on and off.
Verify that your LED turns on when $V_{in}$ is ~ 5V and off when $V_{in}$ is 0V
Replace the LED with the infrared version for the next step. You'll want to point the transmitter and receiver at one another by bending the legs, like in the image below:
To receive the signal, we can use a light to voltage detector like we built back in lab 6:
Note that this will pick up light from the ambient surroundings, so you can get unwanted signals from ambient light and passing shadows. If this becomes problematic, you can do things like covering part of the circuit with something or using paper/tape to shade the area from unwanted light.
There's also a pretty good chance you'll pick up some 60 Hz noise from wiring / power supplies / cables / incandescent lighting. It is one of the banes of electronics experiments, but you learn to live with it.
Not sure if the op-amp you have is functional at all? Try building a follower with it (connecting $V_+$ to a signal and $V_-$ to $V_{out}$). If the output doesn't match the input, start checking the power connections/voltages. If the output stays at one of the rail voltages all the time it's possible that either there's a problem with your feedback loop or that the chip is dead.
What resistance $R_1$ did you use to receive a sufficiently strong signal on the receiver side?>
What is the highest frequency square wave ($f_{square}$) that you can drive your transmitter with which results a square wave at $V_{out}$ ?
What is the highest frequency square wave ($f_{tri}$) that you can drive your transmitter with which results in at least a 100 mV pk-pk triangle(ish) wave?
If, like me, you got a very noisy signal out of the phototransistor, there's still hope. For instance, in the image below, channel 1 was the output of the light reception circuit, and in addition to the 81 kHz signal that it was supposed to be receiving, there was about a 500 kHz signal along for the ride at a substantial amplitude. The addition of a low-pass filter (using a 10k resistor and 1 nF cap) attenuated the desired signal a little, but nearly eliminated the high frequency portion.
As you (hopefully) just saw, phototransistors have pretty slow rise/fall times, often on the order of microseconds. Waiting for a clean square wave might take so long that you can only transmit a signal of a few kHz. To get around this issue, you can use a comparator or Schmitt trigger to turn the small differences in output into a clean square wave.
What threshold will you use for your comparator/Schmitt trigger?
To get the threshold voltage you need, you'll probably have to make a voltage divider. The sim linked here shows an example of one implementation.
Build the appropriate circuit, and observe its output.
Do you now reliably get a square wave that's the same frequency as the input?
This part may be difficult. If it gets frustrating, you may want to try working on the next parts for a little while.
Include a diagram or sketch of the full implementation of your light transmission and reception circuit.
Don't worry if you can't find symbols for the photodiode/phototransistor, just use a diode or transistor and we'll know what you mean.
You might ask why we should bother with the modulating/demodulating part at all, instead of just sending our audio signal directly through the LED. In short, the answer is noise. If the signal we're sending is essentially binary (light on or light off), then even if we have some issues with the receiver we'll pick up the intended signal fairly easily. If we try and send an analog signal, then any small disruptions or noise end up directly reflected in the waveform we get out, making it much less likely that we can get a good signal without a whole lot more work. This is part of why binary computing eventually won out over analog options: It is extremely robust.
Finally we'll build the part of the circuit that encodes our audio into an easily transmittable format, and then demodulate it using a bandstop filter.
We'll start by building the demodulation circuit first. Why? Because its resonant frequency is determined by inductors and capacitors, which we have in limited supply. The modulation circuit will have its frequency set with resistors, which we have plenty of.
To start off, we'll build a bandstop filter, which is sort of the opposite of the one we built back in Lab 3
If you can, select values for L and C that result a $f_0$ frequency in the realm of 50kHz or more. The reason is because audio signals tend to cap out in the 15 kHz range or so, and the carrier frequency should be several times larger (otherwise it is hard to have multiple periods of the carrier frequency correspond to the signal wave). $R$ will change the filter to be more or less permissive, smaller $R$ means that only frequencies close $f_0$ will be filtered out, but this may be a problem if there's a mismatch with the modulation circuit.
If you aren't sure what exact frequency your bandstop filter is tuned at, you can use the sweep option to cause the input to continuously change frequency, or just turn the dial manually. The frequency where your filter's output amplitude is lowest is $f_0$ .
To test the demodulation circuit, we'll use our function generator to produce a frequency modulated signal with known properties.
Adding a low-pass filter before or after the bandstop may help clean up higher harmonics of a signal that are unwanted.
| Video instructions for frequency modulation |
Now, this signal is going to be quite difficult to watch on the scope, so we'll use the Sync connector to output a square wave with the frequency $f_{test}$. To do this, tap the icon in the lower left corresponding to the channel you're using, until it reads ChannelSet in the center of the screen. Select the SyncSet option from the menu on the left, and toggle SyncState to on. Then, connect a cable to the socket labeled CH1 SYNC/EXT MOD/TRIG/FSK. That should get you a clean square wave to connect to the Ext Trig socket on the scope, and you can then use the Trigger column's Menu to set the Source to Edge using the softkeys. Push the Level knob in to autoset the level to work as anticipated.
The sync settings are reset every time you turn off the function generator.
Video instructions for sync settings |
To turn modulation off, tap the Modulation menu again.
What is the resonant frequency $f_0$ of your filter?
How much more does your filter attenuate the carrier frequency versus an audio frequency signal?
You can use anything from 100 Hz to 15 kHz here as your “audio” frequency.
A passive bandstop filter tends to have a pretty broad frequency response, which isn't desirable here. What we can do to help fix this is to use a “bootstrapped” filter. We essentially replace the circuit ground with a copy of the filtered signal using an op-amp. When we're right at the resonant frequency, the filtered signal is perfectly in phase with the input, which means that we're trying to divide the difference between the input and (nearly) itself. As a result the filtered frequency is actively reduced much more than a passive filter could do.
This is a very hand-wavy explanation, but this class doesn't have the formal analysis tools to get into the gritty details of filter design.
As for the circuit, we can use the following:
The potentiometer value isn't that important, though a larger resistance will reduce the current needed.
Now for our modulation circuit; we can start with the 555 timer circuit we made in lab 8:
You'll want to design your circuit such that the frequency of the unmodulated 555 timer is that of our demodulator circuit.
What values of $R_1$ and $R_2$ will you use for your circuit, and why?
Build your circuit and verify that the output is roughly what you expect both with and without a modulating $V_{in}$ .
After you're satisfied that the modulator is working, its time to connect it to the demodulator circuit and test the results
Is the output from your modulator/demodulator circuit (mostly) something with the same frequency as $V_{in}$ ?
At this point, you have all of the different things you need to complete your wireless audio transmission system. Reconnect your stages as shown below:
Now, it may very well turn out that things did not work at first when you connected them. This is okay, it happens to all of us at some point. If you need to troubleshoot, you should keep some notes on what you find and changes you make.
The first thing you should try if there are issues is removing the complication of the light transmission/reception parts, and just connect the following:
If you're still having trouble, here are some options you can try when troubleshooting your setup:
The basic system, while functional, likely has room for improvement.