Thank you for purchasing a SparkFun Flex Sensor! This unique component can sense how much it is being bent. It opens up a wide range of projects, including:
...and other uses limited only by your imagination.
One side of the sensor is printed with a polymer ink that has conductive particles embedded in it. When the sensor is straight, the particles give the ink a resistance of about 30k Ohms. When the sensor is bent away from the ink, the conductive particles move further apart, increasing this resistance (to about 50k Ohms when the sensor is bent to 90º, as in the diagram below). When the sensor straightens out again, the resistance returns to the original value. By measuring the resistance, you can determine how much the sensor is being bent.
NOTE: Although the active portion of the sensor (the area between the black squares) is quite sturdy, the pin-end of the sensor is susceptible to kinking and eventual failure. We recommend reinforcing or securing this area (for example, clamping or gluing down the sensor at the black square nearest the pins) to ensure that this area doesn't flex along with the rest of the sensor.
The simplest way to incorporate this sensor into your project is by using it in a voltage divider. This circuit requires one resistor. Many values from 10K to 100K will work, but we'll use a 10K resistor here (SparkFun part number COM-08374, also supplied in our Inventor's Kits and locally at Radio Shack, etc.). Connect the flex sensor to your microcontroller using the following circuit:
The resistor and the flex sensor form a voltage divider, which divides VCC by a ratio determined by the two resistances. When the sensor is straight, the 10K resistor and the 30K flex sensor will cause the output voltage to be about 75 percent of VCC. When the sensor is bent, the voltage will increase to about 83 percent of VCC (see our voltage divider tutorial for the math). If you're using 5V for VCC, you should see about 3.75V when the sensor is straight, and about 4.17V when the sensor is bent by 90º. These numbers will vary for individual sensors; for the most accurate results, test your specific sensor and use those numbers in your code.
Here's a basic Arduino sketch to show the output from your sensor:
Enjoy your new sensor! If you have any questions (or want to show off your project), please don't hesitate to contact us at email@example.com.