Home / How To's / How to Use a Flex Sensor
Flex Sensor

How to Use a Flex Sensor

A flex sensor is used to measure how much an object bends. Learn how to use it in this tutorial.

What is a Flex Sensor?

A flex sensor can be conductive ink-based, fibre-optic or capacitive. For hobby microcontroller systems, the conductive ink-based flex sensor is common.

Flex-Sensor-2-2-039-039-measuring-bending

As its name suggests, a conductive ink-based flex sensor uses a conductive ink whose resistance varies when bent. The ink may contain carbon or silver to make it conductive. The spacing between carbon particles are larger when bent and closer when straight which results in a change of resistance:

Sensor bent

Sensor straight

In the diagram, the resistance of the sensor is 30k when flat and 70k when bent at an angle of 90 degrees. Yours might not have the same resistances so I suggest you test it before using it with microcontrollers.

Conductive ink-based flex sensors are unipolar sensors, which means the change of resistance is true only if you bend it in one direction. Bending it to the other direction does not change its resistance.

Arduino Interface Circuit

Just like most resistive sensors (like a thermistor), the best way to connect this sensor is through a voltage divider as shown:

With the setup above, the A0 pin receives an increasing voltage as the bend on the sensor is increasing.

Here is an example Arduino sketch:

Here, series_R is the resistance of the series resistor. It’s advisable to use a resistor that is the same as the resistance of the flex sensor when flat to increase sensitivity. You also need the resistance of the sensor when straight (straight_R) or when bent fully (bent_R).

What microcontroller project could you build using a flex sensor?

Check Also

How to Use the MQ-7 Carbon Monoxide Sensor

The MQ-7 carbon monoxide sensor is especially designed to be sensitive to carbon monoxide (CO) …

Leave a Reply

Your email address will not be published. Required fields are marked *