Electromechanical prostethic arm.

Tell us the story of your project: 

This project was started by a senior called Corie. He made great progress on this arm, but he never got the entire assembly to work, only one servo moved at a time. He graduated and is now attending the U of M. For a couple of months the project was abandoned, but when I was introduced to it I was thrilled to finish it. Now the entire thing works, and we are only working in some minor details to get it ready to be placed in a showcase glass where there will be some potentiometers so that the middle schoolers can play around with it and get interested the in the stem field.

After I got the arm I disassembled it and reassembled it to add the servos and to make the arm work as it was intended to.

The first roadblock that I ran into was giving the Arduino enough power to run continuously for hours without crashing or resetting because of a current spike by the servos.

A the beginning i had a problem where it was really hard to create a power delivery system that would provide the necessary peak amperage to be able to move all the servos at the same time.   

After a bit of trial an error I got to a design that worked reliably, then I started working in the code and making sure that the potenciometers were acurate and would move the servos to their full range. 

How-to: 

I didn't make the arm itself I just added the servos and programmed it to work like it's meant to.

I make all the code with the Arduino IDE, and I made a power delivery system for it. 

 

The first thing that I did was to disassemble the arm and independently check that all the servos worked as they were supposed to on their own. 

After replacing a coulpe of them and making sure that the hardware was okay I started to work in the control system and the power delivery system for it. 

In this case I was using an Arduino to give instructions to the servos and two power supplies to give energy to the Arduino and the servos.

This was the  hardest part as I had to figure out how to power the entire system even when all the servos were moving (which takes up a lot of current and would cause the Arduino to turn off.) 

To solve this and make a more reliable and trustable device I gave the arduino an independent 7v powers supply and I gave the servos a 5.5v 4A power supply.

With this system the arduino would not power off if the servos needed a lot of current because the had separate power delivery systems. 

 

 

 

 

 

This is the code that I created. 

 

#include <Servo.h>
Servo ser1;
Servo ser2;
Servo ser3;
Servo ser4;
Servo ser5;
Servo ser6;
 
// ------------Program functions----------------------------------------------------------------------------------------------
void servosAttach(){

ser1.attach(3);
ser2.attach(5);
ser3.attach(6);
ser4.attach(9);
ser5.attach(10);
ser6.attach(11);
}
// attaches all of the servos to their respectictives pins
void simpleSet(int pop1, int pop2, int pop3, int pop4, int pop5, int pop6){
ser1.write(map(analogRead(pop1),0,1023,0,180));
ser2.write(map(analogRead(pop2),0,1023,0,180));
ser3.write(map(analogRead(pop3),0,1023,0,180));
ser4.write(map(analogRead(pop4),0,1023,0,180));
ser5.write(map(analogRead(pop5),0,1023,0,180));
ser6.write(map(analogRead(pop6),0,1023,0,180));

}
// Takes the input from the analog pin and sets it to the digital output to the servo. Uses maping to ajust the value.
void sequentialMove(int wtime){
for (int cpos = 0; cpos <= 180; cpos += 20) { // goes from 0 degrees to 180 degrees
String Scpos = String(cpos);
serialServoReport(Scpos);
allservosToPos(cpos, wtime);
}
for (int cpos = 180; cpos >= 0; cpos -= 20) { // goes from 180 degrees to 0 degrees
String Scpos = String(cpos);
serialServoReport(Scpos);
allservosToPos(cpos, wtime);
}
}
//Moves all of the one by one
void allservosToPos(int f, int dtime){
ser1.write(f);
delay(dtime);
ser2.write(f);
delay(dtime);
ser3.write(f);
delay(dtime);
ser4.write(f);
delay(dtime);
ser5.write(f);
delay(dtime);
ser6.write(f); // Moves servo to the position F 'f'
delay(dtime); // waits dtime for the servo to get to its position
}
 
int curvemap(int potN, int xInc, int cInc, int aVal, int bVal, int xMin, int xMax){
int xIn = analogRead(potN)+xInc;
int mapX = map(xIn,xMin,xMax,0,180);
double cX = (aVal*mapX*mapX)+(bVal*mapX)+cInc;
int valOut = (int) cX;
return valOut;

}
void complexset(int pop1, int pop2, int pop3, int pop4, int pop5, int pop6){
ser1.write(curvemap(pop1,0,0,0,1,200,900));
ser2.write(curvemap(pop2,0,0,0,1,200,900));
ser3.write(curvemap(pop3,0,0,0,1,200,900));
ser4.write(curvemap(pop4,0,0,0,1,200,900));
ser5.write(curvemap(pop5,0,0,0,1,200,900));
ser6.write(curvemap(pop6,0,0,0,1,200,900));

}

// ------------Debug and calibration functions-------------------------------------------------------------------------------------------------------------------

void curvePotPrint (int potnum){
int sOut = curvemap(potnum,0,0,0,1,200,900);
Serial.print(sOut);
}

void serialServoReport(String serSPos){
String text1 = "Servos Pos is: ";
String linb = "\n";

String serOutAr = text1+serSPos+linb ;
Serial.print(serOutAr);
}
String getSimplePotStates (int pop1, int pop2, int pop3, int pop4, int pop5, int pop6){

String sOut =
String(curvemap(pop1,0,0,0,1,200,900))+
String(curvemap(pop2,0,0,0,1,200,900))+
String(curvemap(pop3,0,0,0,1,200,900))+
String(curvemap(pop4,0,0,0,1,200,900))+
String(curvemap(pop5,0,0,0,1,200,900))+
String(curvemap(pop6,0,0,0,1,200,900));
return sOut;
}

// ------------Default Functions---------------------------------------------------------------------------------------------------------------------------------
void setup() {
Serial.begin(9600);
servosAttach();
allservosToPos(180,300);
}
 
void loop() {
// simpleSet(0,1,2,3,4,5);
sequentialMove(200);
delay(15);

}

 

 

 

To make this project I used the following resources:

 

Thinker cad 

https://www.tinkercad.com/

3d files

http://inmoov.fr/

Arduino:

https://www.arduino.cc/

 

I used thinker cad to run simulations of the code that would be running in the arm to make sure that I the code waas correct, and possibly diagnose a hardware flaw. 

I didn't  use any of the resources at inmoov but the person who built the arm in the first place got his 3d files from this website. 

 

Collaborators: 
gali1383
Number of Forks: 
0
Choose at least one category.: 
Tools: 
Name: 
3d printer
Quantity: 
1
Name: 
Arduino uno
Quantity: 
1
Name: 
BT Shield
Quantity: 
1
Name: 
High torque servo
Quantity: 
5
Name: 
High torque servo (infinite rotation)
Quantity: 
1
Team Members: 
Team member name: 
gali1383
What role did this person play on the project?: 
Project Lead
Public
Sort Order: 
0
Teaser: 
This is a 3d printed arm designed by Gael Langevin. I 3D printed his design and connected it to an Arduino. The purpose of this project is to build a functional arm that can be showcased the middle schoolers and upper school students at Marshall.
Aha! moment: 
For weeks we had problems of the servos not going the the right positions and randomly stopping to work. After a bit of investigation we concluded that the cause of the problem was the power supply, it was not powerful enough. Now we got a new one and we are working to get it working reliably.
Uh-oh! moment: 
When I got the arm it was completely non functional, most of the servos were damaged and there was no wiring. My firs task was to get this working, to that extent I had to do a lot of testing and soldering, which I am not good at, this was really stressful as I had no experience, and I was making a very complicated project.
Show & Tell video as default: 
Creation Date: 
Friday, May 24, 2019 - 09:40

Comments