Imagine a drone that can maintain perfectly stable hovering even in windy conditions—correcting its position in real-time without pilot intervention. That's exactly what Matthew Poff set out to create with his FPGA Flight Controller with Sensor Fusion project for the AMD Open Hardware Competition.
As a recent Computer Engineering graduate from the University of Kentucky, Matthew combined his love of drones with FPGA development to tackle a real-world problem: how to keep drones stable for imaging and flight operations in harsh weather conditions.
The Challenge: Create a flight controller that gathers gyroscopic data from an inertial measurement unit and generates real-time PWM outputs to motors, automatically correcting the drone's orientation to maintain level flight.
The Solution: A custom Verilog-based flight controller on the Zybo 7020 FPGA board that processes 9-axis sensor data and calculates corrective motor commands in real-time.
Project Timeline: 5 months of solo development
Drone pilots and operators face a persistent challenge: maintaining stable hovering positions during imaging operations or flights in rough weather. Wind gusts and turbulence can cause drones to drift or tilt, compromising image quality and flight safety.
Traditional flight controllers exist, but Matthew wanted to explore FPGA-based solutions for their potential speed advantages and real-time processing capabilities. The goal was to create a system where a sensor could be rotated or positioned anywhere on the gyroscopic Y-axis, causing the motors to automatically adjust their speed to return the drone to straight and level flight.
System Architecture
Matthew's flight controller operates through a carefully orchestrated sequence:
Hardware Setup
Communication Protocols
Two critical communication channels enable the system:
The SPI Communication Hurdle
"The biggest challenge was definitely trying to set up the SPI communication used between the sensor and the FPGA board and setting up the UART between the board and PuTTY," Matthew explains.
Getting the communication protocols working required careful attention to timing, data formatting, and establishing proper instantiations between modules. These inter-module connections proved particularly tricky during initial testing phases.
Hardware Selection Issues
Another early setback came from component selection. Matthew discovered issues with his initial sensor purchase due to missing critical information in the specifications. This taught him a valuable lesson: "Do some further investigating into all parts before you buy them."
Indoor testing demonstrated the system's core functionality:
While indoor testing conditions limited the magnitude of results, the proof of concept clearly demonstrated the flight controller's ability to detect orientation changes and generate appropriate corrective responses.
Matthew implemented the entire system in Verilog, creating a multi-nested code structure that handled:
The Red Pitaya STEMlab 125-14 played a crucial supporting role, providing all necessary lab instruments in a compact, network-accessible package that could be monitored from his workstation.
Looking back on the five-month development process, Matthew identified several key insights:
What He'd Do Differently: "I would have likely done SystemVerilog instead next time, because it is more sophisticated and would lead to far less redundancies and less timing errors."
Advice for Other Students:
This project lays the groundwork for several potential enhancements:
Matthew's FPGA Flight Controller demonstrates how FPGA technology can address real-world challenges in drone operations. By combining sensor fusion with real-time FPGA processing, he created a system capable of autonomous flight stabilization—a critical capability for professional drone applications from aerial photography to search and rescue operations.
The project showcases the practical application of digital design concepts: communication protocols, state machines, PWM generation, and real-time control systems. For students interested in embedded systems, FPGAs, or drone technology, this project offers valuable insights into the challenges and rewards of hardware-software integration.
Project Documentation: