Project in progress
Android Controlled 6DoF Robotic Arm

Android Controlled 6DoF Robotic Arm © GPL3+

Most 6DoF robotic arms come with a control board with RS-232 for desktop control, we adapt the control for use with android devices simply.

  • 12,139 views
  • 0 comments
  • 22 respects

Components and supplies

Apps and online services

About this project

Background

we were provided with a Robotic arm as an application of learning to publish our projects on online project sharing platforms, we decided to adapt the arm to use an android smartphone for remote control.

Overview

Most market available robotic arms come provided with control board geared with RS-232 interface for control via desktop software, according to reviews this board and the accompanying software is often unreliable, so we decided to eliminate this part and instead substitute with arduino uno coupled with 1sheeld shield for seamless interfacing with android smartphone.

Steps

/Hardware

*Robotic arm manual: 

http://www.robotshop.com/media/files/pdf/32-servo-robot-arm-controller-manual-ra001.pdf

1. Connect power supply to motors 1-16 header on the supplied control circuit (will be used for power supplying only).

2. Connect 6 servos to successive power and ground headers (check circuit diagram below).

3. Connect 1Sheeld to arduino uno.

4. Connect servo motors 1 through 6 to PWM pins (3,5,6,9,10,11).

5. And lastly connect USB to laptop!

/Software

1. Download and install arduino IDE: 

https://www.arduino.cc/en/Main/Software

Installation instructions: 

https://www.arduino.cc/en/Guide/HomePage

2. Download and install 1Sheeld library: http://1sheeld.com/downloads/

*note: follow guide for library installation in arduino tutorial linked above

3. Launch the arduino IDE and check the connection to uno board is established.

4. Paste Arm Code in the IDE.

5. Upload code to board by clicking arrow button.

[!]Caution: don't forget to switch the 1sheeld to switch mode (unplugged wire icon) before uploading code[!]

6. Switch the 1sheeld back to UART mode.

7. Download and install 1sheeld app to your smart device: 

https://play.google.com/store/apps/details?id=com.integreight.onesheeld&hl=en

8. Launch the application and initialize the pairing process, follow the instructions of the 1sheeld getting started tutorial available above.

9. Enable Accelerometer and gamepad shields from shield selection list.

10. Press the shield symbol on top right to access control interface.

11. Switch to game pad panel

12. You're all set to go;

the accelerometer runs in the background and controls gripper motors 6 and 5, and gamepad uses (right and left) for motor 1

,(up and down) for motor 2

,(red and blue) for motor 3

,(green and orange) for motor 4.

Code

Untitled fileArduino
#define CUSTOM_SETTINGS
#define INCLUDE_GAMEPAD_SHIELD
#define INCLUDE_ACCELEROMETER_SENSOR_SHIELD

/* Include 1Sheeld library. */
#include <OneSheeld.h>
#include <Servo.h>


Servo myservo1;  // create servo object to control a servo
Servo myservo2;
Servo myservo3;
Servo myservo4;
Servo myservo5;
Servo myservo6;
int count1 = 0;
int count2 = 0;
int count3 = 0;
int count4 = 0;
int count5 = 0;

void setup() 
{
  /* Start communication. */
  OneSheeld.begin();
  myservo1.attach(3);  //the pin for the servo control
  myservo2.attach(5);
  myservo3.attach(6);
  myservo4.attach(9);
  myservo5.attach(10);
  myservo6.attach(11);
}

void loop() 
{
  
  /* Turn on the LED when the red button is pressed. */
  if(GamePad.isRedPressed())
  {
        count3+=20;
        if (count3<=180&&count3>=0){
           myservo3.write(count3);
        }
        else if (count3>=180)
        {
          count3=180;
        }
  }
 else if (GamePad.isBluePressed())
  {
        count3-=20;
        if (count3<=180&&count3>=0){
           myservo3.write(count3);
        }
        else if (count3<=0)
        {
          count3=0;
        }
  }

  else if(GamePad.isOrangePressed())
  {
        count4+=20;
        if (count4<=180&&count4>=0){
           myservo4.write(count4);
        }
        else if (count4>=180)
        {
          count4=180;
        }
  }
 else if (GamePad.isGreenPressed())
  {
        count4-=20;
        if (count4<=180&&count4>=0){
           myservo4.write(count4);
        }
        else if (count4<=0)
        {
          count4=0;
        }
  }

  /* If up is pressed, move the car forward. */
  if(GamePad.isUpPressed())
  {
            count5+=20;
        if (count5<=180&&count2>=0){
           myservo5.write(count5);
        }
        else if (count5>=180)
        {
          count5=180;
        }

  }
  /* If down is pressed, move the car backwards. */
  else if (GamePad.isDownPressed())
  {
     count5-=20;
        if (count5<=180&&count5>=0){
           myservo1.write(count5);
        }
        else if (count5<=0)
        {
          count5=0;
        }
    
  }
  /* If right is pressed, turn the car to the right. */
  else if (GamePad.isRightPressed())
  {
        count1+=20;
        if (count1<=180&&count1>=0){
           myservo1.write(count1);
        }
        else if (count1>=180)
        {
          count1=180;
        }
  }
    /* If left is pressed, turn the car to the left. */
  else if(GamePad.isLeftPressed())
  {
         count1-=20;
        if (count1<=180&&count1>=0){
           myservo1.write(count1);
        }
        else if (count1<=0)
        {
          count1=0;
        }
        
 
  }
  
  else 
  {
    myservo1.write(count1);    myservo3.write(count3);
    myservo4.write(count4);
    myservo5.write(count5);
  }
  
   if(AccelerometerSensor.getX() >=3 && AccelerometerSensor.getX()<=9)
  {
    myservo6.write(map(AccelerometerSensor.getX(),3,9,0,180));
  }

 else if (AccelerometerSensor.getY() >=-3 && AccelerometerSensor.getY()<=3)
 {
   myservo2.write(map(AccelerometerSensor.getY(),-3,3,0,180));
 }
  
  /* If nothing is pressed stop all motors. */
  else {
    myservo6.write(0);
    myservo2.write(0);
    
  }

  
}
Code for arduino IDE use

Comments

Similar projects you might like

Robotic Arm Controlled by Human Arm

Project showcase by zezarandrade

  • 5,481 views
  • 0 comments
  • 11 respects

Control Robot Arm with your Android Phone

Project tutorial by Ammar Atef Ali

  • 11,855 views
  • 0 comments
  • 24 respects

1Sheeld Controlled Robotic Arm

Project tutorial by L1Ranger

  • 3,450 views
  • 1 comment
  • 12 respects

How to Make a Remote Controlled Robotic Hand with Arduino

Project showcase by Gabry295

  • 35,362 views
  • 5 comments
  • 110 respects

Nunchuk Controlled Robotic Arm (with Arduino)

Project tutorial by Igor Fonseca Albuquerque

  • 4,613 views
  • 5 comments
  • 36 respects

Simple Programmable Robotic Arm

Project showcase by Ryan Chan

  • 49,017 views
  • 63 comments
  • 145 respects
Add projectSign up / Login