Reply by omkar vyas July 17, 20062006-07-17
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.



An Engineer's Guide to the LPC2100 Series

Reply by omkar vyas July 17, 20062006-07-17
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.
Reply by Peter Jakacki July 17, 20062006-07-17
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*
Reply by omkar vyas July 17, 20062006-07-17
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.
Reply by Peter Jakacki July 16, 20062006-07-16
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*

Reply by David Fowler July 16, 20062006-07-16
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
>
Reply by Tom Walsh July 16, 20062006-07-16
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..."
----------------

Reply by David Fowler July 16, 20062006-07-16
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.

If the output can be set to open collector (open drain) mode you might
get it to work but you should have a pull up resistor between the base
and +5 for this. Warning, this may damage the output pin. I don't know
what the capabilities of the port pins are; I don't even know which
processor you're using.

One answer may be to just remove the transistor and place a jumper
between the base and emitter to connect the uC directly to the 2K
resistor. This way the uC can drive the buzzer directly.

Can you provide more of a description of the buzzer? Part number etc..

If you can change the circuit, I would use a NPN transistor with the
emitter grounded, a base resistor to ground and to the uC port pin. Put
the series resistor and buzzer between the collector and +5. Now the
processor can turn on the transistor with the 3.3V and can get it off by
outputting 0V.

I hope this helps.
David

www.uCHobby.com
Microcontrollers for Hobbyist

> -----Original Message-----
> From: l... [mailto:l...] On
Behalf
> Of omkar vyas
> Sent: Saturday, July 15, 2006 6:44 AM
> To: l...
> Subject: [Retrieved]still!!! [lpc2000] buzzer rings low!
>
> hi firends now i have changed the direction of the pin to input and
also i
> have connected 2k resistence to the collector and then buzzer and then
> ground but still it is not at all ringing i thing the transistor
switches
> once only then it can not switch ! i mean i should get squre wave at
the
> base of the transistor but i am getting continuously high with
squrewave
> which just can not come to ground level at all.
>
> transistor can not switch is there is any thing that transistor is
> operated on 5 volts but base is supplied with the 3.3 volts is this
the
> problem or ARM's sinking capacity is low or some thing?
>
> Leon Heller wrote:
> ----- Original Message -----
> From: "omkar vyas"
> To: "probs"
> Sent: Saturday, July 15, 2006 6:11 AM
> Subject: [lpc2000] buzzer rings low!
>
> i am sorry friends it is very silly question but i am working on it
so
> long!
>
> lpc2104 - port pin number -P23 - transistor(2N3906) base emitter
supplied
> with +5volts collactor is connected to 100 ohm Resistance and then
> buzzer(it
> is not dc buzzer but it operates on square wave) i am giving 822Hz
Freq!
> which is ideal but buzzer rings very low!!!
>
> what should i do? to ring it high Darlington??? is ARM is giving very
low
> out put current or what?
>
> i cant afford to change the circuit design but any transistor can i
use
> instaid of (2N3906 PNP)? whith good gain?
>
> It sounds as if you are using a piezo sounder.
>
> The 100R in the collector is the problem! Try making it 2k. You could
> just
> put it on the output pin, you will probably get enough output. I
often do
> that with a 3.3 V MSP430 MCU and it's quite loud. You can get more
output
> by
> connecting it to two outputs, and using opposite phases.
>
> Leon
> ---------------------------------
> Do you Yahoo!?
> Get on board. You're invited to try the new Yahoo! Mail Beta.
>
>
>
Reply by Ed Koffeman July 15, 20062006-07-15
With 5v tolerant I/O and a resistor from base to emitter (might not be
necessary, but I'd assume the 10 to 150 ua Ipd specification means you need
less than 4k ohms here), it _should_ allow the transistor to turn off when
the port is made into an input, as suggested, and IODIR switched to make the
square wave.

No base resistor is mentioned, but there should of course be one to limit
the base current. As pointed out below, this could also work in combination
with a base-to-emitter resistor to form a voltage divider in case the
5v-tolerant I/O doesn't really allow the base to float up and shut off the
transistor.

An alternative is to use a P-channel MOSFET with around 2v threshold
voltage, and this would not require any base resistors, plus should work
with regular I/O SET and CLR.

Ed Koffeman

-----Original Message-----
From: l... [mailto:l...] On Behalf Of
Peter Jakacki
Sent: Saturday, July 15, 2006 7:54 AM
To: l...
Subject: Re: [lpc2000] buzzer rings low!

Leon Heller wrote:
> It sounds as if you are using a piezo sounder.
>
> The 100R in the collector is the problem! Try making it 2k. You could just
> put it on the output pin, you will probably get enough output. I often do
> that with a 3.3 V MSP430 MCU and it's quite loud. You can get more
> output by
> connecting it to two outputs, and using opposite phases.

Leon's right, your 100R is probably too low although we do not know what
resistors you used in the base. The transistor will not turn off if you
are driving it with 0 to 3.3V as the emitter is connected to +5V and the
base-emitter threshold is around 0.6V. You need to connect a resistor
from the base to the emitter which forms a voltage divider with the
series base drive resistor to achieve cutoff.

The circuit below will work fine and achieve full voltage swing across
the piezo although diffential drive via 2 I/O pins is usually more
effective. Alternatively I have driven piezos through a spare RS232
transmitter which pumps +/- 9V into the piezo making it nice and loud.

An NPN would have been a better choice.

..-------------
| |
.-. |
| |4K7 |
| | |
'-' |
___ | |<
o-----|___|-----o-----|
10K |\
|
| PIEZO
| __ /|
o--------| | |
| .-|__|<->
.-. | \|
| | |
1K| | |
'-' |
| |
|------'
==GND
(created by AACircuit v1.28.6 beta 04/19/05 www.tech-chat.de)

*Peter*



Reply by Peter Jakacki July 15, 20062006-07-15
Leon Heller wrote:
> It sounds as if you are using a piezo sounder.
>
> The 100R in the collector is the problem! Try making it 2k. You could just
> put it on the output pin, you will probably get enough output. I often do
> that with a 3.3 V MSP430 MCU and it's quite loud. You can get more
> output by
> connecting it to two outputs, and using opposite phases.

Leon's right, your 100R is probably too low although we do not know what
resistors you used in the base. The transistor will not turn off if you
are driving it with 0 to 3.3V as the emitter is connected to +5V and the
base-emitter threshold is around 0.6V. You need to connect a resistor
from the base to the emitter which forms a voltage divider with the
series base drive resistor to achieve cutoff.

The circuit below will work fine and achieve full voltage swing across
the piezo although diffential drive via 2 I/O pins is usually more
effective. Alternatively I have driven piezos through a spare RS232
transmitter which pumps +/- 9V into the piezo making it nice and loud.

An NPN would have been a better choice.

.-------------
| |
.-. |
| |4K7 |
| | |
'-' |
___ | |<
o-----|___|-----o-----|
10K |\
|
| PIEZO
| __ /|
o--------| | |
| .-|__|<->
.-. | \|
| | |
1K| | |
'-' |
| |
|------'
== GND
(created by AACircuit v1.28.6 beta 04/19/05 www.tech-chat.de)
*Peter*