Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Building Smart Drones with ESP8266 and Arduino
Building Smart Drones with ESP8266 and Arduino

Building Smart Drones with ESP8266 and Arduino: Build exciting drones by leveraging the capabilities of Arduino and ESP8266

eBook
€13.98 €19.99
Paperback
€24.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Building Smart Drones with ESP8266 and Arduino

Things to Know Before You Build a Drone

Let me guess why you are reading this chapter—because you have some knowledge of Arduino and you are interested in building something awesome with it, which is a drone. Right? If yes, then this book is for you. Throughout this book, we will learn how to build a full-phase drone with the help of Arduino and other technologies. We will also build some prototype drones. If you don't have a basic idea about Arduino, I would recommend you read Learning C for Arduino before starting this book. In this book, we will learn how to build a drone from scratch and we will also modify the drone to serve our other purposes, such as Follow Me drones, mission-control drones, selfie drones, gliding drones, and racing drones. We will also learn how to maintain the drones and troubleshoot when needed.

In this chapter, we will cover the following topics:

  • Definition and usages of drones
  • Types of drones
  • How we can identify or differentiate drones
  • Introducing things needed to build a drone

If you feel enthusiastic about build your own drone, then come with me; let's start a journey together to build drones and have a lot of fun.

Drone

When you were a kid, did you have fun with paper planes? They were so much fun. So, what is a gliding drone? Well, before answering this, let me be clear that there are other types of drones, too. We will know all common types of drones soon, but before doing that, let's find out what a drone first. Drones are commonly known as Unnamed Aerial Vehicles (UAV). A UAV is a flying thing without a human pilot on it. Here, by thing we mean the aircraft. For drones, there is the Unnamed Aircraft System (UAS), which allows you to communicate with the physical drone and the controller on the ground. Drones are usually controlled by a human pilot, but they can also be autonomously controlled by the system integrated on the drone itself. So what the UAS does, is it communicates between the UAS and UAV. Simply, the system that communicates between the drone and the controller, which is done by the commands of a person from the ground control station, is known as the UAS. Drones are basically used for doing something where humans cannot go or carrying out a mission that is impossible for humans. Drones are used mainly by military men, scientific research, agriculture, surveillance, product delivery, aerial photography, recreations, traffic control, and of course, for terrorist attacks and smuggling drugs, which we will not be discussing in this book.

Types of drones

Drones can be categorized into the following six types based on their mission:

  • Combat: Combat drones are used for attacking in the high-risk missions. They are also known as Unnamed Combat Aerial Vehicles (UCAV). They carry missiles for the missions. Combat drones are much like planes. The following is a picture of a combat drone:
  • Logistics: Logistics drones are used for delivering goods or cargo. There are a number of famous companies, such as Amazon and Domino's, which deliver goods and pizzas via drones. It is easier to ship cargo with drones when there is a lot of traffic on the streets, or the route is not easy to drive. The following diagram shows a logistic drone:
  • Civil: Civil drones are for general usage, such as monitoring the agriculture fields, data collection, and aerial photography. The following picture is of an aerial photography drone:
  • Reconnaissance: These kinds of drones are also known as mission-control drones. A drone is assigned to do a task and it does it automatically, and usually returns to the base by itself, so they are used to get information from the enemy on the battlefield. These kinds of drones are supposed to be small and easy to hide. The following diagram is a reconnaissance drone for your reference, they may vary depending on the usage:
  • Target and decoy: These kinds of drones are like combat drones, but the difference is, the combat drone provides the attack capabilities for the high-risk mission and the target and decoy drones provide the ground and aerial gunnery with a target that simulates the missile or enemy aircrafts. You can look at the following figure to get an idea what a target and decoy drone looks like:
  • Research and development: These types of drones are used for collecting data from the air. For example, some drones are used for collecting weather data or for providing internet.

