Skip to content

Repository files navigation

Merlyn435 Flight Stack

Introduction

This is my custom Merlyn435 Flight Stack! This project was made as a successor to my previous Merlyn411 flight controller due to several limitations. It lacked in its processing power and free UART ports. Its mounting pattern was also unconventional at 25mm, making its mounting incompatible with any ESCs on the market. By upgrading to the AT32F435@288MHz, the new Merlyn435 easily handles 8k8 PID loop and advanced autonomous flights with 3 spare UART ports.

The Merlyn435 also upgrades the IMU from the MPU6500 to the LSM6DSK320X, which provides significantly better vibration noise rejection at 3.8  bsp; mdps / Hz compared to 10  bsp; mdps / Hz . This results in cooler motors and more stable flights with fewer gyro filters, preventing issues such as mid throttle oscillation and flyaways.

The Merlyn435 flight controller is designed for a wide battery voltage ranging from 2 to 6 cells. This flight controller can also be mounted in various sizes of drones from 2" to as big as it can get.

It is a 3 in 1 flight controller offers features such as an integrated 2.4GHz ExpressLRS receiver and an OSD to overlay telemetry directly in the video feed. Furthermore, it has 16MB of flash memory for blackbox logging to assist in flight tuning.

The MerlynESC is a 4 in 1 ESC which runs on Bluejay firmware and also operates from 2 to 6s battery voltages. Its maximum continuous current is 40A per motor and peaks up to 55A for a maximum duration of 10 seconds.

image image image image image

Feature Merlyn435 Merlyn411
MCU AT32F435CGU7 @ 288MHz STM32F411CEU6 @ 100MHz
MCU Flash Size 1024kB 512kB
UART Interfaces 5 Hardware UART (2 internal, 3 free) 2 Hardware UART + 1 SoftSerial (1 internal, 1 softserial, 1 free)
IMU LSM6DSK320X (SPI) MPU6500 (SPI)
Barometer BMP388 (I2C) None
OSD AT7456E (SPI) AT7456E (SPI)
Blackbox Flash 16MB (SPI) 16MB (SPI)
Integrated Receiver Serial ExpressLRS 2.4GHz Serial ExpressLRS 2.4GHz
Mounting Size M2 20x20mm M2 25.5x25.5mm
BEC 5V 2A @ 1.1MHz Synchronous 5V 2A @ 150kHz Asynchronous
ESC Connection 8 pin JST-SH (Betaflight standard) Direct solder pads

Hardware Specifications

Merlyn435

  • MCU: AT32F435CGU7
  • IMU: LSM6DSK320X @ SPI1
  • Barometer: BMP388 @ 0x76
  • OSD: AT7456E @ SPI2
  • Blackbox: W25Q128JV 16MB Flash @ SPI2
  • Receiver: Serial ExpressLRS (ESP8285 + SX1281) @ UART2
  • Voltage range: 2-6s LiPo / Li-ion / LiHV
  • Power Supply: LMR51420YDDCR buck converter + SPX3819M5-L-3-3 LDO
  • Mounting: M2 20x20mm

MerlynESC

  • MCU: EFM8BB21F16G
  • MOSFET: JMSL0302AU
  • Gate Driver: EG6288
  • Max Current: 145A Peak / 40A Continuous @ 1.2mΩ
  • Voltage range: 2-6s LiPo / Li-ion / LiHV
  • Power Supply: HT75C0-1 12V LDO + HT7533-1 3.3V LDO
  • Mounting: M2 20x20mm

Pinout

Header Pin name AT32 Pin Description
ESC (1)BAT+ - Battery Positive Input from ESC
(2)GND - Ground
(3)NC - No Connection
(4)CURR PA1 Current Sense Input
(5)M1 PB6 Motor 1 Signal Output
(6)M2 PB7 Motor 2 Signal Output
(7)M3 PB0 Motor 3 Signal Output
(8)M4 PB1 Motor 4 Signal Output
GPS C PH2 I2C SCL (Internal BMP388 & External Magnetometer)ter)
D PH3 I2C SDA (Internal BMP388 & External Magnetometer)ter)
T PB4 UART7 TX
R PB3 UART7 RX
G - Ground
5 - 5V Power Output
URT5 T PB9 UART5 TX
R PB8 UART5 RX
G - Ground
5 - 5V Power Output
CAM I - Analog Video Input
G - Ground
5 - 5V Power Output
URT3 5 - 5V Power Output
G - Ground
R PB11 UART3 RX
T PB10 UART3 TX
VTX T PA9 UART1 TX (IRC Tramp / SmartAudio)
O - Analog Video Output (OSD Overlay)
G - Ground
B+ - Battery Output for VTX
BZ - PC15 Beeper MOSFET Pin
+ - 5V Power Output
POWER 3 - 3.3V Power Input/Output
G - Ground
5 - 5V Power Input/Output
Test Points RX PA2 UART2 TX (ExpressLRS RX)
TX PA3 UART2 RX (ExpressLRS TX)
D PA13 SWDIO (Debug & Flash)ash)
C PA14 SWCLK (Debug & Flash)ash)
R NRST NRST (Debug & Flash)ash)
B BOOT0 BOOT0 (Debug & Flash)ash)
Jumpers BOOT ESP8285 GPIO0 Bridge to enter ExpressLRS bootloader mode
RST ESP8285 CHIP_EN Bridge to disable internal ExpressLRS receiver

Hardware Overview

Merlyn435

image

MerlynESC

image


Flight Controller Firmware

Because the Merlyn435 is a custom hardware layout with no existing Betaflight targets, you must compile Betaflight using the custom target definitions in /firmware/source/betaflight or use the pre compiled firmware of your preferred Betaflight version in /firmware/binaries

Important

The LSM6DSK320X was officially added in v2026.6. The same Betaflight configuration can be used to compile your binary for both 2025.12 and 2026.6 without any issues. However, 2025.12 does not support or detect the LSM6DSK320X, so the LSM6DSK320X IMU will only function when running 2026.6 or later.

How to build the firmware (Betaflight)

  1. Clone the betaflight repository using any UNIX terminal (use MSYS2 MINGW64 on Windows) and enter the directory
  2. Enter make configs (install any required GCC toolchain if asked)
  3. Create a directory in betaflight/src/config/configs named MERLYN435 and paste config.h in the new directory
  • For v2026.6 and later, create a directory in configs named "ANSN" before creating the MERLYN435 directory inside "ANSN"
  1. Enter make MERLYN435 and the .hex file should appear in betaflight/obj

How to build the firmware (iNav)

  1. Clone the iNav repository using any UNIX terminal (Building iNav is not supported on Windows) and enter the directory
  2. Switch to the latest iNav stable release. E.g. git checkout 9.1.0
  3. Create two directories. One named build in the root directory and another named MERLYN435 in /src/main/target
  4. Copy CMakeLists.txt, target.c and target.h into the MERLYN435 directory from /firmware/source/inav
  5. Enter the build directory
  6. Enter cmake .. (install any required GCC toolchain if asked)
  7. Enter make MERLYN435 and the .hex file should appear in /build

Flight Controller Flashing

  1. Via USB DFU Mode (Recommended): Short the SWD B test point to 3.3v and plug in the USB C cable. Open Betaflight Configurator (applicable for iNav), select your compiled local .hex file, and click Flash Firmware.
  2. Via SWD: If the bootloader is corrupted, connect an ST Link programmer to the B, D and C test points (R is optional) and flash the compiled binary with STM32CubeProgrammer.

ExpressLRS Flashing

The internal ESP8285 ExpressLRS receiver is wired to the AT32 via UART2. It uses the BETAFPV 2.4GHz Lite RX firmware target. The firmware binaries can be obtained from the ELRS site or from this repository in /firmware/binaries. There are two way to flash the receiver:

Method 1: Betaflight Passthrough

Note that Betaflight must be installed and configured before passthrough works.

  1. Bridge the BOOT pad

  1. Connect the FC via USB
  2. Open the ExpressLRS Configurator web flasher or app
  3. Select Receiver
  4. Select your preferred firmware version and the BETAFPV 2.4GHz Lite RX target and press next
  5. [OPTIONAL] Enter your bind phrase
  6. Select the Betaflight Passthrough flashing method, press next and follow the steps

Method 2: Manual Flashing

If the ESP8285 is bricked or passthrough fails, you can flash it directly using an FTDI adapter or another ESP8285/ESP8286/ESP32 or even an Arduino. Bridge R to GND as well as the BOOT jumper and connect the FTDI TX to RX and FTDI RX to TX

ESC Flashing

The MerlynESC is a 4 in 1 ESC that runs Bluejay firmware target A, MCU type H, 30x20.4ns deadtime and 48KHz PWM frequency. The firmware files can be found in /firmware/binaries or the official Bluejay repository. You can flash the EFM8BB21 chips using the C2 programming pads with a makeshift arduino programmer.


Drone Assembly

image

While this project is mainly focused on the Merlyn435 + MerlynESC flight stack, I also designed a high performance 3 inch freestyle FPV drone. If you want to recreate the full build, below is the component breakdown:

Component List

  • Frame: RATE S30 Pro carbon fiber frame
  • Motors: RATE 1505 4300KV
  • Propellers: HQProp 3x3x3
  • Camera: Caddx Ratel 2 analog camera
  • VTX: Cyclone 1W analog video transmitter
  • GPS: RATE M10 GPS module
  • Battery: GNB 4S 850mAh 120C LiHV
  • Fasteners (If using CF frame): Included with frame kit
  • Fasteners (If using 3d printed frame):
    • 6x M3 20mm Female to Female Brass Standoffs
    • 12x M3 6mm Screws
    • 4x M2 Nuts
    • 4x M2 20mm Screws
    • 8x M2 10mm Screws
    • 16x M2 6mm Screws
    • 4x M2 6mm Screws
    • 8x M2 6mm Self Tapping Screws

Why 3D Printing the Frame is Not Recommended

I advise against 3D printing your frame. On my previous build, a 100 percent infill PETG frame shattered from a very light fall. More importantly, 3D printed frames flex and resonate which causes excessive gyro noise and leads to deteriorated flight performance.

crash.mp4

Assembly Instructions

The Merlyn435 and ESC uses standard 20x20mm mounting hole distance.

Stack Mounting

  1. Place 4x M2 Nuts into the recesses in the bottom frame plate.

  1. Push rubber grommets into the flight controller and ESC mounting holes.

  1. Push 4x M2 20mm screws through the adapter plate, through the rubber grommet, and through the bottom plate into the M2 nuts..

VTX Mounting

The VTX mounts to the rear of the frame.

  1. Place 4x M2 Nuts into the recesses in the bottom frame plate.

  1. Push rubber grommets into the VTX mounting holes.

  1. Push 4x M2 10mm screws through rubber grommets, down through the bottom plate, and into the M2 nuts.

Motor Mounting

  1. Mount the four 1505 4300KV motors to the arms using 16x M2 6mm screws (4 per motor). Ensure the screws do not touch the motor windings inside the bell.

  1. Mount the HQPROP 3x3x3 propellers. Pay attention to motor rotation directions (depending on your betaflight configuration, it could either be prop in or prop out). Fasten each prop with 2x M2 6mm screws.

Remaining Components

  1. Mount the analog FPV camera to the cage using 2x M2 6mm screws.

  1. Mount the camera cage to the bottom frame using 2x M2 6mm Self Tapping screws.

  1. Mount the 6x M3 20mm Female to Female Brass Standoffs and secure with 6x M3 6mm screws to the bottom plate.

  1. Press fit the antenna holder to the brass standoffs, then insert the antenna and connect the antenna to the VTX.

  1. Press fit the GPS module into the bracket.

  1. Mount the top plate and secure with 6x M3 6mm screws.

  1. Mount the GPS module and bracket underneath the top plate and secure with 4x M2 6mm Self Tapping screws.

  1. Insert 2x M2 6mm Self Tapping screws to secure the top plate to the camera cage.


Bill of Material

Note: The prices in USD are converted as of 22 August 2026 and may fluctuate. Promo codes will be applied before checkout to bring the costs down. And yes, the costs of separate components are cheaper than JLCPCB assembly.

Category Item Name Description Link Vendor Quantity Total Price (USD)
Flight Controller TAXM8M4RDBCCT2T 8 MHz crystal link LCSC 5 0.73
Flight Controller 7D027000I01 27 MHz crystal link LCSC 5 0.50
Flight Controller XL7EL89CMI-111YLC-26M 26 MHz crystal link LCSC 5 0.44
Flight Controller XC21M4-52.000-F10NNHPL 52 MHz crystal link LCSC 5 0.68
Flight Controller TYPE-C 16P QTWT USB C Connector SMT link LCSC 10 0.75
Flight Controller LMR51420YDDCR Buck converter link LCSC 2 1.96
Flight Controller AT7456E Video overlay OSD link LCSC 2 (Two because there's a deal on LCSC that lets me get both for free) 7.49
Flight Controller SPX3819M5-L-3-3/TR 3.3v LDO regulator link LCSC 10 2.19
Flight Controller APH0420T4R7M 4.7uH inductor link LCSC 5 0.45
Flight Controller USBLC6-2SC6 USB ESD protection link LCSC 5 0.92
Flight Controller BWU.FL-IPEX1 U.FL connector link LCSC 10 0.42
Flight Controller 0402WGF1202TCE 12k 0402 resistor link LCSC 100 0.69
Flight Controller 0402WGF1501TCE 1.5k 0402 resistor link LCSC 100 0.50
Flight Controller+ESC CL10A106MA8NRNC 10uF 0603 capacitor link LCSC 20 1.60
Flight Controller 1206B475K500NT 4.7uF 1206 capacitor link LCSC 10 2.72
Flight Controller W25Q128JVSIQ 16MB flash chip link LCSC 1 2.62
Flight Controller HC-1.0-8PWT JST SH 8p connector link LCSC 5 0.67
Flight Controller LSM6DSK320XTR LSM6 series IMU link LCSC 1 9.18
Flight Controller PCB PCB - JLCPCB 1 7.00
Flight Controller Partial PCB Assembly Partial PCB Assembly - JLCPCB 1 47.91
ESC GRM21BR61H106KE43L 10uF 0805 capacitor link LCSC 5 1.25
ESC CL31A106KBHNNNE 10uF 1206 capacitor link LCSC 20 5.63
ESC CL05B104KB54PNC 0.1uF 0402 capacitor link LCSC 100 0.93
ESC CL05A105KA5NQNC 1uF 0402 capacitor link LCSC 50 0.61
ESC 1SS400CMT2R SOD923 diode link LCSC 40 1.02
ESC JMSL0302AU N channel MOSFET link LCSC 25 7.07
ESC 0402WGF1002TCE 10k 0402 resistor link LCSC 100 0.19
ESC 0402WGF4701TCE 4.7k 0402 resistor link LCSC 100 0.50
ESC 0402WGF1001TCE 1k 0402 resistor link LCSC 100 0.67
ESC 0402WGF100JTCE 10R 0402 resistor link LCSC 100 0.58
ESC HoYLR2512E-3W-0.5mR-1% 0.5mR 2512 shunt resistor link LCSC 10 0.60
ESC 0402WGF3902TCE 39k 0402 resistor link LCSC 100 0.69
ESC HT75C0-1 12v LDO regulator link LCSC 5 0.99
ESC HT7533-1 3.3v LDO regulator link LCSC 5 0.71
ESC EFM8BB21F16G-C-QFN20R ESC MCU link LCSC 5 6.33
ESC EG6288 Gate driver link LCSC 10 3.06
ESC INA139NA/3K Current sensor link LCSC 2 1.12
ESC PCB PCB - JLCPCB 1 2.00
Flight Controller + ESC Shipping EPOST shipping - JLCPCB 1 6.49
Flight Controller + ESC Shipping LCSC - LCSC 1 4.92
Drone Parts RATE 1505 4300kv motor Motors link TaoBao 4 28.75
Drone Parts RATE S30 Pro frame Carbon fiber frame link TaoBao 1 23.06
Drone Parts RATE analog antenna Right hand circular polarized 5.8GHz antenna link TaoBao 1 5.80
Drone Parts RATE 90mm ELRS antenna Linear polarized dipole 2.4GHz antenna link TaoBao 1 0.95
Drone Parts RATE beeper/buzzer Active piezo buzzer link TaoBao 1 0.64
Drone Parts HQPROP T3x3x3 2 Pairs 3 inch propeller link TaoBao 1 1.88
Drone Parts RATE XT30 + Cable Connector and cable link TaoBao 1 0.64
Drone Parts RATE Rubber Grommets 10pcs soft mounting rubber grommet link TaoBao 1 0.48
Drone Parts RATE M10 GPS Nano size gps module with battery link TaoBao 1 8.80
Drone Parts 470uF low ESR capacitor Capacitor for MOSFET protection link TaoBao 1 0.42
Drone Parts Cyclone 1W VTX 5.8GHz analog video transmitter link TaoBao 1 14.00
Drone Parts TaoBao Tax Fees - TaoBao 1 10.05
Drone Parts TaoBao Shipping Shipping - TaoBao 1 4.05
Drone Parts CADDX Ratel 2 + Tax 19mm Analog camera link AliExpress 1 28.64
Drone Parts AliExpress Shipping Shipping - AliExpress 1 0.99
Drone Parts GNB LiHV 4S 850mAh 4S LiHV battery link Shopee 1 20.10
  • Flight Controller Total: $89.42
  • ESC Total: $33.95
  • Shipping Total: $26.50
  • Drone Parts Total: $134.16

Grand Total: $284.03

About

Successor to the Merlyn411 25mm flight controller. The flight stack includes a 3in1 20mm flight controller and a 20mm ESC.

Resources

Stars

1 star

Watchers

0 watching

Forks