Hello everybody,
I followed the link below to setup Raspberry Pi with FSR sensor.

With the help of tech support, I got it to work but unfortunately, the max pressure the FSR produces is 2047. WHat can I change in the setup for it to show higher pressure? Please help, our project is STUCK

I tried multiple FSR units but same results .
Thanks for your help!!
Julie

Hey Liam,
I am collecting force applied on the FSR sensor. The reading doesnât go beyond 2047. It appears there is a max value set somewhere. I found two other threads that mention the same issue, but I am sure where to modify.

Hm, 2047? I am almost certain this doesnât have anything to do with the FSR.

It is interesting that value 2047 is exactly 11-bits (12-bits if combined with a bit representing signature).

The ADS1015 is a 12-Bit ADC - 4 Channel with Programmable Gain Amplifier, the maximum possible range of values that can be represented in 12-bits is -2047 to 2047 as each bit can either be a 1 or a 0. So with first or last bit representing + or - then the next eleven bits represented in base-10 would have values of:

Which if all zeros would represent zero, then all ones âunsignedâ 2047, with combinations representing every value in-between and the sign bit whether it is positive or negative. This is your maximum level of precision capable with an ADS1015.

However, even with limited precision, you can âreadâ values from a wider range with the help of gain adjustment, thereâs a programmable gain amp on the ADS1015 as stated in the description:

As a nice bonus, it even includes a programmable gain amplifier, up to x16, to help boost up smaller single/differential signals to the full range

All you should need to do is tweak that gain so each increment measured represents a wider/tighter measurement from the FSR, youâll lose or gain some precision in exchange for a wider or shallower sensor measurement range.

Can you please shoot through the code and library youâre using? Should have a way to change the gain so 2047 actually represents either the maximum value of the FSR, or at least some higher max reading than what youâre getting now.

Thatâs a good question, but the only coding I have done is whatâs in your article. Also, will it help if I get a 16 bit ADC instead? I have no idea how to modify the gain value. Thanks Julie

I think you actually want less gain, and Iâm not super sure 5 is a valid value looking at the tutorial page

Alternatively, you can adjust the resistor value to skew the voltage output of the FSR to keep it in range of your ADC, try a lower resistance to âpull it harderâ towards GND.

Hi Julie,
The resistor value is a hardware adjustment. The resistor you have currently appears to be 80k Ohms.
There are many helpful calculators for determining resistor values.

Before you make any hardware changes, that shouldnât be necessary. Once you change your gain, 2047 isnât actually representing 2047 anymore, itâll always max out to 2047 no matter what you do as thatâs the maximum signed value that can be represented by 12-bits as I mentioned earlier.

Using a 16-bit adc will instead give you a range of 32767 if signed (2 ^ 15), as it has more bits worth of precision.

When you changed the GAIN to 5 in your earlier code, youâre essentially amplifying/minimizing the representative value of that 2047, exchanging your precision or range for a benefit in the other.

Should just be a straight multiplication/division of values by GAIN to get the actual representative value of each reading (can probably do it in an enumeration on a one-liner pretty easily) if I remember correctly (unless it is a non-linear relationship and Iâve misremembered this which could certainly be the case, please correct me if Iâm wrong here ).