1. FSR (Force Sensitive Resistor)

FSR(Force Sensitive Resistor, 압력센서)는 물리적인 압력, 무게 등을 측정할 수 있도록 고안된 센서입니다. 구조도 간단하고 가격도 저렴한 장점이 있는 반면에 정확도는 떨어지는 편입니다.

아래 그림과 같이 몇 개의 레이어로 구성되어 있으며 압력을 받으면 Active dot 영역 중 semi-conductor에 닿는 면적이 늘어나면서 저항이 줄어드는 원리입니다.

force___flex_FSRimage

간단한 구조에 반해 정확도가 떨어지므로 정확한 무게 측정에 이용하기는 힘들며 대략적인 무게에 대한 추정치를 구할 수 있습니다.

모양이나 크기가 가지각색이므로 프로젝트에 맞는 제품을 구하시면 됩니다. 대부분 구조 및 사용방법이 동일합니다.

2. 측정 방법

FSR 이라는 이름처럼 압력 센서는 압력에 따라 센서의 저항값이 변화합니다. 아무런 압력이 없을 경우 센서는 무한대의 저항값을 가집니다.(open circuit) 여기에 약간의 힘을 가하면 100KΩ의 저항이 발생하며, 이후 힘을 줄수록 저항값이 떨어집니다. 아래 그림이 힘에 따른 센서의 저항값 변화입니다. 가로축 Force 의 단위는 Newtons*100 입니다. 그리고 해당 값에 로그를 취한 값으로 그린 그래프이므로 가해지는 힘에 따라 선형적으로 변화하지는 않는다는 점에 유의하세요.

force___flex_resistanceforce

3. 연결 방법

연결은 간단합니다. 한 쪽을 VCC에 연결하고, 다른 한 쪽을 풀다운(pull-down) 저항을 거쳐 Ground로 연결하면 됩니다. 저항과 센서 사이에서 선을 연결해 아두이노의 analog 핀으로 연결합니다. 이렇게 연결하면 analog 핀은 압력이 없을 경우 0V에서 최대 5V까지 입력될 것입니다. 물론 analog 핀을 읽으면 0~1023 까지의 값으로 변환되어 나옵니다.
force___flex_fsrpulldowndia
아래 테이블은 힘에 따른 센서 저항의 변화와 analog 핀으로 들어오는 입력 voltage의 변화를 보여줍니다.
Force (lb) Force (N) FSR Resistance (FSR + R) ohm Current thru FSR+R Voltage across R
None None Infinite Infinite! 0 mA 0V
0.04 lb 0.2 N 30 Kohm 40 Kohm 0.13 mA 1.3 V
0.22 lb 1 N 6 Kohm 16 Kohm 0.31 mA 3.1 V
2.2 lb 10 N 1 Kohm 11 Kohm 0.45 mA 4.5 V
22 lb 100 N 250 ohm 10.25 Kohm 0.49 mA 4.9 V

4. 소스 코드 (스케치)

아래는 센서에서 읽은 값을 5단계로 분류해서 압력 유형을 출력하는 간단한 코드입니다.

/* FSR simple testing sketch. 

Connect one end of FSR to power, the other end to Analog 0.
Then connect one end of a 10K resistor from Analog 0 to ground 

For more information see www.ladyada.net/learn/sensors/fsr.html */

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) {
  // We'll send debugging information via the Serial monitor
  Serial.begin(9600);   
}

void loop(void) {
  fsrReading = analogRead(fsrPin);  

  Serial.print("Analog reading = ");
  Serial.print(fsrReading);     // the raw analog reading

  // We'll have a few threshholds, qualitatively determined
  if (fsrReading < 10) {
    Serial.println(" - No pressure");
  } 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);
}

아래는 analog 입력 핀으로 읽은 값을 바탕으로 힘 단위(newton)로 변환해서 출력하는 코드입니다.

/* FSR testing sketch. 

Connect one end of FSR to power, the other end to Analog 0.
Then connect one end of a 10K resistor from Analog 0 to ground 

For more information see www.ladyada.net/learn/sensors/fsr.html */

int fsrPin = 0;     // the FSR and 10K pulldown are connected to a0
int fsrReading;     // the analog reading from the FSR resistor divider
int fsrVoltage;     // the analog reading converted to voltage
unsigned long fsrResistance;  // The voltage converted to resistance, can be very big so make "long"
unsigned long fsrConductance; 
long fsrForce;       // Finally, the resistance converted to force

void setup(void) {
  Serial.begin(9600);   // We'll send debugging information via the Serial monitor
}

void loop(void) {
  fsrReading = analogRead(fsrPin);  
  Serial.print("Analog reading = ");
  Serial.println(fsrReading);

  // analog voltage reading ranges from about 0 to 1023 which maps to 0V to 5V (= 5000mV)
  fsrVoltage = map(fsrReading, 0, 1023, 0, 5000);
  Serial.print("Voltage reading in mV = ");
  Serial.println(fsrVoltage);  

  if (fsrVoltage == 0) {
    Serial.println("No pressure");  
  } else {
    // The voltage = Vcc * R / (R + FSR) where 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 = 1000000;           // we measure in micromhos so 
    fsrConductance /= fsrResistance;
    Serial.print("Conductance in microMhos: ");
    Serial.println(fsrConductance);

    // Use the two FSR guide graphs to approximate the force
    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);
}

참고자료