Touch Sensitive Button Using Conductive Fabric and Velostat

For this experiment I decided to dive deeper into the EE side of things and wanted to get a feel (pun sort of not intended) for how it all worked. My goal was to figure out how to create a pressure sensitive button made out of fabrics, and hook it into an Arduino so I could program around the haptic feedback.

I thought it would be easy to find the parts and videos I needed to get to my goal, but was surprised to find few videos that took the viewer from start to finish. So, I decided to record what I learned along the way so that others may have it easier.

First, let’s start with the materials:

  1. Velostat
  2. Conductive Fabric
  3. 2x Alligators Clips
  4. Multimeter

In short, Velostat is a resistive material and feels like it is cut out of a trash bag. The conductive fabric is a fabric that has conductive material woven into each strand. If you hook up each piece of fabric to a battery and touch those pieces of fabric together you will create a complete circuit. (Be careful, this can cause a fire when the wires spark around the fabric.)

When you place the Velostat between those two pieces of fabric you make it harder for the electricity to flow from one piece of fabric to the next (ergot “resistor”). Since the Velostat is thin and malleable, pressure from your finger onto the sandwiched materials increases or decreases the flow of electricity. This change in electricity is the signal you will interpret in your “pressure gauge”.

This video shows you how you put it all together. If you remember the principles above the rest becomes fairly easy. For example, you must be sure that none of your conductive fabric touches one another, so make sure your Velostat swatch is larger than you fabric swatches.

Now that I got that working I set out to connect the system to an Arduino so I could read the change in resistance on the computer.

Materials:

  1. Same materials in Part 1 (Multimeter not required)
  2. 1N4003 Diode
  3. Arduino UNO
  4. Jumper Cables
  5. Arduino SDK
  6. Computer
  7. USB/Serial Port Connector
touch_sensor
#include <math.h>
int myPin = 0;
int touching = false;
int touchingCount = 0;
void setup() {
Serial.begin(9600);
}
// the loop function runs over and over again forever
void loop() {
int sensorValue = analogRead(myPin);
String amount = "Start Touch";
if (sensorValue > 90) {
touching = true;
touchingCount++;
} else {
touching = false;
touchingCount = 0;
}
if (touching && touchingCount < 20) {
amount = "Tap";
} else if (touching) {
amount = "Hold";
}
if (sensorValue < 90) {
// Serial.println("Not touched");
} else if (sensorValue < 120) {
Serial.println("Light " + amount);
} else if (sensorValue < 160) {
Serial.println("Strong " + amount);
} else if (sensorValue < 190) {
Serial.println("Hard " + amount);
}
}
view raw Advanced Reads hosted with ❤ by GitHub
#include <math.h>
int myPin = 0;
void setup() {
Serial.begin(9600);
}
// the loop function runs over and over again forever
void loop() {
int sensorValue = analogRead(myPin);
Serial.println(sensorValue);
}
view raw Basic hosted with ❤ by GitHub

Product Review: The Google Chromecast

I love my Google Chromecast. It’s light weight, cheap, simple to use and is very transportable. I’ve tried many bulky pieces of equipment to enhance my home theater experience such as a Roku, Google TV, and Apple TV. For all the extra features those products could provide, and the extra costs they had to have them, Google Chromecast is the only that has given me exactly what I needed. Sometimes less is more; this is one of those cases.

One thing the other products failed to appreciate is how much of my time is based on my laptop, and how readily available it (or my iphone) is. I don’t need a second computer to run my TV. My laptop has everything I need so making the main media hub makes sense. No additional keyboards or remotes needed.

Chromecast uses your wifi network and its built-in HDMI jack to create a media bridge between your computer and your TV. Once connected you will need to download the Chromecast extension for your chrome browser. Once it place you’ll have the ability connect your browser (and everything on it) to your screen. If you want to play movies then all you need to do is drag your movie file into Chrome and the browser will play it as well. If you want to share your desktop with your screen just use the Beta screen casting option – which is still a bit hit or miss.

I don’t need more and I am happy to pay less. (Chromecast is 66% less than most alternatives in the market today.) If you haven’t taken the leap to get one I suggest you do, or make sure it is on your christmas list 🙂