This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Driving a PIEZO Buzzer using nRF52840

Hi All,

If I am to use a Piezo Buzzer to generate sound using nRF52840 PWM:

1. any suggestion on how to design the circuitry?

I am planning to use a Murata cimponent

 https://www.mouser.in/datasheet/2/281/7BB-20-6L0-792753.pdf

or

https://www.mouser.in/datasheet/2/670/cpt-3526-l100-1778018.pdf

2. Should I have a external driving circuit?

3. If so any suggestions on a driving chip?

Thanks a lot!

Parents
  • You can drive the piezo directly from 2 i/o port pins on the nRF52 in differential mode which acts like a full H-Bridge circuit without requiring external components. The volume is not great but can be improved by strategically placing the piezo on an acoustic resonant chamber - as with many small electronic devices, worth taking one apart to see. The PWM peripheral simplifies the driving. Here's an example midi-piano. There are some other examples which allow PWM sound file playback, worth a search on this forum.

    If you want to blast more sound out, have a look at the Thingy-52 circuit on how-to-generate-music-with-pwm

  • Hi Hmolesworth,

    Many thanks for the reply.

    Do you mean, in nRF52840, I can directly use GPIO pins with PWM without having an external H-Bridge circuitry?

    I was checking the Thingy-52 design schematic and in there, they use an external H-Bridge circuit along with an amplifier. Any idea why they used this approach?

    I also came across this piezo driver, https://www.mouser.in/datasheet/2/115/PAM8904Q-1594729.pdf. Any ideas about using this chip?

    Thank a lot!!

  • Yes you can directly use GPIO pins with no external driver. If that gives insufficient volume then an external driver such as the one you note allows a higher drive voltage giving more volume, so it just depends on how loud it has to be. The GPIO pins can also be set to high drive (H0H1) but with some piezos that makes little difference as the piezo presents very little load to the pins (the piezo is capacitive, not resistive). Mounting of the piezo is the critical part, since a resonant cavity boosts the volume. Crank a Music Box shaft in free air and the sound created is quiet; place it on a desk surface (which acts as a resonant cavity) and the sound booms out

Reply
  • Yes you can directly use GPIO pins with no external driver. If that gives insufficient volume then an external driver such as the one you note allows a higher drive voltage giving more volume, so it just depends on how loud it has to be. The GPIO pins can also be set to high drive (H0H1) but with some piezos that makes little difference as the piezo presents very little load to the pins (the piezo is capacitive, not resistive). Mounting of the piezo is the critical part, since a resonant cavity boosts the volume. Crank a Music Box shaft in free air and the sound created is quiet; place it on a desk surface (which acts as a resonant cavity) and the sound booms out

Children
Related