We can also classify drones by their wing types. There are three types of drones depending on their wings or flying mechanism:

  • Fixed wing: A fixed wing drone has a rigid wing. They look like airplanes. These types of drones have a very good battery life, as they use only one motor (or less than the multiwing). They can fly at a high altitude. They can carry more weight because they can float on air for the wings. There are also some disadvantages of fixed wing drones. They are expensive and require a good knowledge of aerodynamics. They break a lot and training is required to fly them. The launching of the drone is hard and the landing of these types of drones is difficult. The most important thing you should know about the fixed wing drones is they can only move forward. To change the directions to left or right, we need to create air pressure from the wing. We will build one fixed wing drone in this book. I hope you would like to fly one.
  • Single rotor: Single rotor drones are simply like helicopter. They are strong and the propeller is designed in a way that it helps to both hover and change directions. Remember, the single rotor drones can only hover vertically in the air. They are good with battery power as they consume less power than a multirotor. The payload capacity of a single rotor is good. However, they are difficult to fly. Their wing or the propeller can be dangerous if it loosens.
  • Multirotor: Multirotor drones are the most common among the drones. They are classified depending on the number of wings they have, such as tricopter (three propellers or rotors), quadcopter (four rotors), hexacopter (six rotors), and octocopter (eight rotors). The most common multirotor is the quadcopter. The multirotors are easy to control. They are good with payload delivery. They can take off and land vertically, almost anywhere. The flight is more stable than the single rotor and the fixed wing. One of the disadvantages of the multirotor is power consumption. As they have a number of motors, they consume a lot of power.

How can we differentiate between drones

We can also classify multirotor drones by their body structure. They can be known by the number of propellers used on them. Some drones have three propellers. They are called tricopters. If there are four propellers or rotors, they are called quadcopters. There are hexacopters and octacopters with six and eight propellers, respectively.

The gliding drones or fixed wings do not have a structure like copters. They look like the airplane. The shapes and sizes of the drones vary from purpose to purpose. If you need a spy drone, you will not make a big octacopter right? If you need to deliver a cargo to your friend's house, you can use a multirotor or a single rotor:

  • The Ready to Fly (RTF) drones do not require any assembly of the parts after buying. You can fly them just after buying them. RTF drones are great for the beginners. They require no complex setup or programming knowledge.
  • The Bind N Fly (BNF) drones do not come with a transmitter. This means, if you have bought a transmitter for your other drone, you can bind it with this type of drone and fly. The problem is that an old model of transmitter might not work with them and the BNF drones are for experienced flyers who have already flown drones with safety, and had the transmitter to test with other drones.
  • The Almost Ready to Fly (ARF) drones come with everything needed to fly, but a few parts might be missing that might keep it from flying properly. Just kidding! They come with all the parts, but you have to assemble them together before flying. You might lose one or two things while assembling. So be careful if you buy ARF drones. I always lose screws or spare small parts of the drones while I assemble. From the name of these types of drones, you can imagine why they are called by this name. The ARF drones require a lot of patience to assemble and bind to fly. Just be calm while assembling. Don't throw away the user manuals like me. You might end up with either pocket screws or lack of screws or parts.

Drone frames

Basically, the drone frame is the most important to build a drone. It helps to mount the motors, battery, and other parts on it. If you want to build a copter or a glide, you first need to decide what frame you will buy or build. For example, if you choose a tricopter, your drone will be smaller, the number of motors will be three, the number of propellers will be three, the number of ESC will be three, and so on. If you choose a quadcopter it will require four of each of the earlier specifications. For the gliding drone, the number of parts will vary. So, choosing a frame is important as the target of making the drone depends on the body of the drone. And a drone's body skeleton is the frame. In this book, we will build a quadcopter, as it is a medium size drone and we can implement all the things we want on it.

If you want to buy the drone frame, there are lots of online shops who sell ready-made drone frames. Make sure you read the specification before buying the frames. While buying frames, always double check the motor mount and the other screw mountings. If you cannot mount your motors firmly, you will lose the stability of the drone in the air. About the aerodynamics of the drone flying, we will discuss them soon. The following figure shows a number of drone frames. All of them are pre-made and do not need any calculation to assemble.

You will be given a manual which is really easy to follow:

You should also choose a material which light but strong. My personal choice is carbon fiber. But if you want to save some money, you can buy strong plastic frames. You can also buy acrylic frames. When you buy the frame, you will get all the parts of the frame unassembled, as mentioned earlier.

The following picture shows how the frame will be shipped to you, if you buy from the online shop:

If you want to build your own frame, you will require a lot of calculations and knowledge about the materials. You need to focus on how the assembling will be done, if you build a frame by yourself. The thrust of the motor after mounting on the frame is really important. It will tell you whether your drone will float in the air or fall down or become imbalanced. To calculate the thrust of the motor, you can follow the equation that we will speak about next.

