3

I'm looking for a solution to drive simultaneously 10 piezo buzzer from teensy. I'm aware about the limitations of the number of internal timers so I'm looking for an external chip that would enable the control of 10 piezzo buzzer independently and simultaneously.

I want to generate up to ten frequencies using piezo buzzers and a micro controller.

I see some I2C PWM drivers such as MAX7313 or PCA9685 but I'm not sure how they would act for piezzo such as the following: https://docs-emea.rs-online.com/webdocs/1581/0900766b815811a0.pdf

Any idea of a way to achieve that ?

  • 1
    Do you want individual and all or any combination? – Oldfart Nov 24 '18 at 17:42
  • Any combination. – xavier.seignard Nov 24 '18 at 17:46
  • I would have to look into the details but I would use one timer for a common oscillating power. (May need a PFET for more power) Then connect the other end of the buzzers to an individual pin to pull low. They would all have the same freq. though! – Oldfart Nov 24 '18 at 17:49
  • Thanks, nice suggestion. That's what I have for now, but I want to be able to set frequencies individually to each buzzer. – xavier.seignard Nov 24 '18 at 17:54
  • 3
    Then write that in your question: "I want to generate up to ten frequencies using piezo buzzers and a micro controller." (Don't mention Arduino). But beware that you have to work out more as this forum is not a design house. – Oldfart Nov 24 '18 at 18:02
  • Thanks for the advice. I know this is not a design house, if I'm asking here it's because I couldn't find a solution by myself. This is the purpose of stack exchange, right? – xavier.seignard Nov 24 '18 at 18:06
  • Are you happy to find your own solution if the task was to drive only one piezo buzzer? If not then say so and make this clear in your question. – Andy aka Nov 24 '18 at 18:35
  • Si5351 offer 8 simultaneous outputs (each with different frequency). Low-voltage CMOS outputs, so you'd need an amplifier/driver for each piezo. A microcontroller with I2C is needed to control it. – glen_geek Nov 24 '18 at 18:54
  • 1
    The buzzer you reference is an internal drive type, you want external drive types if you want to control the frequency.Note that most piezo devices have a relatively narrow (audible) frequency range often 1KHz-4KHz. If you want a large frequency range then you're looking at something a bit more complicated. google "sonitron" for more info on all that. – user201365 Nov 24 '18 at 19:15
  • Not all Teensies are created equally; some have more than 10 timers, and some timers can have several PWM outputs. Which one do you use? – ocrdu Sep 18 '20 at 10:11

2 Answers2

1

First: For audio frequencies, you could just check whether it's time to turn on/off by checking the microsecond clock for each of the ten pins, in a tight loop. There's enough "oomph" in the Teensy that the signal will be reasonably clean enough compared to the shitty frequency response of most piezo elements, even if you do some limited communications. (Especially if you split up any protocol parsing to be one byte per iteration through the loop.)

Second: Typically you drive a Piezo with a 1K resistor across the terminals, and tie one terminal to your positive supply, and the second terminal to a small signal transistor. A BS170 / 2N7001 would be fine, and is easy to drive from the Teensy's pins. Do not drive the piezo directly from the MCU, because if something vibrates the piezo, it will generate a voltage, which may be high enough to destroy the MCU pins! (The BS170 can take up to 60V, by comparison.)

Third: Even the PWM controllers are sensitive to overvolt, so vibration/knocking on the piezo would destroy them, too. Thus, even if you use a PWM controller (a PCA9685 would totally work to generate 10 parallel PWMs) you should buffer the output as described above.

Here's a typical driving circuit. Adjust it for whatever your driving voltage and current is -- could be up to 20V for your particular part, and it takes 8 mA current.

enter image description here

Jon Watte
  • 5,650
  • 26
  • 36
0

You cannot control the frequency of those buzzers. They produce a single frequency somewhere from 2300Hz to 3300Hz like a smoke detector. Instead you need a piezo transducer that can be driven from your own oscillator but their frequency response is all over the place so some frequencies will be loud and other frequencies will barely be heard.

Audioguru
  • 3,894
  • 5
  • 8