RFP602 pressure sensor with Arduino

FunduinoPublished on

Mit einem Folien-Drucksensor Krafteinwirkung bis 500 Gramm erfassen

Der RFP602 ist kaum dicker als ein Blatt Papier und trotzdem ein vollwertiger Sensor: Drückt etwas auf seine runde Messfläche, sinkt sein elektrischer Widerstand – und der Arduino kann daraus ablesen, wie stark die Kraft ist.

In dieser Anleitung baust du den Sensor als Spannungsteiler auf, liest ihn am analogen Pin aus und lässt dir den Wert gleich in Gramm ausgeben. Eine Wägezelle ersetzt er dabei nicht – warum, erfährst du gleich im ersten Schritt.

Thin-film pressure sensor under a tomato
Example application: The pressure sensor measures the force exerted by a tomato resting on it.

You need this

Membrane pressure sensor - weight measurement 0-0.5 kg, analog Membrane pressure sensor - weight measurement 0-0.5 kg, analog 5,47 € *Item no. F23106985About the product — Membrane pressure sensor - weight measurement 0-0.5 kg, analog
Funduino UNO R3 Microcontroller - ATmega328P, 16 MHz, for Arduino Funduino UNO R3 Microcontroller - ATmega328P, 16 MHz, for Arduino 11,12 € *Item no. F23107480About the product — Funduino UNO R3 Microcontroller - ATmega328P, 16 MHz, for Arduino
Breadboard Cables Male-to-Male - 40 Pieces, 20 cm Breadboard Cables Male-to-Male - 40 Pieces, 20 cm 1,74 € *Item no. FUN-1010558About the product — Breadboard Cables Male-to-Male - 40 Pieces, 20 cm

All 3 parts together 18,33 € *Ready to ship immediately · Delivery time: 1-3 business days

* All prices include statutory VAT, plus shipping costs.

Material

For this project, you need:

  • 1× microcontroller with a suitable USB cable
  • 1× RFP602 membrane pressure sensor (0 to 500 g)
  • 1× 10 kΩ resistor
  • 1× breadboard
  • Male-to-male jumper wires

What the sensor measures

The RFP602 is a thin film whose electrical resistance decreases as pressure is applied to the round sensing area. This type of component is called a “thin film pressure force sensor” in English.

Important distinction: The RFP602 is not a load cell. It is not calibrated and does not provide an accurate weight measurement, but rather an indication of how much force is acting on it. With no load, the reading is below 100; as force increases up to about 500 grams, it rises toward 1023.

The relationship between force and measured value is not linear: in the lower force range, the value changes significantly, while in the upper range it hardly changes. The conversion in the sketch is therefore a rough approximation. If you need greater accuracy, take measurements using known weights and create your own comparison table.

Thin-film pressure sensor under a tomato
Example application: The pressure sensor measures the force exerted by a tomato resting on it.

Structure

The sensor has two connections. Connect one to 5V and the other to analog pin A0. Also connect a 10-kilohm resistor from A0 to GND.

In the diagram, red is the power supply, black is GND, and purple is the data line to pin A0. There is no matching Fritzing component for the RFP602, so a similar-looking symbol is shown instead.

The resistor to GND is not optional. The sensor itself is just a variable resistor - only together with the fixed resistor does it form a voltage divider that the Arduino can read. Without it, pin A0 returns random values.

Circuit diagram of the RFP602 connected to an Arduino
Setup: red = power supply, black = GND, purple = data line to pin A0

Source code

The sketch reads the value from pin A0. Because the Arduino returns values between 0 and 1023 there, but you want to read grams, the command map converts the range from 0 to 1023 to 0 to 500 grams. The output appears twice per second in the Serial Monitor at 9600 baud.

Because the unloaded sensor already returns a value below 100, the Serial Monitor shows a few grams even with no load. Read the zero-load value once and subtract it in the sketch if this bothers you.

Sketch: Output applied force in grams
int Sensorpin = A0; // Legt fest, an welchem analogen Pin der Sensorwert ausgelesen wird

void setup() {
  Serial.begin(9600); // Festlegung der Baudrate
}

void loop() {
  int Sensorwert = analogRead(Sensorpin); // Auslesen des Sensorwertes (zwischen 0 und 1023)

  // Mappen des Wertes vom Sensor (0..1023) auf den Messbereich (0 g .. 500 g)
  int Krafteinwirkung = map(Sensorwert, 0, 1023, 0, 500);

  Serial.print("Die Krafteinwirkung betraegt: ");
  Serial.print(Krafteinwirkung); // Ausgabe des Wertes im Seriellen Monitor
  Serial.println(" Gramm");

  delay(500); // 500 ms Pause, bevor der Loop erneut durchlaufen wird
}
Rate the instructions

Comments

Ask a question or share an experience

Contact us if something doesn’t work. Please include your board and the error message.

We review every comment before publication. Your email address remains with us.