Most hobby quadcopters fly on an off-the-shelf flight controller running Betaflight or INAV. Maker tynix5 went the hard way instead. The 5 inch quad, called No Fly Zone, flies on a flight controller PCB that the maker designed and hand-assembled, paired with a handheld remote built on a second custom PCB. All of the flight and remote firmware was written from scratch, and the full write-up, KiCad files and source are on GitHub.
The flight controller
The board is built around an STM32F446, chosen for its clock speed, hardware FPU for the quaternion maths, and plenty of SPI and timer peripherals. An LSM6DS3TR IMU and an LPS25HB barometer sit on SPI. The firmware fuses the IMU data with a Madgwick filter to estimate orientation, compares it with the attitude requested by the remote, and drives the four motors through a 4-in-1 ESC using DShot, the digital ESC protocol, generated with timers and DMA. An ADC watches battery voltage and the ESC current-sense pin.
The board went through three revisions. Revision 1.0 was split into an MCU board and a sensor board with a 6-axis IMU, magnetometer, barometer and GPS. The JST links between them proved unreliable, and the magnetometer picked up too much interference from the motors and traces. Revision 2.0 merged everything onto one board, dropped the magnetometer and GPS, improved the RF layout and changed the stackup to keep buck-converter and RF noise down.
The remote and the radio link
The remote runs an STM32L432 with an SSD1306 OLED, an encoder and a 1,100 mAh LiPo in a 3D-printed housing. Both ends talk over an nRF24L01. On the PCB the antenna area is surrounded by a ground plane with stitching vias about 6 mm apart, between a tenth and a twentieth of the 2.4 GHz wavelength. The quad also sends acknowledgement packets back with its state and a running-average battery reading.
Safety is handled in firmware: watchdogs, failsafe if sensor data goes stale or the radio link drops, shutdown on low battery, and an arm/disarm mode on the remote. The rest of the hardware is standard: a 225 mm frame, four 1,900 KV 2207.5 motors, a 60 A 4-in-1 ESC and a 4S 1,550 mAh pack. The maker notes that AI was used only for Python test scripts, not for the flight or remote firmware.
Our take
Writing your own flight stack is one of the best ways to really understand sensor fusion, PID control and RF layout, and this repo documents each step, including what went wrong in revision 1.0. The maker's own next steps are altitude hold with the barometer, an absolute heading source and more transmit power. For the building blocks, see our tutorials on the MPU6050 gyro sensor and on nRF24L01 wireless links.
Image credit: tynix5 / Reddit, cropped and resized.
About the author: Aswinth Raj is an electronics engineer and the editor of CircuitDigest, where he has published more than 150 hands-on projects and tutorials across Arduino, PIC, ESP32, Raspberry Pi and EV battery systems. He selects the stories on this page for what engineers and makers can actually learn or build from. Connect on LinkedIn
Add a comment
No account needed. Your comment appears once a moderator has reviewed it.