Skip to main content

Make a Smart Phone Controlled Robotic Arm ! Arduino DIY.


Making ROBOT ARMs is very popular and fun among hobbyists, but it's not that easy to control a ROBOT ARM. So today we'll be making a robot arm that can be controlled using just your Android Smartphone or tablet.
Good news is, you just need to program the Arduino, the App is already available to download for free.

Step 1: Parts You'll Need

2 More Images
  • Servo motor 4x (I'm using micro servo Sg90 but any model or size is okay) you can use upto 5 servo for this robot arm, I've only 4, so I'm using them.
  • sliced piece of Card Board - to make the body.
  • USB OTG (on the go) [pic3 & 4- all the same]
  • And of course a Arduino board (any board)
  • And a few jumpers to make the connection
  • And a 9v battery to power the servo motors.

Step 2: Making the Robot Arm (THE BODY)

Now in here I'm actually making the body in a way so that I can easily connect and disconnect the ARM anytime. Using some pieces of cardboard and Hot glue I've mounted the Servo motors to the cardboard to make the body. It's better to watch the video to better understand how it's done.

Step 3: Making the GRIPPER (finger for Robot Arm)

I've made the robot gripper using juice straw or pipe. And added a simple fiver or rope so that when it's pulled the grip will be closed.

Step 4: Assemble the Robot ARM

After making the arm and making & the gripper you just assemble the body as shown.

Step 5: The Circuit

Well the circuit is very easy, you just need to power the servo motors. Arduino will take power from your phone via OTG cable. Don't worry, the power consumption is very low.

Step 6: Download the ANDROID APP

Search on google PLAYSTORE - Servo & Esc controller.
Then Install the app.

Step 7: Programming the Arduino

You can get the code from the link in the app, I'm providing the code below
# include <Servo.h>
//PWM OUTPUT VARIABLES
Servo pin2;
Servo pin3;
Servo pin4;
Servo pin5;
Servo pin6;
//SERIAL USB BUFFER
char inData[ 65 ]; // Allocate some space for the string
char inChar; // Where to store the character read
byte index = 0 ; // Index into array; where to store the character
void setup () {
//START PIN OUTPUT
pin2. attach ( 2); // attaches the servo on pin 9 to the servo object
pin3. attach ( 3);
pin4. attach ( 4);
pin5. attach ( 5);
pin6. attach ( 6);
//SEND MINIMAL VAUE 1000, REGUIRED FOR ESC TO ARM (max is 2000)
pin2. writeMicroseconds (1000 );
pin3. writeMicroseconds (1000 );
pin4. writeMicroseconds (1000 );
pin5. writeMicroseconds (1000 );
pin6. writeMicroseconds (1000 );
//INIT SERIAL COMMUNICATION WITH ANDROID
Serial. begin (115200 );
}
void loop () {
if (Serial. available () > 0 ){
//WAIT FOR INCOMMING DATA BUFFER TO FILL
if (index < 24){
inChar = Serial. read (); // Read a character
inData[ index ] = inChar; // Store it
index ++; // Increment where to write next
if (inChar == 'X' )
index = 0 ;
inData[ index ] = '\0' ; // Null terminate the string
}
}
if (index ==24 ){
index = 0;
//STRING LOOKS LIKE "A100B96C20D0E" WHERE LETTERS ACT AS DELIMINATOR
//STRING CAN CONTAIN SINGLE VALUE LIKE "B96C"
String buf = String (inData);
int ia = buf. indexOf ( "A", 0);
int ib = buf. indexOf ( "B", 0);
int ic = buf. indexOf ( "C", 0);
int id = buf. indexOf ( "D", 0);
int ie = buf. indexOf ( "E", 0);
int iff = buf. indexOf ("F" , 0 );
Serial. print ("|" );
//A?B
if (ia!=- 1 && ib!=- 1){
//1. CONVERT VALUE TO INTEGER
//2. CONVERT 0-100 TO 1000 - 2000
//3. WRITE TO ARDUINO PIN NUMBER 2
pin2. writeMicroseconds (map (buf. substring (ia+ 1, ib). toInt (), 1, 100 , 1000 , 2000 ));
//SEND RESPONSE TO ANDROID
Serial. print ( "RESPONSE:OK" );
}
//B?C
if (ib!=- 1 && ic!=- 1){
pin3. writeMicroseconds (map (buf. substring (ib+ 1, ic). toInt (), 1, 100 , 1000 , 2000 ));
//Serial.print("PIN3 OK");
}
//C?D
if (ic!=- 1 && id!=- 1){
pin4. writeMicroseconds (map (buf. substring (ic+ 1, id). toInt (), 1, 100 , 1000 , 2000 ));
//Serial.print("PIN4 OK");
}
//D?E
if (id!=- 1 && ie!=- 1){
pin5. writeMicroseconds (map (buf. substring (id+ 1, ie). toInt (), 1, 100 , 1000 , 2000 ));
//Serial.print("PIN5 OK");
}
//E?F
if (ie!=- 1 && iff!=- 1){
pin5. writeMicroseconds (map (buf. substring (ie+ 1, iff). toInt (), 1 , 100 , 1000 , 2000 ));
//Serial.print("PIN6 OK");
}
Serial. print ("|00" );
Serial. print ("\n" );
}
}
void logg (){
}
Okay download or copy the code from below.

Step 8: Connect the OTG and Arduino to Phone

Connect the OTG cable to arduino programming (USB B) cable and then connect the wire with the phone. The APP will automatically pop up. Click on 'ok' and twill open. After connecting "port open" message will be seen.

Step 9: Finished

And you're done, just power the Servo and use the app to rotate every single servo of the arm as you please. So Simple.
Thank you.
If you want to get my future projects time to time Subscribe via e-mail by clicking here

Comments

  1. thanks for tutorial good job nice

    ReplyDelete
  2. Replies
    1. Thanks, you commented in my birthday anyway.

      Delete
  3. Can i use the 5v of the arduino for the servo source?

    ReplyDelete
    Replies
    1. For one servo it is okay but not recommended, You might harm the servo and Arduino. For a lot of servos, you cant. I powered them using a 5v 1A power bank then. But I recommend using at least 6v for these. Thanks.

      Delete
  4. Want report of this project urgently

    ReplyDelete
    Replies
    1. I didn't write any report other than blog post.

      Delete
  5. Plz make a video on wiring of the servo s and battery.plz

    ReplyDelete
  6. Give me the circute diagram to make this project i give no send it to me 9360738976

    ReplyDelete
  7. Brother I want dimension of cardboard .

    ReplyDelete
    Replies
    1. I just cut them randomly, make sure you cut pieces that fits your servo. That's it.

      Delete
  8. How much cost and give the links of servos and Arduino please total how much cost

    ReplyDelete
    Replies
    1. They are very cheap, each servo costs 100 Taka (BDT) and Arduino costs around 400 Taka (BDT).

      Delete
  9. Replies
    1. Connect the GND (black /gray) pins and VCC (red wire) to 6v/5v from a quality power bank and connect data pins to arduino 2,3,4,5,6

      Delete
  10. This comment has been removed by the author.

    ReplyDelete
  11. Please send the project report bro

    ReplyDelete
    Replies
    1. I'm sorry there is no project report, I did not write any other than this blog post. Thank you.

      Delete

Post a Comment

Popular posts from this blog

Make a Smart Humanoid Talking Robot- MOFIZA.

This Robot - Mofiza - (weird name) Can SEE , TALK and REACT to her surroundings. Before I proceed watch the video: Ever since I've seen making talking robots I saw that people actually use other development boards rather than Arduino to make talking robots. But it's completely possible to make a Humanoid robot with Arduino who can talk and add a lot of servos to make it move. So lets begin: Step 1: Parts You'll Need Arduino Pro mini (5v 16 Mhz) [any board is good but i've used this to make it small) Female header pins for connecting on pcb Male header pins Vero Board to make the circuit Sd card TF module (to make it talk) micro sd card (not more than 2GB) 3x IR proximity sensor 3x servo motor (I've used micro servo sg90) Cardboard to make the body Step 2: Connecting IR Sensor and the Body Make a

Make AI Assistant Robot with Arduino and Python

Introduction: We all are familiar with ‘Jarvis’ AI assistant robot from “Iron Man’ movies and Marvel series. It has always been a dream of programmers to make something on their own. I will today show a simple way to make such an assistant using Python programming. Moreover, I will also make a physical avatar of that robot, so that whenever we talk to the robot, it can do some movements. That will be more amazing than just a software robot. Because if it has a body, it is cool. So today we will learn to use both Arduino and Python programming to make an AI robot which can control your computer and have a little chit chat with you. Let’s hop in guys! Why I named the robot ‘Jaundice’? Because I painted it yellow, very very yellow!   Parts: Electronics - Arduino Nano – 1x Micro Servo Sg90 – 3x Ultra Sonic Sensor HCsr04 – 1x Body – PVC sheet (preferably white, better for coloring, I used blue one) Servo wheel (for the stand) Tools -  Cutter knife Scissor Hot glu

Arduino Automated Parking Garage

An Arduino Automated Car Parking System that is too easy and too fun to make. When a car arrives it shows the number of empty slots (if available) and then opens the gate. if there is not any empty slot then the gate does not open.  Amazing thing is that the whole project can just be POWERED using a POWER BANK!! Watch the video for the full tutorial. Note: you can use display instead of my hand made led sign display. Now lets get started. Step 1: Parts Arduino  - any board Infrared proximmity sensor  (pic 2 & 3 - both are functional) 330r resistor some  LED 's Servo motor  - any model or size you wish. Step 2: Making the LED Display To make this  LED display  I have used a piece of bredboard then soldered the LED's and the 330r resistor. Then just added a ribbon cable f

Problems using PIR sensor?? Always HIGH? DELAY? Solution is here.

PIR sensor When I was working on a project "controlling home appliances using just a wave of hand" I had used a PIR sensor and found some issues: PIR doesn't work properly when starts. PIR output value is always 1. It some times doesn't read motions. Now those are three Common and Unavoidable problems of a PIR sensor. So what would we do? I assume you know what a PIR sensor is and I'll just try to give a solution to the problems so that you can use PIR in your project efficiently, also I've added a code below on how to solve that problem. As I have mentioned earlier those are Common and Unavoidable,  keep 3 issues in mind: After powering - PIR sensor needs 1 minute to function For that 1 minute the OUTPUT is always HIGH. When a motion is detected it'll take 5 to 7 seconds to detect motion again. SOLUTION: After powering - PIR sensor needs 1 minute to function:  which means when you'll power a PIR sensor it wi

Control Anything Over Internet / WiFi. IOT Light Switch_ NodeMCU ESP8266 .

Parts: NodeMCU ESP8266  WiFi Development Board LED 330r resistor Android app Download the app from Below , To Upload code to NodeMCU using Arduino.ide Update Arduino.ide (desktop app) start Arduino app goto  Files > Preferences  Then  paste the link  then press  ok.    http://arduino.esp8266.com/stable/package_esp8266com_index.json goto  Tools>Boards> Board Manager  then wait untill it finds ESP8266 properties Scroll down and  click install Then Restart the Arduino App. Now you can upload Code in C / C++ to NodeMCU ESP8266 using Arduino.ide Getting IP Address Code T o get the IP Address (Internet Protocol Address) Upload this Code and open serial monitor. #include <ESP8266WiFi.h> const char* ssid="WIFI name"; const char* password = "WIFI PASSWORD"; int ledPin = 13; void setup() { pinMode(ledPin,OUTPUT); digitalWrite(ledPin,LOW); Serial.begin(115200); Serial.println(); Serial.print("Wifi co

How to use ServoTimer2 Library with Arduino- full tutorial.

Introduction I've been trying to make a humanoid robot  MOFIZA -Arduino Talking Humanoid Robot.  recently- which means dealing with Servo motors. Everything worked just as fine just before I tried to make the robot TALK. When I needed to use the TMRpcm library. But there's some libraries like #TMRpcm .h #VirtualWire .h are libraries that use the Timer1 of Arduino. It appears that you can't use two devices simultaneously where both use the same timer...So, if my robot talks- the servos don't work. Because The Servo.h and the TMRpcm both works on Arduino TImer1. Which is a mess. If you want to make both of them work you have to use another library for servos. Which is ServoTimer2 library? This uses the Timer2 on Arduino...Unfortunately on internet I haven't found any tutorials to understand how this ServoTimer2 library actually works, and how to use it in code. So, I've decided to make a tutorial so that people like me can understand better. We'll be u