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.

buzzer connection with at89c51

Status
Not open for further replies.

tarun0xe

Member level 2
Member level 2
Joined
Jul 25, 2011
Messages
47
Helped
8
Reputation
16
Reaction score
8
Trophy points
1,298
Location
India
Visit site
Activity points
1,812
hello friends... i am using a buzzer in my project. i want it to produce sound when the incoming voltage from a sensor(through ADC) exceeds a particular value and stop when that voltage gets reduced below that threshold value. i have been searching on net for buzzer connection to MCU(at89c51) from yesterday and came across another thread on this same board https://www.edaboard.com/threads/229158/ . i have also connected my buzzer in same way but i used a dc source of +12V to my buzzer(firstly is that correct???? as using the same power source that is given the diagram in that thread,i could not turn on my buzzer so i just randomly put there a dc +12V source and it worked).but now the problem is that it keeps producing sound whether i give the corresponding pin of MCU a high or a low that i couldn't understand. please help me in this and also tell me the correct connections and that whether it is required to clear or set the corresponding pin of MCU to turn on buzzer and how much supply voltage does buzzer require.my buzzer look like this
7252115000_1353632735.jpg
thanks in advance.
 

Use this circuit:
7850219100_1353640877.png


Your buzzer will probably work from a range of voltages. 5V should be enough. 12V should be okay too.

Hope this helps.
Tahmid.
 
thanks for the reply tahmid.... then to turn off the buzzer,what value should I send to microcontroller's pin....a high or a low??...or is there some other way to turn off it..??
in my one similar circuit(using uln2803) once buzzer starts it keeps sounding...and whatever value I send to uC's pin(to turn it off) has no effect on buzzer's operation.....what should I do to turn It off..?? also it starts sounding soon I turn on the simulation, no matter there is a high or low in corresponding pin of uC and then keeps sounding forever. other people also, please give your valuable replies .thanks In advance
 

thanks for the reply tahmid.... then to turn off the buzzer,what value should I send to microcontroller's pin....a high or a low??...or is there some other way to turn off it..??

To turn buzzer on, send 1 to the base of the transistor.
To turn buzzer off, send 0 to the base of the transistor.

in my one similar circuit(using uln2803) once buzzer starts it keeps sounding...and whatever value I send to uC's pin(to turn it off) has no effect on buzzer's operation.....what should I do to turn It off..?? also it starts sounding soon I turn on the simulation, no matter there is a high or low in corresponding pin of uC and then keeps sounding forever. other people also, please give your valuable replies .thanks In advance

Upload the circuit diagram.
 

If you are using 2N2222 transistor in proteus simulation, it has problems. It is always turned ON.
 

Yes there is problem with my proteus 2n2222. That's why I use 2n2222a part in proteus. I have checked that. I use Proteus 7.10 SP0.
 

Attachments

  • 2n2222.rar
    10.3 KB · Views: 105
  • 2n2222.jpg
    2n2222.jpg
    175.1 KB · Views: 152

@ Tahmid

Can you zip and post your proteus models and library folders. Some of my proteus parts doesn't work properly.
 

Use other transistors for simulation. There are so many available. PN2222(A) and BC337 are two that you can use. You can also use other transistors such as BC547. Keep the current rating in mind.
 

thanks for the replies friends, actually my design which keeps producing sound was with connecting the buzzer through uln2803 ic. but now when I connected in the same manner as suggested by tahmid...it gives no sound at all.. I don't know where I did mistake but I just connected it to P2.0 of uC and set that bit in my code...but no response..i am posting simulation image here.. please help...
 

Double click buzzer and set its voltage as 5V and not 12V. I checked that proteus BC547 is not working, So use 2N2222A Part in Proteus instead of BC547.
 

    V

    Points: 2
    Helpful Answer Positive Rating
Double click on the buzzer. Change voltage to 5V as you are working with 5V in your circuit. Change the resistance of the buzzer to 1200 instead of 12.

There isn't supposed to be any problem with the BC547. It works fine for me.
 
  • Like
Reactions: adwait.pande

    V

    Points: 2
    Helpful Answer Positive Rating

    adwait.pande

    Points: 2
    Helpful Answer Positive Rating
@ Tahmid

BC547 doesn't work for me. See the video there is no sound coming from buzzer.
 

Attachments

  • buzzer.rar
    22.1 KB · Views: 127

    V

    Points: 2
    Helpful Answer Positive Rating
Ye. It worked. What happens when resistance is increase to 1200 Ohms?
 

    V

    Points: 2
    Helpful Answer Positive Rating
If resistance is increased, current is decreased. BC547 is rated at 100mA.

When resistance of buzzer = 12Ω, current is (5/12)A = 0.417A = 417mA.

When resistance of buzzer = 1200Ω, current is (5/1200)A = 0.00417A = 4.17mA

I assumed that the transistor does not drop any voltage. Even though it does, the above points explain why it's okay when the resistance of buzzer is increased to 1200Ω.

Place a voltmeter across the transistor collector-emitter and another across the buzzer. Adjust the values of the buzzer resistance. Experiment and see what happens.
 

    V

    Points: 2
    Helpful Answer Positive Rating
Actully I want to know why the buzzer worked when I used 1200 Ohm resistor and reducing the current to buzzer. More current to buzzer means it should sound loud. Isn't it?
 

    V

    Points: 2
    Helpful Answer Positive Rating
But the transistor can't take the more current. BC547 is rated to withstand 100mA. You can't sink more current with BC547. But that is what you're attempting to do when resistance = 12Ω.
 

    V

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top