IAN LANG ELECTRONICS
So, the question running through your mind at the moment is "what in the name of God is a force sensitive resistor?" unless of course you know what a force sensitive resistor is or does in which case the question is going to be "he's not going to bang on for the length of this page about what a force sensitive resistor is or does, is he?".
Yes he is. For those of you that don't know, a force-sensitive resistor is a device that lowers its resistance when it gets some force applied to it, just like the name implies. But- there are some caveats.
On the left there you can see the one I'm going to be using
in this article, it's the Interlink 402 and it came from
Oomlout, if you click on the picture it takes you to
their webpage for it. As you can see it's round,
and if you look in the middle you
active area where the variable can see the
active area where variable resistance takes place.
Two long legs lead down to a set of prongs which you
must not, under any circumstances, solder; because I
promise you even if you are the undisputed heavyweight
soldering champion of the Universe and Emeritus Professor of
Soldering Very Carefully at Cambridge university and have a lecture circuit consisting of MIT, UMIST, Caltech, The Technical Universities of Tokyo and Berlin and the Institute of Electronic Engineers who Solder Really Carefully if you solder it you will ruin it irreperably. Instead, consider some PCB mounted terminal blocks. The two long legs are actually silver traces which are highly conductive, which brings me to another caveat. It is very flexible, but watch that bend radius in the legs and never fold at sharp angles, because if you do you'll cause a crack in the traces and ruin it.
They are made of a flexible substrate on to which is printed a semiconductor, then a spacer is applied and a polymer thick film or PFT layer with printed interdigitating electrodes is applied.
I know what you're thinking. You're thinking "is it? Oh, jolly good." The practical upshot of the techno-babble above is that it doesn't take very much to get it conducting at all, just a gentle press with the tip of your finger, and the more you press, the more it conducts, up to a given point. Those of you who know about FSRs will at this point be thinking " I just bet he's going to bang on about conductivity and resistivity at this point" and you would not lose your money if you did.
As you know, a resistor resists the flow of electrons and we express the resistance in Ohms. A variable resistor such as we have here can be made to do this to greater or lesser degree. In technical, that's all we care about. However some people like to sit in laboratories and complicate matters. Sometimes, they find something useful that we as technical people can apply to the real world, but 90 % of their work is to do with making things a good deal harder than they need to be. It was a red-letter day when they came up with the idea of resistivity and conductivity. Still, we might as well know it, as you never know, it might come in useful.
A low resistivity is one which allows readily a movement of electrons. Same as resistance, you might be thinking, but no because they measure it over a distance of the material involved and use the term ohm-metres as the unit. (You can bet that Clever Clive and his team of Sciency Misfits use a very accurate meter too. Probably based on a portion of the Earth's circumference on a sunny Tuesday in August at a point in Gambia). There now follows a fancy equation:
This is the equation for resistivity. The fancy letter at the beginning that looks like a p is in fact the Greek character rho, and stands for resistivity, the R is resistance, the A the cross-sectional area of the material under consideration and the fancy l underneath the length of the material. You can also define rho as the magnitude of the electric field measured in Volts per metre divided by the magnitude of the current density measured in Amperes per square metre. If you want to. Not many people do.
These people get paid for this, and so not content with embuggering the concept of resistance they also came up with the idea of looking at it the opposite way round and calling it conductivity. Conductivity is the reciprocal of resistance and is expressed:
The fancy letter at the front is the Greek letter sigma but k is often used as well. The unit for conductivity is often introduced to third-form schoolboys by the physics teacher before the biology teacher has done human reproduction as the physics teacher knows that if he does it afterwards the class of thirteen-year-old boys will dissolve into uncontrollable gales of laughter and he or she might just as well dismiss it for the rest of the afternoon. It is the Siemens per metre. Nice one, Clive.
All of the above means for us that our FSR plugged into our Arduino gets less resistive the harder we press, or as Clever Clive and the Sciency Misfits would point out, more conductive the harder we press. Oomlout say the resistance goes from infinite at air pressure to about 250 ohms at 100 Newtons, which is about
10 kg or if like me you're old enough to be working in pounds and ounces 22lb. Oomlout are usually very good at working this sort of thing out and so that's the figures we'll go with.
Like all sensors, it doesn't work just on its own. I know the following is in the same spirit as rubbing salt in the wounds, but now it's time to talk about voltage dividers. If you don't know what a voltage divider is, look here:
So, before you actually fall asleep on the keyboard of your computer, I promise that is the end of the underlying theory. No more Joules per dustbin lid or Amperes per jar of jam, just what it does and how to do it. We'll start with a wiring diagram:
And so, you can see the concept of the voltage divider here at work. Look where the lower leg of the FSR is and it's in the same conductive path as the 10k resistor, and the green wire makes a tap at the junction feeding analog 0. The 10k resistor is at the same time reliably pulling analog 0 low, a neat solution all round. Upload the following code to your board, open the serial monitor and put your finger on the active pad of the FSR and apply gentle pressure, gradually increasing. Then take your finger off and do it again.
Done it? You probably, by pressing hard, got the reading up to about 900 or so. This is a digital reading of the analogue voltage coming in at pin A0. Since there's ~ 4.9mV per digital step, this represents about 4.4 V. Let's see if the theory bears it out
Vout = (R2/R1+R2)Vs
Hmmm. Where's that 0.5 V gone? Could be a misapproximation in the readings, could be the resistors aren't quite the values we thought, might be the effect of the breadboard, who knows? It's close enough in any case to prove our theory works and we'll take a digital reading of 900 to be a full press.
And that leaves us the question as to what we can do with it. The most common application for FSRs is in the form of a switch. It's not accurate enough for scales or strain gauges, but what it can do is let a light touch turn things on and a heavy one turn them off or vice-versa. It can be used as collision sensor in slow-moving objects.
The short video above illustrates the former principle outlined above. You'll see that to turn the LED on, I need to apply quite a lot of welly to the FSR, but to turn it off again I only need the gentlest of touches. Here's the wiring diagram:
And some code, which as always, we analyse over the page.