SmartPort inverter for F4 flight controllers

While STM32F4 family processors installed in newest flight controllers are superior to STM32F3 (and F1 of course) in terms of raw speed, they are inferior to F3 family in terms of IO handling capabilities. For example, F4 family is not equipped with UART port inverters. Just take a look at the Omnibus F4 flight controller. There is an S.BUS inverter, but not a SmartPort inverter. That creates a series of problems when it comes to connecting various serial RX receivers and telemetry systems.

The most popular FrSky (Futaba) S.Bus serial RX protocol and FrSky SmartPort telemetry require inverted UART signal. If there is no hardware inverter on hardware UART port, they will not work. While S.Bus requires only one data line, an external inverter is not a big issue. Some time ago I've published The Simplest Hardware Inverter. One MOSFET transistor, one resistor and that are all.

In the case of SmartPort, it's slightly more complicated. Not only signal is inverted, SmartPort also combines TX and RX UART line into a single wire. That means the following:

  1. The more complicated inverter is required
  2. The software has to support this case and fallback to unidirectional UART mode

Hardware

  1. 2x N-channel MOSFET transistors, for example,2N7000
  2. 2x 4.7kOhm resistors
  3. 1x 47kOhm resistor
  4. Some cables
    Hardware is simple enough to build "in the air" and then put inside heat shrink or deluged in epoxy.

Software

Like I mentioned previously, the software has to be able to switch to the unidirectional mode when this hardware is used. Luckily, both Betaflight and INAV supports it.

In the case of Betaflight and a newer required command is

set sport_halfduplex=ON.

In the case of INAV, the required command is

set smartport_uart_unidir=ON.

There is also a "receiver" hardware hack, but for those who are not for soldering cables to receiver pads, this might be an option. Like for all users of Omnibus F4 family.

10 thoughts on “SmartPort inverter for F4 flight controllers”

  1. Hi,
    Here’s some feedback about your Inverters (2N7000 and BC547 based ) which both in the following configuration didn’t work (= no new sensor discovered beyond RSSI,RxBt)
    Betaflight 3.1 , CC3D Revolution, x9d+ ,Optentx 2.20N362 and an XSR.
    With the exact same Betaflight settings but connecting the Tx lead of UART3 (=flexi Port)directly to the XSR as explained here :
    https://www.rcgroups.com/forums/showthread.php?2740049-HOWTO-F4-Revo-Revolution-Betaflight-Raceflight-sbus-vbat-telemetry-buzzer-OSD
    the 6 additional sensor provided by the CC3D were immediately discovered.
    You can safely exclude wrong connections/ assembly of your inverters.
    With which configuration did you test your inverters ?
    Greetings / Frank

    1. Hi,
      I’ve tested both designs with INAV 1.4 and 1.5 and Betaflight 3.1 on Airbot F4, Omnibus F4, X4R-SB and X8R receivers. So, they works

      1. Hi,
        Well after your confirmation that you had them indeed working with a F4 – the CC3D Revo being also one- I checked all settings and connections again and managed to have the BC547 “Fritzing” inverter working with an X8R..something which commonly is considered to be undoable …or rocket science !
        Most helpful thereby was the use of a scope to detect and follow the smartport signal and visualize how the smartport protocol works .Fact is that the smartport protocol need to be initialized and managed by the FrSky receiver …which means that is actually quite misleading to speak of an unidirectional transmission protocol !
        So many thanks for sharing the information about your truly useful inverters.
        Frank

  2. Great. Can this potentially work with Fport too? I ordered the board from OSH Park and plan to attach xsr-m to uart6rx/tx of Omnibus F4 V3 with this inverter. Any chances this will work?

  3. Could it je that the command is not working anymore in the new version of betaflight? I get a error message when I enter it.

  4. Hi Dziku, I finally solved my problem by replacing the resistors on Tx side with the suggestion from teralift.Details in this post:
    https://www.rcgroups.com/forums/showpost.php?p=40018401&postcount=10

    Saying everything in a respectful way:).
    It looks like with the 4.7k and 47k resistors on Tx side,the telemetry part of the Fport signal remains at quite low level than the receiver part of signal.It was on the edge.X4R was accepting it but R-xsr didn’t like it.I have captured with oscilloscope in my thread.So by replacing 4.7K —> 330R and 47K —> 4.7K, inverter gives both receiver and telemetry at same level.I have not tested it with Smart port.I have only tested it with Fport signals.

Leave a Reply to Gary Cancel reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.