This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com)
This project is a robotic hand made to mimic the movement of the user's hand. Executing the project involves a power glove with 5 flex sensors, which is worn by the user, 5 servos attached to nylon "tendons", an arduino with appropriate code, an external power source, and the contraption itself. The robotic hand has 5 different parts designed in Autodesk Inventor, which must be 3D printed. This Instructable will provide the necessary steps as well as the necessary CAD files and code to reproduce this project.
Step 1: 3D Design and Assembly
Description of above parts in order:
- Full hand assembly
- Bottom part of digit A (common among Index, Middle, Ring, and Pinky fingers)
- Bottom part of digit B (used for thumb)
- Middle part of digit (common among all fingers)
- Top part of digit (common among all fingers)
This is the 3D assembly of the project and represents what it's supposed to look like after it is printed. There are 5 main components in this 3D design. The first and main part is the palm, which houses all the fingers and rails for each tendon. The second is the lower part of digit for the index, middle, ring, and pinky fingers. The third is the lower part of the digit for the thumb, which required multiple renderings in order to find the ideal angle of rotation. The fourth and fifth, common among all fingers are the middle and bottom parts of the digits for all of the fingers. Each part was designed in order to replicate the natural movement of the hand, and made to be pulled by a nylon tendon when contracting, and to be pulled back by rubber bands when retracting.
Note: These parts were designed to easily snap into place like the parts of a toy, making assembly after printing incredibly easy. The parts also account for the thermal expansion of plastic when printing and are therefore ready to printing.
Step 2: Control System
The control system basically involves an arduino at the heart of the operation recieving input from the flex sensors on the glove worn by the user, which in turn, replicates the data received and maps it onto the corresponding servos. Each servo will, in turn, pull on a nylon string that is attached to a finger on the hand. The servos require their own power source in order to maximize functionality, so a 6V power supply of 4 AA batteries is used. As you can see, the control system is a very simple one, as it involves a flex sensor hooked up to a 22k ohm resistor feeding in data to the arduino which is then replicated on the servos. The data being read by the arduino is the resistance value of the flex sensor. As the flex sensor bends, the resistance present is changed, and this used in the arduino code. Parameters are therefore established based on each sensor's bent and unbent state and used to move each servo from 0 to 180 degrees.
Step 3: Code
In the main file of the arduino sketch, each of the five flex sensors are mapped to analog inputs 0 to 4 while the corresponding servos are mapped to the analog pins on the digital side 5,6,9,10, and 11 respectively. As you can see, the main file declares objects thumb, index, middle, ring, and pinky based on the class Finger. In the setup function, each object initializes the servo initialize function of Finger while in the looping function each object constantly updates the position of each servo according to the flex sensor's reading.
The header file of class Finger contains all the declarations associated with the class. The flexSensorPin and servoPin pins and servo digit are declared, along with the variable flexSensorReading which contains the mapping from the raw resistance readings from the flex sensors. The variable flex contains the mapping from flexSensorReading mapped into a more streamlined paramater. The functions attachServoPin and updateFinger are also declared. The constructor is present without a parameter simply to enable the declaration of objects.
The class file for class Finger contains all the function definitions for each Finger object. At first, the constructor is initialized. Following that, is the attachServoPin function which attaches a servoPin to a corresponding servo and initializes that servo. The next function is updateFinger which is based on the parameter flexSensorPin. To understand what the function does, you must first understand what is going on in the control system. Each flex sensor has a resistance reading fed into the arduino. Without code, the flex sensor doesn nothing except feed in readings. What the arduino is coded to do is read the resistance each flex sensor outputs when bent or unbent and maps these values to the servos.
Keep in mind each sensor has a 22 kilo-ohm resistor so as to feed in manageable and smooth input to the arduino, which is why the sketch parameters are very relative to what resistance is present in each circuit. So the updateFinger function maps these flex sensor resistance readings to a variable flex, depending on the pin number. This is because each finger object has its own resistance range from bent to unbent due to the unique nature of the structure of fingers on a hand. This is where if conditional statements come in. The variable flex maps these resistance ranges from the arbitrary values to 0 through 100. This, more streamlined reading, is then fed into the servo mapping line, which is seen at the end, in order to move the servos from 0 degrees to 180 degrees when the sensor is unbent and bent.
Step 4: Final Product
Now that the arduino is loaded with the code it's time to set up the power glove. In this execution, the flex sensors were attached to the glove with tape. To be precise, the each flex sensor was taped at the top, then stuck to the top of each digit, then a "shell of tape was made. two strips of tape were taped in the middle, so the middle would not have glue on it and the sides would, so as to stick in the glove, and allow the sensor to bend. That being said, this is not the only way to make a power glove. Other methods can be used, such as stitching "pockets" onto each finger for each sensor. All that's left is to solder each flex sensor to two wires that feed into your control system, and the power glove is finished.
Time to adjust the arduino code to the power glove. Print statements can be used to output the resistance values of each flex sensor when they are bent or unbent. use the minimum and maximum resistance values of these readings and modify the code to the new parameters. Now, the arduino is ready.
Next is the assembly of the robotic hand. Each part clicks into place very easily with little friction, although that may not be true depending on the print job, though if it is an issue, petroleum jelly can be used. Hot glue nylon to the top part of each digit and wire it through the contraption, then place one rubber band between two digit parts at every two notches, and the hand itself is ready.
The servo's range isn't wide enough to pull a whole digit, unfortunately, so extending its range is necessary. In this execution, each servo has another servo axle screwed onto it to extend its range, though other methods can be used. Next, hot glue each servo onto a frame or box. Position each servo into the 180 degree position and hot glue the hand to the top of the frame. In this execution, a box was used, having a hole at the top for wiring to feed through. Now, tie each tendon to the corresponding servo, making sure the finger is completely contracted. This ensures the servo completely contracts as desired when reaching 180 degrees.
Hook everything up, place the arduino and wiring in another box (this is also convenient, as it functions as a support to keep the hand from falling back) and install the external power source, and test it out. Feel free to continue to tinker with the arduino's coding parameters for the flex sensors, as a flawless execution in the first trial is not to be expected.
And above is the final result of all the hard work put into the project! If you've made it this far, then congratulations and thank you for putting the effort into replicating my project!