Interfacing of Force Pressure Sensor with Arduino Uno.
What is a Force Pressure Sensor?
An FSR (Force Sensitive Resistor) or Force Pressure Sensor is a sensor that allows you to measure physical pressure, weight and squeezing.
The resistance of an FSR varies as the force on the sensor increases or decreases. When no pressure is being applied to the FSR, its resistance will be larger than 1MΩ. The harder you press on the sensor’s head, the lower the resistance between the two terminals drops. By combining the FSR with a static resistor to create a voltage divider, you can produce a variable voltage that can be read by a microcontroller’s analog-to-digital converter.
Material Required:
Material Quantity
Arduino Uno 1
Force Pressure Sensor 1
Jumper cables 4
LED 1
Resistor 1 ( 10 k)
Pinout Diagram:
Circuit Diagram:
The connections are pretty easy and straight forward. Make the circuit by referring the images.
The FSR has two pins, one will be connected to 5V pin.
The other to A0 directly and to Gnd pin via a resistor.
If you need to connect the LED and control it's brightness, then connect it across pin 13 and Gnd of the Arduino.
Tested Programming Code:
int fsrPin = 0; // the FSR and 10K pulldown are connected to a0 int fsrReading; // the analog reading from the FSR resistor divider
void setup(void) { Serial.begin(9600); } void loop(void) { fsrReading = analogRead(fsrPin); Serial.print("Analog reading = "); Serial.print(fsrReading); // the raw analog reading if (fsrReading == 0) { Serial.println(" - No pressure"); } else if (fsrReading < 10) {
Serial.println(" - Light touch"); } else
if (fsrReading < 50) { Serial.println(" -
Light squeeze"); } else if (fsrReading
< 150) { Serial.println(" - Medium
squeeze"); } else {
Serial.println(" - Big squeeze");
}
delay(1000);
}
Precautions:
1. Double check the connections before powering on the circuit.
2. Don’t use loose jumper cables.
3. Check whether proper board is selected from Arduino IDE.
4. Ensure proper placement of Force Pressure Sensor for correct working.
5. Don’t lose hope if Force Pressure Sensor does not run properly for the first time, try again.
Conclusion:
Once your sketch is running, you have to open your serial monitor. There you can see the Pressure applied on the sensor as Light , Big or No squeeze.