Author Topic: Driving a piezo speaker  (Read 26336 times)

0 Members and 1 Guest are viewing this topic.

Offline yiancarTopic starter

  • Contributor
  • Posts: 34
Driving a piezo speaker
« on: April 23, 2013, 04:02:46 pm »
Hello guys I would like to Drive a piezo speaker using an arduino.
I have found some examples like : http://www.imagesco.com/articles/piezo/piezo10.html and http://www.seekic.com/uploadfile/ic-circuit/201294202153332.jpg  however I dont know where to search for such transformers. Do i need to make my own?

Regards,
Yiangos
 

Offline jebcom

  • Regular Contributor
  • *
  • Posts: 81
  • Country: us
Re: Driving a piezo speaker
« Reply #1 on: April 23, 2013, 05:02:53 pm »
What type of piezo speaker do you have?
Do you have specifications such as drive voltage?
 

Offline yiancarTopic starter

  • Contributor
  • Posts: 34
Re: Driving a piezo speaker
« Reply #2 on: April 23, 2013, 06:24:10 pm »
http://cy.rsdelivers.com/product/rs/abi-022-rc-rs/buzzer-pcb-continuous-tone-12vdc-100db/7243178.aspx

I am using a 9v battery. I want the piezo to be really loud, I have tested it with my bench psu and i found it satisfactory at around 30v
 

Offline Christe4nM

  • Supporter
  • ****
  • Posts: 252
  • Country: nl
Re: Driving a piezo speaker
« Reply #3 on: April 23, 2013, 08:53:56 pm »
See the last page of this TDK data sheet. I wanted to test a few piezo buzzers and used that schematic. Tried several drive signals like square, triangle and sine wave. Note that the waveform must be symmetrical i.e. 50% duty cycle for the square wave.

Use a PWM signal from your microcontroller to drive the BJT. By increasing the external voltage (VCC) that drives the speaker/buzzer it will increase in volume. Take care not to go beyond the buzzer's maximum voltage.
 

Offline hlavac

  • Frequent Contributor
  • **
  • Posts: 536
  • Country: cz
Re: Driving a piezo speaker
« Reply #4 on: April 23, 2013, 09:21:35 pm »
30V is too much, you will kill internal driver electronics!
They say max power supply 15V.

There is nothing to drive on this piezo siren, it has built in driver, just give it power supply (5-15V)!
For Arduino control simple NPN BJT like BC547C will do. Connect base thru 10k resistor to arduino pin.
Emitor to GND.
Collector to your siren (negative), other end of siren to +15V power rail.
Set pin to high to turn on beep.
Good enough is the enemy of the best.
 

Offline yiancarTopic starter

  • Contributor
  • Posts: 34
Re: Driving a piezo speaker
« Reply #5 on: April 24, 2013, 02:45:51 am »
My power source is 9v, any easy way to up it up to 15?
 

Offline ftransform

  • Frequent Contributor
  • **
  • Posts: 728
  • Country: 00
Re: Driving a piezo speaker
« Reply #6 on: April 24, 2013, 04:15:07 am »
Use a UJT!
 

Offline hlavac

  • Frequent Contributor
  • **
  • Posts: 536
  • Country: cz
Re: Driving a piezo speaker
« Reply #7 on: April 24, 2013, 08:23:24 am »
My power source is 9v, any easy way to up it up to 15?

You can make a simple boost converter with for example MC34063A
Good enough is the enemy of the best.
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: Driving a piezo speaker
« Reply #8 on: April 24, 2013, 10:11:17 am »
My power source is 9v, any easy way to up it up to 15?

You can make a simple boost converter with for example MC34063A

That buzzer needs such a low current (15mA) that I would just use a charge pump.  A full boost converter is perhaps overkill.

If this project has two free I/O pins on the Arduino available, then you can alternate those two pins in about a 90% duty cycle, to pump the 9V up to 15.3V or so.

https://en.wikipedia.org/wiki/Charge_pump

From the circuit on that wiki page, use two Arduino pins in place of the buffer/invertors, and alternately source and sink current into small valued capacitors. I don't know how much the Arduino can source and sink, but it can probably do up to 20-25 mA ... since people use them for LED blinky things alot. But you should check to be sure you don't exceed the Arduino's current limits on the pins doing this. If there is a risk of exceeding the Arduino's current source and sink limits, then you need to use external buffer drivers as shown on the wiki page.



 

Offline yiancarTopic starter

  • Contributor
  • Posts: 34
Re: Driving a piezo speaker
« Reply #9 on: April 24, 2013, 01:02:19 pm »
can someone explain the circuits i posted in the first post?
 

Offline hlavac

  • Frequent Contributor
  • **
  • Posts: 536
  • Country: cz
Re: Driving a piezo speaker
« Reply #10 on: April 24, 2013, 01:05:42 pm »
I don't think charge pump will work very well, 15mA/15V IS a lot for that

can someone explain the circuits i posted in the first post?

These are drivers for different type of piezo sirens than you have, ones that need to be driven by high voltage square wave of the correct frequency.
They use step up transformers to turn low voltage/high current square wave into high voltage/low current one.
« Last Edit: April 24, 2013, 01:22:49 pm by hlavac »
Good enough is the enemy of the best.
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: Driving a piezo speaker
« Reply #11 on: April 24, 2013, 01:59:28 pm »
a charge pump should be able to handle it. It's not the voltage that is a problem for a charge pump, but it's the current. And 15mA is not that bad.

RS232 driver chips can pump 5V up to 12V at 25mA.  So I think 15V@15mA could work. 

This one can do 3V @ 100mA, for 300mW total http://www.linear.com/product/LTC1983

That's impressive!




 

Offline yiancarTopic starter

  • Contributor
  • Posts: 34
Re: Driving a piezo speaker
« Reply #12 on: April 24, 2013, 02:52:37 pm »
if i go with the step up solution, would the frequency matter?
 

Offline jebcom

  • Regular Contributor
  • *
  • Posts: 81
  • Country: us
Re: Driving a piezo speaker
« Reply #13 on: April 30, 2013, 05:42:11 am »
Quote
if i go with the step up solution, would the frequency matter?

If you're referring to the charge pump, the frequency should be set so that you have enough on-time each cycle to fully charge the capacitor. This will depend on the RC time constant: the R being the source impedance of the Arduino output plus any series current limit resistance you choose to use. But understand that the object in this case is to produce a higher DC voltage for that RS Buzzer. It is not a discrete piezo speaker. It is a self-contained buzzer that includes the oscillator and the piezo element. You can assume that they are using the resonant frequency of the piezo element for maximum sound output.

The links that you provided in the first message are for transducers that need to be driven with an audio frequency in order to get sound. This is more complex than just providing DC to the RS buzzer. If the RS Buzzer will do the job for you, then go for that solution.

If you need greater sound level than the RS Buzzer will provide, it will take some work. You would probably want to use a rigid piezo element as in the seekic link. But note that in the schematic, they call it a beeper. It's only a beeper if you provide it with the correct audio frequency signal, though. The rigid elements tend to have a rather sharp resonance; they indicate 3.5 kHz, and this is a common resonant frequency. You will get much greater sound pressure level at the resonant frequency, so you may want to sweep it with a signal generator to make sure you find the best frequency, if it is not specified precisely. (There are also piezo elements with 3 terminals; the 3rd terminal is for feedback, and this is used to make a self-resonating oscillator in which the piezo element itself is actually part of the tank circuit. Properly designed, this circuit will always give you the resonant frequency of the piezo for maximum sound level output. I don't know how easy it is to find one of these elements, though.)

The piezo film speaker in the other link is a different kind of device. It probably has a wider frequency response, and it may not be capable of the same sound pressure level as the rigid piezo element because the film speakers don't have the sharp resonance. I'm guessing this would not be your best choice if your goal is a high sound pressure level.
 

Offline jebcom

  • Regular Contributor
  • *
  • Posts: 81
  • Country: us
Re: Driving a piezo speaker
« Reply #14 on: April 30, 2013, 06:08:38 am »
And if you have access to an oscilloscope, this is a good opportunity to get a good understanding of how the charge pump works as you verify the design and operation. Watch the capacitor charge and discharge and verify that everything is working correctly.
 

Offline yiancarTopic starter

  • Contributor
  • Posts: 34
Re: Driving a piezo speaker
« Reply #15 on: April 30, 2013, 03:23:57 pm »
Quote
if i go with the step up solution, would the frequency matter?

If you're referring to the charge pump, the frequency should be set so that you have enough on-time each cycle to fully charge the capacitor. This will depend on the RC time constant: the R being the source impedance of the Arduino output plus any series current limit resistance you choose to use. But understand that the object in this case is to produce a higher DC voltage for that RS Buzzer. It is not a discrete piezo speaker. It is a self-contained buzzer that includes the oscillator and the piezo element. You can assume that they are using the resonant frequency of the piezo element for maximum sound output.

The links that you provided in the first message are for transducers that need to be driven with an audio frequency in order to get sound. This is more complex than just providing DC to the RS buzzer. If the RS Buzzer will do the job for you, then go for that solution.

If you need greater sound level than the RS Buzzer will provide, it will take some work. You would probably want to use a rigid piezo element as in the seekic link. But note that in the schematic, they call it a beeper. It's only a beeper if you provide it with the correct audio frequency signal, though. The rigid elements tend to have a rather sharp resonance; they indicate 3.5 kHz, and this is a common resonant frequency. You will get much greater sound pressure level at the resonant frequency, so you may want to sweep it with a signal generator to make sure you find the best frequency, if it is not specified precisely. (There are also piezo elements with 3 terminals; the 3rd terminal is for feedback, and this is used to make a self-resonating oscillator in which the piezo element itself is actually part of the tank circuit. Properly designed, this circuit will always give you the resonant frequency of the piezo for maximum sound level output. I don't know how easy it is to find one of these elements, though.)

