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

    Join Date
    Oct 2012
    Posts
    78
    Helped
    0 / 0
    Points
    1,379
    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.

    •   Alt25th March 2018, 16:56

      advertising

        
       

  2. #2
    Super Moderator
    Points: 57,436, Level: 58
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    11,693
    Helped
    2710 / 2710
    Points
    57,436
    Level
    58

    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. Thank you.



  3. #3
    Member level 5
    Points: 744, Level: 5

    Join Date
    Aug 2016
    Posts
    91
    Helped
    15 / 15
    Points
    744
    Level
    5

    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.



    •   Alt25th March 2018, 22:11

      advertising

        
       

  4. #4
    Advanced Member level 5
    Points: 20,317, Level: 34
    barry's Avatar
    Join Date
    Mar 2005
    Location
    California, USA
    Posts
    3,918
    Helped
    844 / 844
    Points
    20,317
    Level
    34

    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.



    •   Alt26th March 2018, 18:32

      advertising

        
       

  5. #5
    Member level 5
    Points: 744, Level: 5

    Join Date
    Aug 2016
    Posts
    91
    Helped
    15 / 15
    Points
    744
    Level
    5

    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: 57,436, Level: 58
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    11,693
    Helped
    2710 / 2710
    Points
    57,436
    Level
    58

    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. Thank you.



  7. #7
    Advanced Member level 5
    Points: 20,317, Level: 34
    barry's Avatar
    Join Date
    Mar 2005
    Location
    California, USA
    Posts
    3,918
    Helped
    844 / 844
    Points
    20,317
    Level
    34

    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.



  8. #8
    Super Moderator
    Points: 57,436, Level: 58
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    11,693
    Helped
    2710 / 2710
    Points
    57,436
    Level
    58

    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. Thank you.



    •   Alt27th March 2018, 06:52

      advertising

        
       

  9. #9
    Advanced Member level 5
    Points: 20,317, Level: 34
    barry's Avatar
    Join Date
    Mar 2005
    Location
    California, USA
    Posts
    3,918
    Helped
    844 / 844
    Points
    20,317
    Level
    34

    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 4
    Points: 1,379, Level: 8

    Join Date
    Oct 2012
    Posts
    78
    Helped
    0 / 0
    Points
    1,379
    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



--[[ ]]--