Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Robotics Lab Manual with experiments, Summaries of Introduction to Robotics

This document describes the experiments for robotics

Typology: Summaries

2019/2020

Uploaded on 03/29/2020

paridhi-kaushik
paridhi-kaushik 🇮🇳

1 document

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Experiment-2
Objective: Debug different APIs in Pluto
Problem Statement: To detect the movement of PlutoX in vertical direction (upwards
and downwards) byusing LEDs on board and printing the velocity values on the Pluto
Monitor.
Requirement Tool & Software: Cygnus IDE, Pluto Drone
Code: The Code for the following task is here
// Do not remove the include below
#include"PlutoPilot.h"
#include"Estimate.h"
#include"Utils.h"
//The setup function is called once at PlutoX's hardware startup
voidplutoInit()
{
//Add your hardware initialization code here
}
//The function is called once before plutoLoop() when you activate
developer mode
voidonLoopStart()
{
//Do your one time stuff here
LED.flightStatus(DEACTIVATE);
}
//The loop function is called in an endless loop
voidplutoLoop()
{
//Add your repeated code here
if(Velocity.get(Z) > 0) /*If the drone is moving upwards (Velocity in
the
Z axis will be positive)*/
{
LED.set(RED, ON);
LED.set(GREEN, OFF);
}
else/*If the drone is moving downwards*/
{
LED.set(RED, OFF);
LED.set(GREEN, ON);
}
pf3
pf4
pf5

Partial preview of the text

Download Robotics Lab Manual with experiments and more Summaries Introduction to Robotics in PDF only on Docsity!

Experiment-

Objective: Debug different APIs in Pluto

Problem Statement: To detect the movement of PlutoX in vertical direction (upwards

and downwards) byusing LEDs on board and printing the velocity values on the Pluto

Monitor.

Requirement Tool & Software: Cygnus IDE, Pluto Drone

Code: The Code for the following task is here

// Do not remove the include below #include "PlutoPilot.h" #include "Estimate.h" #include "Utils.h" //The setup function is called once at PlutoX's hardware startup voidplutoInit () { //Add your hardware initialization code here } //The function is called once before plutoLoop() when you activate developer mode voidonLoopStart () { //Do your one time stuff here LED.flightStatus( DEACTIVATE ); } //The loop function is called in an endless loop voidplutoLoop () { //Add your repeated code here if (Velocity.get( Z ) > 0) /If the drone is moving upwards (Velocity in the Z axis will be positive)/ { LED.set( RED , ON ); LED.set( GREEN , OFF ); } else /If the drone is moving downwards/ { LED.set( RED , OFF ); LED.set( GREEN , ON ); }

Monitor.println("Velocity Z: ", Velocity.get( Z )); Graph.red(Velocity.get( Z ), 1); } //The function is called once after plutoLoop() when you deactivate developer mode voidonLoopFinish () { //Do your cleanup stuff here LED.flightStatus( ACTIVATE ); }

Result:

myservo.write(pos); // tell servo to go to position in variable 'pos'

Serial.println(pos);

delay(15); // waits 15ms for the servo to reach the position

Result:

Experiment-

Objective: Learn StepperMotor with L293D Motor Driver & Arduino

Requirement Tool & Software: NEMA Stepper Motor, Arduino IDE, L293D

MotorDriver

Description: we are using NEMA 17 bipolar stepper rated at 12V. It offers 200 steps per

revolution, and can operate at 60 RPM.

Connection: The connections are fairly simple. Start by connecting external 12V power

supply to the Vcc2 pin and 5V output on Arduino to the Vcc1 pin. Make sure you common

all the grounds in the circuit.

You also need to connect both the ENA & ENB pins to 5V output so the the motor is always

enabled.

Now, connect the input pins(IN1, IN2, IN3 and IN4) of the L293D IC to four digital output

pins(12, 11, 10 and 9) on Arduino.

Finally, connect the A+ (Red), A- (Green), B+ (Blue) and B- (Yellow) wires from the stepper

motor to the L293D’s output pins (Out4, Out3, Out2 & Out1) as shown in the illustration

below.