Odd resistance measurement situation with force sensitivity resistor

Hello. I have recently purchased two of these FSR's: https://www.amazon.com/dp/B08SJ3722C?psc=1&ref=ppx_yo2ov_dt_b_product_details.

While prototyping with one of these, I had it hooked up between ground and the data pin and included another regular resistor to function as a pull-down resistor on the circuit. Basically I followed someone else's instructions on how to do this, and it works fine. I can read the sensor from my Arduino code and spit out the measurement into the serial monitor so I can see the impact as I put pressure on the FSR.

Now I have two of them hooked together in series (haven't tried parallel yet) and layed out parallel to one another about 10 inches apart under a section of flooring in my house. This layout seems to work adequately for my use case, which is to detect when someone steps on this particular part of my floor. But I'm experiencing something really odd.

In my Arduino code, I have a trigger set to perform an action when the average reading (based on a sample of 30 reads from the sensor) goes above a certain threshold. I tested this while the Arduino was plugged into my Mac's USB port. The behavior is great -- I set the threshold the way I want, and when I step on that spot of the floor the trigger happens as I would expect. However, when I disconnect the Arduino from my Macbook and instead power it from a 5V power supply, the trigger action happens continuously. Therefore, the readings from the sensor are higher. For example, when powered by the Macbook, the threshold I use is 300. When using the 5V power supply, I have to up the threshold to 450 to avoid the continuous triggering.

Why would the measurements from the FSR be different based on whether I'm powering it from my Macbook or from the 5V power supply?

Please provide a schematic of the circuit you've built, and a clear photograph of how you have everything connected together.

https://www.electronics-tutorials.ws/resistor/res_5.html

Which Arduino are you using?

I hope that you mean pull-up resistor, because the strip already goes down to GND.

With the pull-up resistor you have built a voltage divider, powered by the controller supply voltage. Depending on your ADC reference you can get any level in idle state.

Also prepare for temperature dependency of the strain gauges. For reliable operation I'd build a divider from 2 strips, one active and one without stress for temperature compensation.

1 Like

It's the Uno. Elegoo R3 for my prototyping.

Is the 5V power supply connected to the USB port on the Uno?

No, it's plugged into the little round power supply port on the Uno. Next to the USB port.

@JPInMontana

it's plugged into the little round power supply port

Well, that is the problem
The voltage for the little round input thing (barrel jack) needs to be between 7V and 12V
Won't work with 5V
Do you have other power supplies?

Ah. Well, dang. That's an fundamental failure on my part! I will address that and see how it goes. Thank you!

Do you maybe have a 5V power bank?

I was just about to reply -- I found a variable/selectable voltage power supply I had in storage. Pulled it out, set it to 9V, and am now triggering actions based on the same measurement I was using with the Macbook. Thank you again for your help!

Thank you for your thoughts on this... I'm pretty new to electronics, so I'm sure you're right in that it's a pull-up resistor!

Glad you made it work
Have a nice day!

Even though things seem to be working okay, I've noticed that the readings I'm getting don't vary by a drastic amount. It makes "tuning" it to find the right threshold a little more challenging. In other words, while the two FSR's (wired in series) are lying under my flooring the measurement I'm reading in Arduino hovers around 220-240 (that's with the 5600 Ohm resistor.)

In this current configuration, my threshold for triggering action based upon the FSR reading is ideal right around 250. With that little of a gap, I see some false positives every once in awhile despite my buffering/averaging of continual FSR reads. It's working pretty well, but I wonder if there's anything I can do to widen the spread between the "empty" weight of just my floor and then other weight that meets or exceeds my trigger threshold. For example, it would be great if it hovered around 150 when nobody was stepping on that part of the flooring, and then the reading would jump up to 400 or so whenever someone stepped on it. That's a wide enough gap which may allow me to set a threshold of around 375 in order to avoid false positives.

Maybe it boils down to sensitivity. I wish the FSR's would be more sensitive. And maybe they are and I'm using the wrong resistor, or perhaps need some other kind of electronic component.

Any thoughts?

This is a good app note on using FSR
FSR Integration Guide - Interlink Electronics.pdf (795.0 KB)

I would connect the two FSRs in parallel and use a 30K resistor as shown below.
With no force the reading should be around 50 and may jump to 250 with force

The key is "jump". Sudden change that remains for some time (unlike noise does).

Thank you!

You are welcome

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.