I am in the final stages of creating an 'Inmoov Robotic Hand'. It's a 3D printed robotic hand controlled by flex sensors which a certain servo reenacts.
The servos are directly powered through the DC power supply, while the flex sensors are powered through the Arduino 5v.
Some servos read the values of the flex sensors well (which are flex sensors #17 , #24 and #34 ) and some do not (which are #30 and #38 ). Although it reads and reenacts the values, flex sensor #34 is very odd as it draws a max of 3.6Amps of current during its flexion. I think the other values are being impeded by this.
All servos have had the maximum physical stopping pin removed (which had been the solution to my last problem.)
I have also redone the Vero-Board, so there are no faults with the copper, although there may be a fault in how it's wired.
a 470uf is also placed capacitor between the leading ground and 5v lead.
I do not have any CAD drawings, they will be completed next week (we were told to draw the circuit first).
Here is the Vero-Board which is connected to the arduino, the wired connection on the underside are for the A0-A4 pins for each flex sensor. The Servos are connected to the '~' connections of the arduino (being connection ~5, ~6, ~9, ~10, ~11) .
All in all, it is the servos attached to pins 10 (myservo2) and pin 3 (myservo5) , reading from Flex Sensors #38 and #30, which are simply not using the values to rotate. They stay stationary when the Sensor is flexed, and am not sure why. Flex Sensor #34 may be the cause, but I am not sure if so.
Any help would be appreciated. Thank you.
#include <Servo.h>
int pos1; //Set first servo to an initial position of 0
int pos2; //Set second servo to an initial position of 0
int pos3; //Set third servo to an initial position of 0
int pos4; //Set fourth servo to an initial position of 0
int pos5; //Set fifth servo to an initial position of 0
Servo myservo1; // create 1st servo object to control a servo
Servo myservo2; // create 2nd servo object to control a servo
Servo myservo3; // create 3rd servo object to control a servo
Servo myservo4; // create 4th servo object to control a servo
Servo myservo5; // create 5th servo object to control a servo
void setup()
{
Serial.begin(9600);
myservo1.attach(9); // attaches servo on pin 9 to the servo object
myservo2.attach(10); //attaches sevo on pin 10 to the servo object
myservo3.attach(6); //attaches sevo on pin 6 to the servo object
myservo4.attach(11); //attaches sevo on pin 11 to the servo object
myservo5.attach(3); //attaches sevo on pin 3 to the servo object
}
void loop()
{
//This is the programming for #24 flex sensor
int flex1 = analogRead(A1) - 680;
pos1 = map(flex1, 0, 170, 0, 179);
delay(40);
myservo1.write(pos1); // tell servo to go to position in variable 'pos1'
delay(40); // waits 15ms for the servo to reach the position
//////////////////////////////////////////////////////////////////////////////////////////
//This is the programming for #38 flex sensor
int flex2 = analogRead(A2) - 690;
pos2 = map(flex2, 0, 270, 0, 179);
delay(40);
myservo2.write(pos2); // tell servo to go to position in variable 'pos2'
delay(40); // waits 15ms for the servo to reach the position
//////////////////////////////////////////////////////////////////////////////////////////
//This is the programming for #34 flex sensor
int flex3 = analogRead(A3) - 610;
pos3 = map(flex3, 0, 140, 0, 179);
delay(40);
myservo3.write(pos3); // tell servo to go to position in variable 'pos3'
delay(40); // waits 15ms for the servo to reach the position
//////////////////////////////////////////////////////////////////////////////////////////
//This is the programming for #17 flex sensor
myservo4.write(0);
int flex4 = analogRead(A0) - 600;
pos4 = map(flex4, 0, 170, 0, 179);
delay(40);
myservo4.write(pos4); // tell servo to go to position in variable 'pos4'
delay(40); // waits 15ms for the servo to reach the position
//////////////////////////////////////////////////////////////////////////////////////////
//This is the programming for #30 flex sensor
int flex5 = analogRead(A4) - 655;
pos5 = map(flex5, 0, 235, 0, 179);
delay(40);
myservo5.write(pos5); // tell servo to go to position in variable 'pos5'
delay(40); // waits 15ms for the servo to reach the position
//////////////////////////////////////////////////////////////////////////////////////////
Serial.println(flex1);
Serial.print(" ");
Serial.print(flex2);
Serial.print(" ");
Serial.print(flex3);
Serial.print(" ");
Serial.print(flex4);
Serial.print(" ");
Serial.print(flex5);
Serial.print(" ");
delay(30);
}