EXPERIMENT-NO--03-PRESSURE-MEASUREMENT-USING-ARDUINO-AIM-To-interface-an-FSR-force-sensitive-resistor
To interface an FSR(force sensitive resistor) and measure the force applied,indicate the change in force applied using LEDs.
- FSR (force sensitive resistor)
- 1 KΩ resistor
- Arduino Uno
- USB Interfacing cable
- Connecting wires
FSRs are basically a resistor that changes its resistive value (in ohms Ω) depending on how much it is pressed. These sensors are fairly low cost, and easy to use. They also vary some from sensor to sensor perhaps 10%. FSR's resistance changes as more pressure is applied. When there is no pressure, the sensor looks like an infinite resistor (open circuit), as the pressure increases, the resistance goes down. This graph indicates approximately the resistance of the sensor at different force measurements.
FSRs are often a polymer with conductive material silk-screened on. That means they're plastic and the connection tab is crimped on somewhat delicate material. The best way to connect to these is to simply plug them into a breadboard.
The easiest way to measure a resistive sensor is to connect one end to power and the other to a pull-down resistor to ground. Then the point between the fixed pull down resistor and the variable FSR resistor is connected to the analog input of a microcontroller such as an Arduino The way this works is that as the resistance of the FSR decreases, the total resistance of the FSR and the pull down resistor decreases from about 100Kohm to 10Kohm. That means that the current flowing through both resistors increases which in turn causes the voltage across the fixed 10K resistor to increase.
Table -01 indicates the approximate analog voltage based on the sensor force/resistance w/a 5V supply and 10K pull down resistor.
****Where R= 1KΩ in this experiment ****That is, the voltage is proportional to the inverse of the FSR resistance.
- Connect the circuit as per the circuit diagram
- Connect the board to your computer via the USB cable.
- If needed, install the drivers.
- Launch the Arduino IDE.
- Select the board (If you the board is arduino uno, select accordingly).
- Select your serial port, accordingly ( E.g. COM5 )
- Open the file of the program and verify the error , clear if any errors that are existing
- Upload the program and check for the physical working.
- Ensure safety before powering up the device
- Plot the graph for the output voltage vs the resistance
// C++ code // Define pins: #define fsrpin A0 #define led1 2 #define led2 3 #define led3 4 #define led4 5 #define led5 6 #define led6 7
//Define variables: int fsrreading; void setup() { Serial.begin(9600);
//Set LED pins as output pinMode(led1, OUTPUT); pinMode(led2, OUTPUT); pinMode(led3, OUTPUT); pinMode(led4, OUTPUT); pinMode(led5, OUTPUT); pinMode(led6, OUTPUT); } void loop() { fsrreading = analogRead(fsrpin); Serial.println(fsrreading);
if(fsrreading>150) { digitalWrite(led1, HIGH); } else digitalWrite(led1,LOW); if(fsrreading>300) { digitalWrite(led2, HIGH); } else digitalWrite(led2,LOW); if(fsrreading>450) { digitalWrite(led3, HIGH); } else digitalWrite(led3,LOW); if(fsrreading>600) { digitalWrite(led4, HIGH); } else digitalWrite(led4,LOW); if(fsrreading>750) { digitalWrite(led5, HIGH); } else digitalWrite(led5,LOW); if(fsrreading>900) { digitalWrite(led6, HIGH); } else digitalWrite(led6,LOW); }
<<<<<<< HEAD
Thus the interface an FSR(force sensitive resistor) is simulated int tinkerCAD.