Saturday, 26 September 2020

1-wire radio control protocols


 These protocols are used typically to communicate between a radio reciever and flight controller, or any other kind of controller in a flying drone, robot, or something else.


I'm considering here, ibus, sbus and PPM



This is the protocol used by Futaba receivers, servos, and some other things. It's a serial
1-wire protocol and uses an unusual bit rate of 100kbaud.

Some details are here:

The S-bus signal is "upside down" - normally low, and uses low=0, high=1.

S-bus also requires some "bit twiddling" because it uses 10 bits per channel and splits them between several bytes.

 Pros: Many digital receivers support it.

Cons: A pain in the arse to decode, difficult to simulate, USB serial dongles usually can't decode it.


Ibus uses a bit rate of 115,200 baud, which is a "standard" speed. I-bus is "the usual orientation", normally high, low=1, high=0 (this is consistent with most other serial protocols)

Ibus uses simply 2 bytes per channel and outputs the number of microseconds wide that a pulse would be if the channel was transmitted as a servo pulse (1000 - 2000 with 1500 as the centre).

Pros: Much simpler than S-Bus to decode, can decode with a USB-Serial dongle easily.

Cons: Only Flysky (like) receivers support it.


PPM is a scheme of multiplexing several channels of servo pulses on the same wire. It still uses 1000-2000 microsecond pulses for the channels, but sends them sequentially with a longer sync pulse.
If your microcontroller doesn't have a crystal, you might not be able to detect the 1500us centre pulses accurately, and need to trim the centre position. The microcontroller might vary its speed slightly depending on voltage and temperature.  (Radio receivers need a crystal to operate their radio, so their timing must be spot on)
Pros: Widely supported
Cons: Analogue; need exact timing to get centre position trimmed correctly. Electrical noise could cause channels to get mixed up with crazy results. Supports fewer channels than sbus or ibus.