Go Down

Topic: Generating a high frequency of sound with Arduino Uno (Read 538 times) previous topic - next topic

hoya0523

Hi all,

I have a very basic question, but need your help.
I tried to generate 18kHz tone with Piezo buzzer, but could not hear any sound (instead hear very small volume of vibrating sound?).

Anyway, do you know how to output high frequency sound (Ex. 18kHz, 20kHz, etc) with Arduino Uno and Piezo buzzer? If impossible with a piezo buzzer, please recommend a good speaker for that.

Thanks!

slipstick

Generating the tone is easy. There are plenty of piezo speakers that will transmit frequencies that high though they usually need fairly high voltages to get any appreciable sound level out so you certainly can't drive them direct from the Arduino. Google "high frequency piezo speaker". What piezo are you using?

And then you will need to find a person who can actually hear those frequencies. Not everyone can even when young and certainly many people older than about 30 cannot. High frequency hearing usually disappears as you get older.

Steve

Grumpy_Mike

Quote
And then you will need to find a person who can actually hear those frequencies.
Or get an oscilloscope, or make one with an Arduino and a Raspberry Pi like my article :-
https://www.raspberrypi.org/blog/build-oscilloscope-raspberry-pi-arduino/

Then look at the signal directly, then put a microphone on the front.

DVDdoug

Most piezo transducers can go that high.  But, make sure you have a "transducer" or "speaker", NOT a "buzzer".   

A speaker/transducer is a passive device that converts electrical signals to sound.   (A speaker/transducer might "click" when you connect/disconnect power put it doesn't make any sound with constant DC applied.)


A buzzer is an active device with built-in electronics to generate the sound.   You supply DC power and it makes sound.    i.e. You can't play music through a buzzer because it only makes one tone/pitch.



----------------------------------------------------------------------------------------------
Try 5 or 10kHz to see if you can hear that.   If it's working at lower frequencies it's probably also working at 18kHz, but you may not be able to hear it.




----------------------------------------------------------------------------------------------
You can also generate tones on your computer with Audacity and play them on your computer speakers (to check your hearing), but some speakers may not go that high.




hoya0523

Hey slipstick,

I am using this piezo: https://www.adafruit.com/product/1739

Thanks for your advice.
Ho

DVDdoug

Quote
I am using this piezo: https://www.adafruit.com/product/1739
That's a transducer and it should work, but the specs don't give you a frequency range.  

They give you a resonance range, which is where it is most efficient....   It's weird that they give you two different resonant frequency ranges.

If it's working at lower frequencies I'd assume it's mainly your hearing and possibly low output at that frequency.

slipstick

You could always get a speaker/transducer like https://www.amazon.co.uk/2-5kHz-45kHz-Frequency-Ultrasonic-Speaker-Black/dp/B00PJ92OMO which does have a specified frequency range.

Or you can write a test program that sweeps a tone from say 2KHz up to whatever frequency you choose. You can be fairly confident that the signal level into the speaker will stay fairly constant. Unfortunately you still won't really know if you're testing the speaker or your hearing unless you also do a similar sweep on high quality studio or hi-fi speakers so you know that you can hear those frequencies if they exist.

Even Mike's idea of using a microphone to check the output of the speaker will depend on choosing the microphone carefully. Many cheapish mics are optimised for speech frequencies and the response falls rapidly over about 8KHz.

Steve

Grumpy_Mike

Quote
Even Mike's idea of using a microphone to check the output of the speaker will depend on choosing the microphone carefully. Many cheapish mics are optimised for speech frequencies and the response falls rapidly over about 8KHz.
One of these then Bat Detector.

MarkT

Even Mike's idea of using a microphone to check the output of the speaker will depend on choosing the microphone carefully. Many cheapish mics are optimised for speech frequencies and the response falls rapidly over about 8KHz.

Steve
Small electrets are usually OK for high frequencies, the membrane is ultra-thin.  Some expensive mikes
are optimized for speech frequencies too, so don't assume expensive = full audio frequency range!
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

slipstick

You're right but one advantage of expensive mics is that they usually publish detailed specifications including frequency response charts.

Steve

MarkT

They give you a resonance range, which is where it is most efficient....   It's weird that they give you two different resonant frequency ranges.
Not weird at all, it has multiple modes like any other resonant object.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

hoya0523

That's a transducer and it should work, but the specs don't give you a frequency range.   

They give you a resonance range, which is where it is most efficient....   It's weird that they give you two different resonant frequency ranges.

If it's working at lower frequencies I'd assume it's mainly your hearing and possibly low output at that frequency.
Thanks for your comments.
As it goes to a high frequency, it could only hear some vibration from a speaker or a transducer.
Do you think it is because of low output?

DVDdoug

Quote
Do you think it is because of low output?
We don't know.   It could be a combination of low output and/or lack of high-frequency hearing sensitivity.  

Did you try 10kHz or 5kHz?  Is it working at all?

Did you check you hearing with Audacity and good speakers or good headphones earphones?

Even if you can hear to 20khz it's natural for your ears to loose sensitivity at higher frequencies* and it's normal for speakers/transducers to have lower-output at higher audio frequencies.    If the specs for a speaker say 50Hz to 20kHz +/- dB, that means it's 3dB down at 50Hz and 20kHz.   If they don't give a +/-dB spec, it's worse than that (and the specs are meaningless).   If the specs say 100Hz to 18kHz +/-3dB, it's more than 3dB down above 18kHz.


* See Equal Loudness Curves.  

Go Up