Lab Manual - Drone

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Department of Computer Science & Engineering

LAB MANUAL
Introduction to Drones
II Year I Semester B. TECH CSE

Course Title INTRODUCTION TO DRONES


Course Code A6701
Course Type Integrated
Category Core Engineering
Regulation VCE-R 20
Academic Year 2020-2021
Course Lead Mohamed Sirajudeen Y
Course Instructors
1. Mohamed Sirajudeen Y

COURSE OVERVIEW

The main aim of this course is to understand the basics of Unmanned Arial Vehicles (Drones) and its
various applications. The course will also impart the knowledge of how to fly a drone by considering
the rules and regulations to the specific country. Further the students will be introduced to the safety
measures to be taken during flight.

COURSE OBJECTIVE
The course enables the students to apply the concepts of drone technology

COURSE OUTCOMES (COs)


At the end of the course student will be able to:

A4701.1 Demonstrate the parts and functions of a drone


A4701.2 Explain the basic working principle behind assembling a drone.
A4701.3 Analyze building process of a drone before flying.
A4701.4 Design a mission control Drone to plan a surveying mission.
A4701.5 Build a prototype drone to record videos and take Photos.

[Introduction to Drones] [Page 1]


BLOOM’S LEVEL OF THE COURSE OUTCOMES

Bloom’s Level
CO# Remember Understand Apply Analyze Evaluate Create
(L1) (L2) (L3) (L4) (L5) (L6)
A5510.1 √
A5510.2

A5510.3

A5510.4

COURSE ARTICULATION MATRIX

PSO

PSO
PO1

PO2

PO3

PO4

PO5

PO6

PO7

PO8

PO9

PO1

PO1

PO1
CO#/

2
Pos
A5510.1 1
A5510.2
3 3 3 3
A5510.3
3 3 3 3
A5510.4
1

Note: 1-Low, 2-Medium, 3-High

COURSE ASSESSMENT
Component
S Duration Total
Component Wise Weightage Marks
No in Hours Marks
Marks
1 Theory: Test-1 1 20
2 Continuous Theory: Test-2 1 20
Internal
Alternate 100 0.3 30
3 Evaluation - 20
Assessment*
(CIE)
Practical
4 2 40
Exam
5 Semester End Exam (SEE) 3 100 100 0.7 70
Total Marks 100

[Fundamentals of IoT] [Page 2]


Week 1

1. Study and install IDE for Arduino and different types of Arduino.
Arduino is an open-source electronics platform based on easy-to-use hardware and
software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or
a Twitter message and turn it into an output - activating a motor, turning on an LED,
publishing something online. You can tell your board what to do by sending a set of
instructions to the microcontroller on the board. To do so you use the Arduino programming
language (based on Wiring), and the Arduino Software (IDE), based on Processing. Different
Types of Arduino Boards: The list of Arduino boards includes the following such as, Arduino
Uno (R3), LilyPad Arduino, Red Board, Arduino Mega (R3), Arduino Leonardo.
NodeMCU (Node Microcontroller Unit) is an open source software and hardware
development environment that is built around a very inexpensive System-on-a-Chip (SoC)
called the ESP8266. ESP8266 is a low-cost, WiFi Module chip with full TCP/IP stack and
micro controller capability and that can be configured to connect to the Internet in the IoT
applications.

Arduino IDE Installation:


Step 1: Install Arduino IDE (latest version from www.arduino.cc)

Step 2: Configure ESP8266 bords in the IDE


-Goto File -> Preferences-> Additional Boards Manager URLs
-Enter:http://arduino.esp8266.com/stable/package_esp8266com_index.json
-Open Board Manager menu and type esp8266 and install

The-pin-configuration-of-Node-MCU
2. Study and configure Raspberry Pi.
Raspberry Pi 4 Model B is the latest product in the popular Raspberry Pi range of computers.
It offers ground-breaking increases in processor speed, multimedia performance, memory, and
connectivity compared to the prior-generation Raspberry Pi 3 Model B+, while retaining
backwards compatibility and similar power consumption. For the end user, Raspberry Pi 4
Model B provides desktop performance comparable to entry-level x86 PC systems

Raspberry Pi 4 pinout Diagram:

