0% found this document useful (0 votes)
38 views45 pages

Unit-2 (Building Drones)

The document provides a comprehensive guide on building drones, focusing on the use of the ESP8266 Wi-Fi module for communication with Arduino. It includes steps for setting up the hardware, installing necessary libraries, and programming the drone to perform tasks such as controlling an LED and implementing a 'Follow Me' feature. Additionally, it covers calibration, safety measures, and the integration of various components for drone functionality.

Uploaded by

Kummari Rohan
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)
38 views45 pages

Unit-2 (Building Drones)

The document provides a comprehensive guide on building drones, focusing on the use of the ESP8266 Wi-Fi module for communication with Arduino. It includes steps for setting up the hardware, installing necessary libraries, and programming the drone to perform tasks such as controlling an LED and implementing a 'Follow Me' feature. Additionally, it covers calibration, safety measures, and the integration of various components for drone functionality.

Uploaded by

Kummari Rohan
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/ 45

Vellore Institute OF Technology, BHOPAL

CSA2002 Introduction to Drones

(School of Computer Science &


Engineering)
Ankit Shrivastava
Vellore Institute Of Technology (VIT),
Bhopal, India
Unit- 2
Building Drones

2
How to Build a Drone - Preparing:
What Is ESP8266?

• ESP8266 is a Wi-Fi module. It has the capability for 2.4 GHz Wi-Fi, which
is 802.11 b/g/n.

• It supports WPA / WPA2.

• To communicate with the drone we will need Bluetooth or wifi connection


so we are using the Esp8266 Wi-Fi module because it has inbuilt Wi-Fi, and
we can use it for communication.

• ESP8266 Open-source, Interactive, Programmable, Low cost, Simple, Smart,


Lowest cost WI-FI enabled hardware.

3
The following image is an ESP8266 with its pin out:

The standard ESP8266 has eight pins –

Pin: Function
▪ RX: It receives data
▪ VCC: Power pin (usually 3.3V maximum)
▪ GPI 0: General purpose Input output pin 0
▪ RESET: It is a reset pin
▪ CH_PD: Chip power down pin
▪ GPIO 2: General purpose input output pin 2
▪ TX: It transmits data
4 ▪ GND: Ground pin
How to Build a Drone - Preparing:
1. Connect the ESP8266 to Arduino
The pin configurations are:

This configuration used to control LED with the ESP8266.


5
2. Installing Libraries and Mobile App
We will use an app on your smartphone to control the LED on pin no.- 13 of the
Arduino for avoiding complexities for the time. First of all download and Install
the Arduino IDE from https://www.Arduino.cc/en/Main/Software. Now you need
to install a library on your Arduino IDE. Go to
https://github.com/blynkk/blynk-library/releases/latest and download the latest
release of the BLynk library in ZIP format. Install the library in the Arduino IDE
from Sketch | Include library |Add ZIP Library:

6
If you get an error like the following image, don’t worry, just unzip the zipped file
and copy all the contents of the libraries folder to the Arduino IDE library folder.
The library location is as follows:
• On Mac: Right-click on the Arduino app icon and click on the Show Package
Contents | Java | libraries
• On Windows: Go to Program Files or Program Files (x68) | Arduino
|Libraries
• On Linux: Go to User | Share |Arduino | Libraries.

Once you have installed the library and connected to the ESP8266 to the Arduino,
now is the time to download the Blynk mobile application. The application is
available on both App Store and Play Store. Install the application and finish the
registration process, if required.

7
You will follow the following page after the
Installation:

8
Refer the following steps:

Select New Project

LED Project

Choose Device: Arduino UNO

Connection Type: WiFi

Theme: DARK / LIGHT

Create Project
9
3. Get Authentication

⚫ When create a project, we will get prompt


that an authentication code, that sent to
our mail.

⚫ The authentication code also present in the


project setting of the Blynk application.

⚫ Swipe right ride of your screen to access


the Widget menu and select a Button
from there:

10
11
4. Write the Arduino Code

12
⚫ Verify and upload the code to the Arduino
and open Blynk app.
⚫ From the Blynk app, press the Button and
if everything is OK, the LED connected on
your Arduino should turn on.

Since you can now control an LED with your


smartphone, you can now control a motor
with your phone. For more about the Blynk
code and documentation, go to
www.blynk.cc. You can use tons of things
with your ESP8266 using Blynk.

13
Install APM Planner or Mission Planner:
▪ ArduPilot is the Flight Control Board.

▪ APM Planner is a software for configuring the drone.

▪ Download the APM Planner from


http://firmware.ardupilot.org/

▪ Use AMP Planner or Mission Planner with version 2.0

▪ After installation, open the APM Planner or Mission


Planner Interface.
14
APM Planner Version 2.0:
At the top left of APM Planner:

Flight data

Flight Plan

Initial Setup

Config / Tuning : Select a baud rate of 115, 200 for a


higher speed and Click on “Connect”.
Graphs
Donate
15
APM Planner Version 2.0:

16
APM Planner Version 2.0:
Installing ArduCopter:
The version may vary depending on the version of the ArduPilot control board.

17
Calibration:
a. Access Calibration:
Hit the calibrate button and set in which orientation
should place the drone.
Make sure the chosen orientation (above-left-right-down-
up-back) correctly because it is really important when
flying a drone.

b. Radio Calibration:
Connect the Radio transmitter with ArduPilot and click on
Radio Calibration.

18
Radio Calibration:

19
c. Flight Mode Calibration:
Choose any type

