Shop OBEX P1 Docs P2 Docs Learn Events
how to connect a piezo to bs2 — Parallax Forums

how to connect a piezo to bs2

ArchiverArchiver Posts: 46,084
edited 2003-03-24 21:57 in General Discussion
i know it's a basic question!
how do i connect a piezo speaker to an output of the stamp,
i try with a 470 ohm, but dont have the full volume as if i
connected to straight 5v.
thanks
John

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-03-24 02:36
    In a message dated 3/23/2003 6:27:01 PM Pacific Standard Time,
    johneck790@s... writes:

    > i know it's a basic question!
    > how do i connect a piezo speaker to an output of the stamp,
    > i try with a 470 ohm, but dont have the full volume as if i
    > connected to straight 5v.
    > thanks
    > John

    Assuming the peizo you are using is simply supplied with 5 volts you can do
    the following;

    Get a simple NPN transistor such as a 2n2222. Connect the emitter to ground.
    Connect the collector to one side of the peizo and the other end of the peizo
    to +5 volts (or +12)
    Connect a 1k ohm resistor between the base of the transistor and the output
    pin of the stamp.
    When you command the stamp pin to go high the peizo should sound and visa
    versa.

    Ken


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-03-24 12:26
    --- In basicstamps@yahoogroups.com, smartdim@a... wrote:
    > In a message dated 3/23/2003 6:27:01 PM Pacific Standard Time,
    > johneck790@s... writes:
    >
    > > i know it's a basic question!
    > > how do i connect a piezo speaker to an output of the stamp,
    > > i try with a 470 ohm, but dont have the full volume as if i
    > > connected to straight 5v.
    > > thanks
    > > John
    >
    > Assuming the peizo you are using is simply supplied with 5 volts
    you can do
    > the following;
    >
    > Get a simple NPN transistor such as a 2n2222. Connect the emitter
    to ground.
    > Connect the collector to one side of the peizo and the other end
    of the peizo
    > to +5 volts (or +12)
    > Connect a 1k ohm resistor between the base of the transistor and
    the output
    > pin of the stamp.
    > When you command the stamp pin to go high the peizo should sound
    and visa
    > versa.
    >
    > Ken
    >
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]

    Thanks Ken,
    try your circuit, dont work with my piezo, but i substitute a led
    with a resistor, and with command freqout the led flash, any idea,
    the piezo works fine on 5v

    John
  • ArchiverArchiver Posts: 46,084
    edited 2003-03-24 14:52
    In a message dated 3/24/2003 4:27:11 AM Pacific Standard Time,
    johneck790@s... writes:

    > Thanks Ken,
    > try your circuit, dont work with my piezo, but i substitute a led
    > with a resistor, and with command freqout the led flash, any idea,
    > the piezo works fine on 5v
    >
    > John
    >

    When your piezo does work, are you suppling a pulsed signal, or simply 5v and
    ground?

    Ken


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-03-24 14:55
    In a message dated 3/24/2003 6:54:21 AM Pacific Standard Time,
    smartdim@a... writes:

    > >Thanks Ken,
    > >try your circuit, dont work with my piezo, but i substitute a led
    > >with a resistor, and with command freqout the led flash, any idea,
    > >the piezo works fine on 5v
    > >
    > >John
    > >
    >
    > When your piezo does work, are you suppling a pulsed signal, or simply 5v
    > and
    > ground?
    >
    > Ken

    Also, do you know how much current your device consumes?


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-03-24 18:56
    Hi Ken,

    i'm connecting the piezo across +4.8v (4x1.2v nimh) and ground
    and the current is 5 ma

    thanks

    John
    --- In basicstamps@yahoogroups.com, smartdim@a... wrote:
    > In a message dated 3/24/2003 6:54:21 AM Pacific Standard Time,
    > smartdim@a... writes:
    >
    > > >Thanks Ken,
    > > >try your circuit, dont work with my piezo, but i substitute a
    led
    > > >with a resistor, and with command freqout the led flash, any
    idea,
    > > >the piezo works fine on 5v
    > > >
    > > >John
    > > >
    > >
    > > When your piezo does work, are you suppling a pulsed signal, or
    simply 5v
    > > and
    > > ground?
    > >
    > > Ken
    >
    > Also, do you know how much current your device consumes?
    >
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-03-24 19:36
    In a message dated 3/24/2003 10:59:23 AM Pacific Standard Time,
    johneck790@s... writes:

    > Hi Ken,
    >
    > i'm connecting the piezo across +4.8v (4x1.2v nimh) and ground
    > and the current is 5 ma
    >
    > thanks
    >

    hmmmmmmmmm,

    If indeed the unit is pulling only 5ma, the stamp should be able to directly
    drive the buzzer.

    And, the NPN transistor idea should do the same. If I remember correctly,
    you stated you could pulse an LED?

    When you pulsed the LED, was the stamp providing ground for the buzzer, or
    power.

    If you pulsed the LED using ground, you should be able to do the same to the
    buzzer. And IF YOU ARE SURE the buzzer uses only 5ma, no resistor is needed.
    But to be safe, I recommend the transistor idea....Again

    2n2222 or 2n3904

    emitter to ground, base to the stamp pin through 1k ohms and the collector to
    one side of your buzzer and the other side of the buzzer to your + 4.8 volts.

    Is the 4.8 volt source using the same ground as the stamp power supply? The
    ground for your buzzer must be tied to the same ground as your stamp.

    Don't hesistate to write back if more help is needed.
    Ken


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-03-24 21:57
    Sounds to me more like the device is a Piezo buzzer,
    which has it's own circuitry inside, if running it
    directly off 5V gives a tone. If that's the case,
    pulsing it with the stamp may not work.

    --- smartdim@a... wrote:
    > In a message dated 3/24/2003 10:59:23 AM Pacific
    > Standard Time,
    > johneck790@s... writes:
    >
    > > Hi Ken,
    > >
    > > i'm connecting the piezo across +4.8v (4x1.2v
    > nimh) and ground
    > > and the current is 5 ma
    > >
    > > thanks
    > >
    >
    > hmmmmmmmmm,
    >
    > If indeed the unit is pulling only 5ma, the stamp
    > should be able to directly
    > drive the buzzer.
    >
    > And, the NPN transistor idea should do the same. If
    > I remember correctly,
    > you stated you could pulse an LED?
    >
    > When you pulsed the LED, was the stamp providing
    > ground for the buzzer, or
    > power.
    >
    > If you pulsed the LED using ground, you should be
    > able to do the same to the
    > buzzer. And IF YOU ARE SURE the buzzer uses only
    > 5ma, no resistor is needed.
    > But to be safe, I recommend the transistor
    > idea....Again
    >
    > 2n2222 or 2n3904
    >
    > emitter to ground, base to the stamp pin through 1k
    > ohms and the collector to
    > one side of your buzzer and the other side of the
    > buzzer to your + 4.8 volts.
    >
    > Is the 4.8 volt source using the same ground as the
    > stamp power supply? The
    > ground for your buzzer must be tied to the same
    > ground as your stamp.
    >
    > Don't hesistate to write back if more help is
    > needed.
    > Ken
    >
    >
    > [noparse][[/noparse]Non-text portions of this message have been
    > removed]
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed.
    > Text in the Subject and Body of the message will be
    > ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
    >


    =====
    Chris Savage
    Knight Designs
    324 West Main Street
    Montour Falls, NY 14865
    (607) 535-6777

    http://www.knightdesigns.com

    __________________________________________________
    Do you Yahoo!?
    Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
    http://platinum.yahoo.com
Sign In or Register to comment.