Note: To get the pin details of any RPi board get a command terminal and issue the following
command:
pinout
This gives the pinout diagram of that RPi version.
Precautions:
• Raspberry GPIO Pins can withstand 3.3Volts only. If the input voltage on any pin exceeds
3.3V, it will damage the RPi board. Extreme care must be taken to avoid 5V supply directly
given to any GPIO Pin. It must be properly reduced using a pair of resistors in the ratio of
1:1.5
• Connect the wires to motherboard only after properly checking the circuit on the breadboard
• Each pin can drive a current of about 15mA of current at 3.3V which means we must
connect at least 200Ω resistor (220Ω) in series to each used pin.

Commercially available Resistors and Capacitor Values:


(1, 1.2, 1.5, 1.8, 2.2, 2.7, 3.3, 3.9, 4.7, 5.6, 6.8, 8.2, 9.1) x 10p Ωwhere p can be 0 to 6
Color Code:
Resistors and ceramic capacitors are generally painted with color code where it has 4 bands –
First 2 bands are value, third band is the multiplying factor 10x, where x is the band value, and
the last band is the tolerance (Gold-5%, Silver – 10%). A gold or silver third band represents a
multiplying factor
of 10-1 (0.1). For example, {Red, Red, Gold, Gold} represents a resistance of 2.2Ω
(22x10-1). Following resistor represents 270 ohms.

Black = 0, Brown = 1, Red = 2, Orange = 3, Yellow = 4, Green = 5, Blue = 6, Violet = 7, Gray = 8,


White = 9

Capacitors: Same as above values available in Micro Farads (µF) (10-6), Nano Farads (nf) (10-9)
and Pico Farads (pf) (10-12). The value is represented as Pico Farads (pf) when represented in
color code or numbers are given with 3 digits and without any units.

Week 2
Aim: Blink the LED every two seconds using a microcontroller

1. Source Code:
#define LED D1 // Led in NodeMCU at pin GPIO16 (D1) CONNECT D1 TO positive of LED.

void setup() {
pinMode(LED, OUTPUT); // LED pin as output.
}
void loop() {
digitalWrite(LED, HIGH);// turn
the LED off delay(1000); // wait for
1 second. digitalWrite(LED, LOW);
// turn the LED on. delay(1000); //
wait for 1 second.
}

2. Procedure:
Connect D1 Pin (NodeMCU) to positive of LED and connect GND to negative of LED.
3. Viva Voce Questions:

a. What is mean by Arduino?

b. Difference between Arduino and NodeMCU?

Output

LED blinks every two seconds.


Week 3
1. AIM: Measure the distance between the drone and the obstacle using ultrasonic sensor.

2. Source Code:
// defines pins numbers
const int trigPin = 5; // pin no. 5 is D1 ESP8266
const int echoPin = 4; // pin no. 4 is D2 ESP8266
// defines variables
long duration;
int dist;
void setup()
{
pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
pinMode(echoPin, INPUT); // Sets the echoPin as an Input
Serial.begin(115200); // Starts the serial communication @9600
}
void loop() {
// Clears the trigPin
digitalWrite(trigPin, LOW);
delayMicroseconds(20000);
// Sets the trigPin on HIGH state for 10 micro seconds
digitalWrite(trigPin, HIGH);
delayMicroseconds(20000);
digitalWrite(trigPin, LOW); // Reads the echoPin, returns the sound wave travel time in
microseconds duration = pulseIn(echoPin, HIGH);

// Calculating the distance


dist= duration*0.034/2;
// Prints the distance on the Serial Monitor
Serial.print("Distance: ");
Serial.println(dist);
}

3. Procedure:
a) Connect Trig pin (Ultrasonic Sensor) to D1 in Node MCU
b) Connect Echo pin (Ultrasonic Sensor) to D2 in Node MCU
c) Connect VCC (Ultrasonic Sensor)to VCC in Node MCU
d) Connect GND (Ultrasonic Sensor) to GND in Node MCU

4. Viva Voce Questions:

a) Explain the working principle of ultrasonic sensor

b) What are the different pins in the ultrasonic sensor?

5. Output

The distance between the Drone and the obstacle is measured using Ultrasonic sensor and NodeMCU
microcontroller.

You might also like