3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Arduino and Touchpad Tic Tac Toe

Step 5The touch pad - how it works

The touch pad - how it works
«
  • wiregrid1.png
  • wiregrid2.png
Just as we used a crossbar multiplexer to set up an LED matrix with minimal pins, we can use a similar crossbar multiplexer to set up a touch sensor array, which we can then use to activate the LEDs. 

The concept for this touch pad is simple.  It is essentially a wire grid, with three bare wires running in rows, and three bare wires running in columns above the rows.  At each intersection point is a small square of insulation that prevents the two wires from touching.  A finger touching the intersection will make contact with both wires, resulting in a huge, but finite resistance between the two wires.  A small current, but detectable, current can therefore be made to flow from one wire to the next, via the finger.

To determine which intersection was pressed, the following method was used:
Step 1: Set all the column lines to OUTPUT LOW.
Step 2: Set the row lines to INPUT, with the internal pullups activated.
Step 3: Take an analog read on each row line until the value drops below a given threshold.  This tells you in which row the pressed intersection is.
Step 4:  Repeat Steps 1-3, but now with the columns as inputs and the rows as outputs.  This tells you which column the pressed intersection is.

To minimise the effects of noise, a number of readings are taken and then averaged.  The averaged result is then compared against a threshold.

Since this method just checks against a threshold, it's not suitable for detecting simultaneous presses.  However, since tic tac toe proceeds in turns, reading a single press is sufficient.

Attached is a sketch illustrating how the touchpad works.

As with the LED matrix, bits are used to represent which intersection was pressed.


« Previous StepDownload PDFView All StepsNext Step »
8 comments
Feb 4, 2011. 7:33 AMskylen says:
So it sounds like this touchpad matrix uses capacitive sensing, rather than resistive touch operation. When a finger is placed on the intersection of a row wire and a column wire, it increases the capacitance between the wires, causing the LOW level on the column wire to couple more strongly to the row wire, resulting in the touched row dropping in voltage more quickly than if it were not pressed.

Example: ChaN's Simple Touch Sensor
Feb 8, 2011. 12:17 PMartecx says:
I've problems with downloading the .pde files.
any solution to download them proper?
they all got a .tmp extension
Jan 16, 2010. 10:24 AMMinifig666 says:
 You could also use QTC pills as the insulation as it becomes more resistant when squashed, is is also quite cheap these days
Jan 22, 2010. 4:06 PMMinifig666 says:
 Yeah it is difficult to find in shops these days but it is easy to find online. In the UK you can get it at Maplin but in the US you could try Mouser or somewhere like that 

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
8
Followers
3
Author:origamiwolf