0% found this document useful (0 votes)
17 views7 pages

5 RPRT

The lab report focuses on the introduction to spider robots and the operation of servo motors in controlling their locomotion. It details the procedure of simulating the movement of a spider robot's leg using Tinker Cad, emphasizing the manipulation of code to achieve desired motor movements. The experiment concludes with an analysis of how the servo motors work together to maintain the vertical position of the leg's end during movement.

Uploaded by

Muhammad Tayyab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views7 pages

5 RPRT

The lab report focuses on the introduction to spider robots and the operation of servo motors in controlling their locomotion. It details the procedure of simulating the movement of a spider robot's leg using Tinker Cad, emphasizing the manipulation of code to achieve desired motor movements. The experiment concludes with an analysis of how the servo motors work together to maintain the vertical position of the leg's end during movement.

Uploaded by

Muhammad Tayyab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Department of Mechanical Engineering

<<ROBOTICS-I LAB>>

Experiment No. 05
Experiment Name: Introduction to spider robot with working of its 1 leg servo
motors

Name of Student: Nimra Nadeem


Signature of Student: ____________
Registration No.: 04-3-1-041-2020

Report Marks: _____ out of 10


Date of Report Submission: 8/12/23
Name of Lab Instructor: Sir Saim
Signature of Lab Instructor: ____________
Submitted to: Dr. Nasir Rehman
Table of Contents
Abstract ........................................................................................................................................... 3
Introduction: .................................................................................................................................... 3
Procedure ........................................................................................................................................ 4
Discussion ....................................................................................................................................... 7
Conclusion ...................................................................................................................................... 7

List of Figures
Figure 1 Spider Robot with 3 motors on 1 leg ................................................................................ 3
Figure 2 Simulation of above code. ................................................................................................ 5
Figure 3 Simulation showing motor 2 and 3 sweep in opposite direction ...................................... 6
Abstract
The main objective of this lab was to get familiarize with Spider Robot locomotion with help of
servo motors. Each leg of Spider Robot was equipped with 3 servo motors and thus for one leg
how servo motors are working was noticed. Firstly, single motor simulation was run and then to
use 3 motors with desired rotations various codes were manipulated and run on Tinker Cad so that
for entire robot one can get the knowledge of how to manipulate codes for specific orientation.

Introduction:
A servo motor is a precise rotary actuator used in robotics and automation. It operates in a closed-
loop system, providing accurate control of position, speed, and torque. Equipped with a feedback
mechanism, it can maintain high precision, respond quickly to commands, and is adaptable for
various applications. Commonly compact and lightweight, servo motors come in both DC and AC
types and find use in robotics, CNC machinery, aerospace, and more.

Figure 1 Servo motor

Furthermore, a spider robot with 4 legs and 3 motors on 1 leg is a quadrupedal robot designed to
mimic the locomotion of spiders. Each leg of the robot is equipped with three servo motors,
strategically placed to control joint movements and provide flexibility. The motors enable the leg
to articulate, replicate the natural movements of a spider's leg, and navigate various terrains.
Precise control, sensor integration, and motor code manipulation are crucial aspects of its design,
ensuring coordinated and stable movements, ultimately allowing the robot to adapt and traverse
complex environments as shown in figure 1.

Figure 2 Spider Robot with 3 motors on 1 leg


In this lab, how 3 motors of 1 leg is equipped in locomotion of robot was to observe. Among 3
motors 2nd motor firstly move to some angle then motor 1 starts its working while 3rd motor is
placed for compensation such that the angle move by 2nd motor will allow the movement of 3rd
motor by same angle but in opposite direction so that leg’s end portion remains vertical.
For this purpose, Tinker Cad software allows the users to manipulate codes for desired results
without using physical microcontrollers. So, 3 motors desired locomotion can be achieved by
playing with codes and motors in Arduino boards and microcontrollers in Tinker Cad.

Procedure
 Analyze the spider robot and placement of motors in legs.
 Then observe how servo motors work for 1 leg.
 Open the interface of Tinker Cad and go to create design of circuits.
 Drag the Arduino UNO with micro servo motor and manipulate the code such that motor
