Shop OBEX P1 Docs P2 Docs Learn Events
How to get louder beep on Piezo? — Parallax Forums

How to get louder beep on Piezo?

T ChapT Chap Posts: 4,223
edited 2014-04-17 08:38 in Propeller 1
On some designs I have relied on the Piezo object or modified versions for beep outputs using different frequencies. I use an LM386 to produce a robust signal that is quite a bit louder than a direct Prop pin. The cost is not really an issue but in some cases the real estate is, 386 + large 330uF. Does anyone have any tricks that would use a smaller footprint for the boost section? I always have 5V on the boards, so what about a 2222 or 3904 for gain?
«1

Comments

  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2012-11-11 06:50
    If you have two pins then try push/pulling each end differentially?
  • T ChapT Chap Posts: 4,223
    edited 2012-11-11 06:53
    I cannot spare another pin.
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2012-11-11 07:09
    TDA7052 instead of LM386?? Also if it is a piezo, do you need such a large cap??
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-11-11 08:24
    I generally use a 3904 for piezos.

    I found a schematic on the forum for use a transistor with a piezo. Here's a modified version of the schematic:
    Vin(+5.0V)
                               Piezo Speaker
                              │ ┌───┐                                 
                              └─┼‣┼─┐     
                                └───┘ │                          
     Header#_MainBuzzerPin ─────── 2N3904              
                                 10KΩ │
                                      │
                                      
                                     Vss
    

    The original schematic included a 1K resistor across the speaker pins. I don't know what the purpose of the extra resistor but I though the piezo sounded the same with or without the extra resistor so I leave it off.

    I think the 10K resistor could probably be reduced to somethink like 3K (I don't recall if a lower value resistor on the base changes the volume).

    I'm sure you're aware that piezos have ceratain frequencies where they are louder than other frequencies.
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2012-11-11 09:06
    Hi Toby;
    TDA7052 instead of LM386?? Also if it is a piezo, do you need such a large cap??
    I assume the 330uF is in series with the Piezo device.
    In this case you don't need any capacitor at all.

    Duane J
  • Heater.Heater. Posts: 21,230
    edited 2012-11-11 09:10
    I'm wondering if we need electronics to make the beeper louder. No idea what beeper you using but perhaps adding a horn to it will get you more noise. Old gramophones, claxons, trumpets and many other musical instruments use a horn to match the acoustic impedance of the sound source to the air for maximum effect. I know at least one guy who was involved in designing little plastic horns for piezo alarms many years ago.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-11-11 09:25
    It is all about watts. If you want loud, use a 5 watt 8 ohm speaker driven by a TIP120 Darlington. It may not be low-passed filtered to produce something nice, but it will be loud.

    Take a look at the piezoelectric speaker documents. How many watts will is really output? Not even 1 watt?

    You might add a 10K pot for volume control as this is LOUD!
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2012-11-11 09:32
    Hi Duane;

    That circuit will not output any sound at all without a resister across the Piezo device. (Except for an initial click.)
    Essentially it looks like a capacitor. Once it is charged, the click thing, no more current can flow.
    The resistor discharges the Piezo when the transistor is off.

    Duane J
  • prof_brainoprof_braino Posts: 4,313
    edited 2012-11-11 09:41
    Don't know if this is an option, but I remember that a physically smaller piezo is louder. Of course, the resonant frequency also goes up on a smaller device. This might only be significant in ultrasonic range, I don't remember the details.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-11-11 09:57
    Differential drive from the 5V level could really make a difference. Something like the Micrel MIC4225 driver chip, 8 pins, one inverting and one non-inverting section. Tie both inA and inB together to one Prop pin, 3.3V compatible. OutA and outB to two sides of the piezo for 9V peak to peak drive.
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2012-11-11 10:14
    This is essentially what you are looking for... the circuit was designed for 5V operation, so the resistors should be scaled accordingly... See #3 and #4

    http://forums.parallax.com/showthread.php?62310-Amplifying-piezo-speaker&p=466534&viewfull=1#post466534


    Top of thread:
    http://forums.parallax.com/showthread.php?62310-Amplifying-piezo-speaker&p=464410&viewfull=1#post464410
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-11-11 10:19
    Be sure that the device is really a piezo, and not magnetic. (measure its resistance!) Leaving voltage across a piezo may not be a problem, but with magnetics you would definitely need that capacitor or a bridge circuit.

    There are BTL (bridge tied load) audio power amplifiers that would be a much better bet than the LM386, because they do not require the output capacitor to drive a magnetic speaker. For example, the TDA7052A is a 1W BTL audio amp, available in DIP8 or SOIC8.
  • T ChapT Chap Posts: 4,223
    edited 2012-11-11 11:14
    Tracy, I do have those TDA parts on hand and have used it on small speakers, it is a nice part.

    http://www.digikey.com/product-detail/en/SMT-0825-S-2-R/668-1067-1-ND/1464934

    Interestingly, I have never really paid attention to the type of buzz I am using until today, it is magnetic. Sorry that I have claimed it to be a piezo earlier.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-11-11 15:04
    Even the TDA7052s are a bit dated but they are vastly superior to those ancient LM386s which still seem to circulate in hobby designs. The newer class D chips are even better though.

    Here's a design tip if you are using piezos rather than a magnetic speaker. If it is a piezo element in that it needs an external circuit to drive it then you can use a MAX232 chip or equivalent to drive it differentially. Basically you end up with 18Vp-p drive and one of the receivers can be used as an inverter so that you can run this from a single Prop I/O using a counter or software.
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2012-11-11 15:06
    Nice Peter!
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-11-11 15:10
    Another option for Piezos is to put an inductor in parallel with the Piezo, sized so that the inherent capacitance of the piezo and the inductor resonate at the resonant frequency of the piezo, and drive it open-collector at that frequency. That way, you can actually get >10v p-p out of a 5v supply, since as it resonates, the voltage will keep going up until the power being added to the circuit is equal to the power leaving the piezo.

    The other option is to put said inductor in series with the piezo, and drive it full-wave. Then the voltage will really boost up.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-11-11 17:24
    T Chap, if it is magnetic, it will definitely require a driver suited to the low DC impedance. Most of the discussion so far does focus on the piezo with its high DC impedance.

    There was an EDN design idea recently for making a mosfet bridge to drive piezo sounders.

    The piezo bender disks in smoke alarms are coupled to a horn and of course they are rather loud. They are usually driven at self-resonance in bridge mode by a circuit that consists of a couple of inverters. You can see the circuit in data sheets for smoke alarm chips like the 5366.

    Peter, I've tried the MAX232 circuit with 40kHz piezos but was disappointed with the results. It simply took too much current to drive it at 40kHz and the '232 charge pump couldn't keep up. It might be different at low audio and with musical material that has lower RMS demand.

    With differential drive, though, I can attest that the inductor in series makes a big difference. With a 40kHz piezo, it takes in the neighborhood of 8 mHy.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-11-12 04:50
    MAX232 for audio! That certainly has panache! A nice big jump in output voltage.

    I have felt for a long time that all these teenie-tiny audio amplifier chips were a rather silly as you still are locked into +5V or less output unless you commit to a dual supply.
  • kolouchkolouch Posts: 1
    edited 2013-09-03 00:53
    Why not to try solution called Push-pull circuit. Wikipedia will help ...
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2013-09-03 08:45
    kolouch,


    Welcome to the Forum!!!



    A push pull is essentially the same as a differential drive to create a larger voltage swing to the piezo crystal, however you are limited to your supply voltage with the push pull circuit.

    Using a MAX232 increases the voltage drive to 18Vp-p due to an internal charge pump within the MAX232.
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2013-09-04 13:00
    A series inductor will work quite well if you're at the right frequency.

    Go to this circuit to see it in action.

    If that link doesn't work, go [URL=]here[/URL] and on the new window, go to File->Import and type:
    $ 1 5.0E-6 10.20027730826997 50 5.0 50
    R 304 176 224 176 0 2 23200.0 5.0 0.0 0.0 0.5
    l 304 176 368 176 0 1.0E-4 -1.2383080346917208
    r 368 176 368 240 0 5.0
    c 368 240 368 272 0 4.6999999999999995E-7 0.1368459609754298
    g 368 272 368 288 0
    w 368 176 448 176 0
    p 448 176 448 272 0
    g 448 272 448 288 0
    o 0 64 0 35 5.0 1.6 0 -1
    o 6 64 0 34 20.0 9.765625E-5 1 -1
    
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2013-09-04 13:12
    Circuitsoft,

    You don't want to drive that directly off of an I/O, that circuit pulls over +/- 1 Amp of current.

    Piezo.jpg
    1024 x 819 - 70K
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2013-09-04 14:12
    Circuitsoft,

    You don't want to drive that directly off of an I/O, that circuit pulls over +/- 1 Amp of current.

    Piezo.jpg
    Yes, but power drivers that can drive +/- 1 amp at their own rails are easier to get/find than charge pumps that can also drive +/- 1 amp.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2013-09-04 17:46
    A dead thread revival!

    We may be talking a couple of different kinds of piezo. A beeper/transducer will take considerably less current than a mechanical actuator or a cleaning tank or something like that. A typical ultrasonic air transducer will have an impedance at resonance of around 500Ω, so with 10V excitation it will need 20mA current.

    I've used inductors in series with resonant ultrasonic transducers in order to improve the output. The voltage applied to the transducer increases at best around 20%, but there can be an nice increase of about 20% in bandwidth too.

    The best easy results for loudness I've found come from a transformer. Xicon (Mouser) makes mini audio transformers, one with 100Ω CT primary and secondary. I hook 1/2 the primary (50Ω) to bridged microcontroller or driver pins, and the full secondary (100Ω) to the piezo. That gives a solid 4x power boost.

    I don't know, a MAX232 might have trouble providing 20mA at the peaks. Maybe with all 1µF capacitors for the charge pump. The MAX232 specs are geared to providing at least ±5V into a 3000Ω load.
  • T ChapT Chap Posts: 4,223
    edited 2013-09-04 17:59
    Sure brings back memories when you see your old threads.

    I went with the LM386, kicks butt and I can hear the thing across the room. The loud beep is used on a system where I program in various patterns/frequencies that allow me to hear what is happening over a phone while someone is in the field programming the system.

    Here is the magnetic buzzer. On some applications where loudness is not a problem I drive it direct with the Prop!

    http://www.digikey.com/product-detail/en/SMT-0825-S-2-R/668-1067-1-ND/1464934
  • tonyp12tonyp12 Posts: 1,951
    edited 2013-09-04 18:14
    Audio Amplifier Class H
    http://www.mouser.com/_/N-scv7?Keyword=Haptic+Piezo&Ns=Pricing%7c0&FS=True
    They are (maybe too) tiny, but you said real estate is at a premium.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2013-09-04 19:06
    Sorry if I laugh at whenever LM386 is mentioned as it's not really a compact (big caps) or powerful solution (to get only 1W you need 16V supply with 32ohm load) although this chip was king back in the 70's and early 80's (that's over 30 years ago!!!). These old chips are horse and buggy in the 21st century and you must be Amish to think about using them in new designs :)

    However this old thread title was about piezos, not magnetic speakers, so it's totally different. Also inductors need drivers and my suggestion is one that I have used and it's cheap and small, one tiny TSSOP16 chip and a tiny capacitor array works noisy wonders with piezos.

    @tonyp - Class H BTW is Haptic, not really audio (but interesting)
  • T ChapT Chap Posts: 4,223
    edited 2013-09-04 19:12
    HA! Well I know a loud beep when I hear one, ancient or not. :)
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2013-09-04 21:25
    Hmmm.... Just thinking out loud (no pun) .... Is a contest in order? .... to see who can be "heard" the farthest away audibly from a 3.3V micro controller? Some standards should be set on an audible agreed receiver and allowed frequency range you can send a "beep". An agreed piezo transducer should also be decided. The transmitter circuitry is free game, anything goes, how far away can you be detected?

    Judging should be done on power efficiency and overall design.
  • hydronicshydronics Posts: 2
    edited 2013-11-05 16:57
    I figured it out how to make a Piezo loud after way too long tinkering with this issue! You can use 5V and you get a ton of noise.. The trick is to add an Auto-transformer to the circuit that you can get at the dollar store. I made an instructable on it here:


    http://www.instructables.com/id/How-to-make-an-Arduino-driven-Piezo-LOUD/


    If anyone can identify this dollar store part on Mouser, that would be cool. cheers, tom


    specs: Pin-1/2 ~154 ohms Pin 2/3 ~ 8ohms. Not sure on the inductance although a similar project used 91mH and 2mH as shown on the instructable.
Sign In or Register to comment.