Shop OBEX P1 Docs P2 Docs Learn Events
Amplifying piezo speaker — Parallax Forums

Amplifying piezo speaker

StuckStuck Posts: 2
edited 2009-03-19 16:06 in Learn with BlocklyProp
I'm very new to the Basic Stamp and programming world in general.·
I've been going thru the "What's a Microcontroller" book labs.· I would like to know, and get any ideas/clues on how I can amplify the sound from the piezo speaker.· Nothing outrageous, just a way to increase the volume from what I can get from the piezo alone.

Thanks!

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--STucK!

Comments

  • Aristides AlvarezAristides Alvarez Posts: 486
    edited 2004-07-25 23:44
    Usually piezospeakers are conected directly to microcontroller output pins and for that reason they're really easy to use.
    You'll sense an increase in volume when you get closer to their resonating frequency (3kHz to 5kHz).

    When you want more power (at any frequency), the easiest solution is to use a driver (for example, LM386 IC).

    Once you use an amplifier, you'll have to switch from a piezospeaker to a standard speaker.
    (only whe you use a driver as the LM386!!!)

    From a speaker you will obtain better sound quality and also wider frequency response.

    We have an AppMod that will allow you fast testing (if you have a board with AppMod connector; the HomeWork Board doesn't have it):
    http://www.parallax.com/detail.asp?product_id=29143

    You can look at the documentation how to build your own circuit using the LM386 in your prototyping area.
    If you want even more documentation about the LM386, you can visit the manufacturer website:
    http://www.national.com/pf/LM/LM386.html

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Saludos,
    Aristides Alvarez
    Education Manager
    aalvarez@parallax.com
    Parallax, Inc. www.parallax.com
    California, USA
  • Beau SchwabeBeau Schwabe Posts: 6,547
    edited 2004-08-22 00:51
    Hello,

    The "easiest" way to increase the volume right off the bat to a piezo is with the use of an inverter, basically doubling the
    voltage that is supplied to the piezo. Typically when you use a piezo, one terminal is connected to a microcontroller, while
    the other terminal is connected to ground. When the pin goes HIGH, the piezo is deflected in one direction producing a
    "click"...when the pin goes LOW, the piezo relaxes producing another "click". By using an inverter you can effectively
    deflect the piezo in each direction past center creating a noticable increase in volume.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe - Mask Designer III

    National Semiconductor Corporation
    (Communication Interface Division)
    500 Pinnacle Court, Suite 525
    Mail Stop GA1
    Norcross,GA 30071

    Post Edited (Beau Schwabe) : 8/27/2004 10:55:23 PM GMT
    846 x 786 - 15K
  • Beau SchwabeBeau Schwabe Posts: 6,547
    edited 2004-08-25 03:18
    Hello,

    If you can't provide a solution in software by sacrificing two pins that you can drive 180 Deg out of phase
    to supply a piezo, then the below circuit may be of some use to you. It is basically a two transistor inverter
    designed to be able to handle a floating input. At rest (INPUT) mode each B-E transistor junction "sees"
    approximately 0.45 volts thus ensuring that both transistors are OFF. When the signal goes to +5V or GND,
    the appropriate transistor is turned ON while the opposing transistor remains OFF. The voltages in the
    schematic next to each resistor reflect the actual measured value, as opposed to a calculated value.
    While only consuming about 3mA, the overall design provides a significant volume improvement particularly
    noticeable at non-resonate frequencies.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe - Mask Designer III

    National Semiconductor Corporation
    (Communication Interface Division)
    500 Pinnacle Court, Suite 525
    Mail Stop GA1
    Norcross,GA 30071
    935 x 583 - 16K
  • Tom_Tom_ Posts: 1
    edited 2004-09-16 06:23
    I'm also trying to get more volume out of a piezo speaker.· There are a couple of things that I'm not too clear on.·

    I pulled a piezo disc out of a pocket size alarm clock that runs off a watch battery.· I hooked it up to a 555 chip running at 6.5V.· The 555 was wired with a pot so that I could adjust the frequency to pretty much anything the ear can pick up.· The sound output was really weak throughout the whole frequency range.· I couldn't even get close to what the alarm clock used to put out, even though I was running at a higher voltage.· The 555 is rated at 200 mA source.· I'm assuming that's more than enough for the piezo disc.· I checked out the alarm clock circuit board and the piezo is connected to some kind of component (a small black cylinder with no markings on it, it's the only component on the board, besides the IC and the oscillator).· Is this some kind of transformer?··Could it be a problem with the duty·cycle·I was running on my 555?·

    Also, how does a smoke alarm·produce such a loud noise·running of a·9V battery.· Surely there·must be more to it than just inverting the voltage.· Does it have to do with the design of the piezo speaker itself, or can any piezo disc be·made that loud?

    Thanks for the help,
    Tom
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-09-16 20:02
    I think this really boils down to the Voltage.· It's too bad you couldn't go back and see how much voltage was going into the piezo in the alarm clock (I mean directly).· The ones I have are rated at 50V P-P.· A 555 hardly puts out enough to drive one to any loud degree...Try an amplifier?



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    Designs Page:··· http://www.lightlink.com/dream/designs
    ·
  • Beau SchwabeBeau Schwabe Posts: 6,547
    edited 2004-09-19 02:54
    By connecting a 555 to a piezo, I assume that one lead of the piezo is tied to GND and the other is tied to the output (pin 3). Even if your
    555 is at a 50% duty cycle, this is not the best configuration for driving a piezo. In order to create "volume" you need to move something
    by an X distance within a certain amount of time. The shorter the amount of time that you can cover the most distance will give you the
    greatest amount of power or sound pressure. Since the movement of the piezo crystal is somewhat logarithmic in nature (i.e more voltage
    will not necessarily create more deflection, but rather cause a faster response in the crystal.), applying an inverter as I have suggested
    earlier will cause the most amount of deflection because you are stressing the crystal in BOTH directions in a region of the crystal that
    is most responsive. Adding more voltage to this scenario will increase the volume as well, because you are able to deflect the piezo
    crystal much faster with the added voltage. A simple 1:10 ratio transformer after an inverter stage will boost the volume to levels that you
    would expect in an alarm equipped with a piezo.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe - Mask Designer III

    National Semiconductor Corporation
    (Communication Interface Division)
    500 Pinnacle Court, Suite 525
    Mail Stop GA1
    Norcross,GA 30071
  • edited 2004-10-29 21:21
    Here's another piezospeaker volume control suggestion:

    http://forum.parallax.com/forums/default.aspx?f=6&m=53966

    The circuit can be adjusted with a potentiometer to set the volume anywhere between barely audible to annoyingly loud (roughly three times the volume of a BASIC Stamp I/O pin).
  • lrohnlrohn Posts: 33
    edited 2004-10-30 05:43
  • John BondJohn Bond Posts: 369
    edited 2009-03-19 07:21
    Sorry to hijack your thread STUCK

    What about connecting the piezo to two pins on the controller and alternating the voltage? Pin1 high Pin2 low then Pin1 low and pin2 high.



    By the way, I love the CAD program Andy Lindsay used to create his·diagrams in the post http://forums.parallax.com/showthread.php?p=517152

    Where can I buy a copy of the softwaretongue.gif

    Regards
    John Bond


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Post Edited (John Bond) : 3/19/2009 7:27:31 AM GMT
  • Beau SchwabeBeau Schwabe Posts: 6,547
    edited 2009-03-19 16:06
    John Bond,

    "What about connecting the piezo to two pins on the controller and alternating the voltage?" - See my reply about 7 posts up.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
Sign In or Register to comment.