0
\$\begingroup\$

I have previously used dedicated touch pins and connected them across an electrode and been able to easily detect touch. Usually in such a case one wire directly from the pad to the dedicated touch pin would work.

I would like to do the same except the micro I am using is doing a few things and I've only got two digital pins available. Is there a way to do captouch sensing using digital pins?

I only need one pad detection. I can make it fairly big for better sensitivity etc. Is this possible?

I ask as everything I could find online seems to need analog comparators and relaxation oscillators to make the measurement ( analogue pin on micro).

\$\endgroup\$
  • 2
    \$\begingroup\$ then you really didn't look very far. It feels like a very old trick to switch an output high, then switch its role to a high-Z digital input and count the cycles until it turned low. Literally, all over the internet. \$\endgroup\$ – Marcus Müller Aug 12 at 12:02
  • \$\begingroup\$ Could you provide a link to something of the sort? I don't think I follow. \$\endgroup\$ – Hassan Nasir Aug 12 at 12:30
1
\$\begingroup\$

You don't say which microcontroller but some manufacturers offer a software library for capacitive sensing. Essentially they perform measurement similar to Qtouch technology. Library or not, yes this should be possible, but if you do it yourself you are basically replicating patented technology.

\$\endgroup\$
  • \$\begingroup\$ what patent are you referring to? \$\endgroup\$ – George White Aug 17 at 4:03
1
\$\begingroup\$

I am not promoting the product but just to give you a hint. I have been using touch controllers and this is one smallest and just enough for the need.

MBR3102 from Cypress

It needs no extra pins. No software. It can be used to sense two touch buttons and is the cheapest in the family. If you can accomodate this in the design, give a try. I have also explored similar IC solution from QTouch family but this IC is better in terms of performanceenter image description here

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

With two pins you could create a software I2C interface and interface an IC (e.g. QTouch)

\$\endgroup\$
  • \$\begingroup\$ This needs expanding on. I've never been able to implement this with less than 3. If a device is a master only you need an output to drive a clock transistor, an output to drive a data transistor and an input to see the data. Several micros have two pins for I2C but implement this logic internally. The only exception I can think of is if you only want to monitor an existing conversation between other devices and not take part, \$\endgroup\$ – Warren Hill Aug 12 at 14:14
  • 1
    \$\begingroup\$ This is not SPI. The SDA pin is bidirectional. Configure it as an output or input (high-z) whenever you need the function. To write on SDA, make it an output, to read make it an input (yes, you'll need an additional pull-up on both of these lines) and read from it. You're not writing and reading at the same time. SCK is always driven. \$\endgroup\$ – Tom L. Aug 12 at 14:29
  • \$\begingroup\$ Just for clarification; software I2C is always either low output or floating with pull-up resistors. It is never high output. \$\endgroup\$ – Justme Aug 12 at 16:57
  • \$\begingroup\$ This is more of a comment than an answer. \$\endgroup\$ – Voltage Spike Aug 15 at 16:39

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.