System Setup
The ultimate embedded system would ideally be implemented in terms of one chip (a SoC, system on chip) which would easily fit within a drone’s limited payload budget. Instead, our prototype ES will be implemented on a custom flight controller board (PCB) holding various chips (processor, sensors, etc.), which provides a versatile experimentation platform for embedded system development. The system setup is shown in Figure 1. The ES receives its commands via a so-called PC link from a so-called ground station, which comprises a PC (laptop) and a joystick. The PC link can be operated in (1) tethered, and (2) wireless mode. Although wireless mode is the ultimate project goal, tethered flight will be most extensively used. In this mode the drone is connected to the ground system through a USB cable providing low-latency and high-bandwidth communication. The motors are powered by a LiPo battery carried by the drone, whose charging state needs to be checked at all times as operating these batteries at a too low voltage ruins them instantly. Charging the batteries takes about an hour, and provides for 15 minutes or more of continuous flight. More information on the Quadrupel drone can be found in other places on this website.
Rather than resorting to expensive sensors, electronics, FPGAs, etc., we explicitly choose a low-cost approach, which opens up a real possibility for students inspired by this course to continue working with drones and/or ES on a relatively low budget; the price tag for a Quadrupel drone is around €250. Hobby model drones are relatively low-cost due to their simplicity. As the rotors do not feature a swash plate there is no rotor pitch control. Consequently, rotor thrust must be controlled through varying rotor RPM (revolutions per minute).
The four rotors control vertical lift, roll, pitch, and yaw, respectively, by varying their individual rotor RPM (see Theory of Operation). The accelerometer and gyro sensors required to derive drone attitude (which is the minimal information for a simple autopilot application) are also low cost. By using a standard microcontroller (with integrated Bluetooth support), the Quadrupel drone can be simply programmed in Rust with an open-source compiler (rustc, though used through cargo), avoiding the need for an expensive toolchain.
The PC acts as a development and upload platform for the drone. The PC is also used as user interface / ground station, in which capacity it reads joystick and keyboard commands, transmits commands to the ES, receives telemetry data from the ES, while visualizing and/or storing the data on file for off-line inspection. The PC and the drone communicate with each other by means of a RS232 interface (both in tethered and wireless mode).
Of course, the low-cost approach is not without consequences. Using low-cost sensors introduces larger measurement errors (drift, disturbance from frame vibrations) which degrades computed attitude accuracy and control performance. Using a low-cost microcontroller reduces the performance of the designs; the selected ARM Cortex M0 CPU, for example, runs at 14 MIPS and lacks floating-point arithmetic. Nevertheless, experiments have shown that the low-cost setup is more than capable to perform drone control, and provides an excellent opportunity for students to get fully acquainted with embedded systems programming in a real and challenging application context, where dealing with limited-performance components is fact of life.