+ Post New Thread
Results 1 to 10 of 10
  1. #1
    Member level 5
    Points: 1,473, Level: 8

    Join Date
    Oct 2012
    Posts
    92
    Helped
    0 / 0
    Points
    1,473
    Level
    8

    Interfacing a buzzer with CPLD

    Hi,

    I wanted to connect a buzzer with an I/O pin of CPLD (XC2C128 – VQ 100 package). The I/O pin will be driven at 3.3v (LVCMOS logic levels). How should I connect the buzzer: directly connect the positive terminal of the buzzer to the I/O pin with a series resistance or use a npn transistor to drive the buzzer as a load to the collector of the transistor. I only need to have a continuous beep when required. I am planning to use the buzzer as per the link here.

    I could not find its datasheet. Does anyone have any prior experience with such devices pls? To be specific, how much minimum current does it require for a beep?

    Thanks and Regards,
    Arvind Gupta.

    •   AltAdvertisment

        
       

  2. #2
    Super Moderator
    Points: 61,937, Level: 60
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    12,620
    Helped
    2926 / 2926
    Points
    61,937
    Level
    60

    Re: Interfacing a buzzer with CPLD

    Hi,

    A bjt and a 1k base resistor does the job.
    In detail it depends on buzzer current and bjt type.
    If you want to safe part count then I recommend to use a digital bjt.....it has internal resistors.

    I don't recommend to drive the buzzer directly from the PLD.

    Klaus
    Please don´t contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  3. #3
    Full Member level 1
    Points: 858, Level: 6

    Join Date
    Aug 2016
    Posts
    104
    Helped
    17 / 17
    Points
    858
    Level
    6

    Re: Interfacing a buzzer with CPLD

    Hi,
    I am thinking that a transistor would be a better idea since there is a possibility that a CPLD may not be able to supply the current it would require.

    Another point of concern is that AC is specified for the buzzer. What plans do you have to take care of that?
    -------------
    --Akanimo.



    •   AltAdvertisment

        
       

  4. #4
    Advanced Member level 5
    Points: 21,066, Level: 35
    barry's Avatar
    Join Date
    Mar 2005
    Location
    California, USA
    Posts
    4,055
    Helped
    882 / 882
    Points
    21,066
    Level
    35

    Re: Interfacing a buzzer with CPLD

    Quote Originally Posted by Akanimo View Post
    Hi,
    I am thinking that a transistor would be a better idea since there is a possibility that a CPLD may not be able to supply the current it would require.

    Another point of concern is that AC is specified for the buzzer. What plans do you have to take care of that?
    This is a DC device, not AC. Note the "+" and "-" in the picture.

    I agree with Klaus-use a transistor. The link doesn't supply a lot of information, and what information it DOES supply is, well, wrong. A "passive" buzzer? Does that mean it doesn't need power? Is it 16 ohms? At 12 Volts that's almost an amp of current. I'm pretty sure that's not right.



    •   AltAdvertisment

        
       

  5. #5
    Full Member level 1
    Points: 858, Level: 6

    Join Date
    Aug 2016
    Posts
    104
    Helped
    17 / 17
    Points
    858
    Level
    6

    Re: Interfacing a buzzer with CPLD

    Quote Originally Posted by barry View Post
    This is a DC device, not AC. Note the "+" and "-" in the picture.

    ...The link doesn't supply a lot of information, and what information it DOES supply is, well, wrong. A "passive" buzzer? Does that mean it doesn't need power? Is it 16 ohms? At 12 Volts that's almost an amp of current. I'm pretty sure that's not right.
    I actually read through the feedback from customers. One from an American addressed this. He stated that the buzzer required AC to work despite the fact that it had polarity markings on it. He said the polarity indications were deceptive.

    From his words, I could deduce that he had connected it in a circuit with polarity but it did not work. This information could be easily gotten if feedback from customers is filtered down to those from Americans.

    It require AC actually. Maybe a square wave will work - maybe.



  6. #6
    Super Moderator
    Points: 61,937, Level: 60
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    12,620
    Helped
    2926 / 2926
    Points
    61,937
    Level
    60

    Re: Interfacing a buzzer with CPLD

    Hi,

    The OP should know whether this is a passive device or an active device with oscillator inside.

    The value "16 Ohms" more likely is for a passive device.
    The "+" and "-" may be for an active device. But this is not sure.

    There is a chance that it is a passive device compareable with a speaker. Audio speakers have "+" and "-" signs, too, although they are AC devices.

    But it's the OP's problem...buying devices without specifications...we can't know what device it is.

    Klaus
    Please don´t contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  7. #7
    Advanced Member level 5
    Points: 21,066, Level: 35
    barry's Avatar
    Join Date
    Mar 2005
    Location
    California, USA
    Posts
    4,055
    Helped
    882 / 882
    Points
    21,066
    Level
    35

    Re: Interfacing a buzzer with CPLD

    They are calling this a "buzzer", not a transducer, not a speaker. Maybe it's a translation thing. But the fact that they specify it for different voltages would lead one to believe it is, in fact, a buzzer. I would suggest you buy one (unless this is one of those deals where you have to buy 10000), hook it up to a power supply and see if it buzzes. And even if it is what you are calling "AC", i.e., an electromagnetic speaker or piezo, it would still be driven by a pulsed DC through a transistor.



    •   AltAdvertisment

        
       

  8. #8
    Super Moderator
    Points: 61,937, Level: 60
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    12,620
    Helped
    2926 / 2926
    Points
    61,937
    Level
    60

    Re: Interfacing a buzzer with CPLD

    Hi,

    https://www.digisound.de/en/fdgx-12p/

    They call it a "buzzer", too. Maybe this is not the correct word.
    They come with different voltages, they are without internal oscillator, they have a resistance specification and they have "+" and "-" signs in the datasheet.

    Thus I'd say it comes close to that in the OP's link.

    And on thd digisound homepage you find similar looking devices with internal oscillator.
    Still we can't be sure what it is.

    Klaus
    Please don´t contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  9. #9
    Advanced Member level 5
    Points: 21,066, Level: 35
    barry's Avatar
    Join Date
    Mar 2005
    Location
    California, USA
    Posts
    4,055
    Helped
    882 / 882
    Points
    21,066
    Level
    35

    Re: Interfacing a buzzer with CPLD

    Based on the comments on the link, it LOOKS like this is actually NOT a buzzer. Some comments say "it works perfectly"; others say "it doesn't work at all". I say, you get what you pay for.

    But back to the fundamental question: use a transistor to drive this.



  10. #10
    Member level 5
    Points: 1,473, Level: 8

    Join Date
    Oct 2012
    Posts
    92
    Helped
    0 / 0
    Points
    1,473
    Level
    8

    Re: Interfacing a buzzer with CPLD

    Thanks for all the comments and advice. Can anyone point me to a PCB mountable buzzer which I can drive through a CPLD pin (3.3v output) and a NPN transistor to make a beep/buzz sound? I can use it as a reference for my part searching. Also, what are the types of buzzers commonly available pls?

    Regards,
    Arvind Gupta



--[[ ]]--