Serial inverter

Hi all,

I'm working on a Futaba frame loss counter, and since the SBUS protocol uses an inverted serial signal, how can I invert it so it can be processed by Arduino? I know I have to create a serial inverter but I don't have the knowledge to do so. I know that I need transistors and resistors, but how exactly and where am I to solder what?

Would appreciate your help.

This may be of interest Arduino - SoftwareSerialConstructor but I am not sure of your exact use case

I tried using that library, however it is too slow for my purpose because in the time that software serial inverts the signal, there can be some important data missed out, hence I wanted to make a hardware version.

Additionally, the library creators suggested a hardware module as opposed to something coded.

I thought SBUS hasn't been used since the 1990s when it was used in Sun Unix workstations, a little like PCI bus. That can't be what you're talking about?

So what is this protocol? How many data lines, what voltage etc?

Would some 74hc00 series chip work?

What baud rate does the SBUS protocol run at ?

by SBUS I mean Futaba SBUS used in RC aircraft receivers.

voltage ranges from 5.9V to 8.4V, and the arduino has a regulator on board so that is not an issue.

  • Byte[0]: SBUS header, 0x0F
  • Byte[1 -22]: 16 servo channels, 11 bits each
  • Byte[23]
    • Bit 7: channel 17 (0x80)
    • Bit 6: channel 18 (0x40)
    • Bit 5: frame lost (0x20)
    • Bit 4: failsafe activated (0x10)
  • Byte[24]: SBUS footer

SBUS runs at 100k baud. I know the max software serial can take is 115,200 baud however although it can receive at that baud rate, when a byte is received an interrupt will be generated hence it's not usable in this case.

Oh yes it is. Anything higher than 5.5V to an Arduino input and you could damage it.

It is if that is the voltage on the serial input to the Arduino ?

I've used a 9V battery on a Nano without problems. it was on for an extended period of time.

Yes, that is if I power the arduino through the receiver / the airplane's battery packs

What voltage will be present at the Serial input ?

Connected to Vin pin, yes, fine. Connect 9V to any other pin and...

You can easily reduce the voltage of a data signal down to 5V with a voltage divider (a pair of resistors), but only if you know what the input voltage is going to be.

Perhaps an opto-isolator would work at a wider range of voltages, and with a little ingenuity could invert the signal at the same time.

at the serial input it will be 5.9 volts

Ok, so a voltage divider to reduce that to 5V and a 74hc00/74hc04/74hc14/whatever-you-have to invert it?

Also, if you plan to use hardware serial for speed, choose an Arduino with an extra hardware serial port, like Pro Micro, otherwise debugging your code can become difficult, not being able to use serial monitor.

There is a much better way to do it.

You may need to scale the resistors down a decade or so if in the 100 kBaud range.

This site gives wiring instructions:

its too much of a headache, because I can just make a separate serial inverter circuit and solder it to the pins required.

Yes, this is what I meant.

Arduino input means what in this case? is it the RX pin where it will be connected to the receiver? and "to switch" indicates?

So effectively I need 14 k-ohm resistors and 2.1k-ohm resistors. the transistors can be the same correct?