EmbeddedRelated.com
Forums

buzzer rings low!

Started by omkar vyas July 15, 2006
David Fowler wrote:

>Omkar,
>
>Is this the circuit you're having trouble with?
>
> +5
> |
> C
> /
> |<
>uC P23--| Q = 2N3906 PNP
> |\
> \
> E
> |
> R=2K
> |
> Buzzer
> |
> GND
>If so, I can see your problem. The transistor will always be on because
>the uC needs to drive the pin to about 5V (5V-.7V) to turn off the
>transistor. The processor is powered from 3.3V so it is just not going
>to make it. I don't think there is any way to fix this circuit as it is.
>
>
>
I wouldn't have done that circuit that way. Having said that, yes,
there are several problems I see with that circuit:

1. The PNP transistor will not turn on if the emitter is wired to
ground. If you were to use a PNP, then the collector would go to GND
and the emitter to the + supply. Your wiring shown could work if an NPN
were installed instead of the PNP and a modest pullup resistor is placed
on the base lead to the +3.3v supply (about 27K ohm, depending on the
transistor beta and ICC load).

2. The 2K resistor is probably going to starve the sounder for power,
the value seems to limit the current to the sounder to a pretty low
level. You didn't say what sounder you were using, that circuit will
only deliver 2.5 ma to the device.

3. I wouldn't have chosen a bipolar transistor, I would have used a
depletion mode N-FET. Something like MGSF1N03LT1. They work at 3.3v
and have about 150ma of drive. The FET is a voltage-to-current device,
a bipolar transistor is a current-to-current device. IMHO, bipolar
transistor is a poor choice in a digital environ.

I would suggest, replace the PNP with an NPN (2N2222A comes to mind).
Put the emitter on the buzzer side, the collector on the + supply.
Then, reduce the emitter resistor to a more reasonable value, see the
data sheet on the sounder to find how much current it needs. Next, add
a pullup resistor to the base of the transistor to +3.3v, keep the value
large, your transistor gain (beta) will dictate the resistance value:
Load_Current / gain == base current required. Pullup resistor == +3.3v
/ base current.
TomW
--
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net, http://cyberiansoftware.com
"Windows? No thanks, I have work to do..."
----------------

An Engineer's Guide to the LPC2100 Series

I had the transistor labeled wrong. Top should have been the Emitter.

David

www.uCHobby.com
Microcontrollers for Hobbyist

> -----Original Message-----
> From: l... [mailto:l...] On
Behalf
> Of Tom Walsh
> Sent: Sunday, July 16, 2006 6:40 PM
> To: l...
> Subject: Re: [Retrieved]still!!! [lpc2000] buzzer rings low!
>
> David Fowler wrote:
>
> >Omkar,
> >
> >Is this the circuit you're having trouble with?
> >
> > +5
> > |
> > C
> > /
> > |<
> >uC P23--| Q = 2N3906 PNP
> > |\
> > \
> > E
> > |
> > R=2K
> > |
> > Buzzer
> > |
> > GND
> >
> >
> >If so, I can see your problem. The transistor will always be on
because
> >the uC needs to drive the pin to about 5V (5V-.7V) to turn off the
> >transistor. The processor is powered from 3.3V so it is just not
going
> >to make it. I don't think there is any way to fix this circuit as it
is.
> >
> >
> >
> I wouldn't have done that circuit that way. Having said that, yes,
> there are several problems I see with that circuit:
>
> 1. The PNP transistor will not turn on if the emitter is wired to
> ground. If you were to use a PNP, then the collector would go to GND
> and the emitter to the + supply. Your wiring shown could work if an
NPN
> were installed instead of the PNP and a modest pullup resistor is
placed
> on the base lead to the +3.3v supply (about 27K ohm, depending on the
> transistor beta and ICC load).
>
> 2. The 2K resistor is probably going to starve the sounder for power,
> the value seems to limit the current to the sounder to a pretty low
> level. You didn't say what sounder you were using, that circuit will
> only deliver 2.5 ma to the device.
>
> 3. I wouldn't have chosen a bipolar transistor, I would have used a
> depletion mode N-FET. Something like MGSF1N03LT1. They work at 3.3v
> and have about 150ma of drive. The FET is a voltage-to-current
device,
> a bipolar transistor is a current-to-current device. IMHO, bipolar
> transistor is a poor choice in a digital environ.
>
> I would suggest, replace the PNP with an NPN (2N2222A comes to mind).
> Put the emitter on the buzzer side, the collector on the + supply.
> Then, reduce the emitter resistor to a more reasonable value, see the
> data sheet on the sounder to find how much current it needs. Next,
add
> a pullup resistor to the base of the transistor to +3.3v, keep the
value
> large, your transistor gain (beta) will dictate the resistance value:
> Load_Current / gain == base current required. Pullup resistor =+3.3v
> / base current.
> TomW
> --
> Tom Walsh - WN3L - Embedded Systems Consultant
> http://openhardware.net, http://cyberiansoftware.com
> "Windows? No thanks, I have work to do..."
> ----------------
> ------------------------ Yahoo! Groups Sponsor
>
David Fowler wrote:
> I had the transistor labeled wrong. Top should have been the Emitter.

