Search code examples
raspberry-piraspbiangpiobeeptransducer

Using Raspberry Pi to produce 'beep' through piezo transducer


I'd like to use my Raspberry Pi to produce a brief, high-pitched (and preferably loud) 'beep' through a piezo transducer.

I tried connecting the + of the transducer to a GPIO pin (and the -ve to GND), and making the pin go high briefly. This worked, but it's more of a very quiet click rather than a loud beep.

Does anyone know how to produce a beep?

Thanks!


Solution

  • the raspberry pi os connected straight to the piezo, no amplifier?

    1. Make sure the gpio can output the power required by the transducer.

    2. Try toggling the gpio at a frequency in our hearing range, somewhere between 20Hz to 20KHz.