I have been receiving requests regarding the DIY Flex Sensor (Bend Sensor) that I used on my Robotic Hand project. Well, here it is.
Materials needed:
Two (2) flexible plastic strips (2cm x 10cm)
Two (2) aluminum foil strips (1cm x 9cm)
One (1) bond paper strip (2cm x 10cm)
One (1) sharpened pencil
One (1) 10K-ohm resistor
Four (4) jumper wires
STEP 1. Prepare the white bond paper strip (2cm x 10cm) and the pencil. Darken the both sides of the bond paper strip with the pencil – as black as possible. See images below for reference:
STEP 2. Prepare the two (2) flexible plastic strips (2cm x 10cm) and the two (2) strips of aluminum foil (1cm x 9xm each). Stick the two aluminum foils to the flexible plasic strips. Please refer to the image below:
STEP 3. Prepare two (2) jumper wires, and attached one end of each jumper wire to the bottom portion of each aluminum foil (that are already attached to the flexible plastic strips). See image below:
STEP 4. Prepare the darkened piece of paper. “Sandwich” this piece of paper in between the aluminum foils. Be sure that the aluminum foils and the wires in between do not touch. Please see images for reference:
Image at left shows the piece of paper on top of one of the strips. Image at left shows the piece of paper being “sandwiched” in between the strips prepared in Step 3.
STEP 5. Place some masking tape (or any tape will do) to hold the pieces in place.
STEP 6. We are now ready to attach the DIY Flex Sensor to the board (in this case, my DIY Arduino on breadboard). Attach one end of the jumper wires (red jumper wire in the picture) and the other to another a point in breadboard which is not connected to any pin in Atmega328). Please see image below:
STEP 7. Add a 10K resistor to the breadboard, one end being attached to the GND (power rail) and the other end attached to the other jumper wire (orange jumper wire) of the DIY Flex Sensor: Please refer to image below for clarity.
STEP 8.Attach another jumper wire in between the resistor lead and the orange jumper wire, then attach the other end of wire to Analog A0 pin of the Atmega328 (on your Arduino board, look for A0, and attach the other end there. Refer to the image below:
I am also showing the different angles of the connections for all these wires in the following images:
STEP 9. Now, we do the coding. Attach you board to the computer, and open up the Arduino IDE. You may download the IDE from this link from Arduino web site: Arduino IDE.
I do not have a multimeter. So I will have to see what is the minimum and maximum values when the Flex Sensor is not bent, or bent to some degree. In my case, the minimum value I get for my sensor is 10, and the maximum value when I bend it to the fullest is 143. Using these values, I then mapped them between 0 and 180 (the Servo angles I used in my project).
Now, code the following as seen from the screenshot below:
At this point, we’re done with our DIY Flex Sensor. You may want to modify how you will be doing yours. Comments are welcome. You can still improve this set up.