20
Failsafe Calibrtion:
My personal Preference is for the Failsafe configuration for the throttle
fail when returning to the land. Failsafe helps to protect the drone so as to
avoid crashes when it loses the connection from the transmitter. You may
choose the Return to Launch (RTL) option too:

21
Calibration:
⚫ Make sure all the propellers are moving.

⚫ Now we can throttle the motors gradually.

⚫ When (thrust > drone weight), the drone will start


hovering.

⚫ Bring the drone 2 meters away, then move the


Pitch and Roll of transmitter and control the
drone.
22
To stop the drone from flying

⚫ Remove the finger from the roll / pitch gimbal and


slowly decrease the throttle.
⚫ Gradually land the drone in ground.
⚫ When the drone almost on the ground, just push the
throttle gimbal to the button left and hold it until all the
propellers stop.

Extra Precautions

⚫ Switch off the transmitter.


⚫ Remove the battery.
23
Building a Follow Me Drone:
⚫ A Follow Me drone follows a device or an object; the
device can be your phone or a device with some sensors
that continuously communicate with the drone to get the
right position. If it follows an object, then there is some
machine learning involved with the system. Some drones
can do image processing and follow an object.

⚫ For example- If you train your drone to follow dogs, you


need to teach it how to detect an object and compare it with
dog and follow it, which is a little complicated.

⚫ Follow Me drones are like air dogs to me. Simply, they can
do some things such as taking photos or recording videos.
24
⚫ If your drone is capable of doing complex things like
face detecting, object targeting and so on then the
processing speed of the drone’s brain should be higher
than the communication speed between the RC
receiver and the drone.

25
Making a Follow Me Drone using ArduPilot:
1. Buy a USB dongle, which is a GPS receiver.
2. Official is – GlobalSat ND-100S USB GPS dongle.
(OR)
3. GPS-embedded Bluetooth module such as GlabalSat BT-368i
Bluetooth GPS receiver.
⚫ We need “telemetry” for setting up the modules with the ArduPilot
software.
Settings:
1. Take your drone to a suitable place for flying and connect it via
“MAVLink” using telemetry.
2. Connect your USB dongle or Bluetooth receiver to your laptop.

26
Making a Follow Me Drone using ArduPilot:

27
▪ Once connect the USB dongle to the Mission Planner
software, the drone will consider the dongle the “Fly to
Here” location all the time.

▪ Now, if we move our laptop, the drone will follow the


laptop.

28
Using a smartphone to enable the Follow Me Feature
of ArduPilot:

29
DroidPlanner 2 :
Download and Install DroidPlanner 2 Software.

30
2. Connect OTG cable/converter to Phone and connect
the USB telemetry, such as SiK Telemetry Radio to
the phone via OTG.

31
3. From the home menu, Select “Loiter” as
the flight mode (we can change it while
flying too).

32
4. Click the “Drone” icon at the bottom of the screen, the
drone is now a
“Follow Me Drone”

5. We can move with our phone then the drone follow the
phone.

6. Now, we can control the drone from the application.

7. We can see all the flight data on the screen and know the
drone’s condition.

Note: Enable the location of the phone before using the


DroidPlanner.
33
Using the Tower Application:
The Tower application is similar to the DroidPlanner 2
application, but has a few extra features such as camera control
and smart user interface:

34
Building Arduino- based Follow Me Drone:
Requirements:
1. Motors
2. ESCs
3. Battery
4. Propellers
5. Radio-controller
6. Arduino Nano
7. HC-05 Blutooth module
8. GPS
9. MPU6050 or GY-86 gyroscope
10. Some wires
35
Connections:
Now connections are simple-
1. Connect Motors to ESCs and ESCs to
Battery (use 4-way connector).

36
2. Connect the Radio to the Arduino Nano.

Arduino Pin Motor Pin

D7 Motor-1

D8 Motor-2

D9 Motor-3

D10 Motor-4

37
3. Include the library “PinChangeInt” in
Arduino library.

4. Upload the code to Arduino Nano.

5. Connect the GPS with corresponding pin.

38
GPS Tracker Using ESP8266:
Requirements:
1. NodeMCU – It has built-in ESP8266)
2. GPS receiver
3. Cables
4. Battery
5. Smart Phone (Blynk)

39
Connection:
1. NodeMCU with GPS Receiver

40
41
Configure the Real-time Location

1. V1 – Set the pin type Virtual for Lattitude.

2. V0 - Add the map from the widget menu and select pin type to be
Virtual

3. To see how many satellites

Select a display value or labeled value to the screen with Virtual pin
and V3 configuration.

4. Create an object for the TinyGPS: TinyGPSPlus mygps;

5. Define the pin v0 for the map: WidgetMap mymap(v0)

42
6. For communication, pass the TX and RX value to the
“SoftwareSerial”
SoftwareSerial test_GPS(RX, TX);

7. Declare the Blynk timer and the number of satellites:


BlynkTimer timer;
float noofsats;

8. Define the authentication and WiFi connection:

char auth[] = “ * * * * * * * *”; // send to your mail


char ssid[] = “ * * * * * * * *” // WiFi name
char pass[] = “ * * * * * * * * “ // WiFi password

43
9. Write the code in

void setup()
{
// Blynk Connection
// GPS checking
}

void loop()
{
// Display Latitude and Longitude
// Display No.of Satellite in Blynk
}

10. Upload the code to NodeMCU after connecting it to the computer.


44
Thank you

45

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy