3
\$\begingroup\$

(Note: I have found several other questions on a similar topic, but none of them address my specific issue.)

I have a lamp that is controlled by non-contact touch buttons. The user-facing surface is plastic with icons printed on it. When the user places his finger on the plastic, the touch is sensed capacitively by metal pads on the circuit board underneath:

lamp

circuit board

I am attempting to add an alternative control method, by way of a microcontroller.

By connecting one of the IO pins of the microcontroller to one of the sense pads with a small (22pF) capacitor in series, I am able to trigger the pad by oscillating the IO pin.

My problem, however, is that this causes the touch pads to stop working in the normal way - or, at least, weakens them to the point that they can't be triggered through the plastic. If I touch the pad with a small screwdriver, it triggers. But it doesn't trigger capacitively anymore.

Adding a 10K resistor in series fixes the problem. But then the microcontroller can no longer control the device. If I change the resistor to 1K, the microcontroller can once again control the unit, but the touch pad stops working properly.

I seem to be in an "either-or" situation: I can either have the touch pad working, or I can have the microcontroller be able to control it.

Is there a way for both control methods to coexist? Perhaps by adding more components, or changing the value of the capacitor? I tried 100nF, but it just stopped everything working.

\$\endgroup\$
10
  • \$\begingroup\$ Which IC is used for capacitive sensing? I can't read the IC name from the image shown. Some touch sense ICs have GPIO outputs. If the IC that your board has is one of them then it can be quite easy to hack, or tricky otherwise. \$\endgroup\$ Commented Jul 11, 2022 at 9:18
  • 1
    \$\begingroup\$ Instead of generating signal, try to switch IO mode between input (normal state) and output (touched state). I think, about 1000 pF should work. Have you connected both circuits common wires? Another way it to insert your circuit between output transistors and controller. Another - between circuit output and lamp. 2-transistor circuit on board looks like simple CMOS inverter. \$\endgroup\$
    – Vladimir
    Commented Jul 11, 2022 at 10:20
  • \$\begingroup\$ @Vladimir The other transistor on the board is acting as a primitive voltage regulator. The output uses a single MOSFET. I have tried setting the input as you suggest, but the problem remains. \$\endgroup\$ Commented Jul 12, 2022 at 9:54
  • \$\begingroup\$ How does it behave? Do you turn on the circuit already connected? Because it can do zero adjust at power-on. May be wires are too long or capacitor too big. MCU input pin capacitance alone, i think, shouldn't cause triggering. \$\endgroup\$
    – Vladimir
    Commented Jul 12, 2022 at 10:08
  • \$\begingroup\$ Yes, the circuit is already connected at power on. If I use a 10K resistor in-line, the touch pad continues to function normally. Therefore the (necessarily long) wires are likely not the cause. But I wouldn't have thought 22pF excessive...? \$\endgroup\$ Commented Jul 12, 2022 at 10:15

1 Answer 1

2
\$\begingroup\$

Yes, you probably can keep the touch pads working as designed, while allowing an external microcontroller to trigger them.

You've already confirmed that you can trigger the pads from a microcontroller IO pin through a 22 pF capacitor, but this interferes with normal "touch" detection. You've loaded the touch pad with too much capacitance, and it's swamping out the small capacitance of a nearby finger. If the microcontroller IO pin is configured as an output -- doesn't matter whether it's "high" or "low", you've basically loaded the touch pad with 22 pF to ground. (I'm assuming you've tied the microcontroller ground to the touchswitch PCB ground, by the way. If not, then the problem may be interference rather than capacitive loading.)

Configure the IO pin as an input and be sure to disable any pullup or pulldown as well. Then it will display a high impedance instead of a short to ground or Vcc. It will still have some capacitance to ground, but hopefully not enough to swamp out your finger touch. Only place it in output mode when you're sending a request, and experiment to find the right duration of pulse(s) required to trigger the pad.

\$\endgroup\$
1
  • \$\begingroup\$ Unfortunately, I have already tried this. My microcontroller keeps the pin tristated when not actively trying to trigger the pad. \$\endgroup\$ Commented Jul 12, 2022 at 9:56

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.