UltrasonicPlayer
Project UltrasonicPlayer | |
---|---|
![]() | |
An inexpensive DIY ultrasonic audio player | |
Status | In progress |
Contact | bertrik |
Last Update | 2016-10-17 |
Introduction
This project is about a do-it-yourself portable ultrasonic audio player, built out of inexpensive modules available on sites like AliExpress.
A typical use case for this is a kind of "lure" for biology researchers to improve the results of trying to catch bats in a net. The player emulates (social) bat calls which attracts the bats to the net, increasing the chance for them to be caught.
The ultrasonic player acts as a USB sound card with high sampling rate plus a speaker to turn it into actual ultrasonic audio. You have to provide a device with a media player yourself, like a tablet or a laptop.
Status
2016-10-11: received the amplifier boards. 2016-10-02: ordered the parts (USB audio, amplifier, a few step-up circuits).
Next steps:
measure the frequency range of the USB audio card, using artificial waveform(s), like sweeps and fixed-frequency tones. I can create these waveform in Audacity (which supports the 384 kHz sample rate).measure the frequency range of the amplifier circuit- connect the 5V-12V step-up circuit and use it to power the amplifier
- measure the current consumption of the amplifier
- connect the speaker and verify sound production using a bat detector
- check whether devices can actually play ultrasonic audio over this sound card: my laptop, perhaps some cheapish android tablets (using an OTG cable). Can a Raspberry Pi do it too?
Hardware
The hardware consists of the following parts:
- Some kind of media player which takes care of the storage and playback of the ultrasonic files, this can be a tablet or laptop
- A USB audio card to create the analog ultrasonic signal
- An amplifier to amplify the ultrasonic signal
- A speaker to turn the signal into actual ultrasonic audio
USB sound card
I'm considering this one: USB sound card based on a SA9227+PCM5102 chip.
It allows a maximum sample rate of up to 384 kHz, or equivalently audio op to about 170 kHz. Price: about E30,-
To play back the audio file noise.wav:
aplay -D plughw:CARD=Audio,DEV=0 noise.wav -v
On the right, rom top to bottom: the signal at 50 kHz, 100 kHz, 150 kHz respectively
Measurements of amplitude vs frequency:
- on the scope you can clearly see the sampling steps: at 100 kHz one wave is sampled using only 3.84 samples.
- the amplitude drops a bit when going higher, but only like 30% at 150 kHz compared to 50 kHz
Amplifier
I'm considering this one: amplifier board based on a TDA2030 chip.
The TDA2030 chip has a claimed audio bandwidth of up to 140 kHz. Price: about E1,-
Measurements:
- seems to be able to handle 50 kHz and 150 kHz audio input equally
- additionally, it seems the power supply still works down to 5V
Speaker
I'm considering this one: Vifa/Tymphany XT25SC90-04.
This speaker is also used in other products that produce ultrasonic audio.
Price: about E22,-
Power
For the power source, there are two options:
- draw power from the USB port from the tablet/laptop
- use our own power from a separate battery
In the first case, I'll have to consider the maximum current that an average USB port can supply, which is 500 mA typically. In the second case, I'm thinking of just using a 5V USB battery. There are plenty of models to choose from, in varying capacity ranges and prices.
If we're powering everything from 5V, we may need some kind of step-up converter to supply the amplifier with 12V. I'm considering this one: 5V-to-12V step-up cable or possibly this USB 5V to 12V converter. An important consideration for the step-up converter is that the switching frequency is considerably higher than any ultrasonics frequencies we are interested in.