FrSky X4R-SB S.BUS anti-invert hack

I am building a quadcopter using a FrSky Taranis X9D radio. It came with a FrSky X8R receiver. I wanted to keep my wiring clean by using the S.BUS feature on the FrSky receivers, I purchased a smaller FrSky X4R-SB receiver. The X8R has 8 PWM channel pins and the X4R-SB has 3 PWM channel pins, but if I use S.BUS (which is serial, not PWM), I can access 16 channels using only 1 pin, on both X8R and X4R-SB. The X4R-SB is much smaller, making it more ideal. (do not confuse the X4R-SB with the D4R-II, this is important, D4R-II uses CPPM, not S.BUS)

(update 10/25/2014: a follow up hack for Smart Port)

I want to use a Naze32 flight controller, which is open source and does have code to interpret S.BUS protocol. S.BUS is UART communication but it is inverted and the Naze32’s UART cannot accept inverted input. Some flight controllers, such as the Pixhawk, has a dedicated inverter just to solve this problem, but the Naze32 does not.

The first option is to buy a “S.BUS to CPPM converter” but CPPM is not a serial bus like S.BUS and thus does not have the advantages of being a serial bus. CPPM uses timing, timing needs to be measured (measuring things = possible error) and the signal edges can be affected by capacitance, noise, etc. Also having such a converter means there will be a tiny bit more latency in the system. These two disadvantages are probably too insignificant to notice performance wise. But I still didn’t want to spend another $13 + tax + shipping just to solve a problem that shouldn’t have existed in the first place.

The second solution is to buy an “inverter cable” which is a cable that has a NOT gate inline and then shrink wrapped. Or I can just buy a NOT gate and make the cable myself. I still didn’t want to spend the money. I opted to hunt down the inverter on the X4R-SB circuit instead, and connect a wire to the input of the inverter (labelled as “A” in the datasheet). This provides me access to the un-inverted signal that I can directly connect to the Naze32.

See the pictures below to understand how this hack was done.

identify_r25indentify_inverterinstructions

And just in case I confused you even more, all you need to do is connect a wire to the “A” pin.

I have tested it with Naze32 Rev5 and firmware f4d556c68876ccd5902bddf1cade32f1bb382c9f. Works like a charm.

It is probably possible to perform the same hack on a X8R but the X8R is constructed using two PCBs and the inverter is covered up by one of them. Separating the two PCBs is very difficult and risky.

The Smart Port (I think it’s also called S.PORT) is another inverted serial bus available on the X4R-SB and X8R but it is bidirectional. Since whatever you want to connect to it will need a bidirectional circuit anyways, it is not worth it to perform another surgery on the Smart Port. Also, the Naze32 can use SoftSerial to transmit in an inverted fashion, so a dedicated inverter isn’t even required. (SoftSerial would not work well for taking inputs, but outputs is OK)

42 thoughts on “FrSky X4R-SB S.BUS anti-invert hack

    1. Admin Post author

      All you need to do is connect a wire to the “A” pin. That’s all you have to do. I swear it’s that simple.

      Reply
  1. hoggdoc

    Wow this is so simple, thanks. So let me ask this does not change the operation of the S.Bus connection to other devices that have an inverter in place, such as a DJI Nasa flight controller, right?

    Reply
  2. hoggdoc

    I forgot to ask, does both BaseFlight and CleanFlight support S.Bus? What version do I need to support the S.Bus connection. This should work on other Naze type boards like the Flip series, right? How about the Naze32 mini?

    Reply
    1. Admin Post author

      It should work with Flip32 and Naze32 mini

      Bad weather these days, I haven’t done much multirotor stuff lately, I haven’t updated the firmwares to the latest github commits. I also can’t test to confirm. But I think my github account has working copies for both BaseFlight and CleanFlight.

      Reply
  3. Gary N

    Hi
    I have just reciever a fr sky TFR4 SB fast compatible rx.
    Can a mod be don on this rx to invert the sbus signal.
    Thanks for your info

    Reply
    1. Admin Post author

      My answer is “probably”, because I have not seen the circuit in person.

      You can find out yourself without too much risk.

      Reply
  4. Martijn

    Hi,
    Thanks for publishing this info. I’ve done this “hack” but I’ve used one of the 4 pads next to the inverter. A lot easier to solder.

    I’ve got it working with an afromini32 (micro naze32). But I’m not sure if I should add a resistor between the X4R and the afromini32. Any thoughts ?

    Thanks again for sharing.

    Reply
    1. hoggdoc

      OK I think I understand what is being accomplished here, but to clarify. If I make this mod to my X4R RX, I will then have access to 4 PWM channels on the RX plus the remaining 12 channels via the new S-Bus connector, right?

      Reply
      1. Admin Post author

        Correct. Also note that the S.BUS connector provides 16 channels those 4 first channels are included. You will not need to connect the 4 PWM channels at all.

        Reply
      2. Max P.

        On the X4R-SB you already have S-Bus on one of the sets of pins. This hack is simply to get the same S-Bus output but not inverted (useful for some flight controllers). The X4R-SB only has channels 1-3 via PWM. There is another X4R version that has 4 PWM channels and no S-Bus (unless you hack it πŸ™‚ ).

        -Max

        Reply
    2. badz

      Hi,
      There might be a good reason, but indeed why not use the through hole if they are equivalent . It should be easier than the U8 pins to solder ?
      Thx

      Reply
  5. T.Williams

    How can I get telemetry? Right now I just need Vbat. I have the Taranis Plus, Naze32full and X8r.
    –Thank you–
    T.Williams, Oklahoma City, USA

    Reply
  6. Colton

    So I’m a little bit confused here… what is the A connection providing? Cppm? or PWM Ch.4? Thanks for any help!

    Reply
    1. Admin Post author

      S.BUS is not CPPM or PWM, S.BUS is a serial protocol with a non-standard baud rate.

      “A” and “Y” are the same, except “A” has standard serial signaling and “Y” is always equal to the inverted “A”.

      Reply
  7. ALi

    hi bro, just need to know, for the X8R receiver with Naze32, is there any method like you modify above will allow Naze32 using all 16 channel in Naze32? i was little confiused with your explaination… can you elaborate a bit please? thanks.

    -AhLee

    Reply
    1. Admin Post author

      It’s the same hack, but harder on the X8R receiver. The components are more hidden because the X8R is built with two circuit boards stacked together. I suggest buying a X4R-SB instead, because it is easier to hack and you won’t break a X8R if you screw up.

      Reply
  8. Freakshowdevil

    As a suggestion, why not just solder away U8 and put a cable between the A and Y instead. Then you have left R25 as current limiter

    Reply
    1. Admin Post author

      You are right. Now I am wondering why I didn’t do that in the first place… This was months ago… I agree that I should have done it your way, but my way does have the advantage of keeping the inverted version of the signal.

      Reply
    1. Charles Mrizek AKA; Rrockyrraccoon

      Its actually really easy on the x8r and x6r. Here is how.
      Remove your receiver from the plastic case. Place it so the bind button is facing up and the smart port is closest to you. Just above and to the left of the smart port there are 4 open holes starting at the bottom one go up one two three to the third hone and solder in a wire. That will be the uninverted signal. No need to spit the two boards at all.

      Here are some photos the first on is what you see if you separate the two board. the second is where you should make the connection without taking them apart.
      https://drive.google.com/file/d/0B6ByTAAB61Gbbkd3bXhvUE4xZVk/view?usp=sharing
      https://drive.google.com/file/d/0B6ByTAAB61GbUUU0dEFHSmxteG8/view?usp=sharing

      Reply
  9. jaewoo kim

    I tried this mod to x8r
    and success! thx!
    I upload on my blog this mod (it’s Korean, just see video)
    and.. it’s hard.. no recommend in x8r
    if you have x8r, buy inverter cable

    Reply
  10. Rob

    After the mod is done what should the settings be under ports and configuration on the naze32
    rx_ serial or rx_ppm etc.
    Thanks a bunch

    Reply
  11. Hubert

    This is great. Have you thought about removing the inverter entirely and just bridging pin A to Y for a cleaner hack or is too difficult?

    Reply
    1. Steve

      So which is the easiest way to hack the inverter on the X8R, I have one coming in the next few days and would like to use sbus to the Naze32

      Reply
  12. Dave

    How daft, the xy are meant to be bridged for reverse Sbus, this is not a hack it’s a standard setting on the X4, but I cannot see how it can be done on the X8, so all in all a waste of time and effort.

    Reply
  13. Axel

    Sorry, I’m having some trouble…

    Sbus works, but the naze32 only reads my sticks… Any idea what I am doing wrong?

    Naze32 rev 5
    X8r hacked
    Taranis plus
    D16 1-16

    Reply
  14. Iskandar

    Axel,

    I’m having the same problem too, my quad just read my sticks but it does not acknowledge the RX is there, sending out Lost Signal alarm.

    Any idea?

    Reply

Leave a Reply to Martijn Cancel reply

Your email address will not be published. Required fields are marked *