Electronic – arduino – the purpose of a voltage divider in a flex sensor

arduinoresistancevoltage divider

I've been following this flex-sensor-arduino tutorial on setting up a simple flex sensor with Arduino, and I got confused on this part:

The flex sensor changes its resistance when flexed so we can measure that change using one of the Arduino’s analog pins. But to do that we need a fixed resistor (not changing) that we can use for that comparison (We are using a 22K resistor). This is called a voltage divider and divides the 5v between the flex sensor and the resistor.

Why exactly did I need to add the second resistor? Couldn't the Arduino just get the voltage change from a single variable resistor that is the flex sensor? I'm very new to electronics, so an explanation in simple terms would be great.

Best Answer

This is called voltage divider. To to be able to discover the unknown resistance you put it into a combination with a known resistance and apply the formula.

enter image description here enter image description here enter image description here

You can connect a fixed current source to the unknown resistance, to measure voltage drop over it. A fixed current source is a bit more tedious to implement though.

enter image description here enter image description here

I'd suggest you go and read about it, experment with it on a breadboard. You'll need two multimeters - one for voltage, another for current. Learn your Ohms law amen.