0
\$\begingroup\$

Can someone help me with the basic working of this capacitive touch switch? I know it isn't very complicated but I just can't get over my brain block of what actually triggers when the button is pressed. Transistors have always been a frustratingly confusing topic for me, and I'm having trouble figuring out how the NPN output wire works.

What I do get: Connecting the LEDs to ground allows current to flow across, those make sense to me. Pressing the button causes the control unit to change the voltage it is outputting to the transistor base. This either causes current to flow or not flow. Looks like I would add a load across the NPN and V+ wires. I'm guessing the purpose of this is to measure the current, which is what triggers from a button press, but about here is where I get shaky.

\$\endgroup\$
7
  • \$\begingroup\$ Does this answer your question? Capacitive touch sensors, how do they work? \$\endgroup\$
    – JYelton
    Commented Apr 19, 2022 at 16:23
  • 3
    \$\begingroup\$ The headline asks how capacitive sensors work, which is already answered as provided by @JYelton, but yet your body text asks how to use the output of the sensor. Please clarify which is it that you are interested so your question is not misunderstood. \$\endgroup\$
    – Justme
    Commented Apr 19, 2022 at 16:29
  • \$\begingroup\$ @Justme good point, I edited the title to reflect that I am looking for how to measure the output from this specific sensor. \$\endgroup\$
    – InBedded16
    Commented Apr 19, 2022 at 16:31
  • \$\begingroup\$ @JYelton While helpful, I do understand how capacitive touch itself works and have updated the question to make it more clear. \$\endgroup\$
    – InBedded16
    Commented Apr 19, 2022 at 16:31
  • \$\begingroup\$ I've retracted my close vote. Your question was definitely not clear, which is what led me to vote-as-duplicate. \$\endgroup\$
    – JYelton
    Commented Apr 19, 2022 at 16:34

2 Answers 2

1
\$\begingroup\$

It's a bit confusing because it says NPN but they actually have a MOSFET in there and list drain to source resistance in the electrical characteristics. NPN is a quasi-generic term for a switching element between the output terminal and ground that is activated by the device. This usually requires a pull-up resistor and, given the characteristics of the switching element (BJT or MOSFET), allows the output to be adjusted to a range of voltages.

The datasheet tells you that the resistance across the MOSFET in the on state is <1 ohm. It also tells you that the voltage range is 5-24V and the maximum current through the switch is 1A. So you might hook it up like the following circuit, with R1 chosen so that V1/R1 (you can ignore the 1 ohm on-resistance of the MOSFET since your resistor will have a tolerance in excess of this) is less than 1A. For interfacing with logic, you can make the resistance 10s of kohm and so reduce the amount of power wasted in R1. The output of this circuit will be high when the button is not pressed and low when it is.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Thank you, that makes so much sense because I knew the symbol didn't look quite right but couldn't place it. Very helpful answer, much appreciated! \$\endgroup\$
    – InBedded16
    Commented Apr 19, 2022 at 16:53
1
\$\begingroup\$

The NPN output will pull to ground when activated.

So a load is put between some supply voltage such as V+ and the NPN output.

You can think of the output like it was a relay contact that is either open or connecting to ground.

\$\endgroup\$
1
  • \$\begingroup\$ So Control Unit output = B, GND = E, and NPN Output = C. Therefore when activated, the Control Unit outputs voltage and opens the transistor, current flows from E->C, pulling C to ground. When not activated, the load connecting C to V+ pulls C high. If that is correct, do I then only need to measure whether C is high/low to know when it is pressed? \$\endgroup\$
    – InBedded16
    Commented Apr 19, 2022 at 16:46

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.