Intelligent Autonomous Quadcopter

The main aim of this project is to make a drone which must be capable of detecting obstacles and protect itself from these obstacles by measuring a special distance. If obstacle is 5 meter away from it, so it must detect the distance of 5 meter in order to avoid itself from obstacle. The main aim of

2025-06-28 16:33:17 - Adil Khan

Project Title

Intelligent Autonomous Quadcopter

Project Area of Specialization RoboticsProject Summary

The main aim of this project is to make a drone which must be capable of detecting obstacles and protect itself from these obstacles by measuring a special distance. If obstacle is 5 meter away from it, so it must detect the distance of 5 meter in order to avoid itself from obstacle. The main aim of our drone is to safe people from so many accidents like if there is ignite a flame in any building, or there is a situation like the building is about to falling down and there is a need to check whether there is people in the building or not, so this drone can fly there autonomously and will detect persons, or if we want to check flooding reversely in villages, this drone would be helpful. The range of this drone is 1.8 kilometers. Basically the main purpose of our drone is to fly and capture video and pictures by facial recognition and send it to its remote station. It has a remote station of hazard office on which it transfer its video. We can run this drone by remote and autonomously or self-controlled too. For this purpose we will take a ready flight controller and connect it with raspberry pi. The basic purpose of this flight controller is that with raspberry pi there is LiDAR module (sensor) which works same but more good than ultrasonic sensor which detect anything then run the algorithm which is on raspberry pi and it tells Pixhawk (flight controller) whether there is an obstacle or not. If there is an obstacle, so how much distance the drone have to take to move upward, downward, backward, forward, left and right to avoid itself from obstacle. So the main purpose of this project is to avoid all the avoid types of accidents before they occurred so that we will not face much loss. This is an autonomous drone in which we have GPS and it can fly without remote.

Project Objectives

The main objective is to make a quadcopter drone which is capable to solve all the problems while flying and solve all sort of problems when find people in danger.

Our project will mainly focus on the following objectives:

  1. To detect whether there is an obstacle in its way or not, if there is an obstacle so avoid it as early as it reach close to it.
  2. To protect itself from an obstacle by measuring a special distance.
  3. To protect people when there is fire/ ignite a flame in any building by checking whether there is people in building or not. If there is people in the building this drone will capture the video and send it to its remote station.
  4. This quadcopter drone can fly autonomously in any building which is about to falling down and check whether there are people in the building or not.
  5. This drone would be helpful if we want to check flooding reversely in villages,
  6. The main objective is to is to avoid all the avoid types of accidents before they occurred so that we will not face much loss.

This quadcopter drone will allow us to explore and understand Aerodynamics that how this drone will move upward and downward, backward and forward, right and left on the sky as per situation. This project helps us to grow, understand, explore and educate others about this new drone not on the earth but the new horizon.

Project Implementation Method

Our Quadcopter is based on following methods.
When the whole process starts, our Raspberry pi initializes and facial detection process starts there is 2 methods for facial detection i.e. pretrained Caffee model and Open CV harscascade. We have used Open CV harscascade frontal face method. Using this method, the picture of detected person has been taken. 
When pi initializes, the LiDar initializes too. LiDar is capable of detecting obstacles. If there is an obstacle in its way LiDar avoid that and change its route. We had three options Ultrasonic sensor, Camera angling and LiDar sensor but we used LiDar sensor here  due to its best accuracy. 
2) After that if person detected so email will be triggered on run time and send to the remote station with actual location coordinates along with person name city and date time. If there is no face detected the plan will be finished and Drone will return to launch.

Connected illustration is show in the Block Digram and Flow of the final prodcut is shown is the Flow Chart diagram adn Activity Diagram. The important digarms of project is attached below:

1 Usecase Diagram:

Intelligent Autonomous Quadcopter _1639947813.jpeg

(Figure 1 Usecase Diagram)

2 Activity Diagram:

Intelligent Autonomous Quadcopter _1639947815.jpeg

(Figure 2 Activity Diagram)

3 Block Diagram:

2021-01-19_09:19:08pm_image-20210119211908-10.jpeg

(Figure 3 Block Diagram)

4 Flow Chart Diagram:

Intelligent Autonomous Quadcopter _1639947817.jpeg

(Figure 4 Flow Chart Diagram)

Benefits of the Project Technical Details of Final Deliverable

1    Preparing Environment

          First of all we‘d prepared an environment that is compatible to artificial intelligence, in our Raspberry Pi B we‘d installed an OS named “Raspberrian Strach with Desktop”, then we had installed SMTP Lib, GPSD Clients and OpenCV library.

2    Programmatic Implementation

2.1           Face Detection

