Pick & Place Robot

by sandeep jagdev in Circuits > Robots

1041 Views, 6 Favorites, 0 Comments

Pick & Place Robot

IMG-20170305-WA0002.jpg
IMG-20170305-WA0000.jpg

This robot is designed to lift heavy weights.It can be used in Hazardous condition.It is solar powered and can be manually charged.It is derived by rc remote because it can operate upto 1km range.

Hardware Setup

Untitled.jpg

Component required

6 - 60 RPM DC gear motor+L brackets.

Arduino nano.

8 - 12V relay.

12V DC battery.(7-Amp)

ULN 2803

RC remote and receiver.

Solar Panel.(if required)

Battery charger.

PCB.(Dotted)

Voltage regulator(7805) and capacitor.

Plastic or Wooden sheet for body.

LED strip.(any color)

USB cable and computer.

you can get rc remote here. ww.ebay.in/itm/121966788355?aff_source=Sok-Goog

You can get lift arm here :http://www.ebay.in/itm/Mechanical-Metal-Gripper-for-Robot-Mechanical-Claw-Robotic-Arm-Manipulator-KG382-/112029305488?hash=item1a15778a90:g:TaUAAOSwXeJYHD9v

The circuit diagram shown in figure. For driving arm motor same relay circuit is used .

Note:The three motor on left side are connected in parallel and the three motor on another side are connected in parallel.

Software Setup:

pick place.jpg

First step is to install arduino setup and arduino drivers on your computer .

code:

#include

#define SERIAL_PORT_SPEED 9600

#define RC_NUM_CHANNELS 4

#define RC_CH1 0

#define RC_CH2 1

#define RC_CH3 2

#define RC_CH4 3

#define RC_CH1_INPUT A0

#define RC_CH2_INPUT A1

#define RC_CH3_INPUT A2

#define RC_CH4_INPUT A3

uint16_t rc_values[RC_NUM_CHANNELS];

uint32_t rc_start[RC_NUM_CHANNELS];

volatile uint16_t rc_shared[RC_NUM_CHANNELS];

void rc_read_values()

{

noInterrupts();

memcpy(rc_values, (const void *)rc_shared, sizeof(rc_shared));

interrupts();

}

void calc_input(uint8_t channel, uint8_t input_pin)

{

if (digitalRead(input_pin) == HIGH)

{

rc_start[channel] = micros();

}

else

{

uint16_t rc_compare = (uint16_t)(micros() - rc_start[channel]);

rc_shared[channel] = rc_compare;

}

}

voi1d calc_ch1()

{

calc_input(RC_CH1, RC_CH1_INPUT);

}

void calc_ch2()

{

calc_input(RC_CH2, RC_CH2_INPUT);

}

void calc_ch3()

{

calc_input(RC_CH3, RC_CH3_INPUT);

}

void calc_ch4()

{

calc_input(RC_CH4, RC_CH4_INPUT);

}

void setup()

{

Serial.begin(SERIAL_PORT_SPEED);

pinMode(2,OUTPUT);

pinMode(3,OUTPUT);

pinMode(4,OUTPUT);

pinMode(5,OUTPUT);

pinMode(10,OUTPUT);

pinMode(11,OUTPUT);

pinMode(12,OUTPUT);

pinMode(13,OUTPUT);

pinMode(RC_CH1_INPUT, INPUT);

pinMode(RC_CH2_INPUT, INPUT);

pinMode(RC_CH3_INPUT, INPUT);

pinMode(RC_CH4_INPUT, INPUT);

enableInterrupt(RC_CH1_INPUT, calc_ch1, CHANGE);

enableInterrupt(RC_CH2_INPUT, calc_ch2, CHANGE);

enableInterrupt(RC_CH3_INPUT, calc_ch3, CHANGE);

enableInterrupt(RC_CH4_INPUT, calc_ch4, CHANGE);

}

void loop()

{

rc_read_values();

// // Serial.print("CH1:"); Serial.print(rc_values[RC_CH1]);Serial.print("\t");

// Serial.print("CH2:"); Serial.print(rc_values[RC_CH2]); Serial.print("\t");

// Serial.print("CH3:"); Serial.print(rc_values[RC_CH3]); Serial.print("\t");

// Serial.print("CH4:"); Serial.println(rc_values[RC_CH4]);

// // delay(200);

if(rc_values[RC_CH3]>1600)

{ forward(); }

if(rc_values[RC_CH3]<1400)

{ backward(); }

if(rc_values[RC_CH4]>1600)

{ left(); }

if(rc_values[RC_CH4]<1400)

{ right(); }

if(rc_values[RC_CH4]>1400&&rc_values[RC_CH4]<1600&&rc_values[RC_CH3]>1400&&rc_values[RC_CH3]<1600)

{ stop1(); }

if(rc_values[RC_CH1]>1600)

{ up1(); }

if(rc_values[RC_CH1]<1400)

{ down1(); }

if(rc_values[RC_CH2]>1600)

{ open1(); }

if(rc_values[RC_CH2]<1400)

{ close1(); }

if(rc_values[RC_CH1]>1400&&rc_values[RC_CH1]<1600&&rc_values[RC_CH2]>1400&&rc_values[RC_CH2]<1600)

{ stop2(); }

} void forward()

{ digitalWrite(2,LOW); digitalWrite(3,HIGH); digitalWrite(4,HIGH); digitalWrite(5,LOW); }

void backward()

{ digitalWrite(2,HIGH); digitalWrite(3,LOW); digitalWrite(4,LOW); digitalWrite(5,HIGH); }

void left()

{ digitalWrite(2,LOW); digitalWrite(3,HIGH); digitalWrite(4,LOW); digitalWrite(5,HIGH); }

void right()

{ digitalWrite(2,HIGH); digitalWrite(3,LOW); digitalWrite(4,HIGH); digitalWrite(5,LOW); }

void stop1()

{ digitalWrite(2,LOW); digitalWrite(3,LOW); digitalWrite(4,LOW); digitalWrite(5,LOW); }

void open1()

{ digitalWrite(10,LOW); digitalWrite(11,HIGH); digitalWrite(12,LOW); digitalWrite(13,LOW); }

void close1()

{ digitalWrite(10,HIGH); digitalWrite(11,LOW); digitalWrite(12,LOW); digitalWrite(13,LOW); }

void up1()

{ digitalWrite(10,LOW); digitalWrite(11,LOW); digitalWrite(12,HIGH); digitalWrite(13,LOW); }

void down1()

{ digitalWrite(10,LOW); digitalWrite(11,LOW); digitalWrite(12,LOW); digitalWrite(13,HIGH); }

void stop2()

{ digitalWrite(10,LOW); digitalWrite(11,LOW); digitalWrite(12,LOW); digitalWrite(13,LOW); }

You can add enable interrupt library from here:

https://github.com/GreyGnome/EnableInterrupt

You can download code from here:

Downloads