Is it possible to control the al5a arm with arduino uno

Hi
I am looking for a robotic arm to make my current project presentable. Currently i am using 3 potentiometers (base, wrist, gripper) and 2 Arduino Uno and 2 XBee (XBee for wireless control) to move a robotic arm. I want to replace my robotic arm with the AL5A lynxmotion robotic arm, is this possible ?.

I have written a code for the robotic arm i currently have, and i want to use the same for the AL5A arm as well ?

In the assembly guide and in most pictures, i saw the base being attached to some other board/ i also read about the SSC - 32 controller. Is it a must that i have to use these boards or can i simply replace all of these boards with the arduino uno.

All what i want to do is to be able to move the AL5A robotic arm using potentiometers and arduino uno without any ssc32 and other softwares and boards.

to be more simple

i turn one potentiometer attached to uno, i want the relevant servo (eg: base) of AL5A to move. IS THIS POSSIBLE?

i just want to use the 9V battery to power the robotic arm thats all and all the other connections i want to give to the UNO

thanks

Certainly, but keep in mind the Uno’s pins cannot provide much current, so you’ll need to wire the red V line and black GND lines to a battery or other power supply, and keep the yellow signal and black GND wires connected to the Uno. The SSC-32 is best used for walking robots which require many servos.

You probably could use code like below to control the arm using pots. The servos will require a larger power source than the typical small 9v battery.

[code]//zoomkat multi pot/servo test 3-23-13
//includes dead band for testing and limit servo hunting
//view output using the serial monitor

#include <Servo.h>
Servo myservo1; //declare servos
Servo myservo2;
Servo myservo3;
Servo myservo4;
Servo myservo5;

int potpin1 = 0; //analog input pin A0
int potpin2 = 1;
int potpin3 = 2;
int potpin4 = 3;
int potpin5 = 4;

int newval1, oldval1; //pot input values
int newval2, oldval2;
int newval3, oldval3;
int newval4, oldval4;
int newval5, oldval5;

void setup()
{
Serial.begin(9600);
myservo1.attach(2);
myservo2.attach(3);
myservo2.attach(4);
myservo2.attach(5);
myservo2.attach(6);
Serial.println(“testing multi pot servo”);
}

void loop()
{
newval1 = analogRead(potpin1);
newval1 = map(newval1, 0, 1023, 0, 179);
if (newval1 < (oldval1-2) || newval1 > (oldval1+2)){ //dead band
myservo1.write(newval1); //position the servo
Serial.print("1- ");
Serial.println(newval1); //print the new value for testing
oldval1=newval1; //set the current old value
}

newval2 = analogRead(potpin2);
newval2 = map(newval2, 0, 1023, 0, 179);
if (newval2 < (oldval2-2) || newval2 > (oldval2+2)){
myservo2.write(newval2);
Serial.print("2- ");
Serial.println(newval2);
oldval2=newval2;
}

newval3 = analogRead(potpin3);
newval3 = map(newval3, 0, 1023, 0, 179);
if (newval1 < (oldval1-2) || newval3 > (oldval3+2)){
myservo1.write(newval3);
Serial.print("3- ");
Serial.println(newval3);
oldval3=newval3;
}

newval4 = analogRead(potpin4);
newval4 = map(newval4, 0, 1023, 0, 179);
if (newval1 < (oldval1-2) || newval4 > (oldval4+2)){
myservo1.write(newval4);
Serial.print("4- ");
Serial.println(newval4);
oldval4=newval4;
}

newval5 = analogRead(potpin5);
newval5 = map(newval5, 0, 1023, 0, 179);
if (newval1 < (oldval1-2) || newval5 > (oldval5+2)){
myservo1.write(newval5);
Serial.print("5- ");
Serial.println(newval5);
oldval5=newval5;
}
delay(50); //to slow loop for testing
}

[/code]

this is exactly what I am doing at the moment, I don’t believe the Uno can control more than 6 servo’s at one time without upgrading to the Mega or Due, I could be wrong on that but I’m certain I read it somewhere.

The code you have posted is very similar to the one I am planning to use. the only major difference being I print my servo positions to a Lcd instead of the Arduino serial. I’m somewhat pleased to see it’s very close to my own as I have had nothing to compare it to. This is only a modified version of a piece of code I made for controlling 4 servo’s so i have not had a chance to test it properly yet, not until I finish building the arm (which arrived today!)

#include <LiquidCrystal.h>;  //Activate the LCD libary
#include <Servo.h>;           //Activate the Servo Libary

LiquidCrystal lcd(12, 11, 10, 9, 8, 7);   //Tell the arduino which pins the lcd uses

Servo Grip;  //Create servo names
Servo GripR;
Servo Wrist;
Servo Elbow;
Servo Shoulder;
Servo Base;

void setup () {
 lcd.begin(16, 2);        //Tell the arduino the lcd is 2 rows deep and 16 colums long
 Grip.attach(6);          //Attach Grip to pin #
 GripR.attach(5);        //Attach GripR to pin #
 Wrist.attach(4);        //Attach Wrist to pin #
 Elbow.attach(3);       //Attach Elbow to pin #
 Shoulder.attach(2);   //Attach shoulder to pin #
 Base.attach(13);      //Attach base to pin #
}


