123hridoy
Created March 20, 2022

Forward Kinematics for 3R manipulator

In this project, I tried to describe the motion of the 3R manipulator using forward kinematics..

Forward Kinematics for 3R manipulator

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
SG90 Micro-servo motor
SG90 Micro-servo motor
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Story

Read more

Custom parts and enclosures

3R manipulator

Schematics

schematic

Code

Code

Arduino
#include<Servo.h>
Servo servo1;
Servo servo2;
Servo servo3;
int offset1=0 ;// angle of servo1 for making the link1 align with al, form me its 0
int offset2=0;// angle of servo2 for making the link2 align with al, form me its 0
int offset3=0;// angle of servo3 for making the link3 align with al, form me its 0
void setup() {
  // put your setup code here, to run once:
servo1.attach(9);
servo2.attach(11);
servo3.attach(10);
servo1.write(offset1);
servo2.write(offset2);
servo3.write(offset3);
}

void loop() {
  // put your main code here, to run repeatedly:
  delay(3000);
  for(int i=offset1; i<=90+offset1;i++)
  {
    servo1.write(i);
     servo2.write(i);
      servo3.write(i);
      delay(100);
     
  }
  delay(2000);
  for(int i=90+offset1; i>=offset1;i--)
  {
    servo1.write(i);
     servo2.write(i);
      servo3.write(i);
      delay(100);
     
  }
  
   delay(100000);
}

Credits

123hridoy
2 projects • 3 followers

Comments