This is a piezoresistive force sensor. The harder you press, the lower the sensor's resistance.
Available in 1lb and 25lb ratings.
Parts
-Arduino microcontroller and carrier board
-LiPo battery
-FlexiForce Sensor
Prepare the breadboard
Program the Microcontroller
/** * @file: Force sensor reading * @date: 4/5/2011 * * @section DESCRIPTION * This code follows this tutorial * http://www.ladyada.net/learn/sensors/fsr.html * Modified by DF. * */#define fsrPin 0 // analog pin 0
int fsrReading = 0; // the analog reading
//--- Function: setup()void setup(void)
{ Serial.begin(9600);
}//--- Function: loop()void loop(void)
{ fsrReading = analogRead(fsrPin);
Serial.print("Analog reading = "); Serial.print(fsrReading); // the raw analog reading
//qualitatively determined thresholds: you might have to change those values!!!
if (fsrReading < 10)
{ Serial.println(" - No pressure");
}
else if (fsrReading < 200)
{ Serial.println(" - Light touch"); }
else if (fsrReading < 500)
{
Serial.println(" - Light squeeze"); }
else if (fsrReading < 800)
{
Serial.println(" - Medium squeeze"); }
else
{ Serial.println(" - Big squeeze"); }
delay(1000);}