Force Sensitive Resistors

Force Sensitive Resistors (FSR)

Many embedded applications need to sense physical properties such as force, pressure, squeezing, or approximate weight to be able to interact with the physical world. Force sensitive resistors are a very easy and economical way of sensing whether pressure is being applied at a certain point. They can usually be obtained for around $4 to $8 dollars from Sparkfun. These come in all kinds of shapes and sizes such as strips, circles and squares.

/media/uploads/saporiti/square_force_sensitive_resistor3.jpg /media/uploads/saporiti/coiled_force_sensitive_resistor2.jpg /media/uploads/saporiti/round_force_sensitive_resistor2.jpg

Normally these do not output where the pressure is applied, they only output the maximum amount of pressure applied at any point throughout the FSR's surface. There are some of these sensors out there that use the same principle but act more similarly to a potentiometer such as this doughnut shaped sensor below that won't tell you how hard it is pressed but it will tell you where the pressure is being applied.

/media/uploads/saporiti/circular_soft_potentiometer3.jpg


Internal Structure of an FSR

These sensor come rated to have at least a certain resistance value when unpressed. The resistance then varies inversely proportional according to the pressure applied to it. Therefore the more pressure applied to it,the closer together the two walls of the resistor are and the less resistance there is between them. Since we know the resistance of the sensor, these can also be used to measure an approximate weight range (e.g. between 0 and 2 kilograms).

/media/uploads/saporiti/fsrimage2.jpg

Internal Structure of an FSR


Wiring

These sensors are very simple to wire, they only require a voltage divider circuit like the one shown below connected to an AnalogIn pin on the mbed. The FSR is wired just like a regular resistor but its resistance changes according to the force applied. /media/uploads/saporiti/schematic3.jpg

Schematic of an FSR connected to an analog input


Force-Resistance relation

The table and graph below show reference points for the weight versus force applied. It uses the formula AnalogIn = Vout ( R / (R + FSR) ) to estimate the weight of an object resting on the FSR. Remember that the FSR only gives rough estimates and for the estimate to be as accurate as possible, the entire weight of the object must be resting on the FSR area. If the object is bigger that the FSR and touches something outside the FSR the reading will be less reliable.

/media/uploads/saporiti/log_table.jpg

/media/uploads/saporiti/force_table.jpg

Example Program

Bellow is a code example for a force sensitive resistor connected to pin 20 on an mbed LPC1768 with a 10kΩ resistor voltage divider. As more pressure is applied to the FSR the raw data will increase gradually from 0 to 1, the resistance will decrease gradually from infinity to 0, and the weight will increase gradually from 100 grams to the maximum rating of the particular FSR being used. Anything below 100 grams will show up as zero for the weight.

example.cpp

 #include "mbed.h"
 #include "FSR.h"
 FSR fsr(p20, 10); // a 10k resistor is used
 int main(){
     while (1)
     {
         printf("The raw data is %f\n", fsr.readRaw());
         printf("The resistance of the FSR is %f\n", fsr.readFSRResistance());
         printf("The weight on the FSR is %f\n\n", fsr.readWeight());
         wait(0.3); //just here to slow down the output for easier reading
     }
 }



Import programFSR_hello_world

FSR


Import library

Public Member Functions

FSR (PinName Pin, float resistance)
Create an FSR object.
float readRaw ()
Read the raw data.
float readFSRResistance ()
Read the resistance of the FSR .
float readWeight ()
Read the weight in N.


Additional Resources

Datasheet
Integration Guide


Please log in to post comments.