SparkFun will be closed Nov 26th and 27th for the Thanksgiving holiday. Orders placed after 2:00pm MT on the 25th will ship out Monday the 30th.

Force Sensitive Resistor Round 0.5

The 0.5" force sensitive resistor (FSR) is a quick way to measure pressure, and is very easy to setup. The FSR varies its resistance depending on how much pressure is applied to the sensing area. The greater the force, the lower the resistance. When measured with a multimeter, the sensor has a resistance of greater than 1MΩ when no pressure is applied.

As an example, we'll measure the force on the resistor using an Arduino Uno and a simple voltage divider circuit.


The value of 27kΩ was chosen to give the output voltage the greatest "sweep" from 0-5V, assuming that the sensing range (resistance sweep) of the sensor is 0-100kΩ. The sensor is soldered to jumper wires and another (27kΩ) resistor, with the output voltage connected to A0 of the Uno. If you're new to soldering, be sure to read the Soldering 101 Tutorial.

Using this circuit, we can simply read the Analog 0 input, and the Arduino will return a value somewhere between 0 and 1023, with 1023 representing 5V. The value decreases when pressure is applied to the sensor. This proves that the circuit is working, but what if we want to calculate the resistance value of the sensor? We can find this using the equation for a voltage divider:

VO / VI = Rfsr / (R1 + Rfsr)

In this case, the Arduino is measuring VO. Since its output is 0-1023, with 1023 representing 5V, we can replace VI with 1023. Also, since we know that the value of R1 is 27kΩ, this equation becomes:

VO / 1023 = Rfsr / (27000 + Rfsr)

Solving for Rfsr using a bit of algebra, we find:

Rfsr = (26.4 * VO) / (1 - (VO / 1023))

Note that this equation for Rfsr only works for the 27kΩ resistor value of R1. We can now plug this in to our Arduino sketch, using the value read from A0 as VO, and print out the resistance of the FSR.

// Example Sketch for the 0.5" Force Sensitive Resistor
// 3/17/11
// Set up the FSR as R2 of voltage divider circuit with R1 a value of 27k
// Vout connected to Analog input 0
// Prints resistance value of FSR
// WARNING: Resistance value only valid for 27k resistor if using a different
// value, use the equation
//    x = (Rfsr/(R1+Rfsr))*1023
// where x is the value from A0, and R1 is the non-FSR resistor, to find the 
// FSR resistance in Ohms. 
// To find the actual weight applied to the sensor, refer to the graph on page
// 5 of the datasheet (theoretical values only!) or calibrate the circuit using
// of a known weight. 


#define FORCE 0

float value = 0;
float resistance = 0;

void setup()
  Serial.println("0.5\" Force Sensitive Resistor Test");

void loop()
  value = analogRead(FORCE);
  resistance = ((26.4 * value)/(1-(value/1023.0)));

This sketch will print the approximate resistance of the FSR in order to translate this resistance into the actual force applied. You can reference the graph on page five of the FSR datasheet:

Please note, however, that the actual force applied to the resistor depends heavily on the particular implementation and the tolerance of the specific FSR you're using. In order to determine an actual weight, it is recommended that you calibrate the sensor with a known force in order to form an empirical force/resistance curve. Otherwise, this sensor is great for detecting things like weight shift and relative force.

Comments 3 comments

  • Looks pretty linear to me from say 50 grams all the way to 10000 on this log log plot.

    Given that, the coefficients in the exponential relationship can be determined.

    Then, below 50 grams, a higher order relationship exists.

  • If I wanted to use these as a pressure sensitive MIDI controller, what are some good resources on filtering the input curve to make it more linear, and then mapping that value to a range of 0-127?

    • DId you manage to make it work? I ’m making a similar project and i m thinking of using it as a note on switch and using the pressure as velocity. I prefer to use it only with 5 values in pressure and not as linear.