I have bought a FlexiForce force sensitive resistor, which can measure weights from 1-100lbs with a driving voltage of 5V (although I plan on adjusting the range to 10-300 by setting the voltage to 0.5V as described in the Flexiforce documents).

Now I need a reliable and simple way of measuring the resistance and generating a signal when a certain threshold is reached. Basically I'd like it to look like this: https://i.imgur.com/Wt8pUEf.png

However I haven't found an adjustable device where I can set a resistance detector that has an adjustable threshold.

I also haven't being doing Electrical Engineering that long!

Basically I just want to see if the resistance/voltage reaches a certain threshold and then generates a current on the GPIO for as long as that is the case.

  • Yes im starting to realize that. Im more of a aoftware developer but I need a hardware component that isn't manufactured anywhere. At least Ive since finally understood what a voltage divider does – user2741831 Dec 21 '18 at 6:58
  • tekscan.com/products-solutions/force-sensors/a401 It says it the sensitivity is adjustable using a lower drive voltage – user2741831 Dec 21 '18 at 7:51
  • That would require a middle man that basicly just compares 2 floating point values. Does it really make a difference wheter or not I feed the FSRs output into an anaolog digital converter or just use an analog comperator to directly compare it to another signal? I'm pretty sure the capacitor is just there to keep the signal stable until the converter has submitted all the data? Also how does changing the circutry change the force range of the resistor? – user2741831 Dec 21 '18 at 8:06
  • By the way are you saying that Roger Jones answer probably won't work? – user2741831 Dec 21 '18 at 8:08
  • The one linked in the tekscane website I linked, which produces a digital output, presumably the change in resitance. I assumed the mcp6004 is a digital amplifier, just as this one: play-zone.ch/de/… – user2741831 Dec 21 '18 at 8:12

Typically you'd convert the changes in resistance from your sensor into changing voltage, a Wheatstone Bridge would be one way to do this, and feed that into a Analogue to Digital Converter that would pass on the voltage to the Pi over the SPI or I2C bus.

However, from your question I get the impression you don't care too much about the absolute reading from the sensor but rather want a signal to indicate if it's above or below a predetermined level. In this case we could simplify the circuit somewhat by using a comparator to drive a single GPIO pin (just be careful about keeping the voltages on the GPIO below 3.3v). It would compare the sensor output and your set point on a potentiometer. How much hysteresis you require for your application and so on would determine the final component choice.

EDIT Looking at your diagram again I think you're almost there, you have a potential divider for the sensor so you just need to do the same with a potentiometer, something like this:


simulate this circuit – Schematic created using CircuitLab

Potentiometer = "Tunable Resistor"

  • below 1 second of reaction time would be sufficient for hysterisis. If I get a comparator, wouldn't I need some source of energy that delivers the threshold voltage? Because that would be sort of complicated. I was hoping there would be some programmable chip where I can set the threshold voltage or one of those tunable resistors with a screwdriver slot, which would just compare the resitance instead of measuring it. – user2741831 Dec 17 '18 at 16:33
  • 1
    RADJ = potentiometer – Tomas By Dec 17 '18 at 22:44
  • Just so I understand this right: I connect the 10ohm rrsistor and the fsr in series and connect them with a potentiometer with is configured to the threshold resitance in parallel. I then connect them to a comperator which generates a signal if + resitance is bigger than -. If so what does the comperator use as a signal current source? Also can I connect both ends to the same ground? – user2741831 Dec 17 '18 at 22:51
  • 1
    @user2741831 Not quite, we're building two voltage dividers. Consider the 10Ohm and FSR: they have 5v across them combined so the voltage at the junction between them will be proportional to the ratio of their resistances (Vo=5v x [FSR/[10+FSR]]). Ditto for the potentiometer, the voltage at the wiper is adjustable between 0 and 5v. These two voltages are fed into the comparator inputs. – Roger Jones Dec 18 '18 at 8:58
  • 1
    Watch out for putting too much current through your FSR; the max current they can take is surprisingly low. If the FSR minimum resistance (e.g. when the FSR is pressed on with lots of force) goes down to (say) 40 ohms, that poor FSR would get 100 mA through it -- and probably be damaged. You'll probably want R1 >= 100 ohms. – Catalyst Sep 21 '19 at 23:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.