I have a PNP transistor connected to an MCU with a ~15cm wire and I want to put a filtering capacitor on its base to avoid false triggering due to noise.
Now with NPN I always put the capacitor between base and GND. But with PNP, since it's pulled up and is active-LOW, I'm not sure if I should put the cap between base and VCC or base and GND.
And there is no need for high speed switching. It's an active buzzer.
I'm going to order 30 boards that have this circuit on them and I just want to be safe rather than sorry.
I don't have a photo of the actual wiring because I still haven't ordered the PCB. But the wires used are these "XH" terminal type:
Correct in which aspect? If you notice problems without a cap then there is a yet unknown reason and nobody can tell which of the three circuits cures that problem.
Like I said the board is not made yet to share the actual wiring. There are two boards which will be connected with four wires similar to the one I posted above.
I can post a photo of the wires and the first board tomorrow. But the second board remains to be made. Which is why I want to implement the capacitor in it. Because if I order it (I'm ordering 30) there will be no way to change it.
I'm just trying to be safe here. I don't understand the general negativity so far towards this approach. Isn't it generally beneficial to have a filtering cap on the base if you're not switching high speed?
With an NPN this is the way you'd put a filtering cap on the base. From base to ground:
I wanna know which way is correct for a PNP. From base to VCC or from base to ground.
If you don't mind I'm going to choose post #10 as the solution because it's shorter, more generalized and easier to understand/remember than my schematic, in case someone stumbles upon this thread in the future.
By the way, when you draw schematics, try to avoid using symbols for MOSFETs and BJTs that include pin numbers.
Doing so might confuse you when you designing the PCB; on the other hand if you know pin 1 is emitter, pin 2 is the base etc. then it’s okay to have the numbers displayed.
Yes; the first version in your corrected schematic.
But you need to understand the serious reason.
The transistor responds to the voltage between emitter and base (and let me forestall any comments that it amplifies current, not voltage, the current through the base does strictly depend on the emitter-base voltage). So you want the capacitor to buffer (stabilise) that voltage.
If on the other hand, you connect the capacitor from base to the collector supply - which is ground when using a PNP transistor - then the capacitor applies any fluctuations in the overall supply voltage to the base which then amplifies those fluctuations. Precisely the opposite of what you would intend!
It is generally advised that to allow the following comments to make sense, you do not make significant changes to earlier postings of code or in this case, diagrams. The present forum system does allow the alterations to be examined and you did explain that you altered them, but it is actually neater in future, to simply post the corrected version and make reference to the previous.