Close

Playing with Capacitive Sensors for Buttons

A project log for I LOVE LAMP

Explorations in creating lamps with flexible light emitters & curved surfaces

todbottodbot 05/05/2017 at 23:133 Comments

I made a quick capsense button PCB for the CAP1188 capacitive touch chip . I intentionally followed none of the recommendations for designing capsense buttons. But I did design it so it would easily plug into the Adafruit breakout board which can nicely live on a small solderless breadboard with an Arduino Pro Micro.

To make it a bit more usable, I covered the bare copper with a sheet of kapton tape.

When running the simple test sketch for the chip, I discovered just how bad the board design was. Pretty much any touch would trigger multiple inputs. But after reading the CAP1188 datasheet a bit, I made a small config change of

cap.writeRegister(0x1F, 0x1F); // addr 0x1F set sensitivty to 0x1F (4x, default 32x)

to reduce the sensitivity, it ends up working out pretty well.

I may end up using this board as a tester, but I do really need to redesign it. :-)

Discussions

Simon Merrett wrote 05/06/2017 at 21:38 point

Can you use the same technique as the OS Tricorder project  (I know there are loads) to make a rotary capacitive touch input, a la Apple touchwheel? I can see that you are already interested in rotary encoders for device input. Perhaps you can make the body of the lamp part of the controller. 

  Are you sure? yes | no

todbot wrote 05/06/2017 at 22:23 point

Hi Simon, Yes I totally could make a wheel. Most capsense controllers support a wheel mode, and even though the CAP1188 chip I use here does not seem to, you can fake it in firmware.

And you guessed my end goal: making part of the lamp body the controller. I've started experimenting with flexible PCBs and my hope is to make a flexible capsense controller that can conform to any crazy shape I end up with.

  Are you sure? yes | no

Simon Merrett wrote 05/07/2017 at 06:22 point

I've been using copper foil tape that gardeners use to repel slugs. Cheaper than flexible pcb material when you are just experimenting with the pad forms. It does solder with flux. 

I wrote some rotary encoder code for ATMEGA328P and would love to experiment with forms for a capacitive version (flat surfaces are pretty unimaginative). You mentioned the smoothness and inertia of rotary inputs in an earlier log and capacitive sensing would be probably be suitable for this. 

  Are you sure? yes | no