Introduction: Ultrasound Listener. Electronics That Expand Your Auditory Perception
This instructable will guide you through creating a simple circuit that taps into the ultrasonic spectrum. There are tons of applications of the design, from playing the song of a dog whistle to an 'on/off' verification of ultrasound probes in medical applications. This is an entirely analog project that can be built with readily-available components: resistors, capacitors, op-amps, a multiplier, an ultrasonic receiver, and stand-alone speakers. This is a great project for practicing analog electronic knowledge, as well as for gaining experience with frequency shifts and bandwidth limitations.
This project was created by Matisse Milovich and Steven Shepard as part of Stanford's EE122A, taught by Professor Greg Kovacs and Laurent Giovangrandi. We’d like to thank Professor Kovacs and TA Bill Esposito for valuable feedback and help along the way.
Step 1: What You'll Need
Solder iron & solder (handy but not required)
Power supply (+/-9V if using the AD633 Multiplier)
Op Amps (x4) similar to the LT1056
Analog Multiplier IC (x1) with same capability as the AD633
Ultrasound Transmitter/Receiver (1 each)
Specific Parts We Used:
Op Amps: LT1056 (4 x $4.09)
Multiplier: AD633. Be aware of its power requirements, it needs at least +/- 8V. (1x $9.39).
Ultrasound Receiver and Transmitter: Murata MA40S4R and MA40S4S. ($5 each). We were disappointed in the 600Hz bandwidth (measured at -3db) of the receiver. We'd suggest trying other receivers, though this one certainly works at 40kHz +/- 0.3kHz.
These specific parts total about $45.
Step 2: Background
Before getting our hands dirty, it is essential to understand the physics and signal processing theories behind the function of this circuit.
Audible Sound Versus Ultrasound Sounds
The human ear can hear occur at frequencies between 20Hz and 20kHz. Ultrasound is an acoustic (pressure) wave at anything in the region above 20kHz. A sound wave can be represented by: A*sin (w*t+phi), with A = amplitude, w= 2*pi*frequency, phi = phase. Going higher in the spectrum of sound corresponds to increasing w, and increasing the loudness corresponds to increasing A. Sound waves can be relatively constant for a period of time, with no decay of amplitude, or they can change over time with rising and falling envelopes.
Oscillators provide a steady continuous swing between two voltages. The swing can be abrupt, like the square wave, or the swing can been a clean sinusoidal wave, a specialty of the Wein bridge.
Step 3: Theory
The block diagram above shows the high-level view of our circuit. An introduction to the theory is given here, and more detail for each part of the circuit is provided in later steps.
Multiplying Two Sinusoidal Waves
To achieve a frequency shift of our incoming ultrasonic signal we took advantage of the following trig identity:
cos(A)*cos(B) = ½[cos(A-B)+cos(A+B)], i.e. the product of two signals at different frequencies produces the sum of two signals: one at the sum of the incoming frequencies, and one at the difference of the incoming frequencies. Do not worry that we are now using cosine instead of sine, cosine is just a sine wave shifted 90 degrees, sin(wt) = cos(wt +90). Our ears cannot distinguish a 90 degree phase shift of sound wave.
Think of cos(A) be our incoming signal from the ultrasonic receiver, and think of cos(B) be a local oscillation we create. We can measure A, and we can choose B in order to place cos(A-B) in the audio range.
In reality, our incoming ultrasonic signal will be the composition of several frequencies, but the principle outlined above still holds. The only difference is that we will also see the harmonics A and B in our output as well. For more information, see the technique of heterodyning.
Choosing Shift Amount
We planned for an incoming ultrasonic signal centered around 40kHz, since that is by far the most common center frequency of affordable ultrasonic receivers. We assumed a receiver bandwidth of 10kHz maximum, which meant that our incoming frequencies would be between 35kHz and 45kHz. Consequently, our shifting signal needed to be 35kHz to shift the lower bound of the incoming signal to 0Hz, and the upper bound to 10kHz (still within the audible range). The center frequency would land at 5kHz, which was a pleasant-enough audible sound. Upon building the entire circuit and realizing the bandwidth of the receiver was far narrower than expected, we made the shifting frequency higher to produce a lower, more pleasant center frequency of the audio output.
Step 4: Full Schematic
The schematic above shows our full design on two pages. The output of the multiplier on the first page feeds in to the input of the LPF on the second page. The critical portion is the ultrasonic receiver circuit, which takes in an ultrasonic signal and outputs an audio signal. Optional elements include the ultrasonic transmitter (boxed in the bottom left), and a potential power supply (boxed in the top right) to help those of you who want to make the circuit portable.
Step 5: Transmitter
**Optional but recommended for testing your receiver**
In case there are no ultrasound sources in the vicinity of your prototyping bench, you can test the ultrasound listener circuit with a complementary transmitter circuit. The transmitter can be driven by a function generator or by a Wein bridge oscillator (shown above). The oscillating frequency of this oscillator should be within the bandwidth of the ultrasound transmitter and receiver. Refer to the Wein Bridge steps below for more info
Step 6: Processing the Received Ultrasound Signal
Several stages are needed between the ultrasonic receiver and the multiplier: a voltage buffer, a band-pass filter, and a gain stage.
Voltage Buffer after Receiver
Supplies current. Otherwise current must come from the sound itself via the ultrasound receiver, and that current is insufficient. Simply connect one end of the transducer inducer to the non-inverting input of the op-amp. Set a feedback loop with no resistance from the output to the inverting input of the op-amp.
The bandpass filter does two things: it attenuates noise outside of our expected frequency band, and its high-pass portion prevents negative frequencies from occurring. See the following section if you're interested in more detail.
The gain stage should be designed last out of these three steps. Simply measure the voltage of the signal without the gain stage, and set the gain accordingly to provide a signal with the strength of a few volts. The gain for the configuration above is set by (R1+R2)/R2. Check the max input voltage your multiplier can handle, and make sure that won't be exceeded when the receiver is at its minimum distance from the ultrasonic source.
Step 7: Reasoning Behind Bandpass Stage
We added a band-pass filter (BPF) after the receiver in case the received signal landed outside the assumed range of 35kHz to 45kHz. This turned out to be redundant with our particular receiver’s transfer function (which was far narrower), but we kept it as a preventative measure in case we found a receiver a larger bandwidth, one extending beyond our passband.
The main concern is the folding of negative frequencies back into the (positive) audible range. For instance, if the incoming signal was a mix of 34kHz and 36kHz, and the shift frequency was 35kHz, we wouldn’t want to produce double the amplitude of a 1kHz audio output. We would rather band-limit the incoming ultrasonic signal to fall within the window we designed for.
A second consideration is wanting to band-limit the signal before it goes through the op-amp gain stage, since op-amps have a fixed gain-bandwidth product. Too large of a signal bandwidth would impede the op-amp's performance.
You won't need to worry about frequency folding if you make your shift frequency lie outside the bandwidth of your received signal, i.e. lower than the lower bound or higher than the higher bound.
Step 8: Wein Bridge Oscillator Design
We needed to generate two signals: one for the transmitting frequency used to test our circuit, and one to act as the shifting signal, cos(B) in the block diagram. Several oscillator designs exist, including the Twin-T design, Phase-Shift Oscillators, and the Wein Bridge design. We elected to use a Wein Bridge oscillator because it produces the cleanest sinusoid output.
The frequency of oscillation can be easily adjusted by tuning two pairs of RC values, or by hooking up a dual potentiometer with sufficient granularity in your desired range. The frequency of oscillation is 1/(2*pi*R*C), where R and C are specifically called "R" and "C" in the schematic above. R2, R3 and R4 are chosen such that R3 is slightly less than 2*R2, and R3+R4 is slightly more than 2*R2. The diodes act as a stabilizing measure, ensuring oscillation.
Our values were for the oscillator that serves as the frequency shifter were R=4.3kOhms and C = .001uF, corresponding to a frequency of oscillation at 37kHz. The measured frequency was quite close to the expected (calculated) frequency. For the oscillator involved in the transmitting circuit we wanted an oscillation frequency that fell within our receiver's bandwidth. The center frequency of our receiver was 40kHz, so we chose R = 3.9kOhms and C=0.001uF for a nominal oscillation frequency of 40.8 kHz.
Step 9: Wein Bridge Oscillator Tips
Check the output of your oscillator to make sure it produces the clean sine wave that Wein Bridge oscillators are known for. We want to have as pure of a harmonic as possible so that we shift the ultrasound signal by one amount rather than by several, which would create a distorted signal at the output of the multiplier.
The first image above shows a desirable sine wave output, whereas the second image is an example an oscillation that is far too jagged (in other words, it has higher frequencies present that should not be there). Another common problem when building a Wein Bridge Oscillator is clipping. If you notice clipping on your output check your power supply rails and the values of R2, R3 and R4. Once the signal looks good you can make your oscillator frequency more precise by picking resistors and capacitors that most closely match your desired values (since all component values are slightly off of their nominal value).
We noticed it was critical to have R values in the kOhm range rather than the Ohm range, since the lower value was drawing too much current and throwing the oscillator out of balance. When R was 43 Ohms (accidentally), we produced the signal in the second image above. Changing R to 4.3 kOhms did the trick to get a clean sinusoid.
It's not as critical to have a clean sinusoid fed in to the ultrasonic transmitter (if you build that testing portion of the circuit). In reality, sounds in our environment are composed of numerous frequencies, so you will merely be transmitting a more realistic ultrasound signal. The composition of your transmitted signal is something you can play with, just make sure you keep an eye on its bandwidth so that all the frequencies you want to hear aren't blocked out by the bandwidths of the transmitter, receiver, of BPF down the road.
Step 10: Multiplier
Remember, the product of two sinusoidal signals is a signal with a frequency at the sum and difference of the inputs, according to cos(A)*cos(B)=1/2[cos(A+B) + cos(A-B)].
Two signals: one from the receiver after the gain stage, another from the Wein Bridge oscillator. These signals are shown in the third image above, as as Ch2 and Ch3 respectively. Ch1 is the input from the receiver before the gain stage.
Ideally a waveform at the sum and difference of the two input frequencies is produced, but oftentimes the mixer does not completely get rid of the signals that enter it. Thus we implement a LPF following the output of the mixer to look at the window of frequencies that we are interested in. Mixing an approximately 38kHz signal with an approximate 40kHz ultrasound signal, we get out a 2kHz and 78kHz signal plus other noise, namely at 40kHz and 38kHz. You can see the output in the fourth image above. The fourth image above shows the output from the multiplier after it has gone through the LPF. We can still see the noise at 78kHz, 38kHz and 40kHz, though it has been attenuated by more than 20db.
Tip: Be sure to ground the impedance pin (pin 6 for AD633). The second image shows the input and output ports labeled with notes.
Step 11: Audio Output
Selects the desired signal, which falls in the audio range. Not a necessary step if your speakers can handle high-frequency noise, but a good precautionary measure. We chose to use a passive RC filter because it was sufficient. There was more than a decade of frequency between the competing noise (at ~75kHz) and the signal (at ~5kHz), so the noise would be attenuated by about 20db.
Let there be Sound (that we can hear)
The signal is now ready to go directly to computer speakers using an audio jack and audio cable. You can use smaller speakers or headphones, but you may need to build an amplifier stage. We designed an AB amplifier stage to go with an 8Ohm Speaker, but elected to use computer speakers for their better sound quality.
For the protection of your hearing, always turn your speaker volume down and then increase it gradually. Long-term exposure to loud high-frequency sounds can damage your ears. The sound will be quite loud if you use our component values and put the transmitter inches away from the receiver. We set the knob of our computer speakers to be quite low.
Step 12: Transducer Limitations and Possibilities
Ultrasound Receiver Bandwidth Limitations
The performance of our ultrasound transducers was the largest limiting factor in what ultrasonic sources we could hear. This is because the receivers have a bandwidth of just 600Hz. This means that we can only receive signals at our center frequency of ~40kKHz plus or minus 300Hz without much attenuation. The first two graphs above show the measured the frequency response of our transducer, done using a Network Analyzer. 'Spoiling' the bandwidth can be done by putting a capacitor in parallel with the transducer receiver. Doing this only added about 100Hz for us.
An ideal transducer (or set of transducers) would have a bandwidth of about 20KHz, so that we could make an analog mapping from the ultrasound range to the entire human hearing range.
Circuit works as expected for wider range of frequencies
For testing, we used the AWG input to send in an ultrasonic signal in place of a received one. The circuit behaved properly for the input frequency range we designed for (35kHz to 45kHz), and beyond. Plots showing these results are above. Ch 4 is the output given to the speaker, Ch1 is from the receiver, Ch2 is the amplified received ultrasonic source, Ch3 is the fixed oscillator signal. In all of these plots Ch4 is at the difference of the frequencies of Ch2 and Ch 3, and the noise spectrum is as expected as well. By showing that the circuit behaves as we expect, we can be confident that the limiting factor of what ultrasonic signals we can hear is the bandwidth of the ultrasonic receiver.
Step 13: Be Creative With Your Ultrasound Listener!
Now that this fundamental circuitry works, the ultrasound spectrum is yours to explore!
Below are some extension ideas, many more exist.
- Transducer array
- Send different tones through transmitter
- Vary oscillator frequency. Simply replace the two identical resistors in the oscillator with the leads from a dual potentiometer to adjust the two resistor values at the same time.
- Reduce the power rails by using a low-power multiplier. Our power rails were determined by the AD633 IC chip. Using a low-power multiplier would be a large step towards making this circuit portable, since smaller power supplies would enable using fewer batteries, and more common voltage regulators. We noticed -5V voltage regulators were easier to find than -9V regulators.