Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Robotic Arm

Description

Internet Controlled Move and Pick using Robotic Arm

Robotic arm controlled over the internet to perform pick and place operation.

Things used in this project

Hardware components

owi robotic arm
× 1
SparkFun Triple Axis Accelerometer Breakout – ADXL335
× 2
Particle Spark Core
× 2
H Bridge L298N
× 2

Story

Schematics

Accelerometer wiring

Wiring for Accelerometer based controller

Motor Wiring

Motor wiring schematic. Used H-Bridge to drive the motors.

Code

  • ARM CONTROL
  • ACCELEROMETER REMOTE

ARM CONTROL

C/C++

This module consists of H-bridge and motors to control the arm. Three motors are controlled based on the command received from the acclerometer control.
/* ARM MOTOR CONTROL */

//use core 2

/*motor pins*/
#define shoulderf 0
#define shoulderr 1
#define elbowf 5
#define elbowr 6
#define handf 3
#define handr 4

//commands
const char *cmd1 = "up", 
           *cmd2 = "down", 
           *cmd3 = "left", 
           *cmd4 = "right", 
           *cmd5 = "grab", 
           *cmd6 = "drop";

char *core1, *core2;

void ctrl(const char *event ,const char *data)
{
    
        /*UP*/
    if( strcmp(data , cmd1) == 0 )
    {  
       digitalWrite(elbowf,HIGH);
       digitalWrite(elbowr,LOW);
       delay(500);
       digitalWrite(elbowf,LOW);
    }
           /*DOWN*/
    else if( strcmp(data , cmd2) == 0 )
    { 
        
       digitalWrite(elbowr,HIGH);
       digitalWrite(elbowf,LOW);
       delay(500);
       digitalWrite(elbowr,LOW);
        
    }
          /*LEFT*/
    else if(strcmp(data,cmd3) ==0 )
    {
      digitalWrite(shoulderr,HIGH);
      digitalWrite(shoulderf,LOW);
      delay(500);
      digitalWrite(shoulderr,LOW);
    }
         /*RIGHT*/
    else if(strcmp(data,cmd4) ==0 )
    {
      digitalWrite(shoulderf,HIGH);
      digitalWrite(shoulderr,LOW);
      delay(500);
      digitalWrite(shoulderf,LOW);
        
    }
           /*GRAB*/
    else if(strcmp(data,cmd5) ==0 )
    {
      digitalWrite(handf,HIGH);
      digitalWrite(handr,LOW);
      delay(1000);
      digitalWrite(handf,LOW);
        
    }
           /*DROP*/
    else if(strcmp(data,cmd6) ==0 )
    {
     digitalWrite(handr,HIGH);
     digitalWrite(handf,LOW);
     delay(1000);
     digitalWrite(handr,LOW);
  
    }
    
}


 void setup()   
 {
     Serial.begin(9600);
       
    core1 = "Your remote control Device ID";
    
   // pinMode(7,OUTPUT);
   
    pinMode(shoulderf , OUTPUT);
    pinMode(shoulderr , OUTPUT);
    
    pinMode(elbowf, OUTPUT);
    pinMode(elbowr, OUTPUT);
    
    pinMode(handf, OUTPUT);
    pinMode(handr, OUTPUT);
    
    Spark.subscribe("move", ctrl ,core1);
 }
 
 void loop()
 {
  
 }
 

The post Robotic Arm appeared first on SummerSolderS.



This post first appeared on Summersolders, please read the originial post: here

Subscribe to Summersolders

Get updates delivered right to your inbox!

Thank you for your subscription

×