Programming an Embedded Quadcopter Flight Controller

Reading Input from Remote Control

Any multirotor, drone, airplane, or vehicle needs directions in order to know where to go. This may seem like an obvious aspect of the device’s functionality, but it’s a very important one. These directions don’t necessarily need to come from a remote, they could be programmed directly into the quadcopter or sent from a computer depending on the purpose of the device.

For the sake of simplicity, I decided to start this project using a remote as input and eventually work my way up to bigger and better things once the quadcopter was functioning overall.

Most RC transmitters communicate by sending out electrical pulses of different durations that can be received and interpreted as a sequence of numbers which correspond to the position to the remote’s switches and gimbals. This information can used by the quadcopter to determine where it needs to go.

It’s important to understand how this information will be used in order to understand how signals from the remote should be interpreted. 

The data from both the sensors and the remote is used in a type of algorithm known as a PID controller. In this type of program, the computer compares the current position of the device to the input that is received from the remote.

Given that the sensor data gathered by the quadcopter is interpreted as an angle of orientation, the commands that the device receives from the piloting system must tell the device the angle (or change in angle) that it should move to. This angle will dictate the direction and speed of the device’s movement by altering the quadcopter’s angle of thrust.