Force Sensing Resistor (FSR) with Arduino - Electronic and Telecommunication Engineering

Post Top Ad

Responsive Ads Here

Force Sensing Resistor (FSR) with Arduino

Share This

Force Sensing Resistor (FSR) with Arduino








     Force Sensing Resistors also are known as Force Sensitive Resistors or Force Sensors or just FSRs. They are low-value and smooth-to-use sensors particularly designed to come across physical strain, squeeze, and weight.

    You will discover them in digital drums, cell phones, hand held gaming gadgets and lots of extra portable electronics.

   While these sensors are outstanding for measuring stress, they're now not super at locating how many pounds of weight they have got on them. However, in case you just need to find out “whether or not the sensor has been squeezed or pressed and what sort of” they're a very good option on your next touch-sensing mission.


FSR Overview

    The technology utilized in FSRs has been patented by way of Interlink Electronics which has been in operation due to the fact 1985. The maximum common sorts of FSR that you'll effortlessly find are the Interlink FSR-402 and FSR-406.

Construction

    An FSR is not anything however a variable resistor that varies in resistance as strain is carried out to the sensing vicinity.

   It is made of numerous thin flexible layers. The more it is pressed, the extra resistive carbon elements touch the conductive strains and this reduces resistance.  









Shape and Size

     There are a spread of FSR options obtainable, and some key capabilities including length, shape, and sensing variety that set them apart.

    Most FSRs have both a round or rectangular sensing area. Square FSRs are true for large-vicinity sensing, even as small round sensors can provide extra accuracy to the sensing field.








Sensing Range

     Another key feature of the FSR is its rated sensing variety, which defines the minimum and most pressures that the sensor can differentiate between.

    The decrease the force score, the greater sensitive the FSR is. Any pressure past the sensor’s maximum range is unmeasurable (which also can harm the sensor). For example, a smaller 1kg rated FSR may additionally provide more touchy readings from zero to 1kg, however can't inform the distinction among 2kg and 5kg weight.


How FSR Works?

    As we have said, FSR is essentially a resistor that adjustments its resistive rate depending on how an awful lot it is been pressed.





    When there may be no strain, the sensor looks like an endless resistor (open circuit). The more difficult you press on the pinnacle of the sensor, the decrease the resistance many of the 2 terminals may be, but as you take away the stress it will move returned to its particular price.

   The graph below shows about the resistance of the sensor at one-of-a-kind strain measurements for the FSR 402 sensor. Note that the records is plotted on logarithmic scales.





    Notice that the graph is commonly linear from 50g and up, but now not below 50g. This way that on every occasion we placed pressure on it, its resistance quickly decreases from infinity to 100K, after which becomes greater linear.


Reading an FSR

   The handiest manner to take a look at the FSR is to connect the FSR with a tough and fast fee resistor (generally 10kΩ) to create a voltage divider. To do which you be part of one quit of the FSR to Power and the other to a pull-down resistor. Then the issue among the fixed charge pull-down resistor and the variable FSR resistor is hooked up to the ADC input of an Arduino.

    This way you can create a variable voltage output, which can be take a look at by means of a microcontroller’s ADC input.






Note that the output voltage you degree is the voltage drop throughout the pull-down resistor, no longer across the FSR.

The output of the voltage divider configuration is described with the resource of the equation:




   In the proven configuration, the output voltage will increase with developing strain.

   For instance, with 5V supply and 10K pull-down resistor, while there is no stress, the FSR resistance could be very excessive (round 10MΩ). This outcomes within the following output voltage:






     If you press definitely difficult at the FSR, the resistance will circulate down to more or much less 250 Ω. This consequences inside the following output voltage:







    the output voltage varies from 0 to 5V relying on the quantity of force carried out to the sensor.

   Below table suggests the approximate analog voltage primarily based on the sensor stress/resistance with 5V deliver and 10K pulldown resistor.



Force (lb) Force (N) FSR Resistance Voltage throughout R

None           None                Infinite                       0V

0.04lb           0.2N                 30KΩ                     1.3V

0.22lb            1N                        6KΩ                      3.1V

2.2lb           10N                 1KΩ                      4.5V

22lb                  100N                 250Ω                      4.9V



Wiring an FSR to Arduino UNO

    You want to connect a 10kΩ pull-down resistor in collection with the FSR to create a voltage divider circuit. Then the point most of the pull-down resistor and the FSR is attached to the A0 ADC enter of an Arduino.







Arduino Code and Simple Analog FSR Measurements

    For our first test, we are able to observe the sensor records from the ADC pin of the Arduino and display the output at the serial show.

   The code is pretty honest. It simply prints out what it translates as the amount of strain in a qualitative way. For maximum projects, that is quite lots all that’s needed.




