One of the sensors that can be attached to an Arduino, or other platforms, is the flex sensor.
These sensors allow, for example, with the movement of hand fingers to control servos, and are, in many cases, attached to glove fingers.
But these might be expensive, and there are several alternatives available on the internet to make our own flex sensors.
Well, this is my cheap alternative, and it works just fine.
The material needed to build this flex sensor is:
- An LED, 3mm preferably. Any colour will do.
- An LDR, or light dependent resistor. I’ve just picked the one that came with my Arduino ebay kit.
- Two resistors, one of 220 ohm for the LED and other, might be 10K, for the LDR.
- Some water gardening opaque tube (black), the thin ones used in automatic sprinkler systems, but for vases.
The idea is simple:
Cut the thin water gardening tube at length, for example of one finger.
At one end will be the LED, stuck inside the tube. Now the resistor can be soldered right at this point or at some other place, like a control board.
At the other end, the LDR is placed and taped out with some opaque adhesive tape.
So the schematic is the following:
Not shown is that the LED is at one end of the opaque tube, and the LDR is at the other end. Simpler and cheaper than this…
Now if we connect power, and a multimeter at Arduino A0 point and ground, by flexing the tube the light reaching the LDR varies, and so the tension value at this point also changes.
With a lot of flexing the voltages tends to 5V, in this case, and if the tube is completely straight the LED lights up the LDR more strongly and so the voltage at that point might end with a 2V.
By swapping the LDR with R2, then lower voltage is more flexing and more voltage is less flexing.
The 10K resistor might need to be adjusted in function of the LDR used. In my case it works fine.
And now it’s easy to use this cheap flex sensor. Just connect the “Arduino A0 port” point to one of the analogue inputs of your board, and normalize and use the values to control whatever you want.
For bonus points, the LED at the tip, is placed at tip of the fingers, and so it gives the glove a more “cyber-punk” look :)