Fall 2016 Prosthetic Hand: Model for CDR
Electronics and Control Engineer – Younis Al-Kharusi
Table of Contents
As we decided to use Uxcell 12V 10rpm geared DC motors with pushbuttons, as opposed to flex sensors from PDR, the purpose of the CDR Demo was to focus on getting the hand to do three different grasping motions (burger mode, fries mode and drink mode). We also wanted to demonstrate the performance of force resistive sensors (FSR). An Arduino UNO joystick shield was used to send commands through XBee. We had four different commands, burger mode, fries mode, drink mode and open hand. In each mode, the SG-90 motor that is mounted on the palm places the thumb to on a specific degree and when “open hand” command is sent it moves the thumb back to resting position. Also, each mode had a preset threshold so that the fingers would stop when the finger applies a specific amount of force. The code keeps track of the last mode used then it only opens the fingers used in the last mode when the “Open hand” command is received. In burger mode, index finger and middle finger move together as long as the button is pressed to grasp a burger. In fries mode, the thumb DC motor is timed to stop at set point then the index finger moves as long as button is pressed to grasp a fry. In drink mode, all fingers move but the thumb as long as the button is pressed to grasp a drink.
The CDR demo code can be found using the following link:
https://drive.google.com/open?id=0BzJlMPCB0tFPZ3lYYWw2WFU4MzQ
Video – CDR Demo Video
Joystick Code
digitalRead() is used to read the state of the buttons. It returns 0 when the button is pressed and 1 otherwise. The line byte R = Burger&&Drink&&Fries&&Open; performs “AND” operations for all buttons. When nothing is pressed the value of the variable R=1.when any of the buttons is pressed the value of the variable R changes to 0. The commands are sent as characters “char” through XBEE using “Serial.write ”Command. When nothing is pressed the character “X” is sent to make sure that the motor does not move. When the button associated with burger mode is pressed the Arduino send character “B” and so on.
Joystick Code Link:
https://drive.google.com/open?id=0BzJlMPCB0tFPRnExb2ZUSFh0NDg
Burger Mode Code
In burger mode, the first two if statements check if the threshold is exceeded by force sensors. If the threshold was exceeded then stop the motor. If the force sensor reading is below the threshold the servo moves slowly to 90 degrees and motors moves to grasp a burger
Fries Mode Code
Fries mode is similar to drink mode; the only difference is that when fries mode command is first sent the thumb moves to a set point then the servo and the index start moving to form a fine pinch.
Drink Mode Code
In drink mode, the same algorithm that is on burger mode is repeated again expect the fact that all fingers move together expect the thumb.
Open Hand Code
In this mode, the code checks for the pervious mode used then opens whichever fingers where flexed. It also puts back the servo to its natural position 120 degrees