??? 04/01/07 00:18 Modified: 04/01/07 01:04 Read: times Msg Score: +1 +1 Good Answer/Helpful |
#136347 - Because you took a NPN instead of PNP... Responding to: ???'s previous message |
Verun said:
basically, i used a 2n2222 NPN transistor, connected the base to P1.0, set that to high, connected the collecter to 5v and the emitter to the supply of the buzzer. then when i set P1.0 to high, the buzzer started to work. however, the sound is pretty weak, maybe i need to up the voltage or something...dont know how i will do that. Please carefully compare what you tried, with the circuit I proposed: ![]() You took a NPN to drive the buzzer, but you need to take a PNP! Remember, that a 80C52 port output can only drive (source) a surprisingly low current, when emitting high level. So, with this circuit you can hardly get enough base current to fully turn-on a NPN transistor and to make loud noise with the buzzer. Here, you can only achieve this, when the 80C52 is emitting low level, because then he can sink much more current than he can source! But this only works with a PNP! If you insist in using a NPN, then you can drive the transistor like shown in the following example, which is copied from a schematic of an earlier thread: In this case, the base current is enhanced by using an additional base resistor, so that the 80C52 need not to deliver (source) the full base current. This circuit shows the disadvantage, that an additional supply current is flowing, whenever P1.1 goes low. But in many cases this is only a fraction of the "heavy" load current and by this negligible. By the way, the snippet shows a relay connected to +12V. Just exchange it by your buzzer and power it by your +5V supply. Take your 2N2222 instead of the shown BD115. Also, the base resistor can be increased to about 4k7. Another remedy of the low drivability of standard 80C52 when emitting high state is to use a MOSFET instead of bipolar transistor, like shown in the following snippet: (I have copied this from a larger schematic of an earlier thread, so the circuit looks a bit tiny...) Here, there's nearly no drive current at all needed to turn-on the MOSFET. So, by this methode a standard 80C52 can easily turn-on a heavy load. The shown 100R resistor is only to limit unsane currents. But with your buzzer you can omit the resistor, as Steve earlier mentioned. Kai |
Topic | Author | Date |
how to use a simple buzzer? | 01/01/70 00:00 | |
Try it ? | 01/01/70 00:00 | |
that worked, but... | 01/01/70 00:00 | |
current | 01/01/70 00:00 | |
When you've found the current requirement... | 01/01/70 00:00 | |
Buzzer connections | 01/01/70 00:00 | |
Drivers | 01/01/70 00:00 | |
will try it and get back... | 01/01/70 00:00 | |
If the buzzer draws lots of current... | 01/01/70 00:00 | |
Quote | 01/01/70 00:00 | |
Correct | 01/01/70 00:00 | |
ok... | 01/01/70 00:00 | |
Numerous options ... | 01/01/70 00:00 | |
only have 5V supply | 01/01/70 00:00 | |
it might prove interesting ... | 01/01/70 00:00 | |
Because you took a NPN instead of PNP... | 01/01/70 00:00 | |
will try this | 01/01/70 00:00 | |
kai | 01/01/70 00:00 | |
I would use a PNP | 01/01/70 00:00 | |
Do yourself a favor ... try it as he suggests! | 01/01/70 00:00 | |
we all did some such thing ONCE, I believe | 01/01/70 00:00 | |
hmmm.... | 01/01/70 00:00 | |
I don't know why,...![]() | 01/01/70 00:00 |