Hardi Kurnianto
Published

ARM Robot with weighing system

This is a miniature robot arm combined with a weighing system that can be used to move objects while knowing the weight of the object.

IntermediateProtipOver 1 day4,520
ARM Robot with weighing system

Things used in this project

Hardware components

SG90 Micro-servo motor
SG90 Micro-servo motor
×1
Arduino Mega 2560
Arduino Mega 2560
×1
Load Cell, Low Profile
Load Cell, Low Profile
×1
RGB Backlight LCD - 16x2
Adafruit RGB Backlight LCD - 16x2
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Code

Arm_Robot_IMI.ino

Arduino
#include <Servo.h>

Servo s1; Servo s2; Servo s3; Servo s4; Servo s5; Servo s6;

int pos = 0;
int servo_speed = 15;
int a=0,b=0,c=0,d=0,e=0;

void setup() 
{
 s1.attach(4); s2.attach(8); s3.attach(6); s4.attach(5); s5.attach(7); s6.attach(9);
 hm();
 Serial3.begin(9600);
}

void loop() 
{
 if(Serial3.available())
 {
  char data=Serial3.read();
  if (data=='c'){capit();}
  if (data=='l'){lepas();}
  if (data=='p'){s1.write(180);delay(1000); s1.write(0);delay(1000); s1.write(180);delay(500);}
  if (data=='i'){s3.write(50); delay(500);s3.write(0);  delay(500); s3.write(50); delay(500);s3.write(0);  delay(500);}
  if (data=='t'){s1.write(180);delay(500);s1.write(100);delay(500); s1.write(180);delay(500);s1.write(100);delay(500);s1.write(180);delay(500);}
  if (data=='j'){s2.write(90);delay(50);s3.write(90); delay(50);s4.write(100);delay(50);capit();}
  if (data=='v'){hm();}
  }
}

void hm()
{
  s1.write(0)  ;delay(50);
  s2.write(40) ;delay(50);
  s3.write(0)  ;delay(50);
  s4.write(180);delay(50);
  s5.write(130) ;delay(50);
  s6.write(20) ;delay(50);
}

void capit(){s6.write(80)  ;delay(1000);}
void lepas(){s6.write(10)  ;delay(1000);}

Credits

Hardi Kurnianto

Hardi Kurnianto

17 projects • 16 followers
Master student at Intelligent Control and Systems Engineering Department

Comments