Haptic Glove With DIY Flex Sensors

10,087

52

14

Interacting with a computer through a mouse or a joystick can be rather mundane and sometimes (especially in video game play and robotics) its necessary to encode the movements of our fingers in to electrical signals that a microcontroller can read. Once we can interpret the flexing of our fingers, we can interact with virtual worlds inside a computer or control servo motors to mimic the movements of our fingers - electronic puppetry!!

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Flex Sensors Are Costly

First we need to be able to read the flexing of our fingers. The easiest way to do this is by using a flex sensor. Flex sensors like variable resistors....their resistance changes as they bend and flex. If we can read the resistance of a sensor, we can interpret how much it has been flexed and then we can use this data to do lots of interesting things! The problem is that commercially available flex sensors like the small 2.2" one shown here are incredibly expensive...A glove made from five of these can easily cost close to 100$.

Step 2: DIY Sensors : What We Need

To make our own cheap DIY flex sensors we will need...

1. A small PCB like the one shown.

2. Cable ties....one for each sensor. These add flexibility and strength to the sensor.

3. Two core wire for each sensor. So if we are doing a full five-fingered glove, we need 10 core wire. The length of the wire needs to extend from the glove to the microcontroller (like an Arduino).

4. Cellotape

5. One 10K resistor for each sensor

6. Conductive plastic bags. These are easily available from any electronics hobby store. In fact, you probably have a couple lying around the house since most delicate electronics goods are shipped inside these bags. To check if your plastic bag is conductive, just use a multimeter and touch its probes anywhere on the INNER surface of the bag...if you get a reading, thats good.

Step 3: Step 1: Strip the Wires

Strip one end of each wire. Twist the strands together and make a loop, twisting the end of the wire securely. When finished, each loop should be about 2cm or so in length

Step 4: Step 2: Preparing the Conductive Surface

Using a sharp blade, cut the conductive plastic bag as shown. The length of each strip should be just slightly shorter than the length of the sensor you are trying to make.

You will need two thin strips (each 1.1 cm wide) and one wide strip (2cm wide) for each sensor. The two thin strips will act like the outer layer of bread on a sandwich so If you use the side of the plastic bag, you will get a nice presealed end on one side.

Make sure you remember which surface of the plastic is conductive!

Step 5: Step 3: Inner Surface of Outer Layer

Place two thin (1.1 cm) strips on a work surface, conductive side facing upwards.

Using cellotape, attach two loops of wire to the upper (conductive) surface of the 1.1 cm wide strips.

Adjust the tail end of the loops so that when the two strips are placed on top of each other (like if you were closing a sandwich), the insulated wires sit adjacent to each other, firmly but not touching. Don't close the sandwich, just see that everything sits nicely when the sandwich is closed finally.

Step 6: Step 4: Completing the Sensor

Now that the inner surface of the outer layer of 'bread' is ready, take the wider (2 cm) strip of conductive plastic.

Fold it in half lengthwise (conductive side outwards) and crease it gently.

Now slip it between the the two wire loops as shown, remember conductive side is outward and should be placed against the wire loops on both sides.

Take care that the exposed part of wire loop does not extend outside from the conductive sandwich.

Now fold the sandwich securely and seal it off completely with cellotape on the outer surface.

Once the sensor is securely taped together, place a cable tie over the sensor and tape it in place to add flexibility and strength.

The tips of the sensor can be sealed with shrink tape or cellotape to keep them from opening up as they are put into use.

Step 7: Step 5: Electrical Connections

We now create a circuit so that the flex sensor will act like the 'upper' arm of a voltage divider.

You can see in the breadboard image that one terminal of the Flex sensor is connected to the +5VDC supply. The other terminal is connected to Ground via a 10K resistor. The output to the analog input pin of the Arduino is tapped at the junction of the Flex Sensor and the 10K resistor.

If you are making five full sensors in a glove configuration, you will need to create a bank of 5 such voltage dividers in parallel with each other. The output tapping of each voltage divider goes to a separate analog input pin on the Arduino.

If you want to make a more robust permanent sort of circuit, you can use the PCB to do so as shown in the photo.

Step 8: Step 6: Completing the Glove

Now that all the sensors and the circuit is ready, place the sensors on the glove and stitch the finger tip end of each sensor into place.

Next, put on the glove, flex your fingers gently and check for correct flexing. Once you are happy that everything is lined up, stitch the knuckle end of each sensor into place.

Your haptic glove is now complete!!!

Step 9: Step 7: Arduino Code