Don't worry about the minor details it may all be to no avail anyway.

We believe he is using a piezo transducer, the ones that you have to
drive with a square wave which means that you cannot run it with DC as
in a series circuit. The piezo looks like a capacitive load, not an
inductive or resistive one.

The circuit I posted earlier is the configuration he should be using if
this is the case although there are better options.

In the meantime omkar is not replying and may simply be embarrassed
having seemingly committed 3 fundamental errors.

1) No current limit resistor from the I/O pin to the base

2) No cutoff resistor from base to emitter as the emitter is connected
to +5V (not required if connected to 3.3V or driven as open-drain)

3) Connecting a piezo transducer in a series DC circuit.

*Peter*

hi thankx for ur support friends!!!
my pizo is ringing normal

changes i have made!
1.NPN transistor i have used 2N2222
2.in IODIR that pin is dfined as input pin
3.IOSET and IOCLR used to output the square wave!
4.base resistance is 1K ohm collector resistance is 100ohm in serise with buzzer of 24 ohm!

these all changes made it ring!!!!!

Peter Jakacki wrote: David Fowler wrote:
> I had the transistor labeled wrong. Top should have been the Emitter.

Don't worry about the minor details it may all be to no avail anyway.

We believe he is using a piezo transducer, the ones that you have to
drive with a square wave which means that you cannot run it with DC as
in a series circuit. The piezo looks like a capacitive load, not an
inductive or resistive one.

The circuit I posted earlier is the configuration he should be using if
this is the case although there are better options.

In the meantime omkar is not replying and may simply be embarrassed
having seemingly committed 3 fundamental errors.

1) No current limit resistor from the I/O pin to the base

2) No cutoff resistor from base to emitter as the emitter is connected
to +5V (not required if connected to 3.3V or driven as open-drain)

3) Connecting a piezo transducer in a series DC circuit.

*Peter*

---------------------------------
Do you Yahoo!?
Get on board. You're invited to try the new Yahoo! Mail Beta.
omkar vyas wrote:
> hi thankx for ur support friends!!!
> my pizo is ringing normal
>
> changes i have made!
> 1.NPN transistor i have used 2N2222
> 2.in IODIR that pin is dfined as input pin
> 3.IOSET and IOCLR used to output the square wave!
> 4.base resistance is 1K ohm collector resistance is 100ohm in serise with buzzer of 24 ohm!
>
> these all changes made it ring!!!!!
Ahhh, it's a minature speaker, why do people call them buzzers anyway? I
always thought a buzzer was a small self-oscillating device
traditionally of the coil and contact variety but also including the
piezos/speakers with inbuilt oscillator, apply voltage and they sound.

Besides omkar, I thought you said you couldn't afford to change the
circuit :)

*Peter*
Peter u r right it is inductive buzzer and there r traditnal mistekes with naming conventions so i called it buzzer and seriously changing the circut is major problem with this circuit i will be facing i will have to cut the tracks and will have to use the links to over come problems r there anyway! :-(

Peter Jakacki wrote: omkar vyas wrote:
> hi thankx for ur support friends!!!
> my pizo is ringing normal
>
> changes i have made!
> 1.NPN transistor i have used 2N2222
> 2.in IODIR that pin is dfined as input pin
> 3.IOSET and IOCLR used to output the square wave!
> 4.base resistance is 1K ohm collector resistance is 100ohm in serise with buzzer of 24 ohm!
>
> these all changes made it ring!!!!!

Ahhh, it's a minature speaker, why do people call them buzzers anyway? I
always thought a buzzer was a small self-oscillating device
traditionally of the coil and contact variety but also including the
piezos/speakers with inbuilt oscillator, apply voltage and they sound.

Besides omkar, I thought you said you couldn't afford to change the
circuit :)

*Peter*

---------------------------------
Do you Yahoo!?
Get on board. You're invited to try the new Yahoo! Mail Beta.
Peter u r right it is inductive buzzer and there r traditnal mistekes with naming conventions so i called it buzzer and seriously changing the circut is major problem with this circuit i will be facing i will have to cut the tracks and will have to use the links to over come problems r there anyway! :-(

Peter Jakacki wrote: omkar vyas wrote:
> hi thankx for ur support friends!!!
> my pizo is ringing normal
>
> changes i have made!
> 1.NPN transistor i have used 2N2222
> 2.in IODIR that pin is dfined as input pin
> 3.IOSET and IOCLR used to output the square wave!
> 4.base resistance is 1K ohm collector resistance is 100ohm in serise with buzzer of 24 ohm!
>
> these all changes made it ring!!!!!

Ahhh, it's a minature speaker, why do people call them buzzers anyway? I
always thought a buzzer was a small self-oscillating device
traditionally of the coil and contact variety but also including the
piezos/speakers with inbuilt oscillator, apply voltage and they sound.

Besides omkar, I thought you said you couldn't afford to change the
circuit :)

*Peter*

---------------------------------
Do you Yahoo!?
Next-gen email? Have it all with the all-new Yahoo! Mail Beta.