Force Sensitive Resistor Hookup Guide - MAE540-2017 Team 8
By Samir, Aditya, Hamdan, Arjun, Priyank
Item List: This is a list of items required for running the sensor: Bill of Materials
1. Application of FSR Sensor : Security System
-
We have ideated an application for the FSR sensor, using it as part of a security system for safeguarding valuable items inside a safe locker.
-
The idea is to attach the FSR sensor on the handles of the safe locker. So If anyone tries to open the safe locker by turning the handle, the sensor would detect the force applied on the handle. When the value of the force applied is above a given value, it would prompt the chip to send an email via blynk to alert the owners.
-
The sensitivity of this sensor circuit would be set very high, so that even a slight touch on the handle would activate the circuit to inform the owner that the handle has been touched.
2. Introduction to FSR Sensor
- The 0.5” Force Sensitive Resistors are sensors that allow you to detect physical pressure, squeezing and weight.
- The FSR is made of 2 layers separated by a spacer. The more one presses, the more of those Active Element dots touch the semiconductor and that makes the resistance go down.
-
FSRs are basically a resistor that changes its resistive value (in ohms Ω) depending on how much it is pressed.
-
General FSR Characteristics:
- Diameter: 0.5”
- Thickness: 0.018”
- Force Range: 100g - 10Kgs
- Resistance Range: 200Ohms - 100KOhms
3. Schematic of Hookup and Hardware
The following is the setup required for hooking up the FSR Sensor.
-
Connect the FTDI chip to the esp8266 thing as follows:
GND -> GND
CTS -> NC
VCC -> 3.3V
TXO -> RX
RXI -> TX
DTR -> DTR
- From one pin of the Force Sensitive Resistor(FSR), say pin A, make a connection to ADC and connect a 10k ohm resistor to GND.
- From pin B of the FSR, make a connection to 3.3V on the input side.
4. Arduino Code
#include <Wire.h> #include <ESP8266WiFi.h> #include <BlynkSimpleEsp8266.h> char auth[] = "Blynk Auth Code goes here"; char ssid[] = "WiFi name"; char pass[] = "WiFi password"; const int FSR_PIN = A0; // Pin connected to FSR/resistor divider const float VCC = 3.28; // Measured voltage of Sparkfun 3.3v const float R_DIV = 9788.0; // Measured resistance of 10k resistor void setup() { Blynk.begin(auth, ssid, pass); Serial.begin(9600); pinMode(FSR_PIN, INPUT); } void loop() { int fsrADC = analogRead(FSR_PIN); // If the FSR has no pressure, the resistance will be // near infinite. So the voltage should be near 0. if (fsrADC != 0) // If the analog reading is non-zero { // Use ADC reading to calculate voltage: float fsrV = fsrADC * VCC / 1023.0; // Use voltage and static resistor value to // calculate FSR resistance: float fsrR = R_DIV * (VCC / fsrV - 1.0); Serial.println("Resistance: " + String(fsrR) + " ohms"); // Guesstimate force based on slopes in figure 3 of // FSR datasheet: float force; float fsrG = 1.0 / fsrR; // Calculate conductance // Break parabolic curve down into two linear slopes: if (fsrR <= 600) force = (fsrG - 0.00075) / 0.00000032639; else force = fsrG / 0.000000642857; Serial.println("Force: " + String(force) + " g"); Serial.println(); Blynk.run(); Blynk.virtualWrite(fsrADC, force); delay(500); if (force > 800); { Blynk.email("chausamir@gmail.com", "Security Alert!", "ATTENTION: Activity near safe locker. Security system has detected imminent threat to valuables. From APDM Team#8"); } } }
5. The Experiment & Result
Blynk Setup:
Blynk needs to have widgets added for receiving FSR data, plotting amplitude of force vs. time and then sending an email to the user.
Result of Experiment
-
After setting up all the electronics and the Blynk widgets, we tested the force sensor. A force was applied simulating a thief touching the locker, as soon as the force exceeded the threshold limit and an email was sent to the user alerting the theft.
-
At values lower than threshold limit (Force=800): No email was sent.:
- At values higher than the threshold limit: Email is sent to user (Theft alert!):
The applications of the Force Sensitive Resistor are varied and can be used for several other real-world problems. This security system application can be used by banks, home safe lockers and office lockers.