1
\$\begingroup\$

I'm currently trying to figure out how the Arduino Capacitive Sensing Library works. There is already a similar, but more general question: How does the Arduino CapSense library work? The answers there explain that it's a RC circuit and therefore, there is a RC time constant which depends on the capacitance C. So if C changes - i.e. a human finger is in proximity of the sensor metal plate - there is a different time measurement.

schematic

Source: https://playground.arduino.cc/Main/CapacitiveSensor/

  • Does this "capacitor" (sensor metal plate + human finger) get fully charged/discharged? (What does that even mean in this context?)
  • I'm thinking yes because if I'm imagining a huuuuge sensor plate that can store lots of charge, wouldn't that be like shorting it to GND? Then, the input pin would never change.
  • How important are the additional capacitors "to improve stability"?
\$\endgroup\$
4
  • \$\begingroup\$ your question is about how a piece of software accomplishes a task ... it is not a question about electronics design ... please examine the library source code to determine the answer to your own question \$\endgroup\$
    – jsotola
    Oct 9, 2021 at 19:03
  • \$\begingroup\$ read the title of your post ... if that is not your question, then please do not ask it \$\endgroup\$
    – jsotola
    Oct 9, 2021 at 19:06
  • \$\begingroup\$ the library could simply be charging or discharging for a fixed time interval ... full charge or full discharge could be irrelevant \$\endgroup\$
    – jsotola
    Oct 9, 2021 at 19:10
  • \$\begingroup\$ if the library waits for the voltages at the two pins to be equal, then yes, the capacitor is charged to the voltage at the send pin \$\endgroup\$
    – jsotola
    Oct 9, 2021 at 20:32

2 Answers 2

3
\$\begingroup\$

No, the capacitance does not need to be fully charged for the input pin state to change.

The capacitance only needs to charge enough that the input pin voltage crosses the input logic threshold voltage to change the state to logic 0 or to logic 1.

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

it only puts enough charge in/out for the input pin to change its reading.

Even a huge capacitor will eventually charge up or discharge, if it's taking too long use a lower resistance for R

\$\endgroup\$
0

Your Answer

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

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