In our artificial intelligent model, we imported libraries from OpenCV that is capable of detect faces in run time video. The inputs an image from real time video, detects a face through dark pixels, transform it to grayscale and then crop the area of detected face. The process is shown below:

Intelligent Autonomous Quadcopter _1639947818.png (Figure 1.1 Process)

2.2           Samples

          In our model when a face is detected by OpenCV library, the program captures the picture of face detected. In order to reduce response time (email generating and sending time) we also converted the captured image into a low resolution image using resizing by size technique it will result the most efficient results. When the face is detected the program captures an image and converts it into a resized image, this all process takes only a few seconds.

3    Location Specification

          We ‘d used Neo 6MV2 GPS compatible to Raspberry pi to get the current coordinates of detected person, and using same technique we obtains the real time latitude and longitude or preceding IP in order to get the exact location of that person. We also have checked whether the 2nd detected person is in the same area or not (15 meters radius), in order to prevent triggering email again and again in same area.

4    Generating Email

          As soon as the model detects the person, the classifier generates an automated email using “smtplib” to send the current location (latitude, longitude), name (label), picture and current date and time of the recognized person. The email will generate automatically after detected and capture (fewest seconds), in order to increase accuracy, and it will also triggers after the coordinates is changed by 15 meters. 

5    About LiDAR (Light Detecting and Ranging) Module Code:

          Our Benewake TFmini micro LiDAR module returns 9 encoded bytes of data which is shown below in table:

Byte1-2

Byte3

Byte4

Byte5

Byte6

Byte7

Byte8

Byte9

0x59

Dist_L

Dist_H

Strength_L

Strength_H

Reserved

Raw.Qual

CheckSum_L

Data Encoding Interpretation

Byte1

0x59, frame header, all frames are same.

Byte2

0x59, frame header, all frames are same.

Byte3

Dist-L distance value is a low 8-bit.

Byte4

Dist-H distance value is a high 8-bit.

Byte5

Strength_L is a low 8-bit.

Byte6

Strength_H is a high 8-bit.

Byte7

Reserved Bytes.

Byte8

Original signal quantity degree.

Byte9

Checksum parity bit is a low 8-bit.

In our code, we have used initial “4” bytes:

The code can be divided into three parts:

Byte1-2

0x59

Data Encoding Interpretation

Byte1

Byte2

Byte3

Byte4

Byte5

Byte6

Byte7

Byte8

Byte9

Final Deliverable of the Project HW/SW integrated systemCore Industry TransportationOther Industries Medical , Others Core Technology RoboticsOther Technologies Artificial Intelligence(AI)Sustainable Development Goals Good Health and Well-Being for People, Industry, Innovation and Infrastructure, Life on LandRequired Resources
Elapsed time in (days or weeks or month or quarter) since start of the project Milestone Deliverable
Month 1HardwareHardware Gathering, Testing, Setting things up.
Month 2Flight Controller Setting Flight Controller, Quadcopter Making and Fabrication, Soldering and Connections.
Month 3Test Flight with RC.Initial Calibration, Flight Modes setting (Return to Launch, Stabilize, Altitude Hold, Position Lock, Loiter), Test Flight
Month 4Setting Micro Controller (RPi)Connections, Operating System and Important Libraries, Camera Installation, Testing
Month 5Facial Detection and Transmission to Remote StationFacial Detection Algorithm, Learning Transmission Techniques, Email Generation, algorithm, Testing.
Month 6Location Specification Learning and Trying Web Scrapping Technique, Looking for suitable GPS for RPi, GPS Connections and Libraries installation for external GPS.
Month 7Location SpecificationTesting GPS via GUI, Algorithm for Finding Exact Coordinates of Detected Human, Writing algorithm for detecting human in the same radius of 15 meter. Testing
Month 8Integration of CodesIntegrating all the code together and triggering an email whenever the camera detects any person to a remote station. Email will consist of a picture of the detected person, location coordinates of the area (using GPS). date time city county (using Web Scraping Technique), testing
Month 9Obstacle Detection and Avoidance, Hardware IntegrationLearning and choosing about Obstacle Finding modules and Techniques (camera based angling, ultrasonic modules, LiDAR Module), choosing LiDAR, reading about LiDAR and and its connections and data streams, deciphering data stream, implementing on bread board, algorithm for Detecting obstacles in given range and testing LiDAR, hardware integration, connection between RPi and Pixhawk and Testing
Month 10Discovering the HorizonFinal algorithm for quadcopter obstacle avoidance, final algorithm for Planned Test Flight without RC (Autonomous Flight) , Testing, Project Documentation , Final Evaluation.
Month 11Unleashing the idea. Launching in Exhibits and Industry.

More Posts