Capacitive Sensor Design




Capacitive sensors are an elegant way to control an Arduino using the Capacitive Sensing Library. But the sensitivity and error tolerance depend strongly on the hardware (sensor) design. I found a design guideline here and tested different setups which mostly work well if the Arduino was powered by battery. But the sensor signal changes dramatically if I connect the Arduino to a power supply.

Actually I found a design for five (and more) sensors which works well powered with battery and power supply.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Materials and Tools

For a the five button sensor you need:

  1. Wire - 6 pieces, long enough to reach the Arduino
  2. Five washers - outer diameter 10 mm, connected to the receive pins
  3. Aluminum sheet - 135 x 30 x 0.2 mm³ - connected to ground
  4. Plywood or similar - 130 x 30 x 5 mm³
  5. For a breadboard setup five needles

Also, not shown, some tools and stuff:

  1. Cutter
  2. Soldering gun
  3. Drills - 2 and 3 mm
  4. Double-sided tape
  5. Superglue

Step 2: Prepare the Plywood

The plywood sheet is the base of the sensor field. Drill the holes like seen in the drawing. For each button you have to drill a big (3 mm) and a small (2 mm) one. The small one is for the sensor wire and the big one for the status LED. The rectangular hole is for the grounding of the aluminum sheet.

I tested different layouts and the one with 2 cm distance from button to button works best. As you see I used a longer piece of plywood to possibly extend the number of sensors.

Step 3: Cut the Grounding Plate

To get a better signal of the sensors (lower noise to signal ratio) you need a grounding like explained here. For this you have to cut the aluminum sheet like shown in the drawing. The small strip on the right side is to attach the wire for grounding.

Step 4: Prepare the Washers As Receive Contacts

The washers will be connected to the receive pins at the Arduino. Therefore you have to solder the wires to the washers. Unshielded wires work for me. At different setups shielded ones could be better.

Step 5: Join Aluminum Sheet and Plywood

Glue the grounding plate with two double-sided tape strips to the plywood. Pay attention to center all holes in the aluminum and the plywood correctly.

Step 6: Insert the Washers to the Plywood

I used superglue to fix the washers on the plywood. But you can also use other adhesives. Keep care that there is no contact between the washers and the ground plate.

Step 7: Needels As Breadboard Contacts

If you want to use the sensor field for a breadboard setup it is useful to have some pins on the wires. I use the top part of needles and solder the wires to the heads.

Step 8: Cover the Sensor Field

Because it should be a capacitive sensor field I covered it. For the first trials I use a piece of cardboard and some red dots to mark the sensor positions.

Step 9: Test the Sensor Field

To test the sensors I wrote a small Arduino program.

Wiring the sensor and the Arduino:

  • Send Pin: D2
  • Receive/Sensor Pin 0-4: D2-D7
  • Ground: GND
  • One 10 MΩ from send pin to every receive pin

The buttons are connected as explained in the CapSense documentation.

The serial output can be switched using the debug variable:

  1. int debug = 1: continuous serial output of the five sensor values
  2. int debug = 0: output only the key-press event (c0-c4). This can e.g. used by a Python script.

The video shows the output of the program in debug mode. Note that there are influences between each sensor press to the other sensors. This has to be filtered by the software.

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    11 Discussions


    2 years ago

    Can your code work in that way, lets say if you swipe in one direction LED turns on and if you swipe in other direction LED turns off? Or is this additional part which needs to be coded?


    2 years ago

    Nice and clean work! Congratulations! Only thing is that have you ever tested the resistance of each washer after soldering since the solder might be the reason why they perform differently.


    Reply 4 years ago on Introduction

    I use inkscape ( It's not a CAD programm and has not the standard CAD features but works well for small drawings.


    Reply 4 years ago on Introduction


    You can download this CAD program for free that is very powerful and works almost identical to AutoCad...


    4 years ago on Introduction

    Whichever sensor was the red line in the graph, I'd try to copy that one *exactly* for making your other sensors. That one had a really strong signal with almost zero noise. Also, thanks for teaching me how capacitive sensors work, because I never actually knew!! =)

    1 reply

    Reply 4 years ago on Introduction

    The different colors are the five single sensors in the setup. Not different designs. I don't know exactly why the signals are so different. I see influence because of the breadboard and the position on the breadboard. Actually I make a fix PCB setup to possibly eliminate/lower the influences.


    4 years ago on Introduction

    Wow, this looks like a very nice and clean setup! Well done!