Shop OBEX P1 Docs P2 Docs Learn Events
Propeller and piezo buzzer issue — Parallax Forums

Propeller and piezo buzzer issue

stevoveestevovee Posts: 18
edited 2014-03-25 15:27 in Propeller 1
I have a project where I was driving a piezo buzzer (digikey part number 445-2525-1-ND) directly with my propeller and it worked fine but we were looking to get a little more volume out of it. Since the project has a nice switching 5v supply on the board we figured we could just use a transistor (digikey # 2N3904-APCT-ND) to switch 5v through the buzzer. When I attempt to do this I can tell that something is happening with the buzzer but it really isn't buzzing but more or less making barely audible white noise. I have attached a picture of how I have it wired in the schematic I was just wondering if anyone has any feedback as to why I'm having issues with this. I'm driving it the same way I was before by simply calling the output pin attached high, delay, calling it low, delay and repeat.

buzzer_schem.jpg
589 x 682 - 38K

Comments

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-03-24 15:31
    stevovee wrote: »
    I have a project where I was driving a piezo buzzer (digikey part number 445-2525-1-ND) directly with my propeller and it worked fine but we were looking to get a little more volume out of it. Since the project has a nice switching 5v supply on the board we figured we could just use a transistor (digikey # 2N3904-APCT-ND) to switch 5v through the buzzer. When I attempt to do this I can tell that something is happening with the buzzer but it really isn't buzzing but more or less making barely audible white noise. I have attached a picture of how I have it wired in the schematic I was just wondering if anyone has any feedback as to why I'm having issues with this. I'm driving it the same way I was before by simply calling the output pin attached high, delay, calling it low, delay and repeat.

    buzzer_schem.jpg

    This is a piezo transducer, not a buzzer or even a speaker but what's more is that a piezo's load is capacitive, not resistive or inductive. This means that you need to drive it with an AC waveform which when you had it connected directly to the I/O pin it did by driving high then low. Now with the transistor you are only applying DC. Have you tried differential drive by connecting to two I/O pins and driving them in differential mode, which the counters also support?

    If you need it really loud I have used two transmitters from an RS232 chip in differential mode to drive the piezo at 18Vpp. Even single-ended it would be loud. There are other solutions too.
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2014-03-24 15:32
    If it's truly a piezo, then it needs to be treated as a capacitor in circuit. To drive it you need to push and pull the piezo element to deflect it properly. What you can do as a simple TEST is to place a 1k resistor or so across the piezo. This will allow it to discharge somewhat. If doing that improves the volume, then the piezo should be driven with a simple push/pull style amplifier.


    See this link for more reference:
    http://forums.parallax.com/showthread.php/62310-Amplifying-piezo-speaker?p=466534&viewfull=1#post466534
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2014-03-25 14:21
    Hi stevovee;
    stevovee wrote: »
    I have a project where I was driving a piezo buzzer (digikey part number 445-2525-1-ND) directly with my propeller and it worked fine but we were looking to get a little more volume out of it.
    Take a look at the suggested circuit in the TDK PS1240P02BT document on page 7.
    They use the same circuit you are using except they hake a 1K resister across the buzzer.
    I would think this resister would increase the volume quite a bit.

    Other driving methods, such as those in Beau's post, can essentially double or more the volume over the simple circuit with the 1K resistor.

    Duane J
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2014-03-25 14:28
    Yep, that's what I suggested with the 1k resistor. The 1k resistor is enough to 'discharge' the piezo when the pulse is taken away or the drive transistor is OFF. Remember, the peizo behaves like a capacitor.
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2014-03-25 15:27
    Hi Beau;
    Yep, that's what I suggested with the 1k resistor. The 1k resistor is enough to 'discharge' the piezo when the pulse is taken away or the drive transistor is OFF. Remember, the piezo behaves like a capacitor.
    Sorry about not seeing the 1K in your post.
    Technically the simple circuit with 1K resistor is driving the piezo device with a square wave of about 1/2 of VDD, 1.65V for a Prop. Actually it will be even less than 1/2 of VDD because the resister only cause something like an RC discharge path.

    Those push-pull circuits can drive the piezo with a full VDD square wave.

    An even higher volume can be gotten with the simple circuit. Instead if a resister use an inductor. The effective drive voltage can be several times VDD.
    Of course, one must make sure the transistor never can be turned on continuously, even when the Prop is not running. It takes a bit of experimenting with the piezo device and inductor values. Once you get it right these can be quite loud.

    Duane J
Sign In or Register to comment.