Hi, I am using FSR in a voltage divider circuit with resistors of 100k ohms. I created a program to convert the output value to grams because the range of the FRS is 0g to 2000g like this:
Okay, I know that FSR aren't accurate, but I expected this to give at least a consistent value while being pressed but this isn't the case... it is giving me inconsistent values ranging from 0 - 600. Here is my code...
Do you know how to find that out? I mean I got that thing from amazon... Do you
think they have it on there? Because the FSR were awfully small and the details were kinda hard to understand... lemme check.
The RP-C flexible thin film pressure sensor is composed of polyester film of excellent comprehensive mechanical properties, high conductive material and nano-scale pressure sensitive material; the top is a flexible film and pressure sensitive layer above, the bottom is a flexible film and conductive circuit above.Both are glued by double-sided adhesive and the isolation sensitive zone.When there is pressure on sensitive area, the disconnected circuit on the bottom will be connected by top pressure-sensitive layer, and the output resistance of the port changes along with pressure.
Specification:
Model: RP-C10-ST
Thickness: 0.4 mm
Trigger force: 20 g, triggered when resistance is less than 200 kΩ by default
Pressure sensing range: 20 g ~ 2 kg
Pressure action mode: Static or dynamic (frequency within 10 Hz)
Well, this tells you the resistance is infinite with less than 20 g. So you can only use it with 20 g weight or more. So, perhaps your voltage divider resistance of 100k Ohms may be ok.
Do you have a DMM?
If so can you please read the DC voltage across the FRS as you apply pressure?
Can you please post a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.
How are you applying pressure?
You need to apply pressure "evenly" along the FRS I believe.
Can you please post an image of your project, showing how you are applying prressure to the FRS?
Using 2 analog pins makes NO sense at all. You have a single variable resister, the FSR in series with a second resistor, to make a voltage divider. There is only ONE variable to be read, the voltage across the FSR.
As I always say in these cases RTFM (read the fine manual). To save you some time go to section 24.6.1 in the data sheet.
What this is telling you is that with high input resistance you need a longer sample time to get reasonable answers. If you have a long time between readings you can put a 100 nf capacitor from the voltage divider input to the pin and ground. This will charge up between readings and drive the sample capacitor.
Otherwise you need to change the sample time (sections 24.4 and 24.9.2). If you can't do that you need to buffer the input.
I have to have two for my science fair project. Anyways, I think I fixed the bug... It was probably over complicated code and low resistor values and bad cable connections. I think it sorted itself out. thx for your help guys.