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.

Controlling a +12V buzzer...

Status
Not open for further replies.

ericmar

Full Member level 5
Joined
Apr 14, 2004
Messages
278
Helped
3
Reputation
6
Reaction score
4
Trophy points
1,298
Location
Singapore
Activity points
2,928
how to connect piezo to operate 12v switch

Hi guys,

I plan to use a transistor as a switch to control the a +12V buzzer by my microcontroller (PIC16F877). I tried using a 2N3904 but the volume is too soft. So I tried another transistor, BC639, but it's not working correctly. It seems that when I used the BC639, the transistor is ON all the time so my microcontroller cant control the buzzer at all.

Basically, the way I connect the transistor to the buzzer and power is as the following. I connect +12V to the positive if the buzzer then connect the negative of the buzzer to the collector of transistor. I used a 220Kohm resistor in between of the microcontroller and the base of the transitor. Lastly, I connect the emitter of the transistor to ground!

I have a look on both datasheets, it seems that both can be used as an amplifier and switch. But the BC639's datasheet doesnt tell anything about the ON and OFF characteristics!?

Thanks for any help!

Regards,
Eric
 

12v buzzer datasheet

Hi, try to know the current on your Buzzer at ON in a direct 12 V Supply. Then this current will be the value of your Collector Current, your Collector Current is equal to your Base Current and Nominal transistor Beta.

Base Current is Equal to (Vbb - Vbe)/Rb.

Ib(Beta) = Ic.

At least there alone you can check if your current will be enough to drive your buzzer.
 
piezoelectric speaker 12v

Hi,
You must provide this condition : Base_Current*Beta > Collector_curret.
 

12v buzzer connecting

The resistor you're using is to big. You want that the transistor works like a switch so it must saturate. don't botter finding the correct base current just put a resistor between 1k and 10k and it will work. At saturation the equation Ic=hfe*Ib isn't valide.
 

buzzer switch on transistor

Elavionic said:
The resistor you're using is to big. You want that the transistor works like a switch so it must saturate. don't botter finding the correct base current just put a resistor between 1k and 10k and it will work. At saturation the equation Ic=hfe*Ib isn't valide.

A saturated transistor is not enough, if your Collector Saturation Current is not greater than ot equal to the speaker's nominal operating current, it will be useless.

We are not talking about an ideal transistor here, we are talking about a real application so the computation is needed.

May I ask you, can a 2N3904 give a 1A current at saturation? I guess not, so it is better to always check datasheet and compute before saying anything.
 
transistor to withstand 12v

For the buzzer to give optimal 'buzz', you need to switch the current on it from one direction to the other direction periodically. A buzzeer work a bit like a capacitor. If you just tie one side to 5V, and pulsate the other side, the buzzer won't give a loud sound because it will stay 'charged'.

So, for it to work properly, you need to put, for example, at pins 1 and 2, 5V and 0V, and then, 0V and 5V, and then, 5V and 0V, and so on.

This can be done with a microcontroler easily, however, some things to be carefull. If you switch the 5V/0V for 0V/5V directly, it will be like reversing a capacitor almost instentanously at the 2 pins of your micro. This will put a big load at the micro, and create potentially over-negative or over-positive voltage at the micro (like a brief -5V or +10V). The micro pins are usually protected agains't damage by this, but the problem is that it can create erratic behavior in the microcontroler (usually crash your program, sending the micro in lala-land).

So, on a micro, a correct approach is to send 5V/5V, then 5V/0V, then 0V/0V and finally, 0V/5V (each transition being at one quarter of the period, the period being 1 divided by the frequency).

This is a bit hard to use transistors, as the transistors will conduct current in only one direction. You could use a quad of 4 transistors, 2 per buzzer pin, arranged in totem-pole (push-pull). Don't tie the transistors base togetter though, as a transition from a 0 to 1 (or 1 to 0) will make both transistor conduct simultaneoulsy for a short period of time at each transistion, resulting in very high current flowing through the transistors. Then, this will require 4 micro pins, but beware of never putting both transistor of a pair in driving state at the same time unless you wish to also create a smoke generator. Transistors do run on smoke, and once the smoke get out of the transistor, it will stop working :D Unless it's marijuana, the smoke won't give any 'buzz' to the buzzer :D:D
 

piezo transistor buzzer

Hi

The buzzer might need that the 12 volt be oscillating at some frequency.

Regards
 

transistor with buzzer on collector

First to know is are you having a buzzer or a piezo speaker. Buzzer needs only DC voltage to produce sound. Piezo speaker need AC voltage. For the buzzer you need to find what DC current it needs at 12V (connect it directly to 12V and measure current to the ground). Switch transistor should withstand this current in saturation. Saturation voltage is usually about .1V and this will not cause the problem with buzzing. Only difference is does transistor go to saturation. For this purpouse you should select transistor with proper collector current rating and beta. Then select base resistor which should be about 3k to 6k (for base current 1 to 2mA and max. collector current about 100mA). If you need more collector current use Darlington transistor.
 

best way to connect dc buzzer

No even a piezo buzzer works with DC only will not oscillate but give a constant sound.

A magnetic buzzer needs AC and triggering it is done by most of times by circuits which have transistor in it. Am I correct here? What buzzer are we talking here?
 

12v click buzzer

Buzzer is buzzer. It has build in oscillator and driver for piezo speaker. Piezo speaker is only single element which gives only "click" when connected to DC.
 

ericmar;
Check your source code and output of the uC that it work correctly or not?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top