arduino + touch/pressure sensors!

anyone have experience/advice concerning interfacing arduino w/ touch or pressure sensors? i have found these products:

http://www.qprox.com/products/e11x.php

http://www.phidgetsusa.com/cat/viewproduct.asp?category=5000&subcategory=5100&SKU=1110

any suggestions for hardware/code? thanks everybody :slight_smile:

Hello

The qprox sensor is dead easy... you dont need the e11x just get the qt113 chip and you'll find plenty of examples on how to build the circuit... you only need 1 cpacitor.... then the output is active low.... this means that when somebody touches the output goes from 5v to 0v and you can detect that using a digital input pin.

the phidget sensor is even simpler one pin goes to 5v the other to ground and the third one to a digital pin... the output is the same as before.

the tekscan is slightly more complex... yout need to build this circuit

the send the output to an analogue input..

there are examples online btw qt113 arduino - Google Search
qprox arduino - Google Search

google is your friend

massimo

thank you very much massimo - i consider you a friend as well as google :slight_smile:

will buy the phidget and let you know how it goes...

christolles!

Christolles, what are you buliding? :slight_smile:

im retrofitting an existing (ikea!) chair with a touch sensor on the seat that controls a set of LEDs underneith the seating surface.

when you sit, the lights fade on to provide ambient lighting for dinner/living room.

i think it will be beautiful, and not finished until after thanksgiving :slight_smile:

will post when i finish!

a quick software question:

i am experimenting both with the phidgets touch sensor i linked to above, and a phidgets force sensing resistor (FSR), outlined here.

my question is re: the FSR. i modified this example code, originally intended for a piezo element to work with my new FSR.

my question is this: as the code stands (pasted below), arduino pings the analog input every 150ms for a value to decide whether to switch the LED. the problem is that if a person holds onto the FSR, the LED blinks on/off as it senses the hold every 150ms.

i envision a parameter where arduino only pings the input if the value is below a certain value - that way, the LED will only turn on or off if you have already let go of the FSR. but i cannot code it! please help? hope this is understandable...

EDIT: also, how do i change the sensitivity of the phidgets touch sensor (#1110)? thanks so much everybody :slight_smile:

/* Knock Sensor


  • Program using a Piezo element as if it was a knock sensor.
  • We have to basically listen to an analog pin and detect
  • if the signal goes over a certain threshold. It writes
  • "knock" to the serial port if the Threshold is crossed,
  • and toggles the LED on pin 13.
  • Created 10 August 2005
  • copyleft 2005 DojoDave http://www.0j0.org
  • http://arduino.berlios.de

*/

int ledPin = 13; // led connected to control pin 13
int knockSensor = 0; // the knock sensor will be plugged at analog pin 0
byte val = 0; // variable to store the value read from the sensor pin
int statePin = LOW; // variable used to store the last LED status, to toggle the light
int THRESHOLD = 5; // threshold value to decide when the detected sound is a knock or not

void setup() {
pinMode(ledPin, OUTPUT); // declare the ledPin as as OUTPUT
Serial.begin(9600); // use the serial port
}

void loop() {
val = analogRead(knockSensor); // read the sensor and store it in the variable "val"
if (val >= THRESHOLD) {
statePin = !statePin; // toggle the status of the ledPin (this trick doesn't use time cycles)
digitalWrite(ledPin, statePin); // turn the led on or off
Serial.println("Knock!"); // send the string "Knock!" back to the computer, followed by newline
}
delay(150); // we have to make a delay to avoid overloading the serial port
}

anybody have advice on dimming the LEDs on and off?

Posted by: christolles Posted on: 20.10.2006 at 00:57:06
anybody have advice on dimming the LEDs on and off?

ok.
I have been working to do some thing similar to you question
I am using a force sensing resitor -fsr- to make my mac talk
so to make the led be on while you press .

add

int ledPin = 13; // LED connected to digital pin 13
byte val = 0; // variable to store the value read from the sensor pin
int statePin = LOW; // variable used to store the last LED status, to toggle the light

on set up add this

pinMode(ledPin, OUTPUT); // declare the ledPin as as OUTPUT

on loop find the the code where the piezo sends data
and add

digitalWrite(ledPin, HIGH); // sets the LED on

then place the digitalWrite(ledPin, LOW); // sets the LED off//

where ever you think the piezo sends no data.