Can computer speakers emit ultrasound? What is the maximum frequency that computer speakers can produce?
Generally, yes (confirmed by both theory and experiment) though probably not as effectively as they can lower frequencies.
There are three primary factors:
1) The maximum frequency which can be produced by your source's DAC and associated anti-aliasing filters. This is usually a bit below the Nyquist frequency for your effective sample rate, how far will depend on the sharpness of the filters. There may also be spurious outputs centered on multiple(s) of the sample rate, but these are usually intentionally suppressed (and for most modern DACs, the actual conversion sample rate is many times the input one). Unless you have a 96 Ksps system which is designed with filters to unlock that potential (rather than the more standard 96 Ksps data rate but aliasing filters still designed for a 48 Ksps one), this is probably going to be your primary limit.
2) The maximum frequency which passes through the power amplifier. For a traditional analog design this will be more of a rolloff than a sharp limit. However, a "Class D" amplifier or something with digital processing may introduce its own sampling effects, and have its own strict filters to shield those.
3) The actual transducer response, and to an extent its acoustic environment. Normal moving-coil midrange speakers aren't designed for even the top of the human hearing range, but they will typically still produce some output even beyond it. In contrast, piezo transducers of various size could have resonant peaks at high frequencies, and actually produce more power there than at lower ones.
As a general comment, if you are planning to play with low ultrasound using consumer audio components, your challenge may be more on the receiving side than on the sending one, as the most common condenser microphones substantially roll off between 15-20 KHz (though a few of the smaller ones work higher). In contrast, analog output silicon MEMS sensors are often good to much higher frequencies, being used off-label in bat detectors. These are standard in smartphones, which appear to hear up to the limit imposed by their anti-aliasing filters.
No. "Active" speakers with their own power supply and amplifier will usually have filters in them that roll off above 22kHz. They're not designed to be capable of emitting ultrasound, and the filtering is there to eliminate induced noise from other sources.
You might be able to get very weak ultrasound out of a small passive speaker, but again it's not designed for frequencies above audio.
It's best tried out. I did twice, once in the nineties, with the primitive magnetic "PC speaker" of the era, second time more recently with low end speakers embedded in a laptop. It's a quite exciting experience when two people are listening side by side and one hears the perfect silence, while the other hears an unbearably loud, high pitch noise.
Some findings that surprised me:
- Even among teenagers, variance of threshold frequencies is enormous. People who don't think of themselves as hearing impaired typically have thresholds such as 10KHz, 14 KHz, 16 KHz, rarely much more.
- The thresholds are generally much lower than the textbook limit of 20 KHz.
- Criteria matters. Being able to spot a continuous sound is harder than being able to detect a sound that goes on and off. But this only matters when you are very close to your threshold.
- Waveform shape matters (a little).
- Even mild background noise matters (a little).
- All that said, the upper threshold is much better defined than the lower threshold. In other words, there's silence above the sound range, and there's vibration under the sound range. This applies to young enough, healthy people.
As you can see (er, hear), "ultrasound" is a very subjective concept and even the cheapest general purpose speakers can emit it.
From one paper that had concrete numbers, found by searching for what Ben Voigt suggested, the picture is pretty mixed. While the DAC of a modern sound card may well output 96kHz [at 192kHz sampling], don't hold your breath for the average laptop speakers to go very far above 25kHz at a discernible volume (by that meaning even if you use an ultrasound-capable microphone).
We're told that this T400 laptop had an "Intel Corporation 82801I (ICH9 Family) HD Audio Controller" and that additionally,
Previously performed tests with a Lenovo T410 Laptop featuring the Conexant 20585 audio codec (with 192 kHz DAC / 96 kHz ADC) have shown very similar results.
But these are only a couple of computer (speaker) models.
Besides using speaker-generated ultrasound for covert communications, another interesting application is as an ultrasonic sonar; this is used to test if the user is located (or not) in front of the computer [by exploiting the differences in reflected ultrasound]. A Ph.D thesis on this latter topic is more interesting for our question here because it sampled a couple thousand user machines for emission/reception of a 22 kHz sine wave signal; the recording was done in this case with whatever microphone the user had, so these figures are conservative as far just emission of this 22kHz tone is concerned.
The thesis also has a graph for white noise [which can measure multiple frequencies], but the author says he is not very confident in the results obtained that way due to aliasing.
The same issue of low ultrasonic frequency generation was studied for mobile phone speakers with the intent of using ultrasound to detect indoor positioning changes via trilateration. One interesting bit is that, depending on hardware, mobile phone speakers can behave badly (cause aliasing) if you try to emit some ultrasonic frequencies too loud:
If the volume is set too high, mobile phones will generate a lot of noise in a wide range of frequencies in the audible range when trying to generate one of the signals. For iPhone this happens only with 21.5 and 22 KHz, but for Hero and Navigator this happens at all tested frequencies. Only HTC G1 appeared to be almost completely immune to this problem. As the volume is decreased, this problem fades, and at some point disappears. For example with HTC Hero this happens at around 80% file volume at maximum device volume. With iPhone noise at 21.5 and 22 KHz disappears completely around 20% file volume and device volume maximum - 2.
The paper has some sprectrograms too for these phones (which I won't reproduce here because they have one graph per phone.) and more detailed discussion of noise and aliasing than what I've quoted above. The bottom line seems to be that while you can emit some ultrasound, depending on hardware, you may not get exactly the frequency you wanted/programmed and the output may be very noisy in some cases, including audible noise.
So for 22-25kHz (which are considered low ultrasonic frequencies) it seems to work well enough (as in loud enough) for the majority of machines/speakers you can find out there, although possibly with audible artifacts on some setups. For higher ultrasonic frequencies, who knows... The T400 laptop data suggests it's unlikely to work well/loud enough higher that 25kHz, but I couldn't find a study sampling more machines. I also found another ultrasonic sonar paper which used 40kHz as its chosen frequency; while it used regular 96 kHz sound-card hardware, it went for a specialized ultrasonic piezo speaker (the 400ST) at this frequency; my guess is that they would not have bothered with that if run-of-the-mill computer speakers were reliable/loud enough at this frequency.
Obviously how far above the audible range varies with the speaker model, but the general answer is YES.
Further reading (google search):
You can do it by using a web audio system from your mobile browser by going live.
For that you can use a microphone similar to the inbuilt mobile system. Why microphone it's a mic in from the receiver side and it acts as a speaker from the opposite side which is good for ultrasound.
By the way you have to remove the filter from the live from your web audio system to use ultra sound.