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. And 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, external inverter is not a big issue. Some time ago I’ve published The Simplest Harware Inverter. One MOSFET transistor, one resistor and that’s all.

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

  1. More complicated inverter is required
  2. 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 be build “in the air” and then put inside heat shrink or deluged in epoxy.

Software

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

In case of Betaflight 3.1 and newer required command is

set sport_halfduplex=ON.

In case of INAV 1.4 and newer required command is

set smartport_uart_unidir=ON.

In case of Cleanflight, it should work in 1.14 out of the box, but only on F1 targets, since Cleanflight does not supports F4 yet.

6 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

Leave a Reply

Your email address will not be published.