Expand the Range of a Flex Sensor

I have been googling around and found that the range of a flex sensor is usually around 700 - 900 or 600 - 900. This means that we can have 200 or 300 data samples for one flex sensor. To be honest, 300 out of the 1024 possible data samples are small.

Is it possible to expand the range so that I can have at least more than 500 data samples? If so, how do I do it?

Thank you.

Edit: Apologies for the inconvenience

The flex sensor I am using as of now is a Flex Sensor 2.2 Inch.

I am using it for testing, but later it will be changed to a Flex Sensor 4.5 Inch.

As for the diagram and how it works, I am following a tutorial from SparkFun, but I modified it a bit and added a buzzer for testing.

The circuit I'm using is a combination of the two diagrams below:

Diagram 1

Diagram 2 (The buzzer is moved to pin 9)

This is the code for my program:

const int FLEX_SENSOR = A0;
int prevValue = 0;

const int FLEX_VALUE_MIN = 0;
const int FLEX_VALUE_MAX = 1023;

const int BUZZER_PIN = 9;

float getFlexValue(int pin)
{
  float value = (float)analogRead(pin);
  return (value - (float)FLEX_VALUE_MIN) / (float)FLEX_VALUE_MAX;
}

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  while(!Serial);

  pinMode(BUZZER_PIN, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  int realValue = analogRead(FLEX_SENSOR);
  float mappedValue = getFlexValue(FLEX_SENSOR);

  if (prevValue != realValue)
  {
    noTone(BUZZER_PIN);
  }

  prevValue = realValue;

  if (realValue != 0)
  {
    tone(BUZZER_PIN, 5000 * mappedValue);
  }

  Serial.print("Real value   : "); Serial.println(realValue);
  Serial.print("Mapped Value : "); Serial.println(mappedValue);

  delay(100);
}

Please post a link to the sensor that you are using, a diagram of how it is connected to the Arduino and example of how it is being read by the Arduino

300 units of what ?
If analog counts say so.
There's a zillion ways to amplify the signals .
The question is which one is more suitable for you.
If you use op amps use the LT1215 if you can get it. Google it. There's a differential amolifier circuit
in the first page of the datasheet. I built that
circuit andit works great. (Gain(A) = 20)

1024 is only for a full voltage swing of 0 to 5 volts
Or 0 to 3 volts for those boards that are 3.0 volts

If you want a larger range you could try the MAP function but that will only spread the range over whatever you tell it and may only give you some smaller improvements.

It would however allow you to set the lower point as ZERO which may help in other math functions.

Bob.

The resolution would be better with an opamp differential amplifier 300/1024 x 3V is 878 mV.
If you use a gain of 3 you can use the full range.

The flex sensor appears to be used in a simple voltage divider in the picture. There might be some way to use it in a bridge setup. Artificially expanding existing input may just be adding garbage.

300 points on a 180° bend is 0.6° per point. That's a pretty small angle. If that's over a 90° bend it's even a smaller step. What angular resolution are you after?

Are you sure this sensor can even give you much better resolution? The document you link to doesn't give any info on this part. You'd need to use a test rig that can bend your sensor repeatedly between at least two points with less than 0.1° tolerance. Preferably between three points, to see possible hysteresis at the mid point. You should be getting the exact same ADC readings at each point, time and again. If there's a different reading the whole pursuit of increasing of the ADC range is futile.

Hi,
Welcome to the forum.

Can you tell us the application you have for the flex sensor please?

Thanks.. Tom.. :slight_smile: