EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

buzzer rings low!

Started by omkar vyas July 15, 2006
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?


---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1/min.







An Engineer's Guide to the LPC2100 Series

Hi, May be...

Check if your 2N3906 Transistor is always on.
The P23 pin cannot drive to 5V, only 3.3V.
May be try using IODIR to toggle 822Hz, (with P23 output
permenantly low). and do not use IOSET/IOCLR.
Use a 1K-2KR collector resistor would do.

Regards
--- In l..., omkar vyas
wrote:
>
> 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?
>
>
> ---------------------------------
> Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.
Great rates starting at 1/min.
>
>
>



----- 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

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.
Hi,

Oops...Sorry....
I mean toggle the pin with IODIR bit. Keep toggling the pin
as/between output and input at 822Hz.

When you set the port as output, is will drive the base low
and turn on the transistor.
When you set the port as input, is will tri-state and the base
voltage will float to about 5V cutting off the transistor.

Do NOT use the port bit as output. Simulate it as
"Open collector". Hope it helps and have fun....

Regards

--- In l..., omkar vyas
wrote:
>
> 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.
>
>
>
Hi,

Oops, Adding..
Your description sounds like the collector resistor is in
series with the buzzer. Resistor should be parallel with buzzer.

--- In l..., omkar vyas
wrote:
>
> 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.
>
>
>

> 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?
>

1. Isolate the port pin from transistor and check if you are getting square
wave at port pin.
2. Connect the base of transistor by small resistor (1k or so) to port pin.

3. Connect buzzer between collector and +ve supply (12 volt)

4. Ground the emitter of transistor.

Toggle pin with IOCLR and IOSET.
Best Regards,

Mukund Deshmukh.
Beta Computronics Pvt Ltd
10/1, IT Park, Parsodi,
Nagpur-440022
Cell - 9422113746

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*
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*



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.
>
>
>

The 2024 Embedded Online Conference