7 minutes read
How Do Drones Work?

How Do Drones Work?

In the last decade, we’ve seen an increase in the availability of -- and a decrease in the cost of -- many different technologies. One of the coolest and most exciting is the widespread availability of inexpensive unmanned aerial vehicles (UAVs) -- also known as drones. For just a few hundred dollars, you can purchase a drone that can take high-quality photos and videos while almost flying itself. And you can control the whole operation from your smartphone.

While they may look simple, drones actually require a fair bit of sophisticated software in order to fly easily. An array of sensors, cameras, motors and radios all need to work together so that the drone can be controlled from the ground and fly without crashing. In this article, we’ll look at some of the tech that makes drones work and the software that makes it possible.

Navigation, Positioning and Stability - The Keys to Smooth Drone Flight 

Many drones have features that allow them to fly a set pattern, to fly through predetermined locations known as waypoints, or to return home if asked to by the operator or if the battery runs low. All of these features require the drone to know exactly where it is at all times.

Most drones include satellite positioning systems like GPS or GLONASS. Once the drone locks on to the signal from several satellites, it is able to tell exactly where it is on earth, and remember things like its “home base” location. The drone can also be set to fly to specific locations, or even fly in a set pattern through a number of locations.

But GPS itself isn’t enough to keep the drone in the air. An array of other flight sensors and navigation systems work together to keep the drone in the air. The most important of these is the inertial measurement unit, or IMU.

The Drone’s Inertial Measurement Unit

The “brain” of the drone is its inertial measurement unit, or IMU. The IMU is a collection of sensors that allow the drone to navigate in 3D space. An IMU consists of gyroscopes, accelerometers, and sometimes magnetometers. The gyroscopes allow the IMU to detect changes in attitude, including roll, pitch, and yaw. The accelerometers detect changes in acceleration -- slowing down or speeding up -- in any direction. And the magnetometer, which is an electronic compass, can help the IMU determine which direction it’s pointed. This can help the IMU correct for errors that it accumulates throughout the flight.

The IMU is critical in allowing the drone’s software to control its flight characteristics. For example, a drone can be commanded to hover in one spot without moving. This isn’t simply a matter of keeping all of the motors spinning at the same speed. Wind, even a light breeze, means that the drone needs to continually adjust itself so that it hovers in the same spot. The IMU does that by detecting very small changes in position, and then feeding that to the flight controller. The controller can then adjust the motors so that the drone stays in the same position even during gusts of wind.

But the IMU won’t help the drone avoid trees, buildings and even other flying objects -- but there are other sensors that can do that.

New Drone Technologies: Obstacle Avoidance and AI

Some of the latest developments in drone technology involve the use of specialized sensors to automatically avoid obstacles. These sensors include cameras, infrared, ultrasonic and radar sensors. These sensors produce a large amount of data that needs to be processed in real-time and then acted upon in order for the obstacle avoidance to work.

To make this happen, some drones now have on-board artificial intelligence (AI) or machine learning capabilities. This allows them to “see” obstacles in real-time, like trees, power lines or buildings. Then the drone can take action, like flying a different route or alerting the operator to take evasive action. This makes modern drones even easier to fly, and brings them even closer to full autonomous flight.

Drone Communication and Imaging

By definition, unmanned aerial vehicles don’t have an operator on board. So they must be able to be controlled from the ground via radio link.

In the old days, model aircraft were controlled by simple single-channel radios. This allowed the controller to control the aircraft from a remote controller, the kind with joysticks and a long antenna sticking out of it. But today’s drones are much more sophisticated. Rather than controlling the aircraft directly, a drone pilot tells the aircraft what to do, and then the software decides what it needs to do in order to make that happen.

Modern drones also incorporate two-way communication. This allows the operator to receive telemetry from the drone. For example, the operator can see the drone’s altitude, its speed and its battery level, as well as any problems that the drone’s software might detect. This bidirectional communication makes for even smoother flights and fewer problems during flight.

How Do Drones Work?

Aerial Photography with Drones

One of the most popular uses for drones today is aerial photography. Drones can be fitted with high-quality cameras for recording video and still photos. The resulting images can be used for dramatic effect in movies, advertisements, websites, and lots of other places.

In order to capture smooth video, a gimbal mechanism is used to mount the camera. A gimbal is a sort of reverse gyroscope -- it can be moved independently of the motion of the drone’s body. This way, the images shot by the camera aren’t affected by the vibration of the drone’s motors or any sudden movements caused by wind or direction changes. The result is a perfectly smooth video shot from high in the air.

The gimbal needs feedback from the drone’s IMU in order to compensate for changes in the drone’s speed and direction. So real-time processing software handles moving the camera gimbal mount in response to any changes in motion. Additionally, the camera needs to send a video feed down to the ground so that the operator can see what the drone sees. This first-person view requires additional processing and radio bandwidth in order to work properly.

Drone Software Programming

As simple as they are to operate, drones require sophisticated, complex software in order to work properly. The software running on the drone itself, known as firmware, needs to operate in real-time to process all of the inputs from the different sensors and make adjustments to the drone’s flight.

Drones equipped with collision avoidance features require even more processing, so that they can identify obstacles and take the appropriate action to avoid them. In addition to the flight sensors and controls, the drone’s software also needs to handle real-time communication with the operator on the ground, as well as controls for the camera or other systems on the drone.

In order for all of this processing to happen as quickly as possible, drone firmware is often written in very low-level programming languages like C or C++. Unlike languages such as Python or Java, C and C++ don’t require another piece of software, called an interpreter, in order to run. While this makes programming in them more complicated, it means that these programs execute much faster, and can handle the real-time decisions required for drone control.

In addition to basic flight control, many drones now have advanced features such as obstacle avoidance and autonomous flight. To implement these features, some drones have on-board AI and machine learning capabilities. This allows the drones to make intelligent decisions about their flight patterns to avoid trees, buildings and other obstacles. In addition, they can be set to fly pre-set patterns without operator intervention. This makes today’s drones easier to fly than ever.

Since the drone is able to make some flying decisions itself, the software that controls it from the ground doesn’t necessarily need to be real-time. This allows for the use of smartphone apps that can control all aspects of the drone’s flight and display telemetry to the operator. These apps are written in standard programming languages like Java for Android and Swift for iOS.

Drones are fun to watch and even more exciting to fly. Now, next time you see a drone flying, you’ll know exactly what it’s doing and what kind of software it’s running.