Project in progress
Control your RoboArm with your Smartphone

Control your RoboArm with your Smartphone © CC BY-NC-SA

RoboArm that simulate the human movements through Orientation senor in my mobile

  • 10,708 views
  • 7 comments
  • 30 respects

Components and supplies

About this project

The project is about a RoboArm that you can control it by your hand gestures and movement simulation.

The video: 

Why:

I decided to make this project because it has many applications in real life such as medical operations and manufacturing.

The concept:

1Sheeld get the orientation sensor readings from your mobile and send them to Arduino board and in your code  map the readings to the angles of servo motor and write these angles. 

Connections:

Connect the servo motors to the Arduino.

Connect the signal ( yellow wires ) to your Arduino PWM pins(ex 3, 5, 6, 9, 10, 11).

NOTE :we use the power supply instead of batteries but the batteries works well ONLY check they are 5V.

After checking the connections write your code and and check that 1Sheeld on the uploading mode.

Then upload your code from upload button on arduino IDE.

HINT:  Types of sensor changes by the type of your mobile SO may be my code doesn't work well with your project SO you Should check the readings of your own sensor.

Then put 1Sheeld on operating mode.

Scan your 1Sheeld through your App.

choose the orientation sensor, proximity sensor and check your readings.

During my work I got confused about the servo connections so be aware of it.

Servo connections:

OR

Check breadboard connections to be sure that every thing is OK.

Also you can use combinations of many sensors to get more accurate results.


Here you can find the Build Guide for the Arm and the manual

from its website : 

https://www.mearm.com/pages/instructions






Code

RoboArmArduino
move your phone to see the Arm movements
#include <OneSheeld.h>
#include <Servo.h>
Servo gripper;
Servo base;
Servo motor1;
Servo motor2;

int base_val=0;
int mot1_val=0;
int mot2_val=0;


void setup()
{
     gripper.attach(10);
     base.attach(9);
     motor1.attach(13);
     motor2.attach(11);
     OneSheeld.begin();
  
}

void loop()
{
  
  if(ProximitySensor.getValue() > 0)
  {
    gripper.write(120);
    Terminal.println("open");
  }
  else
  {
    gripper.write(0);
     Terminal.println("close");
  }
  

  if(OrientationSensor.getX() >0 && OrientationSensor.getX() <190 && OrientationSensor.getY() < 2 && OrientationSensor.getY() > -6&& OrientationSensor.getZ() > 0 && OrientationSensor.getZ() < 5)
  {
    base_val = map (abs(OrientationSensor.getX()),0,190,179,0);
    base.write(base_val);
    Terminal.println(base_val);
    
  }
   if(OrientationSensor.getX() >10 && OrientationSensor.getX() <25 && OrientationSensor.getY() < 0 && OrientationSensor.getY() > -85 && OrientationSensor.getZ() > 3 && OrientationSensor.getZ() < 7)
  {
    mot1_val = map (abs(OrientationSensor.getY()),0,85,179,0);
    motor1.write(mot1_val);
    Terminal.println(mot1_val);
    
  }
  
   if(GravitySensor.getZ() >=9 && AccelerometerSensor.getX() > 0 )
  {
    mot2_val = map (abs(AccelerometerSensor.getX()),0,4,179,0);
    motor1.write(mot2_val);
    Terminal.println(mot2_val);
    
  }

}

Custom parts and enclosures

RoboArm Dxf file
MeArmV0.4.dxf

Schematics

CEFam.png
Cefam

Comments

Similar projects you might like

Servo Control with TV Remote Control

Project showcase by eldo85

  • 5,591 views
  • 5 comments
  • 17 respects

Control Door Lock Remotely Using Smartphone

Project tutorial by soardr

  • 3,287 views
  • 0 comments
  • 11 respects

RoboArm With 1Sheeld Gamepad

by Mohammed Magdy

  • 2,848 views
  • 0 comments
  • 9 respects

Smartphone Controlled Arduino 4WD Robot Car

Project in progress by Andriy Baranov

  • 53,241 views
  • 43 comments
  • 98 respects

Control Robot Arm with your Android Phone

Project tutorial by Ammar Atef Ali

  • 12,863 views
  • 0 comments
  • 25 respects

Universal Remote Control using Arduino, 1Sheeld and Android

Project tutorial by Ashraf Nabil

  • 9,219 views
  • 5 comments
  • 14 respects
Add projectSign up / Login