Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Driving a buzzer using a transistor

Status
Not open for further replies.

hobbyiclearner

Full Member level 2
Joined
Oct 27, 2014
Messages
142
Helped
2
Reputation
4
Reaction score
2
Trophy points
18
Activity points
1,296
Hi,

I am making a project with involves driving a passive buzzer. I need to simply produce a beep sound at regular intervals. Since this is the first time I am using a buzzer in a project, I am posting its schematic for anyone to pls. check if it will work.

driving_a_buzzer.jpg

First of all since I need to generate / not generate a beep sound depending on DC voltage at the base of the transistor, I will be needing a passive buzzer only (and not an active buzzer). I hope I am correct?

I am using BCP56 transistor to drive the buzzer as a collector-terminal load. The current through the buzzer is to be 25 mA (max. value can be 50 mA) and its coil resistance is 16 ohms. I will be using a 5v. collector power supply. The base is to be driven by LVCMOS output (logic high = 3.3v and logic low = 0.2v max.).


I just needed to ensure that the buzzer will beep when it is logic high at the base terminal and no beep sound when it is logic low at the base terminal of the transistor. Is this buzzer driving technique OK or do I need to change it for the required functioning?


Looking forward to your comments
.
Thanks,
Hobbyiclearner
 

Hi,

For a passive buzzer, you need an AC or pulsating DC signal to make it buzz. Driving the base of the transistor with straight DC will not work. However, if your drive it with pulses of appropriate frequency and reasonable duty cycle, then it will work.
 
Hi,

I think that circuit is missing a resistor (100k or higher) from the junction of the 15k8 and BJT base to ground, and perhaps it wouldn't be a bad idea to add a series current-limiting resistor from VCC to buzzer pin 1, or between buzzer pin 2 and the BJT collector.
 

The resistor from the junction to ground may not be necessary for BJT as compared to MOSFET.

The current-limiting resistor in series with the buzzer is absolutely necessary. If you desire 25mA of current through the buzzer, then you'll need to solve the following equation to determine the value of the current-limiting resistance, Rlim:

25mA = (5-Vcesat)/(16+Rlim).
 

OK. Thanks for your informative post. I just need a buzzer/beeper which will produce a sound when there is DC input and no sound when there is no DC input. I dont want to add the complication of pulsating DC / AC etc. Can you pls. suggest any such device pls.? It just needs to be small and PCB mountable.

Regards,
Hobbyiclearner
 

OK. Thanks for your informative post. I just need a buzzer/beeper which will produce a sound when there is DC input and no sound when there is no DC input. I dont want to add the complication of pulsating DC / AC etc. Can you pls. suggest any such device pls.? It just needs to be small and PCB mountable.
...

Go for an active buzzer then.
 
The resistor from the junction to ground may not be necessary for BJT as compared to MOSFET.

The current-limiting resistor in series with the buzzer is absolutely necessary. If you desire 25mA of current through the buzzer, then you'll need to solve the following equation to determine the value of the current-limiting resistance, Rlim:

25mA = (5-Vcesat)/(16+Rlim).

Using this expression I am getting the Rlim as a negative value and equal to -15.99 ohms (Vcesat=0.5v). I suppose even the magnitude of the resistor value is quite small. Do you suppose such a small resistor value is not negligible?

Thanks,
Hobbyiclearner

- - - Updated - - -

Go for an active buzzer then.

Thanks. Can you pls. point to the datasheet of an active buzzer as a reference. I dont know which ones will be good for the calculations.

Regards,
Hobbyiclearner
 

You need the current-limiting resistor. Without it the current that would be flowing through the buzzer would be about 300mA (ie Vcc/Rbuzzer = 5V/16ohm).
 

Hi,

I think that circuit is missing a resistor (100k or higher) from the junction of the 15k8 and BJT base to ground.

Just for information purpose, why is this resistor required (whether in BJT or MOSFET).

Thanks,
Hobbyiclearner
 

Hi,

An internet search gives a lot of results.
I recommend to do a search at your favourite distributor.

Klaus
 

With Vcesat=0.5V I got Rlim=164ohm. You can use 150ohm.

You got a negative number for Rlim because you use 25A instead of 0.025A = 25mA.
 

OK. I suppose the equation would be :

5-Vcesat = 25mA*(16+Rlim)

This gives Rlim to be 164 ohms. I am choosing 200 ohms. Hope its OK? Also, is the value of other resistor Rb (15.8 Kohms) OK in this case? BTW what are the typical coil resistance of active buzzers?

Thanks,
Hobbyiclearn
 

It's required with MOSFETs to help drain the gate charges when the MOSFET supposed to be left open.

