The Bitcraze Crazyflie is a small, versatile quadcopter for research and education. An ecosystem of expansion decks, ground station clients and development tools is available for it. The project is completely open source and open hardware.

My work with the Crazyflie is varied. First and foremost, I developed an IPC-based interface to VVVV that wraps the entire Crazyflie software system. This lets my customer, Colorsound IXD, build large quadcopter projects far more efficiently and conveniently. This article discusses another project, which focuses on a new communication interface between the quadcopters and the ground control station.

This project is divided into two parts: a hardware component and a software component, which have to work together precisely. The Crazyflie quadcopter itself is built around the ARM STM32 microcontroller. The new communication interface presented here is implemented using the ESP-32, a low-cost, low-power microcontroller with integrated Wi-Fi and dual-mode Bluetooth modules. Its CPU is an Xtensa dual-core 32-bit LX6 microprocessor operating at 160 or 240 MHz and delivering up to 600 DMIPS.

From a hardware design perspective, compatibility with all other possible expansions had to be taken into account. The Crazyflie provides two UART interfaces (UART1 and UART2) that can be used by expansion decks. With the other expansions in mind, UART2 was selected for communication with the ESP-32, while UART1 temporarily serves as an output for debug information to an RS232 terminal.

The ESP-32 features three hardware-supported serial interfaces at 3.3 V TTL level. UART0 is used to upload the firmware to the ESP-32’s flash memory, and UART2 acts as a universal asynchronous receiver-transmitter interfacing with the STM32 microprocessor on the Crazyflie. Baud rates of up to 460800 baud have been tested successfully so far.

The communication protocol is primarily driven by the client, i.e. by the ground control station (GCS). For example, if the GCS needs the current position data, it sends a request message to the Crazyflie and receives a response message containing the position information. The challenge on the software side was to integrate the new TCP/IP-based communication interface into the existing ecosystem without affecting the existing radio modules based on the nRF-51 chipset.

Raw ESP-32 Deck Printed Circuit Board (PCB)

Image 1 of 4