Simple ultrasound mic?
WTPfeffer wrote 12/14/2020 at 15:41 • 2 pointsI'm a new member and not sure if I'm in the right place.... However:
I want to build a very simple microphone that can detect audio signals up to ca. 45 KHz. All I need to do is detect the wave form. I want to find out what devices (iPhone, computer, camera, etc) produce noise that seem to be upsetting my dog, but that I can't hear.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Check out the Audiomoth: https://www.openacousticdevices.info/audiomoth
It is used for automatic audio recordings in the field for ecology research, and people make a lot of recordings of bats (ultrasonic) with it. You can get it for $60 if you wait for the GroupGets campaign, or a little more if you want it immediately. OR since it's open source, you can emulate the parts that you need.
Are you sure? yes | no
The Audiomoth looks perfect - thanks!
Are you sure? yes | no
The audiomoth is a great suggestion. I don't know whether there would be an easy way to do spectral analysis and find the relative amplitude of the bands you are concerned with. It might be a case of recording a walk around the house, downloading the uncompressed file to the PC, running FFT (e.g. audacity https://manual.audacityteam.org/man/plot_spectrum.html) and then using a timestamp to work out the location where that came from. Then a case of narrowing down the location more finely.
Are you sure? yes | no
Hello Simon - Thanks for your leads on DIY ultrasound... Zach Poff's website looks especially useful!
My needs are really simple at this point - I'd be happy if I could just display the output on a scope. I'm just trying to detect presence/absence of noise above 20 KHz, and an estimate of amplitude relative to lower audible frequencies - Realistically I expect I might need to have a mic pre and an A/D converter running into my computer; that's essentially just an audio interface (and I have one of those), so all I need is a microphone with the right range!
Tad
Are you sure? yes | no
@WTPfeffer does your computer audio card have a reasonable sensitivity to 20+ kHz?
I would be tempted to put an FFT running on a microcontroller. For a pretty ready-made setup, look at the adafruit zero-FFT library and examples for samd21 (and samd51) based microcontroller boards. The FFT will allow you to identify relative amplitudes of the different frequency components, whereas just looking at the waveform will be nigh on impossible to differentiate frequency bands.
Are you sure? yes | no
Thanks again Simon! - My PC (Dell Latitude 7480) has a Realtek ALC3264, and after some digging I *think* it only goes up to around 20 kHz. I'll look into your other advice (and yes, after thinking about it for a second I realize I need something more than the raw waveform!).
Are you sure? yes | no
@WTPfeffer as well as the adafruit FFT code / hardware, teensy microcontrollers are also well suited to this kind of application (fast, good at processing floating point maths, plenty of people have documented audio applications with them and an active forum for help).
If you decide to use a microphone preamp, check it will work at your preferred upper audio frequency. It is worth remembering your ADC sampling rate needs to be much higher than your max audio frequency. In theory it needs to be at least twice as high but 10x is a better planning figure.
Are you sure? yes | no
Search for bat detector or something and you'll find
Are you sure? yes | no
https://www.zachpoff.com/resources/exploring-ultrasound/
And
https://www.zachpoff.com/resources/cheap-microphones-for-ultrasound/
What sort of output are you looking for? Are you thinking of making your own detector eg with a preamp circuit, perhaps microcontroller and eg some LEDs?
Are you sure? yes | no