1

Can normal buzzer be used for generating high frequency audio and if this is possible then can normal microphone module be able to detect the same frequency range(15 kHz - 20 kHz).

Here is the specifications of this buzzer:-

Rated Voltage : 6V DC
Operating Voltage : 4 to 8V DC
Rated Current* : ≤30mA
Sound Output at 10cm* : ≥85dB
Resonant Frequency : 2300 ±300Hz
Tone : Continuous
Operating Temperature : -25°C to +80°C
Storage Temperature : -30°C to +85°C
Weight : 2g
*Value applying at rated voltage (DC)

Buzzermicrophone-module

astrick
  • 83
  • 1
  • 7
  • 1
    That depends entirely on the response range of the transducers in question. Read the datasheets. – Majenko Jan 12 '21 at 11:58
  • I am asking about cheap piezo buzzer – astrick Jan 12 '21 at 12:00
  • @astrick Please provide more information. For example a link to the product. Do you have just the piezo itself? We cannot really say much without knowing the product. Otherwise you would need to just test it. "Normal" microphones should also have a statement about the frequency range in their documentation. Otherwise again you would need to test yourself. – chrisl Jan 12 '21 at 12:06
  • Piezo transducers have a resonant frequency, *specified in the datasheet*. – Majenko Jan 12 '21 at 12:11
  • @Majenko this is having resonant frequency of 2300. Can it transmit more than that? – astrick Jan 12 '21 at 12:25
  • Only at very low efficiency, i.e, very quietly. – Majenko Jan 12 '21 at 12:26
  • @astrick Are you sure, that this is a passive buzzer (which is directly driven by an AC signal)? The "Rated voltage: 6V DC" suggest, that it already sounds, when you apply just the 6V DC. That would mean, that it is an active buzzer, which creates the sound frequency itself. You cannot drive such a buzzer with your own frequency. You can test this, if you connect it to the 5V of the Arduino. It it sounds continuously in that case, it is an active buzzer – chrisl Jan 12 '21 at 13:17
  • @chrisl Thanks for sharing this information. So that means I need to purchase a passive buzzer? – astrick Jan 12 '21 at 13:21
  • For 20kHz you need to buy a piezo transducer with a 20kHz resonant frequency. – Majenko Jan 12 '21 at 13:59
  • 1
    What exactly is it you are trying to achieve? – Majenko Jan 12 '21 at 14:08
  • @Majenko I want to transmit 20kHz sound and then receive it using microphone – astrick Jan 13 '21 at 05:00
  • No, that's what you *think* to want to *do*. Not what you want to *achieve*. *Why* do you want to transmit and receive 20kHz sound? – Majenko Jan 13 '21 at 08:56
  • @Majenko Communication between 2 devices which we cannot hear – astrick Jan 13 '21 at 13:01
  • @astrick Then you want a pair of matched ultrasonic transducers, an amplifier / driver circuit and modulator circuit, and a band-pass filter / demodulator circuit. Not a speaker and a microphone. – Majenko Jan 13 '21 at 14:14

2 Answers2

2

An arduino is very well capable of producing a 20KHz signal. You can use a PWM signal on one of the PWM pins, generate the signal by alternating a pin high and low with a few microseconds in between or you can use a buzzer with an input signal that can play a continuous tone at a specified frequency. I really can't see if the module you show can generate a tone based on the input.

Detecting a tone, however is somewhat difficult. You need an analog microphone amplifier, an ADC (analog-to-digital-converter) and some processing to detect a frequency in the signal data.

The usual microphone modules that are sold for arduino's are mostly just noise detectors and generate a signal when loud noise is present.

Hacky
  • 119
  • 4
  • Note that the PWM frequencies on the UNO are only 490 or 980 Hz, so the normal digitalWrite() approach won't work. If you are going to "roll your own" PWM as suggested, you can use any output. The built-in ADC will work fine, but it uses 0-5 VDC range. You can make a simple circuit to convert an amplified AC signal to this range. See – Boggyman Jan 13 '21 at 13:51
  • thanks Boggy, I completely missed the internal ADC. Because of the way that the ADC probably works internally, I doubt that you can sample this at more than 10kHz. We need at least 40 kHz to detect a 20kHz signal. – Hacky Jan 13 '21 at 14:21
  • Hacky, the DaquinOscope that I mentioned can do burst sampling (1024 samples) at over 1 MHz for single-channel and over 47 kHz for 2 channels at 8 bits, and only slightly slower for 10 bits. But you are correct if you are talking about interrupt-driven sampling, which tops out around 30 kHz. – Boggyman Jan 14 '21 at 14:36
0

As others have noted, the frequency range of the buzzer is given in the data sheet. This is a mechanical property, like the tone of a bell; you can't change it electrically. So if you really need to generate high frequency audio, you need a different type of device. Something like a speaker whose output is controlled by its input signal. You don't mention what you are planning on using this for, which might make a difference in your options. There are inexpensive piezo tweeters that work in this range, but they typically have very ragged frequency responses. Actually, most transducers in this range do, but dynamic types tend to be better, though more expensive and less efficient.

If you want to generate controllable high frequencies with Arduino, you might want to look at my open-source DaqPort sketch. This is intended to be controlled by a computer over USB and includes data acquisition as well as generation, but the oscillator portion can run as a stand-alone. The sketch is included with my Daqarta software, which is free for Arduino use. Daqarta includes the Arduino_Oscillators mini-app, which is described here: https://www.daqarta.com/dw_rrss.htm The oscillators are also used by the DaquinOscope mini-app https://www.daqarta.com/dw_rrss.htm which does simultaneous acquisition, but it uses the computer for display so it's not stand-alone.

Microphones should not be a problem; many inexpensive electrets can handle this range. But we really need to know more about your plans.

Boggyman
  • 615
  • 1
  • 3
  • 4
  • Can I use this [microphone](https://www.amazon.com/MakerHawk-Microphone-Amplifier-GY-MAX4466-Adjustable/dp/B07PVHTZT3/ref=sr_1_4?dchild=1&keywords=electret+microphone&qid=1610543081&sr=8-4) for this ? – astrick Jan 13 '21 at 13:05
  • Astrick, I can't tell from those specs, which talk only about the preamp bandwidth and not the mic itself. The photo shows a mic on the board, but never mentions it at all. If you buy this and it won't go as high as you need, you might be able to replace the mic capsule. You can get these at places like Digi-Key. Make sure you get omnidirectional for the flattest response; directional mics have terrible responses. – Boggyman Jan 14 '21 at 14:43