Int fsrPin = 0;     // the FSR and 10K pulldown are linked to a0
int fsrReading;     // the analog analyzing from the FSR resistor divider
 
void setup(void) {
  Serial.begin(9600);   

 }
void loop(void) {
  fsrReading = analogRead(fsrPin);  
 
  Serial.Print("Analog studying = ");
  Serial.Print(fsrReading);     // print the uncooked analog studying
 
  if (fsrReading < 10) {
    Serial.Println(" - No strain");
   }else if (fsrReading < 200) {
    Serial.Println(" - Light touch");
   }else if (fsrReading < 500) {
    Serial.Println(" - Light squeeze");
   }else if (fsrReading < 800) {
    Serial.Println(" - Medium squeeze");
  } else {
    Serial.Println(" - Big squeeze");
  }
  delay(1000);
}


If the entirety is first-rate, you need to see beneath output on serial display.






Code Explanation:

   The caricature begins with the assertion of the Arduino pin to which FSR and 10K pull-down are linked. We also define the variable fsrReading which holds the uncooked analog analyzing from the FSR.

Int fsrPin = 0;  
int fsrReading; 

In setup feature of code we initialize the serial communique with the PC.

void setup(void) {
  Serial.begin(9600);   
 }


In loop characteristic, we take the analog analyzing from the FSR resistor divider and show it on serial screen.

As referred to earlier, the output voltage of the sensor is among 0V (no stress implemented) and approximately 5V (most stress implemented). When the Arduino converts this analog voltage into digital, it sincerely converts it to a 10-bit quantity of variety zero to 1023. So you will see a value between zero and 1023 in a serial display, depending on how tough you squeeze the sensor.


srReading = analogRead(fsrPin);  
 
  Serial.Print("Analog studying = ");
  Serial.Print(fsrReading);     // print the uncooked analog studying
 
  if (fsrReading < 10) {
    Serial.Println(" - No strain");
   }else if (fsrReading < 200) {
    Serial.Println(" - Light touch");
   }else if (fsrReading < 500) {
    Serial.Println(" - Light squeeze");
   }else if (fsrReading < 800) {
    Serial.Println(" - Medium squeeze");
  } else {
    Serial.Println(" - Big squeeze");
  }
  delay(1000);
}



Arduino Code – Advanced Analog FSR Measurements

Our next arduino sketch is quite superior. It measures the approximate Newton force measured by means of the FSR. This may be pretty useful for calibrating what forces you observed the FSR will experience.




Int fsrPin = 0;     // the FSR and 10K pulldown are connected to a0
int fsrReading;     // the analog analyzing from the FSR resistor divider
int fsrVoltage;     // the analog studying converted to voltage
unsigned long  fsrResistance;  // The voltage transformed to resistance
unsigned long fsrConductance; 
long fsrForce;       // Finally, the resistance transformed to pressure
 
void setup(void) {
  Serial.begin(9600);   // We'll ship debugging facts via the Serial reveal
}
void loop(void) {
  fsrReading = analogRead(fsrPin);  
  Serial.Print("Analog analyzing = ");
  Serial.Println(fsrReading);
 
  // analog voltage analyzing stages from approximately zero to 1023 which maps to 0V to 5V (= 5000mV)
  fsrVoltage = map(fsrReading, 0, 1023, 0, 5000);
  Serial.Print("Voltage analyzing in mV = ");
  Serial.Println(fsrVoltage);  
 
  if (fsrVoltage == 0) {
    Serial.Println("No stress");  
   }else {
    // The voltage = Vcc * R / (R + FSR) wherein R = 10K and Vcc = 5V
    // so FSR = ((Vcc - V) * R) / V        yay math!
    FsrResistance = 5000 - fsrVoltage;     // fsrVoltage is in millivolts so 5V = 5000mV
    fsrResistance *= 10000;                // 10K resistor
    fsrResistance /= fsrVoltage;
    Serial.Print("FSR resistance in ohms = ");
    Serial.Println(fsrResistance);
 
    fsrConductance = a million;           // we degree in micromhos so 
    fsrConductance /= fsrResistance;
    Serial.Print("Conductance in microMhos: ");
    Serial.Println(fsrConductance);
 
    // Use the two FSR guide graphs to approximate the pressure
    if (fsrConductance <= 1000) 
      fsrForce = fsrConductance / 80;
      Serial.Print("Force in Newtons: ");
      Serial.Println(fsrForce);      
    } else {
      fsrForce = fsrConductance - 1000;
      fsrForce /= 30;
      Serial.Print("Force in Newtons: ");
      Serial.Println(fsrForce);            
    
  }
}
  Serial.Println("--------------------");
  delay (1000);
}


Here’s how the output seems like in the serial monitor.







No comments:

Post a Comment

Post Bottom Ad

Responsive Ads Here

Pages