The input given to Piezo Speaker is an analogue signal or digital signal?

Hello, I want to ask the input given to this Piezo speaker is an analogue signal or digital signal? This is because I am using digital output pin of Arduino Uno board to connect this speaker, is that okay?

Besides, if this speaker require an input analogue signal, then should I use Digital to Analogue Converter where convert the digital output pin of Arduino into analogue signal first and then feed to speaker?

The diagram of the connection between Arduino and speaker is shown in this attachment.

Thanks for helping.

There are two kinds.

Speakers/transducers require an AC signal*. It can be a square or rectangular wave from a digital output, or a "true analog" signal. The circuit you've show with an LM386 analog audio amplifier requires that.

PWM is an "analog approximation", so you can use that too. (You are not going to get high-quality music from the Arduino's PWM, but you aren't going to get high-quality music from a piezo speaker either.)

A piezo "buzzer" has the sound-generating circuit built-in and it makes a noise by itself when you apply power.

  • It needs an AC (changing) signal in the audio range to vibrate the transducer, which in-turn vibrates the air, making sound. Piezos (like anything small) don't put-out useful amounts of lower frequencies (i.e. bass). They are basically useful as tweeters working at around 2kHz or more.

Dear DVDdoug,

Thanks for helping. :slight_smile: