Skip to the content
2 layers61 × 24 mmServo PDB, the printed circuit board in 3D

This repository contains the embedded C++ firmware for a custom flight controller based on the NXP i.MX RT1011 (ARM Cortex-M7) microcontroller.

Size
61 × 24 mm
Copper layers
2
Thickness
1.6 mm
Parts
22
Nets
10
Pads
42
Tracks, vias
21, 0
Pours
1
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
22 Jul 2025
Updated
14 Oct 2026

Overview

Servo PDB is an open-source printed circuit board by awalecka, from the awalecka/MIMXRT1011_FlightControllerRtos repository on GitHub. It is a 2-layer board of 61 × 24 mm with 22 parts on 10 nets, routed with 21 tracks and 0 vias.

Its parts include 21 connectors and 1 capacitor. It belongs with the robots and motor control boards of this library.

README

README.md

Flight Controller Firmware (NXP RT1011)

This repository contains the embedded C++ firmware for a custom flight controller based on the NXP i.MX RT1011 (ARM Cortex-M7) microcontroller. The system is built on FreeRTOS and utilizes a modular, object-oriented architecture to manage sensor fusion, flight control laws, and actuator outputs in real-time.

Features

  • Real-Time Operating System: Built on FreeRTOS v10.5.1 with static memory allocation for deterministic behavior.
  • Control Modes:
    • Stabilized Mode: Angle-based PID control with coordinated turn capabilities.
    • Pass-Through Mode: Direct mapping of RC inputs to servos for manual control.
  • Sensor Fusion:
    • AHRS utilizing a Multiplicative Extended Kalman Filter (MEKF) or Unscented Kalman Filter (UKF), selectable at compile time.
    • Online Recursive Least Squares (RLS) Magnetometer Calibration.
  • Connectivity:
    • RC Protocol: FlySky IBUS protocol support using DMA and Idle Line detection for low-latency input.
    • Telemetry: High-speed real-time logging (100Hz via USB / 10Hz via UART) of sensor data, RC commands, and system status.
  • Ground Station: Includes runViz.py, a PyQt6/PyQtGraph-based ground station for 3D attitude visualization, live RC input monitoring, and interactive 3D ellipsoid fitting for magnetometer calibration.
  • Safety:
    • Failsafe state triggering on initialization failure.
    • Watchdog-like hardfault handling for semihosting environments.

Hardware Architecture

Target Platform

  • MCU: NXP i.MX RT1011 (MIMXRT1011DAE5A)
  • Core: Cortex-M7F running at 500 MHz

Pinout Mapping

Pulse Width Modulation (PWM) - Motors & Servos

All configured PWM signals are routed from the PWM1 peripheral block and explicitly mapped in actuators.cpp.

PinMCU SignalFunction / LabelModule & Channel
74GPIO_SD_02PWM0APWM1, Module 0, Channel A (Aileron Left)
75GPIO_SD_01PWM0BPWM1, Module 0, Channel B (Aileron Right)
9GPIO_04PWM1APWM1, Module 1, Channel A (Gear Left)
10GPIO_03PWM1BPWM1, Module 1, Channel B (Gear Right)
6GPIO_06PWM2APWM1, Module 2, Channel A (Elevator)
8GPIO_05PWM2BPWM1, Module 2, Channel B (Rudder)
4GPIO_08PWM3APWM1, Module 3, Channel A (Throttle)
UART - Serial Communications
PinMCU SignalFunction / LabelSubsystem / Notes
3GPIO_09UART1_RXDLPUART1
2GPIO_10UART1_TXDLPUART1
1GPIO_11UART3_RXDLPUART3 (Telemetry)
80GPIO_12UART3_TXDLPUART3 (Telemetry)
59GPIO_AD_01UART4_RXDLPUART4 (IBUS Receiver)
58GPIO_AD_02UART4_TXDLPUART4 (IBUS Receiver)
I2C - Sensors

The I2C pins are configured with internal 22K Ohm pull-up resistors and open-drain enabled.

PinMCU SignalFunction / Label
11GPIO_02LPI2C1_SCL
12GPIO_01LPI2C1_SDA
SPI / SD Card Interface & Memory
PinMCU SignalFunction / Label
52GPIO_AD_06SD_CLK
56GPIO_AD_04SD_MOSI
57GPIO_AD_03SD_MISO
43GPIO_AD_14SD_CS
64GPIO_SD_11SD_CD (Card Detect)
65GPIO_SD_10FlexSPI_CLK (Flash)
69GPIO_SD_06FlexSPI_SS0 (Flash CS)

Hardware Block Diagram

mermaid
graph LR
    %% Main Microcontroller
    MCU[NXP i.MX RT1011 <br> Cortex-M7 @ 500MHz]

    %% Actuators & PWM
    subgraph Actuators [PWM1: Servo & Motor Control]
        MCU -->|Pin 74/75| M0[Module 0: Ailerons L/R]
        MCU -->|Pin 9/10| M1[Module 1: Landing Gear L/R]
        MCU -->|Pin 6/8| M2[Module 2: Elevator & Rudder]
        MCU -->|Pin 4| M3[Module 3: Throttle]
    end

    %% Serial Communications
    subgraph Serial [UART Communications]
        MCU <-->|Pin 2/3| UART1[LPUART1: General]
        MCU <-->|Pin 80/1| UART3[LPUART3: Telemetry / Ground Station]
        MCU <-->|Pin 58/59| UART4[LPUART4: FlySky IBUS Receiver]
    end

    %% I2C Bus
    subgraph I2C [I2C Sensor Bus]
        MCU <-->|Pin 11/12| I2C1[LPI2C1: AHRS IMU & Magnetometer]
    end

System Controller

mermaid
flowchart LR
    %% Inputs
    subgraph Inputs [Inputs & Sensors]
        RC[FlySky Receiver\nIBUS]
        IMU[LSM6DSOX\nAccel & Gyro]
        MAG[LIS3MDL\nMagnetometer]
    end

    %% State Estimation
    subgraph Estimator [State Estimation]
        FILTER{Active Filter\nMEKF or UKF}
    end

    %% Control Laws
    subgraph Control [Attitude Control]
        SETPOINT[Target Setpoints\nRoll, Pitch, Throttle]
        PID[PID Controller\nCascaded Angle & Rate]
    end

    %% Outputs
    subgraph Outputs [Actuator Output]
        MIX[Control Mixer\nLimits & Scaling]
        PWM[PWM Driver\nServos & ESC]
    end

System State Machine

mermaid
stateDiagram-v2
    [*] --> STATE_BOOT : Power On / Reset
    
    STATE_BOOT --> STATE_IDLE : Init Success
    STATE_BOOT --> STATE_FAILSAFE : Init Failed (Sensors/I2C)

    STATE_IDLE --> STATE_FLIGHT : Stick Gesture: Arm\n(Thr Low, Yaw Right)
    STATE_IDLE --> STATE_CALIBRATE : Stick Gesture: Calibrate\n(Thr Low, Yaw Left, Pitch Up)
    
    STATE_CALIBRATE --> STATE_IDLE : Gyro Calibration Complete
    
    STATE_FLIGHT --> STATE_IDLE : Stick Gesture: Disarm\n(Thr Low, Yaw Left)
    
    STATE_FAILSAFE --> [*] : Requires Reboot

Parts

22
QtyValueFootprintReferences
3Screw_Terminal_01x02TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2_1x02_P5.00mm_HorizontalJ17, J18, J19
2GNDConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalJ20, J21
12200uFCapacitor_THT:C_Radial_D10.0mm_H20.0mm_P5.00mmC1
1Servo 1Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ9
1Servo 1Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalJ4
1Servo 2Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalJ8
1Servo 2Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ10
1Servo 3Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ11
1Servo 3Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalJ1
1Servo 4Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ15
1Servo 4Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalJ7
1Servo 5Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ16
1Servo 5Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalJ2
1Servo 6Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalJ5
1Servo 6Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ12
1Servo 7Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ13
1Servo 7Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalJ3
1Servo 8Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalJ6
1Servo 8Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ14

Similar boards

  • 2 layers158 × 11 mmDaylight Matchstick, the printed circuit board in 3D

    Daylight Matchstick

    VoronDesign/Voron-Hardware

    Cool Hardware designed by the Voron Design group

    22 parts1.1kGPL-3.0
  • 2 layers57 × 65 mmRgb to hdmi, the printed circuit board in 3D

    Rgb to hdmi

    hoglet67/RGBtoHDMI

    Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

    22 parts1kGPL-3.0
  • 2 layers81 × 57.2 mmRP2040-Macropad, the printed circuit board in 3D

    RP2040-Macropad

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    22 parts915
  • 2 layers54.6 × 70.9 mmBeagleLogic Cape, the printed circuit board in 3D

    BeagleLogic Cape

    abhishek-kakkar/BeagleLogic

    A Software Suite that implements a logic analyzer with the PRU on the BeagleBone / BeagleBone Black.

    22 parts479GPL-3.0
  • 2 layers66.4 × 24.5 mmConnecting piece, the printed circuit board in 3D

    Connecting piece

    Chrismettal/flipper-zero-backpacks

    Backpack-style addon boards for the Flipper Zero!

    22 parts456
  • 2 layers51 × 70 mmDMG A04-01, the printed circuit board in 3D

    DMG A04-01

    HDR/NintendoPCBs

    Replacement pcb's for Nintendo games.

    22 parts321
  • 2 layers27.8 × 16 mmSpi 1v8 level shifter, the printed circuit board in 3D

    Spi 1v8 level shifter

    CRImier/MyKiCad

    My KiCad boards. Can't be bothered uploading individually anymore, so here you go.

    22 parts253GPL-3.0

Questions

How big is the Servo PDB PCB?

It measures 61 × 24 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Servo PDB use?

22 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Servo PDB KiCad files?

From the awalecka/MIMXRT1011_FlightControllerRtos repository on GitHub, at the commit this page was made from: the board is hardware/Servo_PDB/Servo_PDB/Servo_PDB.kicad_pcb and its schematic hardware/Servo_PDB/Servo_PDB/Servo_PDB.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Servo PDB design in my own project?

Its repository states no licence, so its author keeps all rights: ask awalecka before reusing the design.