You know, when you turn off the MOSFET, it would have charges at the gate so you want to drain the charges to have it open.

- - - Updated - - -

OK. I suppose the equation would be :

5-Vcesat = 25mA*(16+Rlim)

This gives Rlim to be 164 ohms. I am choosing 200 ohms. Hope its OK? Also, is the value of other resistor Rb (15.8 Kohms) OK in this case? BTW what are the typical coil resistance of active buzzers?

Thanks,
Hobbyiclearn

To determine the required base resistor value Rb, you need to provide the hFE of the transistor.
 

OK. Do you think that this is a good buzzer for the purpose?

Thanks,
Hobbyiclearner

- - - Updated - - -

][/COLOR]

To determine the required base resistor value Rb, you need to provide the hFE of the transistor.

The hfe value of BCP56 at 25 degree celcius at 25 mA collector current is approximately 150. And Vbe for same conditions is 0.75v

Thanks,

Hobbyiclearner
 

...
BTW what are the typical coil resistance of active buzzers?
...

To be sincere with you, you do not have to hurriedly choose an active buzzer in place of a passive one since they are usually more expensive. There are still options to explore.

If you are driving the transistor with an MCU, then you can derive a clock signal and drive the transistor with that clock signal anytime the DC signal that was supposed to drive it is HIGH.

- - - Updated - - -

Ic=hFE*Ib; Ib=Ic/hFE
Ib=25mA/150 = 167uA
Vb-0.7=Ib*Rb
Rb=(Vb-0.7)/Ib = (3.3-0.7)/167u = 15,568ohm (use 15kohm or lower value for Rb)

200ohm is okay for Rlim. I'd prefer 150ohm though.
 
Last edited:

Hi,

Just for information purpose, why is this resistor required (whether in BJT or MOSFET).

So the base/gate is at a defined level when "off"/so it's not floating, to avoid unwanted spurious turn-on.

Experiment with two MOSFETs and two LEDs (real world, preferably): One NMOS with a resistor to ground on the gate, the other without - the LED on the one without the resistor will most likely be on whether the gate signal is high or low.
 

Hi,

There is no need for a gate-source or base-emitter resistor.
Usual logic outputs are push-pull and (especially nowadays CMOS outputs) have good V_OL levels.

Thus you need to answer yourself three questions:
* do you use a Mosfet or IGBT?
* is there a time when your logic output is floating (often with microcontroller for a short time at power up until port setup is done)?
* do you see a problem when during this (short) time the buzzer is (partly) energized?

If your answer is 3 x "yes" --> then use the resistor at the gate.
Otherwise you may omit it.

Klaus
 
  • Like
Reactions: d123

    d123

    Points: 2
    Helpful Answer Positive Rating
Hi,

There is no need for a gate-source or base-emitter resistor.
Usual logic outputs are push-pull and (especially nowadays CMOS outputs) have good V_OL levels.

Thus you need to answer yourself three questions:
* do you use a Mosfet or IGBT?
* is there a time when your logic output is floating (often with microcontroller for a short time at power up until port setup is done)?
* do you see a problem when during this (short) time the buzzer is (partly) energized?

If your answer is 3 x "yes" --> then use the resistor at the gate.
Otherwise you may omit it.

Thanks, I didn't know that, that can save a resistor or three sometimes. Power-up spikes are annoying, brief as they may be. 2) and 3) are unavoidable undesirables for me, mcu or not - learnt to accept it paying attention to design note osc captures. Thanks for clarifying.
 

The base resistor must be less than 4.7Kohm to ensure your BCP56 goes into saturation. I would suggest to use 2.2K
A resistor from base to GND does no harm, but does ensure that your BJT does turn off when signal goes low. 10K ohm should be ok.

A current limiting resistor is a MUST to safeguard the buzzer. With 5v supply you should use between 180ohm - 220ohm. (Check the calculations)
One question - why do you have two separate voltages - 3.3v and 5v. Why not drive everything with 3.3v ? If you do, then the limiting resistor should be reduced to 100 ohm

Do check the output drive capability of LCVMOS technology -- it needs to be able to source at least around 3-400uA for this circuit to work failsafe. This is because you have to use a worst case (lowest) hFE or Beta to ensure your circuit always works.

Lastly - I assume your buzzer buzzez simply when you pass current through it. Seeing you have written here detailed impedance/ current parameters, then do also publish the actual buzzer product page for our general knowledge.
 
Last edited:
Hi,

The OP mentioned that the current through the buzzer should be 25mA (50mA being the maximum value). I selected 150 ohm in place of 164 ohm. This would get the current to be a little greater than 25mA but still lie within 25mA and 50mA.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top