void loop () {
    //Display number Identity  
  lcd.setCursor(4, 0);     //Set lcd position to top left middle
  lcd.print("<A");           //Print Pot ID <A
  lcd.setCursor(10, 0);   //Set lcd position to top right middle
  lcd.print("B>");           //Print Pot ID B>
  lcd.setCursor(4, 1);     //Set lcd position to bottom left middle
  lcd.print("<C");           //Print Pot ID <C
  lcd.setCursor(10, 1);   //Set lcd position to bottom right middle
  lcd.print("D>");          //Print Pot ID D>
  
  //Pot A read and print on LCD
  int BasePot = analogRead(A0);                          //Read value from pin A0
  BasePot = map(BasePot, 0, 1023, 0, 179);           //Convert 0-1023 to 0-179 degrees
  lcd.setCursor(0, 0);                                         //Set lcd position to top left 
  lcd.print(BasePot);                                          //Print value from A0 in degrees on lcd

  //Pot B read and print on LCD 
  lcd.setCursor(13, 0);                                          //Set lcd position to top right
  int ShoulderPot = analogRead(A1);                        //Read value from pin A1
  ShoulderPot = map(ShoulderPot, 0, 1023, 0, 179);   //Convert 0-1023 to 0-179 degrees 
  lcd.setCursor(13, 0);                                          //Set lcd position to top right 
  lcd.print(ShoulderPot);                                       //Print value from A1 in degrees on lcd
 
  //Pot C read and print on LCD
  int ElbowPot = analogRead(A2);                          //Read value from pin A2
  ElbowPot = map(ElbowPot, 0, 1023, 0, 179);         //Convert 0-1023 to 0-179 degrees 
  lcd.setCursor(0, 1);                                          //Set lcd position to bottom left
  lcd.print(ElbowPot);                                          //Print value from A2 in degrees on lcd
 
  //Pot D read and print on LCD
  int WristPot = analogRead(A3);                         //Read value from pin A3
  WristPot = map(WristPot, 0, 1023, 0, 179);         //Convert 0-1023 to 0-179 degrees 
  lcd.setCursor(13, 1);                                       //Set lcd position to bottom right 
  lcd.print(WristPot);                                         //Print value from A3 in degrees on lcd

  //Pot E read 
  int GripPot = analogRead(A4);                         //Read value from pin A3
  GripPot = map(GripPot, 0, 1023, 0, 179);           //Convert 0-1023 to 0-179 degrees 

  //Pot F read 
  int GripRPot = analogRead(A5);                         //Read value from pin A3
  GripRPot = map(GripRPot, 0, 1023, 0, 179);         //Convert 0-1023 to 0-179 degrees 


  //Servo Control
  Base.write(BasePot);             //sets servo A to position dictated by BasePot
  Shoulder.write(ShoulderPot);   //sets servo B to position dictated by ShoulderPot
  Elbow.write(ElbowPot);          //sets servo C to position dictated by ElbowPot
  Wrist.write(WristPot);           //sets servo D to position dictated by WristPot
  Grip.write(GripPot);              //sets servo C to position dictated by GripPot
  GripR.write(GripRPot);           //sets servo D to position dictated by GripRPot
  
  delay(10);
}

As for the issue of powering the servo’s I agree with Cbenson, It doesn’t take more than a strip of prototype board and some male headers to make a power supply for the Servo’s.
I have already made one myself, have a look at this page to see mine - amitronics.blogspot.co.uk/2013/04/servo-fun.html (please excuse my assistant!)
The servo plugs into the header and the servo signal is taken from the Uno to the small socket on the board which in turn is connected to the signal wire. This is a simple supply I knocked up on demand, I have plans to make a proper PCB for supplying power at some point.

Hopefully that helps and makes sense.

First of all thanks to all of you who replied !!!

I think both tarrryan and CBensen are trying to say the same thing.

As pointed out by tarrryan i visited the webpage but i am a little confused about taking the power for the servos, are you using a separate power source for the servos? am i supposed to be doing that?

thanks

Aye I am indeed, I am using a bench top PSU to power my projects now but a wall adapter or battery that can supply the required voltage will do just fine.

On the end there is a female socket which accepts a power supply for the servo pins, I committed a cardinal sin by taking my supply from a modified USB cable connected to a usb hub to start with (I only did this with the servo’s under no load for testing),

I cant remember if this is true or not but I remember reading somewhere that the Arduino had to share the same ground connection as the servo’s for them to function properly, I’m unsure what effect this would have though, I haven’t had any problems using a separate power supply myself so far.

I’m entirely self taught so please correct me if I am wrong here.

Ediit: If you want a more detailed description/diagram of the power supply then please say so.

Correct. In many circuits, if you don’t have a common ground, the system will behave erratically.

I discovered this yesterday when I connected the Arduino to a battery and the arm to my PSU, as soon as I turned the power on it set about trying to head butt the desk to death.

I did make a new power supply for the arm though and here is a picture of it.

the top DC jack is the power supply, the bottom one is the arduino supply, the signal from the arduino if directed through the circuit to the correct servo.

Simple, clean and effective. Nicely done.

A typical servo power setup.

http://web.comporium.net/~shb/pix/servo-wire.jpg

Well now, I’m doing the same thing with an Arduino Uno and the AL5A arm.

I found a board at AdaFruit that drives up to 16 servos at once using the i2c bus; only uses two wires on your Arduino.
And you can chain multiple driver boards (up to 62 of them, which will drive 992 servos or other pwm devices). That
would be worth seeing…

adafruit.com/product/815 is the board.
learn.adafruit.com/16-channel-pwm-servo-driver/hooking-it-up shows how to hook it up.

The big difference will be in the program.
SSC-32 feature some nice ready made command for Servo and the Adafruid only use an Arduino library.

If you want to try it, we do sell it as well: