Flex Sensors not working properly

Hello,

I'm working on a project to build a flex sensor glove which is supposed to interprete the sign language. To do that I need to attach 5 flex sensors. 2 flex sensors respond according to how much i bend them, so they are working fine but the 3rd sensor(4th and 5th also does the same thing) behaves as if I am constantly bending it. The values I am getting are normal for the 1st and 2nd sensors but the value for 3rd sensor keeps changing.

I wanted to use the simplest code to see if my sensors are working properly.

int flexPin1 = A0;
int flexPin2 = A1;
int flexPin3 = A2;
int value1;
int value2;
int value3;

void setup()
{

Serial.begin(9600);
pinMode(flexPin1,INPUT);
pinMode(flexPin2,INPUT);
pinMode(flexPin3,INPUT);

}

void loop(){

value1 = analogRead(flexPin1);
value2 = analogRead(flexPin2);
value3 = analogRead(flexPin3);

Serial.println(value1);
Serial.println(value2);
Serial.println(value3);
delay(1500);
}

My circuit diagram looks the same but there are 3 sensors instead of 1. (Included in the attachments)

Thanks in advance.

arduino.png

My recommendation is to triple check your wiring on the 3rd sensor. Sometimes jumper wires have breaks inside. Sometimes breadboard connections are not reliable. You can use a multimeter to check the continuity of the wiring from the sensor to the Arduino.

I would also recommend swapping one of the sensors that's giving good values with the one that's giving bad values to see if the problem follows the sensor.

Thank you for your reply. I just tried using different cables and tested each sensor individually but there is no difference. Sensors are working fine and the problem always starts with hooking up more than 2 sensors.

HJSmith:
Thank you for your reply. I just tried using different cables and tested each sensor individually but there is no difference. Sensors are working fine and the problem always starts with hooking up more than 2 sensors.

Change the order of reading the pins to 3,2,1 and see if you get good reading for pin 3 and not for pin 1

Paul

Hello, I've tried that as well but I'm still getting the same result.

What do you mean by "same result"? After changing the order, is the bad reading on A2, or is it on the 3rd reading?

It is again on the 3rd reading as always

I ve managed to solve the problem by changing the breadboard. It wasnt functioning properly for some reason.

HJSmith:
I ve managed to solve the problem by changing the breadboard. It wasnt functioning properly for some reason.

The reason was given to you in #1:

pert:
Sometimes breadboard connections are not reliable.

Typical for breadboards. A known source of connection errors.