
FSR402 Force Sensor Library for Proteus Simulation

Hello friends, I hope you all are doing great. Today, I am going to share the new FSR402 Force Sensor Library for Proteus Simulation. A force-sensing resistor is the simplest way to give a project a sense of touch: a thin round pad whose resistance drops when you press it - the harder the press, the lower the resistance. It sits under drum pads, inside robot grippers and shoe insoles, on chair seats and in toys. With this library you can run a full Proteus simulation of the FSR 402, the round 18 mm sensor most makers start with, so that your divider, your thresholds and your press detection are ready before the real pad arrives.
FSR402 Force Sensor Library for Proteus
Latest version: V1.0 (November 2026, this tutorial)
Helping Tools
- Serial Monitor Advance: a serial terminal window for the UART of your board
- Serial Monitor Expert: the serial monitor with extra debugging tools
- LCD Library for Proteus V3.0: 16x2, 20x4 and I2C LCDs to show your readings
The pad comes alive at run time: its dark active area glows warmer and wider the harder it is pressed. The demo is a press pad: an Arduino reads the FSR through a voltage divider while a finger touches it, presses it, taps it and squeezes it hard, and shows the force, a press counter and a scrolling trend on an OLED, with a TOUCH and a HARD LED.
NOTICE: Our team has put a lot of effort into these small parts: the bodies, the animation and the pop-ups are all our own design, and you get them free. Your feedback is the fuel that keeps us going, so please tell us what you think in the comments below or in the flex sensor board of our forum. And if our free libraries help you, you can buy us a coffee. So, let's get started with the FSR402 Force Sensor Library for Proteus Simulation:
How Does a Force-Sensing Resistor Work?
An FSR is a sandwich of two thin plastic films. One carries a printed pattern of interleaved silver fingers, the other a layer of conductive carbon ink, and a thin spacer holds them a hair apart. With nothing on it, the films do not touch and the sensor is an open circuit - many megohms. Press it, and the ink touches the fingers; press harder, and more of the ink touches more of the fingers, so the resistance between the two pins falls. Over its working range it falls roughly as one over the force: about 10 kohm at 1 N (the weight of 100 g), about 1 kohm at 10 N.
| FSR 402 force-sensing resistor | |
|---|---|
| Head | 18.3 mm round, the active area 12.7 mm |
| Unloaded | an open circuit (above 1 - 10 Mohm) |
| Turn-on | about 0.1 - 0.2 N |
| Working range | about 0.2 - 20 N; roughly 10 kohm at 1 N, 1 kohm at 10 N |
| Behaviour | resistance about 1 / force; a few percent creep under a steady load |
| Pins | two, 2.54 mm apart on the tail, no polarity |
Touch, Not Weighing
An FSR is wonderful for "is it pressed, and how hard?" and poor for "how many grams exactly?". Two sensors from the same batch differ by several percent, the reading depends on what presses it and where, and under a steady load the resistance keeps creeping down a little. For real weighing you want a load cell and an amplifier, like the ones in our HX711 Load Cell Library for Proteus. For a drum pad, a grip, a doorbell mat or a chair that knows it is occupied, the FSR is perfect - cheap, thin and simple.
The Voltage Divider
A microcontroller reads voltages, not resistances, so the FSR goes into a divider: from 5 V to an analog pin, and a fixed resistor from that pin to ground. With nothing on the pad the pin sits at 0 V; as the pad is pressed and its resistance falls, the voltage rises - 2.5 V at about 1 N with a 10 k resistor, 4.5 V at about 10 N. The fixed resistor sets the sensitivity: a bigger one makes light touches show more, a smaller one spreads out the hard presses.
Features of the FSR402 Force Sensor Library for Proteus Simulation
- A real-looking sensor: the round head at its real size, 18.3 mm, with the dark active area, the printed fingers seen through the film and the amber edge, and its tail (shortened) with two silver traces and crimp tabs.
- Animated: the active area glows warmer and wider with the force.
- A real resistance: an open circuit unloaded, a smooth turn-on near 0.15 N, then 10 k x (1 N / F)^0.95 - about 10 k at 1 N, 1 k at 10 N.
- Real imperfections: a little creep under a steady load, and a 30 ms response.
- A scene: a touch, a press, four taps and a hard squeeze, plus chips for a steady touch, press, hard press or squeeze.
- A pop-up: the pad with a fingertip and a force gauge, the force and the resistance over the run, eight live tiles, graphs, an event log and a check page.
- A complete package: about 2.3 MB with the library, our OLED, 5 mm LED and resistor libraries, our Arduino UNO V4.0 and the demo, without the source code of the model.
The FSR402 in Proteus
The device is FSR402TEP in TEPFSR402.LIB, under Sensors > Force, with the prefix FSR and the model TEPFSR402.DLL. Search FSR or force in Pick Devices. Two pins along the bottom: 1 and 2 - it has no polarity. Its properties: PROFILE (DEMO or STEADY) and FORCE (newtons, for STEADY).
Download FSR402 Force Sensor Library for Proteus Simulation
Click the button below to download FSR402-Force-Sensor-Library-for-Proteus-v1.0.zip (about 2.3 MB, without the source code of the models):
FSR402 Force Sensor Library for Proteus V1.0- README.txt: installation, the demo, the wiring, troubleshooting and the limits of the simulation.
- Proteus Library Files:
TEPFSR402.LIB,TEPOLED12864.LIB,TEPLED5MM.LIB,TEPRESISTOR.LIBandArduinoV4TEP.LIB. - Proteus Model Files:
TEPFSR402.DLL,TEPOLED.DLL,TEPLED5MM.DLL,TEPRESISTOR.DLLandTEPARDUINO.DLL. - Arduino Code: the demo sketch (no extra library).
- Proteus Simulation: the demo project, its HEX file and copies of the DLLs.
No Proteus yet? Read How to Download and Install Proteus 7 and 8. New to libraries? Follow How to Install a New Library in Proteus.
How to Install FSR402 Force Sensor Library for Proteus Simulation
- Close Proteus and extract the whole zip file, for example to your Desktop.
- Copy the files from Proteus Library Files into the LIBRARY folder of Proteus.
- Copy the files from Proteus Model Files into the MODELS folder.
- Delete
TEPFSR402.IDXfrom the LIBRARY folder if it is there. - Start Proteus, press P and search for FSR.
Proteus Simulation of a Press Pad
Our demo is a press pad. FSR1 is the FSR 402 with PROFILE DEMO: nothing at first, a light touch of 0.5 N at 2 seconds, a firm press of 5 N at 4 seconds, released at 6, four quick taps of 3 N from 7.5 seconds, then a squeeze rising to 18 N from 10.5 seconds, held, and released at 15. Its pin 1 goes to 5 V and pin 2 to A0 of our Arduino UNO Library for Proteus V4.0; R1, 10 k, goes from A0 to ground and completes the divider. Our OLED SSD1306 Library for Proteus shows the readings, and two LEDs from our 5mm LED Library for Proteus sit beside it: TOUCH (green, D5) and HARD (red, D6), each through 220 ohm. The Arduino's built-in monitor is the same window as our TEP Serial Monitor Advance for Proteus. Open FSR402-Force-ArduinoUnoV4.pdsprj.
The Sketch
The sketch needs no library. Fifty times a second it averages eight conversions of A0. From the divider it works out the FSR's resistance:
rFsr = R_FIXED * (1023.0 - adc) / adc;
and turns it into a force with the FSR's curve, R = 10 k x (1 N / F)^0.95, solved for F:
force = pow(R_1N / rFsr, 1.0 / EXPO); // newtons, from the FSR's curve
A press must not flicker on and off when the force hovers near the threshold, so the sketch uses two thresholds - a press starts above 0.3 N and only ends below 0.2 N:
const bool p = pressed ? force > 0.2 : force > 0.3; // a press: over 0.3 N, ended under 0.2 N
While a press lasts it keeps the peak, and when the press ends it prints the peak in newtons and grams. The OLED shows RELEASED, TOUCH, PRESS or SQUEEZE in big letters, the force and the resistance, a 100-point trend from 0 to 20 N and the presses with the run's peak; TOUCH lights during a press and HARD above 10 N:
digitalWrite(LED_HARD, force > 10);
FSR402 Simulation Results
Open the project and press Run. The demo runs 16.5 simulated seconds and took 410 seconds on our PC with the pop-up open and the pictures being taken. Click the FSR for its pop-up. Every number below comes from one simulation run, the demo exactly as it ships.
A Light Touch
For the first two seconds nothing touches the pad: the FSR is an open circuit, A0 reads almost exactly 0 V and the monitor says "open". At 2 seconds a finger rests on it with 0.5 N - about the weight of 50 g. The films touch, the resistance drops to 19.1 kohm and A0 rises to 1.72 V; on the sheet the middle of the head starts to glow, the OLED says TOUCH, and the green LED comes on - the sketch has counted press 1.
A Firm Press
At 4 seconds the finger presses firmly: 5 N. The resistance falls to about 2.1 kohm - ten times the force, roughly a tenth of the resistance, just as the curve says - and A0 climbs to 4.12 V. The monitor reads "F 5.12 N A0 4.125 V R 2.12 kohm": a little more than the true 5 N, because the resistance has already crept down 1.9 % under the steady press, and the sketch's curve does not know about creep. At 6 seconds the finger lifts; the reading falls through 0.89 N, the press ends below 0.2 N, and the sketch prints "Press 1 released: peak 5.15 N (525 g)" - the light touch and the firm press were one continuous press.
Taps
From 7.5 seconds four quick taps of 3 N follow, each 0.3 seconds long. Each one is a press of its own: the glow flickers on the sheet, the green LED blinks four times, and the monitor prints four releases, each with a peak of 3.02 N (308 g). At 8.4 seconds, in the middle of the second tap, the pad holds 2.98 N at 3.54 kohm. The hysteresis in the sketch - start above 0.3 N, end below 0.2 N - keeps each tap a single, clean press.
A Hard Squeeze
At 10.5 seconds a hand starts to squeeze, the force climbing from 1 N to 18 N in 2.5 seconds. At 12 seconds it passes 10.9 N: the resistance is down to 1.01 kohm, the red HARD LED lights, the OLED says SQUEEZE and the trend shoots up. From 13 seconds the 18 N is held. Now the creep shows clearly: at 14.8 seconds the resistance is 617 ohm, 4 % below what 18 N alone would give, and the monitor reads 18.93 N. When the hand lets go at 15 seconds, the sketch reports "Press 6 released: peak 19.29 N (1967 g)" - over a newton more than was really applied. That is exactly why an FSR is a touch sensor and not a scale.
The Graphs, the Event Log and the Check Page
The Graphs page plots the force, the conductance, the voltage across the FSR and the current through it. The Event log keeps the scene and every press with its peak. The Check page sums up the run: the force 0 N now and 18.0 N at the run's peak; the resistance back at 20 Mohm with nothing on the pad; 6 presses; and the creep back at zero once the load was gone.
The monitor shows the sketch's side: a line every second, and each press's peak when it is released.
FSR, Flex Sensor or Load Cell?
Three sensors, three jobs. The FSR feels a push on its face. A flex sensor - our Flex Sensor Library for Proteus - is a strip whose resistance rises as it bends: the classic sensor for glove fingers and joints. A load cell with an HX711 - our HX711 Load Cell Library for Proteus - is the real scale: a strain gauge on a metal beam, accurate to a fraction of a gram, but bigger, stiffer and dearer. Choose the FSR when you need thin, cheap and "how hard", the load cell when you need grams.
Try It Yourself
- Click Press 5 N and watch the resistance creep down by a few percent over several seconds - the reading slowly rises.
- Click Touch 0.5 N: A0 sits near 1.7 V; change R1 to 47 k and the same touch reads far higher.
- Click Squeeze 20 N: the resistance falls to about 580 ohm and A0 nears 4.7 V - the top of the range.
- Lower the press threshold in the sketch to 0.05 N: the noise floor starts to count as presses.
- Change R_FIXED in the sketch without changing R1: every force reads wrong - the code must match the circuit.
Ideas to Extend the Demo
- Turn it into a drum pad: send a MIDI note with a velocity from the peak.
- Put four FSRs under a board and find where a weight stands from their balance.
- Make a grip trainer that counts squeezes above a target force.
Your Own Sketches
The demo sketch is in the zip file, and you can change it in the Arduino IDE. New to Arduino? Start with our Arduino Tutorial for Beginners. Export the compiled binary, and set the UNO's PROGRAM property to the new file. Our guide on How to get the HEX file from Arduino shows you where the file ends up.
Things to Know Before Using a Real FSR 402
- Press the active area: the dark round part only, on a flat, firm backing; a small rubber puck spreads the force evenly.
- Not a scale: parts differ by several percent and the reading creeps; calibrate with known weights if you need numbers.
- The tail: never bend it near the head, and do not solder the tabs directly - use a connector or crimp them.
- The divider: choose the fixed resistor for your range - 10 k for general use, 47 k - 100 k for light touches.
- Mounting: do not glue over the vent at the tail; a sealed pad changes its own reading as the air inside warms.
Troubleshooting
- A0 stays at 0 V: nothing on the pad - or the fixed resistor is missing and the input floats.
- The force reads wrong: R_FIXED in the sketch does not match the resistor in the circuit.
- Light touches do not show: use a bigger divider resistor.
- The reading drifts under a steady press: that is the FSR's creep, a few percent.
- The part is not simulated:
TEPFSR402.DLLis missing from MODELS and from the project folder.
Limitations of the Simulation
- The resistance against the force, the turn-on, the open circuit and the creep follow the way FSRs behave; the sensor is our own drawing, the head at its real size, the tail shortened.
- Our own choices: the curve 10 k x (1 N / F)^0.95, the 20 Mohm open circuit, the 6 % / 4 s creep, the 30 ms response, the scene and the glow.
- Not modelled: part-to-part spread, hysteresis, the effect of where and with what it is pressed, and temperature.
- Arduino is a name of Arduino; this library is not made or endorsed by Arduino, Labcenter or any sensor maker.
- Tested in Proteus 8.5 in November 2026 (the demo as shipped). Proteus 7 is not supported.
So, that was all about the FSR402 Force Sensor Library for Proteus Simulation. I hope it helps you build your drum pad, your smart cushion or your robot's fingertip before the real sensor arrives - and shows that a sense of touch can be as simple as two films, a resistor and an analog pin. If you have any questions, ask in the comments and I will help you out. Till the next tutorial, take care and have fun!























Comments
0