Photography. Gadgets. And Other Things Besides.

Touch-Sensitive Button

Here’s a little project that makes use of touch-sensitive buttons, based on QProx’s QT110 capacitive touch-sensing IC. Electrodes are be placed behind a plexiglas panel to activate these buttons. I mostly see questions about PC power switches, so I’ll cater to this, but the QT110 will ground its output on activation (i.e., it’s active-low) so you can use it for any button that does this.

The QT110 by QProx (datasheet here, PDF) is actually a very simple IC to implement in a circuit. Better yet, it’s CHEAP! All it really needs to function is a 10nF capacitor (non-electrolytic per their instructions), an electrode, and a 2.5-5VDC power supply.

In this guide, I’ll add some other options supported by the QT110 that might be of interest to the PC modder.

First, the parts list:

  • 1 x Breadboard (Radio Shack p/n 276-150)
  • 1 x QT110 IC (Digikey p/n 427-1000-ND)
  • 1 x IC socket (Digikey p/n A24802-ND)
  • 1 x Piezo sounder (Digikey p/n P9910-ND)
  • 1 x 475kOhm resistor (Digikey p/n 475KXBK)

You’ll also need some wire, and (obviously) some soldering equipment. For wire, I use 20-gauge solid-core wire because it fits nicely into the holes in the breadboard. It’s a little less flexible than braided-core, but I find it easier to solder and trim.

First, we set up the signal path around the breadboard.

For the most part, I use lead clippings from resistors to make jumpers. Don’t worry, I know it looks sparse, but it’ll make sense as we go along.

Next, we’re going to add the IC socket, and leads going to power and ground. For a PC power switch, you can have the ground lead go to the power switch header along with your output lead (check your motherboard’s pinout to connect it correctly). This particular circuit will activate a DVD-ROM tray eject button, so the other end of these leads go to a standard molex connector — the red goes to red (+5VDC) and black goes go black (ground).

Make sure to orient the IC socket with the notch facing down. You’ll be orienting the QT110 chip the same way, with pin 1 at the bottom right in the image.

The little "jumper" you see at the left straddling the power / ground lead is only there to hold the wires in place. You don’t need to include it if you don’t want to, but it helps keep things nice and neat.

Next, we’re adding leads for output (pin 2 — green wire), the electrode (the green wire below the resistor), and a snazzy LED (the red and black wires leaving from the top of the board). Also note the short black wire next to the IC socket connecting pins 1 and 3.

I’m going to assume you know how to wire up a resistor/LED combination. If not, there are great guides on the Internet — just Google the terms.

The source voltage is 5V. The chip will source 1mA. The LED will be on unless you "press the button", i.e., the circuit is active — perfect for backlighting a touch-sensitive area on a front panel, wouldn’t you say?

Here’s an annotated version of the last photo. I’ve marked the corner pins for the IC (1,4,5,8), and the various leads. Also, we have Cs and Rs marked.

Cs is supposed to be a 10nF (.01uF) non-electrolytic capacitor. Instead, I’m adding a small ceramic piezo sounder. The part # I’ve given in the first post fits the QT110 specs — 3.5-4.5kHz peak out, 10nF capacitance. It will output a 75ms "beep" every time you press the button, adding some useful tactile feedback to our button.

However, as you can read for yourself on the spec sheet, when you apply power to the circuit, you’ll hear a clicking coming from the sounder unless you add the Rs resistor in the photo. Keen eyes will see that while I spec’d a 475kOhm resistor (per QProx’s recommendation), I’ve only used a 100kOhm resistor. Why? It’s what I had lying around, and it does a good job of muting those clicks.

Here’s the final photo of our fully assembled circuit. Note the orientation of the notch on the chip, as I stated earlier. Also, note that the piezo sounder is non-polarized — doesn’t matter which way you hook it up across the to long middle busses.

The size of the sounder (about the size of a quarter) is the reason for the size of the breadboard (a little smaller than a business card). If you were to replace it with a capacitor (for example, Digikey’s p/n P3848-ND), you could very easily fit 3 such circuits on one board with some clever jumpering. Of course, you wouldn’t get the snazzy beeps, either.

Also, if you do forego the sounder, you won’t need Rs either. The circuit will work just fine without it.

All that remains to be done is to connect your output, power, ground, and electrode leads. For the first three, to hook up a power switch, I did this:

- ground (black) and output (green, top) go to the motherboard power-switch header. For my circuit, I clipped the leads from the power button on a now-dead case and soldered them to the breadboard so that I had a connector already attached, without requiring any crimping.

- power (red) is tied to +5VSB on the ATX connector. However, to make it easy to move between PC cases, I bought an $8 ATX power connector extension like this, traced the +5VSB wire (usually the purple one coming from your PSU), and removed the corresponding pin on the extension (you’ll need a molex pin remover for this). I then cut back some of the wire sheath, soldered the red wire from the QT110 circuit to the exposed core, and slipped some heatshrink tubing over the lot of it. Pop the pin back into the ATX connector, and you’re done. Easy peasy.

I’ve tested the circuit by touching the bare wire on the output lead and it works fine. I won’t go into electrode design because what will work for one person won’t work for another, depending on what you’re trying to project the sense field through (plexiglas, wood, plastic, glass), its thickness, etc. Obviously, don’t connect it to your metal PC case or you’ll probably turn your entire PC into a big power button.

Connect the motherboard header, connect the ATX extension between the motherboard and the ATX power connector coming from your PSU, run the wire to the electrode, and you’re done!

Some schematics are shown below. CS is the piezo sounder in my schematic. The part I’ve spec’d is 10nF; if you need to increase the sensitivity you can add a non-electrolytic cap (5-20nF) in parallel with the sounder to do so. The RS resistor is to "mute" the clicks that the voltage step across the sounder create.

The LED is tied to the OUT pin (pin 2) and the Vss pin (pin 8, ground). RL will vary, of course, depending on the LED you choose. In the schematic above I’ve really set each lead coming off the circuit apart from the rest to (hopefully) avoid confusion. Here’s a close-up of the power, ground, and output leads in my own circuit so people can get an idea of what I did to physically connect these wires.

The +5VSB lead traces back to pin 1, Vdd. I spliced it to the +5VSB line in this ATX power extension (NOTE: in my extension, it’s a white wire; according to ATX standards, it’s the PURPLE wire coming off your PSU, so make sure you match them up right!!!).

The GND lead traces back to pin 8, Vss; the FP_BUT lead traces back to pin 2, OUTPUT. As you can see, I hacked off the "button" end of an old power button lead and soldered it to the appropriate pins on the circuit so that I’ve already got the right connector ready to be slipped onto the front panel power button header on the motherboard.

That’s it! You’re done!