If P is the payload capacity of your drone (how much your drone can lift. I'll explain how you can find it), M is the number of motors, W is the weight of the drone itself, and H is the hover throttle % (will be explained later). Then, our thrust of the motors T will be as follows:

The drone's payload capacity can be found with the following equation:

Remember to keep the frame balanced and the center of gravity remains in the hands of the drone.

Types of motors used for drones

There are a few types of motors that are use to build drones. But as the drone needs to be thrust in the air to float, we should use some powerful motors. The cheap, lightweight, small, and powerful motors used in drones are Brushless DC motors (BLDC). For small drones, we do not use BLDC motors, but instead use small DC gear motors.

Several types of speed controllers

You cannot control the speed of motors of your drone unless you use speed controllers. They enable you to control the voltage and current of the motors and hence control the speed, which is the first priority to move the drone one place to another, after floating in the air. You need to increase and decrease the speed of motor(s) to move the drone forward, backward, left, or right.

The connection between the controller board of the drone and ESC and the battery/power distribution board will be shown in Chapter 2, Assembling Your Drone:

Refer to the following circuit diagram:

Flight control board

This is one of the most important things to control the drone from the ground. There are a number of flight control boards on the market. Some of them are open source and some of them are not. The following list has the most famous and top-rated flight controllers:

  • KK 2.0
  • CC3D
  • Naze32
  • KISS
  • ArduPilot
  • Vector
  • 3DR Pixhawk
  • DJI Nava M
  • LUX flight controller
  • DJI A3

In this book, we will use ArduPilot, as it is cheap and it is best for copters. It also covers our book title. The following picture of some flight controllers.

The ArduPilot is one of the best flight controllers for drones because of the following reasons:

  • It has a free, open source autopilot framework supporting different types of drones
  • It supports hundreds of 3D waypoints
  • It allows you to do the autonomous take-off, landing, and camera control
  • It has 4 MB onboard data-logging memory
  • It has a built-in hardware fail-safe processor
  • It has full mission scripting
  • It is really simple to set up

The following picture is an ArduPilot:

We will discuss more about the ArduPilot later.

Radio transmitter and receiver

What the transmitter does is it sends a signal to the receiver. The receiver receives this signal and does according to the command from the transmitter. Since the drone floats in the sky, it needs to send signals to command the drone to move or do something. So we need the transmitter and receiver. There are lots of transmitters and receivers out there. The transmitter looks like a remote, which is controlled by the drone pilot and the receiver is connected to the flight controller. So, if the pilot gives commands from the transmitter to the drone, the drone receives it via the receiver and the flight controller processes the signal and does, as per the command of the pilot.

Battery

A drone is useless without a battery. All motors, flight controllers, radio, and processing require power. But it is not a wise decision to use the heavy battery to fly your drone because most of the energy will be spent on the thrust of a drone to fly. So, we need to choose light but powerful batteries. In a drone, we usually use lithium polymer batteries.

Choosing the right battery for the drone is one of the most critical things. Before choosing batteries for your drone, keep the following things in mind:

  • Battery size and weight
  • Battery discharge rate
  • Battery capacity
  • Battery voltage
  • Battery connectors

You can easily calculate the continuous current output of the battery with the help of the following formula. If the current is I, battery capacity is C, and discharge rate is D, then the instantaneous current draw is I = C X D. So always choose the highest capacity batteries, depending on the size and weight of the batteries. The LiPo, or Lithium Polymer battery has cells. Say you have three cells in your battery and each of them is 5,000 mAh and the discharge rating is 10 C.

So, the current draw is:

Here, we converted mAh to Ah by dividing by 1,000. The following figure shows LiPo batteries for a drone:

Propellers

When you choose propellers for your drone, choose the lightest but strongest propellers. You also need to keep in mind that the propellers should be balanced on both sides. Most drone flight failure are due to a fault in the propellers. So choose carefully. Always choose the right size propellers. Follow the motor manuals to choose which size suits best.

The following figure shows different types of propellers:

Battery adapters/chargers

Battery chargers are required to recharge your LiPo batteries. There are lots of LiPo chargers on the market. Always buy according to the manual of your battery. My suggestion is to buy a balance charger, which allows your battery to be charged with balance for all the cells.

Connectors

Connectors are the most important things for the power and other parts of the drone. If the connectors lose your drone, it might meet with an accident. So, buy connectors with special care according to the drone's power distribution system. You need to solder connectors properly with the batteries, ESCs, and other parts of the drone.

You need to buy bullet connectors, XT60, or T-plug connectors and use them where they suit:

Some modules to make the drone smarter

There are other modules to make the drone even smarter such as GPS, Wi-Fi module (for example, ESP8266), battery checkers, and range booster antennae, and so on.

Power distribution board

The power distribution board of the drone allows the components of the drone to get a proper current and draw a perfect voltage. We will have four ESCs; we can buy a power distribution board to deliver the proper current to all the ESCs. The following picture is a power distribution board of a drone:

Summary

In this first chapter, we have learned what sort of things we will need to build a drone. We have learned a few tweaks for choosing batteries and frames. If you want to build your own drone, I hope you buy them before going to Chapter 2, Assembling Your Drone, because from this chapter onward, we will start assembling and flying our drone. Well, the full parts list will be given, so that you can buy the equipment in the proper quantities. So let's get started with Chapter 2, Assembling Your Drone.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Learn to create a fully functional Drone with Arduino and ESP8266 and their modified versions of hardware.
  • Enhance your drone's functionalities by implementing smart features.
  • A project-based guide that will get you developing next-level drones to help you monitor a particular area with mobile-like devices.

Description

With the use of drones, DIY projects have taken off. Programmers are rapidly moving from traditional application programming to developing exciting multi-utility projects. This book will teach you to build industry-level drones with Arduino and ESP8266 and their modified versions of hardware. With this book, you will explore techniques for leveraging the tiny WiFi chip to enhance your drone and control it over a mobile phone. This book will start with teaching you how to solve problems while building your own WiFi controlled Arduino based drone. You will also learn how to build a Quadcopter and a mission critical drone. Moving on you will learn how to build a prototype drone that will be given a mission to complete which it will do it itself. You will also learn to build various exciting projects such as gliding and racing drones. By the end of this book you will learn how to maintain and troubleshoot your drone. By the end of this book, you will have learned to build drones using ESP8266 and Arduino and leverage their functionalities to the fullest.

Who is this book for?

If you are a programmer or a DIY enthusiast and keen to create a fully functional drone with Arduino and ESP8266, then this book is for you. Basic skills in electronics and programming would be beneficial. This book is not for the beginners as it includes lots of ideas not detailed how you can do that. If you are a beginner, then you might get lost here. The prerequisites of the book include a good knowledge of Arduino, electronics, programming in C or C++ and lots of interest in creating things out of nothing.

What you will learn

  • Includes a number of projects that utilize different ESP8266 and Arduino capabilities, while interfacing with external hardware
  • Covers electrical engineering and programming concepts, interfacing with the World through analog and digital sensors, communicating with a computer and other devices, and internet connectivity
  • Control and fly your quadcopter, taking into account weather conditions
  • Build a drone that can follow the user wherever he/she goes
  • Build a mission-control drone and learn how to use it effectively
  • Maintain your vehicle as much as possible and repair it whenever required

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Feb 27, 2018
Length: 212 pages
Edition : 1st
Language : English
ISBN-13 : 9781788476928
Category :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Feb 27, 2018
Length: 212 pages
Edition : 1st
Language : English
ISBN-13 : 9781788476928
Category :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 98.97
Mastering Internet of Things
€36.99
Building Smart Drones with ESP8266 and Arduino
€24.99
Internet of Things for Architects
€36.99
Total 98.97 Stars icon
Banner background image

Table of Contents

10 Chapters
Things to Know Before You Build a Drone Chevron down icon Chevron up icon
Assembling Your Drone Chevron down icon Chevron up icon
Preparing Your Drone for Flying Chevron down icon Chevron up icon
Building a Follow Me Drone Chevron down icon Chevron up icon
Building a Mission Control Drone Chevron down icon Chevron up icon
Building a Drone to Take Selfies and Record Videos Chevron down icon Chevron up icon
Building Prototype Drones – Gliding Drones Chevron down icon Chevron up icon
Building Prototype Drones – Racing Drones Chevron down icon Chevron up icon
Maintaining and Troubleshooting Your Drone Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.1
(8 Ratings)
5 star 62.5%
4 star 12.5%
3 star 12.5%
2 star 0%
1 star 12.5%
Filter icon Filter
Top Reviews

Filter reviews by




Martin J. Jul 28, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Great book for DIY smart drones. The books provide a lot of information and advices that could perfectly fit with different projects, even if it focus in on way to make it.
Amazon Verified review Amazon
Jinu Jogy May 15, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
It's really worth what I spent. It gives the basic ideas about what a drone is and to how to build a drone. Even beginners can easily understand the contents in the book. I would suggest people interested in drones to purchase this book
Amazon Verified review Amazon
Towaha Apr 09, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
What I like in that book is learning new technologies and using it for future projects. It can be for drones or anything. But the thing is you can't make a project successful unless you know what technology you should use for that. The book is full of new things and grew my interest building a custom drone. I would definitely test all the projects and make a drone.
Amazon Verified review Amazon
Timmy Nov 25, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Book is a helpful guide.
Amazon Verified review Amazon
Arslan Mar 20, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
well written and easy to understand
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.