Now we need to write the Arduino code that reads each sensor and converts its resistance value into data that we can use... Here is a very simple Arudino program that accomplishes this....it reads data from the glove and sends the value of each sensor over the serial interface. For better results, we could use noise reduction and filtering techniques to get a much more smooth output from each sensor.

int sensorPin[5] = {0,1,2,3,4};
int sensorVal[5] = {0,0,0,0,0};

void setup()

{

Serial.begin(9600);

}

void loop()

{

for (int i = 0; i < 5; i ++)

{

int readVal = analogRead(sensorPin[i]);

sensorVal[i] = readVal;

}

for (int i = 0; i < 5; i++)

{

Serial.print(sensorVal[i]);

Serial.print(",");

}

Serial.println();

delay(200);

}

Step 10: Step 8: Putting the Glove to Use

The first video shows glove construction. Jump to 3:41 on the timeline to see data being read from the sensors and transmitted to the computer where it is interpreted and used to control slider bars in a GUI. You can easily see something like this being used as a virtual guitar or a virtual hand inside the computer!

In the second video I use my haptic glove to control the robotic hand I made. As you can see, there is plenty of noise in the system. but this is because (a) I did not employ any data smoothing to the raw sensor data nd (b) the fingers of the robotic hand themselves are made out of springs and they tend to vibrate when under stress.

Sensors Contest 2016

First Prize in the
Sensors Contest 2016

Robotics Contest 2016

Participated in the
Robotics Contest 2016

Be the First to Share

    Recommendations

    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    14 Discussions

    None
    DickSmasher88

    4 months ago

    What do you mean by "Two core wire" and "10 core wire"?
    Will those standard 28AWG arduino jumper wires work?

    1 reply
    None
    vu2aeoDickSmasher88

    Reply 3 months ago

    a 'five' core wire just means a a group of five separate wires that can carry five separate signals. Any AWG wire would suffice.

    None
    vu2aeoShanethefilmmaker.

    Reply 8 months ago

    Sure.... from an electronics point of view I guees that could be done, providing you used a microcontroller with enough analog inputs to cater to your sensors, or several slave microcontrollers talking to a master.

    None
    Shanethefilmmaker.vu2aeo

    Reply 8 months ago

    Why not use two masters, one for the body's front and back. Then all you'd need is less than the amount of microcontrollers you'd need if it was running off one.

    None
    Shanethefilmmaker.vu2aeo

    Reply 8 months ago

    Ok cool. Next question. I understand the glove is mostly for just substituting for the mouse. But is it also like the known haptic products. By that I mean if you felt a certain sensation from a game, would you feel it through that glove? And if not how would you go abouts constructing that aspect let alone put it in a full body suit?

    None
    vu2aeoShanethefilmmaker.

    Reply 8 months ago

    In its current configuration, there is no way the glove can give feedback to the wearer. But given that this setup uses only the analog pins, there are plenty of unused PWM pins available to which you might be able to connect servo motors/ vibration motors that could be used to relay feedback from the computer to the glove.

    None
    Shanethefilmmaker.vu2aeo

    Reply 8 months ago

    Vibration motors sound like a good idea on the gloves only. One or two of them on each hand would work no different that of a dual shock controller and would just be enough to spread out on the entire hand, just through the vibration ripples alone. However I don't really see that being possible on full body suit. I guess I may as well tell you, much of why I asked these questions was that I wanted to know if it was possible to make a suit similar to the X-1 Haptic Bootsuit in Ready Player One. Now I know they got a similar suit that Elon Musk is working on, but I also wanted to see if it was possible to make one with materials used at home and in hobby shops. Anywho. I'm not saying it's impossible to use vibration motors on the full body, but I feel like the whole thing might be a spectacular mess and wouldn't look good covered or not. I don't know much about the conductive bags, but I assume they live up to the name and can conduct electrical currents. (If I'm wrong please correct) Would it be possible if as an alternative the suit could have a mild electrical current flowing through it, with sensors placed at crucial spots. (Arms, legs, chest and so on.) which will cause the current to slightly increase in intensity, through the hit and touch detection of the VR game your playing. All of which controlled through the masters mentioned before? Of course that's not even beginning to get into the protection procedures needed to make sure you don't get shocked by accident through sweating.

    None
    elie000

    1 year ago

    where can i find all arduino code for controling 5 flex sensors and thank u

    2 replies
    None
    vu2aeoelie000

    Reply 1 year ago

    just analogRead() five times one after the other

    None
    DerpyH

    2 years ago

    Nice work well done wish I saw this post before. what is the name of this material and how can you get it?

    1 reply
    None
    vu2aeoDerpyH

    Reply 2 years ago

    Any type of conductive plastic sheet.....like the type electronic components are kept in. Anti-static bags may work too.