rotates 180 degrees and then for 2nd for loop it rotates back to 0 degrees as shown below in
code and simulation.
#include <Servo.h>
int pos = 0;
Servo servo_9;
void setup()
{
servo_9.attach(9, 500, 2500);
}
void loop()
{
// sweep the servo from 0 to 180 degrees in steps
// of 1 degrees
for (pos = 0; pos <= 180; pos += 1) {
// tell servo to go to position in variable 'pos'
servo_9.write(pos);
// wait 15 ms for servo to reach the position
delay(15); // Wait for 15 millisecond(s)
}
for (pos = 180; pos >= 0; pos -= 1) {
// tell servo to go to position in variable 'pos'
servo_9.write(pos);
// wait 15 ms for servo to reach the position
delay(15); // Wait for 15 millisecond(s)
}
}

Figure 3 Simulation of above code.

 This code shows the initial position for motor is 0 degrees and 1st for loop allows movement
of motor from 0 to 180 degrees and then after 15ms of time 2nd loop starts which allows sweep
of motor back to 0 degrees.
 Now focus on movement of 3 motors of spider robot and it will be observed that when motor
1 rotates motor 2 rotates to some angle while motor 3 should allow the end portion of leg to
remain vertical for which third motor will move with same angle as of 2nd but in opposite
direction to compensate for no net movement of end portion of leg occurs for which run the
following code.

#include <Servo.h>

Servo servo_1;
Servo servo_2;
Servo servo_3;

void setup()
{
servo_1.attach(9, 500, 2500);
servo_1.write(0);
servo_2.attach(10, 500, 2500);
servo_2.write(0);

servo_3.attach(11, 500, 2500);


servo_3.write(0);
}

void loop()
{
servo_1.write(servo_1.read()+60);
delay(500);

servo_2.write(servo_2.read()+90);
servo_3.write(servo_3.read()-90);
delay(500);

servo_1.write(servo_1.read()-60);
delay(500);

servo_2.write(servo_2.read()-90);
servo_3.write(servo_3.read()+90);
delay(500);
}
 This code shows 3 micro servos would be attach to 9, 10 and 11 pin of Arduino referring
signal wires and their initial position will be 0 degrees.
 Then in loop 1st motor will sweep to 60 degrees and after 500ms, 2nd and 3rd motor rotates to
90 degrees both in opposite direction to each other to allow for compensation as shown in
simulation below.

Figure 4 Simulation showing motor 2 and 3 sweep in opposite direction


Discussion
In this lab, servo motors were first studied and then 4 leg spider robot was analyzed for its specific
locomotion depending on servo motors arrangement and motion. It was observed that spider robot
consists of 4 legs with 3 motors on each leg. Only 1 leg was taken to allow for deep understanding
of codes manipulation on Tinker Cad that allows for understanding how servo motors could be
coded to decouple motor 3 effect so that end potion of leg remain vertical. For this purpose, Tinker
Cad was opened and in circuit designs Arduino UNO with 1 micro servo was drag and dropped to
interface code was already present but it was changed to allow sweep of motor from 0 degrees to
180 degrees and then back to 0 degrees which could be shown on above figure and code.
As this code was run successfully so 2 servo motors were copied and pasted from original motor
and then wires were attached to Arduino with 9, 10 and 11 pins respectively for motor with ground
and VCC wires same as for single motor was. Then code was written such that their starting
position were 0 degrees and motor 1 was then allowed to sweep to 60 degrees and with time delay
of 500ms motor 2 and 3 were allowed to sweep in 90 degrees with both opposite to each other in
direction to allow for compensation. Finally, in similar manner for return to 0 degrees opposite
sign angles were provided in loop with servo.read function which means whatever the position of
servo is read function sense the position and allows its next movement from same point.

Conclusion
To sum up, Spider robot’s one leg motion was analyzed along with working of servo motors and
how motor 3 can be decoupled to allow end portion of leg to remain in vertical position by first
playing with code in Tinker Cad for 1 motor and then for 3 motors simultaneously.

You might also like