0
\$\begingroup\$

At first I have made a simple circuit to make tones with a passive buzzer. I have used a buzzer, 1K resistor on base and a NPN transistor (8050). This is working nicely. The circuit is similar to what you can see at https://startingelectronics.org/beginners/circuits/arduino-buzzer/ except that I have a passive, not active, buzzer. The transistor is on the low side.

I am generating the square wave with Arduino's tone() function.

Next I wanted to replace the individual parts with a module. I got a module that is similar to this one: https://www.aliexpress.com/item/New-Electric-3-3-5V-Passive-Buzzer-Module-PCB-Dimension-3-3cmx1-3cm-For-Arduino-9012

When I started using it, I discovered that it has a PNP transistor connected on the high end and that when the I/O pin is low the transistor and buzzer are passing current and wasting energy.

It makes sense to me that designers understand that default for off is LOW, right? Why would somebody make the module this way with off requiring a HIGH signal on the I/O pin? Any advantages to PNP transistors over NPN here?

\$\endgroup\$
2
\$\begingroup\$

Yes it would make sense for high or on to be the active state. However in the old days the prevalent logic family was TTL and it can sink much more current to ground than it can source from V+ so active low sort of caught on. In modern CMOS devices the N channel (pull down) transistor has better characteristics than the P channel (pull up) which again gives a bias towards outputs that can sink more current than they source.

Why the PNP it is the easiest transistor to use with an active low output

\$\endgroup\$
0
\$\begingroup\$

It makes sense to me that designers understand that default for off is LOW, right?

No, you are wrong here. The default for active is low in many cases - SPI slaves use almost always an active low chip select pin. The developer is supposed to read the documentation of the hardware he/she is using - the magic smoke may escape otherwise.

Any advantages to PNP transistors over NPN here?

They probably just used the cheapest components available - that were PNP transistors in your case.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.