Unit-2 (Building Drones)
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.
3
The following image is an ESP8266 with its pin out:
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:
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:
LED Project
Create Project
9
3. Get Authentication
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.
13
Install APM Planner or Mission Planner:
▪ ArduPilot is the Flight Control Board.
Flight data
Flight Plan
Initial Setup
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.
Extra Precautions
⚫ 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.
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.
7. We can see all the flight data on the screen and know the
drone’s condition.
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.
D7 Motor-1
D8 Motor-2
D9 Motor-3
D10 Motor-4
37
3. Include the library “PinChangeInt” in
Arduino library.
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
2. V0 - Add the map from the widget menu and select pin type to be
Virtual
Select a display value or labeled value to the screen with Virtual pin
and V3 configuration.
42
6. For communication, pass the TX and RX value to the
“SoftwareSerial”
SoftwareSerial test_GPS(RX, TX);
43
9. Write the code in
void setup()
{
// Blynk Connection
// GPS checking
}
void loop()
{
// Display Latitude and Longitude
// Display No.of Satellite in Blynk
}
45