The piezo film speaker in the other link is a different kind of device. It probably has a wider frequency response, and it may not be capable of the same sound pressure level as the rigid piezo element because the film speakers don't have the sharp resonance. I'm guessing this would not be your best choice if your goal is a high sound pressure level.

could you please show me where i can buy a rigid piezo element? its impossible for me to find one at my usual places
 

Offline jebcom

  • Regular Contributor
  • *
  • Posts: 81
  • Country: us
Re: Driving a piezo speaker
« Reply #16 on: April 30, 2013, 05:51:12 pm »
Quote
could you please show me where i can buy a rigid piezo element? its impossible for me to find one at my usual places

(Search term: "piezoelectric audio transducer")

At Mouser:
http://www.mouser.com/_/?Keyword=pui+audio+piezoelectric&FS=True
http://www.mouser.com/Electromechanical/Audio-Devices/Speakers-Transducers/_/N-awp4u?Keyword=mallory+audio+piezoelectric&FS=True

I see Digikey also carries PUI; they might have others as well.

Here's one at Newark, which might be available from Farnell, Element 14, Premier, or whatever they're called in your area:
http://www.newark.com/multicomp/mckpt-g3018-3939/piezo-buzzer/dp/25R0846

Be especially sure to read the data sheets - they give some good information, in particular a frequency response curve showing the resonant peak.

This youtube video looks interesting, but I haven't watched it yet:


This application manual from Murata has some actual circuit application examples for 2-terminal and 3-terminal elements:
www.murata.com/products/catalog/pdf/p15e.pdf
(Search term: "piezoelectric audio transducer drive circuit")

Application note from Challenge Electronics also has drive circuit examples:
http://www.challengeelectronics.com/news/?y=2012&prid=122

I also found this application note from Maxim, although I'm disappointed they don't provide a reference schematic:
http://www.maximintegrated.com/app-notes/index.mvp/id/988

Other links:
http://www.endrich.com/en/55515/piezoelectric+sound+generators+(transducers+and+buzzer
 

Offline ConKbot

  • Super Contributor
  • ***
  • Posts: 1385
Re: Driving a piezo speaker
« Reply #17 on: April 30, 2013, 06:26:49 pm »
A neat trick that IVe seen for driving piezo elements with a square wave (i.e. not for feeding it analog stuff) is using a MAX220. It generates a nice higher voltage supply, and also has a line driver for driving the element.  It makes a + and - 8v rail, making for upto 16v swing, but if you use the 2 transmitter outputs that are on the IC in a bridged fashion (each one driving one lead on the piezo) you can get a 30v swing on the output.  All from 5v, with one chip, and 5 little ceramic capacitors.
 

Offline yiancarTopic starter

  • Contributor
  • Posts: 34
Re: Driving a piezo speaker
« Reply #18 on: May 01, 2013, 06:39:02 am »
with my RS piezo i use a 15 v supply and then a transistor to the arduino. in the arduino I use the Tone () command , is there maybe a better way to do it? the reason i use the Tone() is because i need the 2 frequencies one at about 3500hz and one at about 4000 or 3000 hz
 

Offline yiancarTopic starter

  • Contributor
  • Posts: 34
Re: Driving a piezo speaker
« Reply #19 on: May 05, 2013, 04:19:02 pm »
bump
 

Offline jebcom

  • Regular Contributor
  • *
  • Posts: 81
  • Country: us
Re: Driving a piezo speaker
« Reply #20 on: May 05, 2013, 04:25:46 pm »
I don't understand. The RS piezo takes a DC supply and is a self-contained buzzer (with it's own oscillator.) How does that relate to the tone command?
 

Offline yiancarTopic starter

  • Contributor
  • Posts: 34
Re: Driving a piezo speaker
« Reply #21 on: May 05, 2013, 06:50:11 pm »
what you mean is that i can only produce one frequency? (the one that the piezo oscillates by its self?)
 

Offline jebcom

  • Regular Contributor
  • *
  • Posts: 81
  • Country: us
Re: Driving a piezo speaker
« Reply #22 on: May 05, 2013, 07:19:38 pm »
Yes, the one that operates from a DC voltage is a self-contained buzzer (or beeper, or whatever you would want to call it) with its own built-in oscillator.
As far as I know, the frequency will not change with voltage, but maybe the output level will; I don't know.

If you want to set your own frequency, you will need to get the raw transducer element. Look through the links I provided earlier. Also look at the data sheets, as I mentioned before, they should show you the frequency response curve, and you will see that the resonant peak is a narrow frequency band. The frequencies that you generate will have to be in the range of that peak if you want a significant sound pressure level.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf