Driving a piezo speaker - Page 1
Forum section: electronics / projects

author: yiancar
author_rank: Contributor
timestamp: April 23, 2013, 04:02:46 pm
content: 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.htmlandhttp://www.seekic.com/uploadfile/ic-circuit/201294202153332.jpghowever I dont know where to search for such transformers. Do i need to make my own?Regards,Yiangos

author: jebcom
author_rank: Regular Contributor
timestamp: April 23, 2013, 05:02:53 pm
content: What type of piezo speaker do you have?Do you have specifications such as drive voltage?

author: yiancar
author_rank: Contributor
timestamp: April 23, 2013, 06:24:10 pm
content: http://cy.rsdelivers.com/product/rs/abi-022-rc-rs/buzzer-pcb-continuous-tone-12vdc-100db/7243178.aspxI 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

author: Christe4nM
author_rank: Unknown
timestamp: April 23, 2013, 08:53:56 pm
content: See the last page ofthisTDK 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.

author: hlavac
author_rank: Frequent Contributor
timestamp: April 23, 2013, 09:21:35 pm
content: 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.

author: yiancar
author_rank: Contributor
timestamp: April 24, 2013, 02:45:51 am
content: My power source is 9v, any easy way to up it up to 15?

author: ftransform
author_rank: Frequent Contributor
timestamp: April 24, 2013, 04:15:07 am
content: Use a UJT!

author: hlavac
author_rank: Frequent Contributor
timestamp: April 24, 2013, 08:23:24 am
content: Quote from: yiancar on April 24, 2013, 02:45:51 amYou can make a simple boost converter with for example MC34063A

author: codeboy2k
author_rank: Super Contributor
timestamp: April 24, 2013, 10:11:17 am
content: Quote from: hlavac on April 24, 2013, 08:23:24 amThat 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_pumpFrom 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.

author: yiancar
author_rank: Contributor
timestamp: April 24, 2013, 01:02:19 pm
content: can someone explain the circuits i posted in the first post?

author: hlavac
author_rank: Frequent Contributor
timestamp: April 24, 2013, 01:05:42 pm
content: I don't think charge pump will work very well, 15mA/15V IS a lot for thatQuote from: yiancar on April 24, 2013, 01:02:19 pmThese 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.

author: codeboy2k
author_rank: Super Contributor
timestamp: April 24, 2013, 01:59:28 pm
content: 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 totalhttp://www.linear.com/product/LTC1983That's impressive!

author: yiancar
author_rank: Contributor
timestamp: April 24, 2013, 02:52:37 pm
content: if i go with the step up solution, would the frequency matter?

author: jebcom
author_rank: Regular Contributor
timestamp: April 30, 2013, 05:42:11 am
content: QuoteIf 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.

author: jebcom
author_rank: Regular Contributor
timestamp: April 30, 2013, 06:08:38 am
content: 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.

author: yiancar
author_rank: Contributor
timestamp: April 30, 2013, 03:23:57 pm
content: Quote from: jebcom on April 30, 2013, 05:42:11 amcould you please show me where i can buy a rigid piezo element? its impossible for me to find one at my usual places

author: jebcom
author_rank: Regular Contributor
timestamp: April 30, 2013, 05:51:12 pm
content: Quote(Search term: "piezoelectric audio transducer")At Mouser:http://www.mouser.com/_/?Keyword=pui+audio+piezoelectric&FS=Truehttp://www.mouser.com/Electromechanical/Audio-Devices/Speakers-Transducers/_/N-awp4u?Keyword=mallory+audio+piezoelectric&FS=TrueI 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/25R0846Be 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=122I 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/988Other links:http://www.endrich.com/en/55515/piezoelectric+sound+generators+(transducers+and+buzzer

author: ConKbot
author_rank: Super Contributor
timestamp: April 30, 2013, 06:26:49 pm
content: 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.

author: yiancar
author_rank: Contributor
timestamp: May 01, 2013, 06:39:02 am
content: 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

author: yiancar
author_rank: Contributor
timestamp: May 05, 2013, 04:19:02 pm
content: bump

author: jebcom
author_rank: Regular Contributor
timestamp: May 05, 2013, 04:25:46 pm
content: 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?

author: yiancar
author_rank: Contributor
timestamp: May 05, 2013, 06:50:11 pm
content: what you mean is that i can only produce one frequency? (the one that the piezo oscillates by its self?)

author: jebcom
author_rank: Regular Contributor
timestamp: May 05, 2013, 07:19:38 pm
content: 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.