0
\$\begingroup\$

Am wanting to use this Capacitive push button for a project but am having trouble understanding the application circuit.

I understand that it is a PNP Highside switch and that current will flow to the load when the base is connected to ground. However I don’t understand why the pin on the controller is a output and the purpose of R1. I would have thought that the the controller pin should be a input?

Any help with a description on the circuit operation will be great,

Cheers,

LED Button Application Diagram

\$\endgroup\$
1
  • \$\begingroup\$ Provide links to the schematic and to the controller you are using, or hoping to use. A link to the capacitive PB would also be nice. Details matter. \$\endgroup\$
    – jonk
    Commented Feb 4, 2020 at 7:44

2 Answers 2

1
\$\begingroup\$

The controller pin is an output as it has to drive the PNP's input (the PNP's base).

I think you're confused because the current that is needed to activate the PNP flows into the controller. That doesn't make it an input. It is still an output as it drives (controls) the circuit connected to it.

Input <=> output indicates what (controller) controls what (PNP), not the direction of current.

R1 is needed to make sure the PNP is off when: - the controller hasn't initialized the pin as an output yet, at startup most microcontrollers define IO pins as unconnected. That would mean the state of the PNP will be unclear. R1 fixes that, it switches the PNP off. - the controller uses an "open collector" or "open drain" output which can only "pull down" the output. Then the controller cannot actively switch off the PNP as it can only pull current and not connect the output to VDD. R1 fixes that, when the output is off R1 pulls the base of the PNP up to VDD so that the PNP is off.

\$\endgroup\$
1
  • \$\begingroup\$ Just to add on the pin output. Totem pole pins (push-pull) can both source and sink current. Sinking current means connecting low side internal transistor to the ground so that the current can flow "into" the pin. But it's still considered output as noted in the answer above. \$\endgroup\$
    – NStorm
    Commented Feb 4, 2020 at 8:06
0
\$\begingroup\$

The transistor is switching the current that runs the LEDs the sensor itself does not need this connection.

The purpose of R1 is to ensure that the transistor (and therefore the LED) turns fully off whe the controller is not commanding light. without it there's a likelyhood of a small leakage of current and thus a faint glow coming from the LEDs; especially if it's hot.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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