Introduction: XRC PRO: Open-Source RC 8CH Transmitter and Receiver WITH Stm32
Overview
The XRC PRO is an advanced, open-source RC transmitter and receiver system designed to offer professional-level performance in a compact and customizable package. Built around the STM32F103C8T6 microcontroller and the NRF24L01 wireless transceiver module, the XRC PRO provides precise, real-time control for various RC applications like drones, cars, and boats. With a compact design, robust functionality, and user-friendly interface, the XRC PRO is an ideal tool for both hobbyists and professionals.
A Support From PCBWAY
This project was made possible with the incredible support and sponsorship from PCBWay. Their assistance allowed me to bring my ideas to life, and I am grateful for their commitment to supporting creators in the DIY and maker community. Thank you, PCBWay, for believing in this project!
PCBWay also offers a variety of services, including PCB assembly, 3D printing, and CNC machining. Their sponsorship program for projects like this one helps make electronics projects more accessible to everyone. By choosing PCBWay, you can bring your projects to life with confidence.
➡️ Check out PCBWay and get your first PCB for FREE : Click Here.
Supplies
Transmitter Components
1).STM32F103C8T6: ARM microcontroller (desoldered from development board and soldered to transmitter PCB)
Quantity:1
2).NRF24L01 GT24 Mini: Wireless transceiver module
Quantity:1
3).E11 Rotary Encoder (ENC): Rotary encoder for menu navigation
Quantity:1
4).SMD 8MHz Crystal (3225): Oscillator for STM32
Quantity:1
5).FC-135 32.768kHz Crystal: RTC crystal
Quantity:1
6).CH340C SMD: USB to Serial Converter
Quantity:1
7).Y1 (8050) NPN Transistor: General-purpose transistor
Quantity:2
8).1AM (3904) NPN Transistor: General-purpose transistor
Quantity:1
9).0.96" OLED Display: For displaying transmitter status and menu
Quantity:1
10).10k Ohm Resistor (SMD): Resistor for various circuits
Quantity:4
11).1k Ohm Resistor (SMD): Resistor for various circuits
Quantity:4
12).100nF Capacitor (SMD): Signal filtering capacitor
Quantity:20
13).Buzzer: Audio feedback for transmitter alerts
Quantity:1
14).AMS117 (3.3V Voltage Regulator): Provides 3.3V to components
Quantity:1
15).10uF Capacitor: Power stabilization and filtering
Quantity:2
16).Male Headers: Connector for modules/components
Quantity:30
17).DJI Phantom 2 Remote: Used as the transmitter enclosure (alternatives include any compatible remote/joystick)
Receiver Components
Receiver (PWM+PPM)
1).STM32F103C8T6: ARM microcontroller (desoldered from development board and soldered to receiver PCB)
Quantity:1
2).NRF24L01 GT24 Mini: Wireless transceiver module
Quantity:1
3).SMD 8MHz Crystal (3225): Oscillator for STM32
Quantity:1
4).40.1AM (3904) NPN Transistor: General-purpose transistor
Quantity:1
5).AMS117 (3.3V Voltage Regulator): Provides 3.3V to components
Quantity:1
6).10uF Capacitor: Power stabilization and filtering
Quantity:2
7).100nF Capacitor (SMD): Signal filtering capacitor
Quantity:4
8).Male Headers: Connector for modules/components
Quantity:30
Receiver (PPM+SBUS)
1).STM32F103C8T6: ARM microcontroller (desoldered from development board and soldered to receiver PCB)
Quantity:1
2).NRF24L01 GT24 Mini: Wireless transceiver module
Quantity:1
3).SMD 8MHz Crystal (3225): Oscillator for STM32
Quantity:1
4).40.1AM (3904) NPN Transistor: General-purpose transistor
Quantity:1
5).AMS117 (3.3V Voltage Regulator): Provides 3.3V to components
Quantity:1
6).10uF Capacitor: Power stabilization and filtering
Quantity:2
7).100nF Capacitor (SMD): Signal filtering capacitor
Quantity:4
8).Male Headers: Connector for modules/components
Quantity:30
Step 1: Schematic-PCB Layout-3D Preview-Final Result
The XRC PRO has multiple PCBs and it consists of three main PCBs: the Transmitter PCB, the 8-channel PWM+PPM Receiver PCB, and the PPM+SBUS Receiver PCB. Each PCB was carefully designed for space efficiency and optimal performance.
Transmitter PCBs
The Transmitter PCB is built around the STM32F103C8T6, NRF24L01 module, OLED display, and various input buttons (trim, menu, encoder). The schematic includes connections for power management (5v to 3.3v), data lines for the OLED, and button inputs for settings navigation etc.
Schematic and PCB Layout
2D and 3D Preview
Final Result
Menu-Keys
Schematic and PCB Layout
2D and 3D Preview
Final Result
Rotary Encoder+Switch
Schematic and PCB Layout
2D and 3D Preview
Final Result
Trim Buttons
2D and 3D Preview
Final Result
Type C Jack
Schematic and PCB Layout
2D and 3D Preview
Final Result
Receciver PCBs
8-channel PWM+PPM Receiver PCB
The 8-channel receiver supports both PWM and PPM outputs. It is based on the NRF24L01 and STM32F103C8T6 for signal decoding and generation.
Schematic and PCB Layout
2D and 3D Preview
Final Result
PPM+SBUS Receiver PCB
The PPM+SBUS receiver is another compact design focused on supporting more advanced control protocols. It also features the STM32F103C8T6 for signal processing and output.
Schematic and PCB Layout
2D and 3D Preview
Final Result
Step 2: Visual and Physical Connections
I’ve designed a detailed, color-coded connection schematic for all inputs and outputs, making it easy for anyone to assemble the XRC PRO transmitter and receivers. Additionally, I’ve included high-quality these images in PDF format, which you can download below.
Transmitter
Receiver(PWM+PPM)
Receiver(PPM+SBUS)
Step 3: Firmware Overview
The XRC PRO's firmware is developed in Keil uVision using the CMSIS framework for STM32. It is fully open-source, with modular code to allow easy customization and extension of the system's capabilities. The main focus of the firmware is on handling communication between the transmitter and receivers, as well as managing the various control inputs.
Here the whole files in KeiluVision:
Below are the functions broken down from the main execution code, organized into smaller functional blocks. These functions are intended to be modular and handle specific tasks like initialization, signal strength calculation, display management, and event handling:
1. setup()
This function initializes all the necessary hardware peripherals and sets up the system for operation.
2. loop()
The main loop that continuously runs during operation. It handles the display updates, signal strength checks, and key events.
3. keyEventHandle()
Handles user input through key presses. This function updates throttle settings and processes navigation within the menu.
4. addSignalStrengthSample()
Adds a new sample to the signal strength buffer and maintains a moving average of signal strength.
5. getAverageSignalStrength()
Calculates the moving average of the signal strength based on the collected samples.
6. displaySignalIcon()
Displays the signal strength icon on the OLED based on the signal strength percentage.
7.NRF24L01 Initialization
Initializes the NRF24L01 module and sets it in transmit mode.
8.Sending Data Packets: sendDataPacket()
This function creates a 32-byte data packet and sends it using the NRF24L01 module. The packet contains a data header and channel values (PWM data).
9.Signal Strength Calculation: getSignalStrength()
This function measures the signal strength by sending multiple packets and calculating the percentage of successful transmissions.
10. updateSignalStrength()
Updates the signal strength display and checks if the receiver is connected. It also adds a new sample to the signal strength buffer.
11. menuEventHandle()
Handles the user interface menu and responds to user input for changing settings.
12. Battery Voltage Display
Updates the battery level icon and percentage on the OLED based on the battery voltage.
13. Clock and Alarm Handling
Handles the clock and alarm functionality, beeping when an alarm is triggered.
These functions represent the core operations of the system, which handles initialization, user input, signal strength monitoring, display updates, and more. Each function focuses on a specific aspect of the overall operation, making the code more modular and easier to manage.
Step 4: Firmware Uploading
To upload the firmware to the transmitter and receivers, follow the connection diagram below. It shows how I connected the CH340 USB-to-TTL adapter to both the transmitter and receivers.
Connections
Transmitter
There are two methods of uploading code into transmitter.First,you can directly upload the code via USB TYPE-C Interface. Second,you can upload the code with the help of USBto TTL (ch340 driver).
Rceiver(PWM+PPM)
Receiver(PPM+SBUS)
Software
Download and install the STMicroelectronics Flash Loader Demonstrator software: Click to download
Steps
Follow:
- Plug the USB serial converter into the PC.
- Press the reset button on the STM32 board.
- Select the COM port in the software.
- Click 'Next,Next and Next.
- Select Download to device.Click on 3 dots and select the hex file.
- Select Global Erase.After that Click on Next
- Within 15 seconds, the code will be uploaded to the device.
- After finsihed.Click Close.