Lab Manual - Drone
Lab Manual - Drone
Lab Manual - Drone
LAB MANUAL
Introduction to Drones
II Year I Semester B. TECH CSE
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
Bloom’s Level
CO# Remember Understand Apply Analyze Evaluate Create
(L1) (L2) (L3) (L4) (L5) (L6)
A5510.1 √
A5510.2
√
A5510.3
√
A5510.4
√
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
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
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.
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
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.
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:
Output
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);
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
5. Output
The distance between the Drone and the obstacle is measured using Ultrasonic sensor and NodeMCU
microcontroller.