Designing UART Ports for RC Receivers and Telemetry (Part 2)
Designing the RCIN Port for Radio Control
The RCIN port is where your radio receiver connects to the flight system. This port faces very unique hardware challenges because it is frequently exposed to external elements and varying voltage levels from different receiver brands.
1. Absolute Input Protection with Zener Diodes
External modules are a primary source of hardware destruction. If a user accidentally injects a 5V power source into an RX pin that operates strictly at 3.3V, the event will permanently destroy the microcontroller.
To mitigate this catastrophic risk, I designed a dedicated hardware protection circuit on the RCIN header using a 10kOhm resistor, a 100 Ohm resistor, and a Zener diode. The Zener diode is placed in a reverse bias configuration between the signal line and Ground.
A Zener diode is a unique semiconductor that acts like a voltage pressure relief valve. During normal 3.3V operation, this diode is completely invisible to the signal. However, if a voltage spike exceeding 3.3V enters the pin, the Zener diode instantly activates and clamps the voltage, safely routing the dangerous excess energy straight to Ground. The 100 Ohm resistor acts as a current limiter to protect the diode from burning out, while the 10kOhm resistor provides a stable bias state.

For a deep academic explanation of how Zener diodes protect logic circuits, you can check on this website: Electronics Tutorials: Zener Diodes.
This images shown exactly how the diode is placed in parallel with the working load to clamp incoming voltage.)

2. The SBUS Inversion Advantage on the STM32H7
Legacy radio protocols like SBUS present a unique schematic challenge because SBUS is an inverted serial protocol. On a standard UART signal, an idle line is held HIGH and drops LOW to send data. SBUS does the exact opposite. On older generation Flight Controllers utilizing STM32F4 processors, hardware designers were forced to add complex external NPN transistor circuits to physically invert the signal before it reached the MCU.
However, my Flight Controller utilizes the exceptionally powerful STM32H7 processor. The STM32H7 features advanced internal UART peripherals that support direct hardware inversion via software configuration. Because of this, my schematic no longer requires an external logic inverter IC on the RCIN port. The raw inverted signal travels safely through our Zener protection network directly into the MCU. This saves valuable board space and reduces the number of components that could potentially fail in the air.
Software Integration via ArduPilot
Once the hardware is designed securely, we must configure the software to utilize these physical ports. Within ArduPilot firmware, every UART we route on the PCB is assigned a specific SERIAL number.
For the TELEME port, you must alter the SERIALx_PROTOCOL parameter in your Mission Planner software to activate MAVLink communication. For the RCIN port receiving the SBUS signal, we must command the STM32H7 processor to activate its internal hardware inverter. We accomplish this by modifying the SERIALx_OPTIONS parameter. By setting the correct bitmask, the processor will handle the SBUS inversion internally without any flaws.
You can check on this website for the official ArduPilot documentation regarding how to configure those specific serial options: ArduPilot Serial Options Documentation.

For a stunning visual explanation regarding how to design a UART hardware interface from start to finish, you can see in this video from Phil's Lab on YouTube: https://youtu.be/aVUqaB0IMh4?si=xleHFRQrn2qTWUUw
Conclusion
Designing the communication ports on a Flight Controller requires much more than simply drawing wires between component pins. By implementing proper 10uF and 100nF power filtering, utilizing 22 Ohm resistors for signal integrity, and designing a Zener diode network for absolute voltage protection, we guarantee that the drone will never lose connection to the pilot. Furthermore, leveraging the internal inversion capabilities of the STM32H7 processor allows us to create a much cleaner and more reliable circuit board.
Sign In Or Register Comment after
No comments yet. Be the first to comment!