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

My work with the Crazyflie is manifold. Primarily I developed an IPC based interface towards VVVV that wraps the entire Crazyflie software system. This lets my customer, Colorsound IXD, build large quadcopter projects lots more efficiently and with some ease of use. This article discusses another project focusing on a new communication interface between the quadcopters and the ground control station.

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

Compatibility with all other possible expansions had to be considered from the perspective of hardware design. The Crazyflie basically provides two UART interfaces (UART1 and UART2) which may be used with expansion decks. Taking into account the other expansions, UART2 was selected for communication with the ESP-32 and UART1 temporarily functions as an output for debug information to an RS232 terminal.

The ESP-32 features three hardware supported serial interfaces at 3.3V TTL level. UART0 is used to upload the firmware to the ESP-32 flash memory and UART2 acts as universal asynchronous transceiver interfacing the STM32 microprocessor on the Crazyflie. Baud rates 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 is interested in current position data, the GCS sends a request message to the Crazyflie and then receives a response message containing the position information. The software challenge 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