Say you’ve got a neat gadget you are building. You need to send data to it, but you want to keep it simple. You could add a WiFi interface, but that sucks up power. Bluetooth Low Energy uses less power, but it can get complicated, and it’s overkill if you are just looking to send a small amount of data. If your device has a microphone, there is another way that you might not have considered: ultrasonic communications.
The idea of using sound frequencies above the limit of human hearing has a number of advantages. Most devices already have speakers and microphones capable of sending and receiving ultrasonic signals, so there is no need for extra hardware. Ultrasonic frequencies are beyond the range of human hearing, so they won’t usually be audible. They can also be transmitted alongside standard audio, so they won’t interfere with the function of a media device.
A number of gadgets already use this type of communications. The Google Chromecast HDMI dongle can use it, overlaying an ultrasonic signal on the audio output it sends to the TV. It uses this to pair with a guest device by sending a 4-digit code over ultrasound that authorizes it to join an ad-hoc WiFi network and stream content to it. The idea is that, if the device can’t pick up the ultrasound signal, it probably wasn’t invited to the party.
We reported some time ago on an implementation of ultrasonic data using GNU Radio by [Chris]. His writeup goes into a lot of detail on how he set the system up and shows a simple demo using a laptop speaker and microphone. He used Frequency Shift Keying (FSK) to encode the data into the audio, using a base frequency of 23Khz and sending data in five byte packets.
Since then, [Chris] has expanded his system to create a bi-directional system, where two devices communicate bi-directionally using different frequencies. He also changed the modulation scheme to gaussian frequency shift keying for reliability and even added a virtual driver layer on top, so the connection can transfer TCP/IP traffic. Yup, he built an ultrasonic network connection.
His implementation underlines one of the problems with this type of data transmission, though: It is slow. The speed of the data transmission is limited by the ability of the system to transmit and receive the data, and [Chris] found that he needed to keep it slow to work with cheap microphones and speakers. Specifically, he had to keep the number of samples per symbol used by the GFSK modulation high, giving the receiver more time to spot the frequency shift for each symbol in the data stream. That’s probably because the speaker and microphone aren’t specifically designed for this sort of frequency. The system also requires a preamble before each data packet, which adds to the latency of the connection.
So ultrasonic communications may not be fast, but they are harder to intercept than WiFi or other radio frequency signals. Especially if you aren’t looking for them, which inspired hacker [Kate Murphy] to create Quietnet, a simple Python chat system that uses the PyAudio library to send ultrasonic chat messages. For extra security, the system even allows you to change the carrier frequency, which could be useful if the feds are onto you. Whether overt, covert, or just for simple hardware configuration, ultrasonic communications is something to consider playing around with and adding to your bag of hardware tricks.
27 thoughts on “Hackaday Dictionary: Ultrasonic Communications”
Does anyone have any experience with ultrasound communication using very small embedded devices. E.g temperature sensor using ultrasound to send values to pi?
I think the Amazon dash button is using this.
My masters thesis in ’01 was M2M sub-audible communications. Sub-audible meaning its technically in the audible range but the average person couldn’t hear it (using psychoacoustics). Though people with acute hearing (typically younger people and/or female) could hear it if they were directly in the path.
In practice it has limited utility because high frequencies are very directional in nature meaning the if the emitter isn’t pointed directly at the receiver there was a huge drop in dB. Compensating this with better equipment make the price and physical dimensions go up (I ended up using a professional omni-mike, a 24bit 128ksps digitizer (~$500 at the time) and a 4″ tweeter horn). Even with this setup anything > +/- 30degrees became difficult to pick up.
The more interesting application was digital fingerprinting audio (at the time mp3 file sharing was a huge concern), where the mechanics of mp3 encoding are exploited to encode data in the stream that isn’t audible. The university sought to patent this but I went to work for the USPTO and was barred from participating in the application. I have since since similar applications that would be used as prior art against any new applications.
recently there is an article on pop sci that reference a paper done on using ultrasound to transmit data through flesh. maybe you can look that up.
See also: https://g.co/tone
Ultrasound has an advantage of being trapped in a room. But I doubt that it is low power, at least not when compared to radio at that short range.
You can get a surprising amount of sound pew mW, especially at high frequencies, but that’s besides the point. If you already have a system with a speaker, using ultrasound gets you an extra communication channel for free.
I recieved an ultrasonic signal from Australia, by moon-bounce and venus-bounce mode. TX power only 1 microwatt, CW frequency 10 khz. (I think this may have happened, possibly just a dream but not really, though……and.)
“outside of hearing range” is a bit of a misnomer. People do hear it, but you need a louder sound to be heard at higher frequencies. There’s experiments with people recognizing and understanding voice that is transmitted at ultrasound frequencies if it’s directional and loud enough.
Furthermore, the non-linearities in the transmission of sound cause some of the signal to be “heterodyned” down to lower frequencies, which can make it audible in practice.
I don’t know why, but I think they can make you feel a little sick. When we were testing our accelerometers and amplifiers at ultra-sonic-ish frequencies (~14-20kHz), we could definitely see how hearing degraded with age, however, independent of age, we didn’t like how we felt with the high frequencies bouncing away.
You know the squeaking logitech mice that emit a sound at some multiple of the 12 Mhz USB clock. I can’t hear those things anymore -except- when I press my ear to it. It definitely creates an ambience, and when the sound bounces off of some corner in a shelf or a flat wall, I can feel it.
On another thought, I remember when I was about 11-12 and we built a “mosquito repellent” device in shop class, and it operated by sounding a tweeter at 25 kHz, and we all definitely heard it. You could turn it on in another room and the kids in the other room could shout when they heard it.
Now kids use that “mosquito” sound as their ringtones and the teacher has no idea that they are getting SMS texts and Bluetooth phone calls during class (there’s a new BT earpiece that is hard to see [ https://contestimg.wish.com/api/webimage/56a33ad612b9bc140ef46314-4-original ]).
It’s not a misnomer at all. The reason it needs to be louder is precisely because your hearing is diminished at that frequency. It’s just that not everyone has the same cut off frequency. “Ultrasound” is just a range. It doesn’t mean that as soon as you get to 20,001 Hz that it is undetectable to the human ear, just that that’s the region where most peoples frequency response is rolling off.
“outside” implies that it’s beyond human perception entirely, not just “poorly percieved”. Almost everyone can hear a sound at 20 kHz if you play it loud enough.
Have you seen a frequency response curve (https://en.wikipedia.org/wiki/Frequency_response)? See the cut off frequency? If you have to turn it up (“play it loud enough”), then you are on the slope on the other side of the cut off frequency and the more you have to turn it up the further down the slope you are. The cut off frequency is where “outside” begins.
Correct – have you ever entered a department store and perceived a very high pitch tone? It’s deliberate and is modulated with speech. You won’t believe the content. Something about suggestions to not steal?
Also most adults can hear the fly-back transformer of the old CRT TV sets. They ran at 15,750,000 Hz. How about someone transmitting Slow Morse at 20KHz to teenager HAM radio enthusiasts. Secret marketing technique like at HAM RADIO OUTLET (USA)? try it yourself and find your limits: http://plasticity.szynalski.com/tone-generator.htm
“Also most adults can hear the fly-back transformer of the old CRT TV sets. They ran at 15,750,000 Hz. ”
No. Most adults *can’t* hear that. It’s pretty much the domain of sub-30 year olds. Standard hearing thresholds also indicate that definitely by 55, 15 kHz is basically gone (40 dB higher threshold level).
But the flyback doesn’t just emit at 15.75 kHz, and your ear, even at youth, is *way* more sensitive to anything emitted at lower frequencies, so you hear those, and think you’re hearing the 15.75 kHz pitch.
Random test data basically shows 15.75 kHz becoming inaudible around 35 or so.
Pat – you’re right. I should have said “felt” or “sense” not direct “hear”. Us old-timers can sense them but no one uses fly-backs anymore in this flat screen LCD world. But older electronic camera flashes still give off a very high pitch signal on recharge. And some older CCTV cameras still emit detectable pitch signal.I tried that program I posted here somewhere and I noticed a definite reduction in my sensing of 15.75 KHz but I could still “sense” it’s presence.
Let’s broadcast ultrasonic over speakers not designed to reproduce ultrasonics that are driven by amplifiers not designed to run into the ultrasonic frequencies.
People will hear that as distortion, especially if something else is going on at the same time because that’s just the result of trying to reproduce ultrasonics on regular home items. Oh and it’s why 192kHz recording is actively a bad choice.
The higher sample rates reduce the chance of aliasing on the input. You can always downsample it later.
If you have animals (cats/dogs it may not be great). Of course if you do not it could keep insects and mice away :)
My grandfather did have a TV with a remote that worked without battery. The remote had few buttons (maybe just 2 or 4). Pushing a button charged a spring mechanism that hit on a rod making a sound and the TV changed channel.
Zenith Space Command. The hammer hits the end of an alloy rod held loosely by the center in a groove, It’s a longitudinal vibration not hit the way one would hit a xylophone bar. They went up to 4 tones 14-22kHz.
Happy legal dogs and jingling keys would make the set change anything it could.
Somewhere around a year ago I had a reel to reel machine that had ultrasonic remote control. It’s called “Маяк 001 стерео” (this one: http://www.rw6ase.narod.ru/00/mg_kat/majak001_00.jpg). I mean, I didn’t have the remote itself, but I do remember playing around with piezo transducer and a signal generator to trigger things on it. I remember all 4 tones being somewhere in the range of 40…50KHz.
Remote was electronic, though. 5 buttons, signal gen, battery and a piezo…
And the TV had to be unplugged when using a vacuum cleaner, or the TV would turn on and crank itself up to maximum volume, every time. A TV repairman in the family would do a “TV tuner cleaning” whenever he was called out to repair a TV that just needed to be plugged in again, to prevent irate customers getting charged for an embarassing service call.
i always have a good laugh when people tell me they can hear 16KHz or more when they CLEARLY have never ever heard 15.75KHz NTSC horizontal scan from a CRT flyback :D
ive only ever met two or three people that could hear it, and they knew EXACTLY when i change channel on built-in analog tuner because it temporarily upsets the horizontal osc. as it tries to lock on, more modern sets smoothly blank the (H-SYNC) signal until after “digital lock”. some sets go WILD when set to line-in with nothing connected.
i remember having to tell the teacher to turn off the tv during a test, had to explain that it was so loud it was distracting from the other side of the room.
i can find my way down a hall and around the corner and point out the tv thats on merely by sound and a flick of my head to judge direction … back in the day, if your watching while on the job, i will know, and i will find you. ditto for LCD :P
Please be kind and respectful to help make the comments section excellent. (Comment Policy)