Several FSR in parallel - range seems to change according to analog input used

Hello,

I have built a small circuit with four home-made insulating-foam FSR sensors (please see schematics below) and an Uno board.

The maximum values I can get after analog to digital conversion are not in the same range for each sensor. They seem to increase according to the analog input used. However the program makes two measures per sensor with a short delay between them to avoid interferences between sensors.

Sensor connected to analog input A0 reaches ±690.
Sensor connected to analog input A1 reaches ±980.
Sensor connected to analog input A2 reaches ±990.
Sensor connected to analog input A3 reaches ±1023.

Note that the schematic doesn’t include the visual feedback part with leds but I guess it has no influence on the values I got from the sensors.

Any idea why I got such differences ?

Thank you in advance.

const int sensorPin[] = {A0, A1, A2, A3};    // select the input pins for FSRs
int sensorValue[] = {0, 0, 0, 0};  // variables to store the values coming from the sensors
const int ledPin[] = {9, 10, 11, 12}; // Analog output pins that LEDs are attached to
int outputValue[] = {0, 0, 0, 0}; //values to send to LEDs
int maxValue[]= {0, 0, 0, 0}; //variables to store sensor's current maxima
int minValue[]= {1024,1024,1024,1024}; //variable to sensor's current minima
const int threshold[] = {30, 30, 30, 30}; //set thresholds sensors according to measured maxima at rest


void setup() {
  // declare ledPin[] as OUTPUT:
  for (int thisPin = 0; thisPin < 4; thisPin++)  {
    pinMode(ledPin[thisPin], OUTPUT);      
  }
  
  // inits serial port
  Serial.begin(115200); 
}

void loop() {
  // HANDLES SENSORS ONE BY ONE
  for (int thisPin = 0; thisPin < 4; thisPin++)  {
      
    // read the value from sensor:
    sensorValue[thisPin] = analogRead(sensorPin[thisPin]);
    // delay to avoid interferences between analog inputs
    delay(2);
    sensorValue[thisPin] = analogRead(sensorPin[thisPin]);
  
    //test for current maximum for sensor
    if (sensorValue[thisPin] > maxValue[thisPin]) {
      maxValue[thisPin] = sensorValue[thisPin] ;
    };
  
    //test for current minimum for sensor
    if (sensorValue[thisPin] < minValue[thisPin]) {
      minValue[thisPin] = sensorValue[thisPin] ;
    } ;
  
    //test if sensed value is upon threshold
    if (sensorValue[thisPin] < threshold[thisPin]) {
      sensorValue[thisPin] = 0;
    };
  
    //sends data for first sensor to serial port
    Serial.print("Sensor #"+String(thisPin)+" value : ");
    Serial.print(sensorValue[thisPin], DEC);
    Serial.print(" Current min. for #"+String(thisPin)+" : ");
    Serial.print(minValue[thisPin], DEC);
    Serial.print(" Current max. for #"+String(thisPin)+" : ");
    Serial.println(maxValue[thisPin], DEC);
    // maps sensor value to PWM scale for LED
    outputValue[thisPin] = map(sensorValue[thisPin], 0, maxValue[thisPin], 0, 255);  
    // change the analog out value (first LED) :
    analogWrite(ledPin[thisPin], outputValue[thisPin]);
  } 
}

The maximum values I can get after analog to digital conversion are not in the same range for each sensor.

If you change which sensor is connected to pin 0, do you still get low readings on pin 0? Perhaps it is the sensor that is faulty.

You're right, if I swap sensors, the maxima change according to the modification.

So it's a matter of sensors. I'll post a message about this in the dedicated forum.

Thanks PaulS.