Hello everyone,
I’m just getting back in to the world of DIY Drones after a year or so off (things have come on a long way since APM 2 came out!). I’ve been using a Pixhawk with a JR radio via the PPM Encoder but decided it was time to reduce my wiring a bit and use JR’s XBus instead. For those who’ve not come across it before the XBus is just a serial output from the receiver which contains all the channel data, much like the Futaba SBus and Spektrum DSM Satellite protocol.
XBus has two modes of operation; Mode A is a JR proprietary protocol which they have released the specification for here (in Japanese, but Google Translate does a fairly decent job). I first attempted to implement this through the Spektrum/DSM connector (the SBus connector would be more convenient, but unfortunately the Rx line is inverted!), but found that the custom baud rate of 250000 would almost certainly break the existing code.
Mode B, on the other hand, is an SRXL compatible protocol which uses the standard 115200 baud rate. It turns out that JR actually use the Multiplex version of SRXL with support for up to 12 channels with 12bit precision, details here. I have implemented XBus Mode B on the Spektrum DSM connector of the Pixhawk and have tested it with a JR XG14 Transmitter, the pull request for the PX4Firmare repository can be found here.
Because the XBus Mode B/SRXL protocol implements a checksum, I am fairly confident that my additional code should not interfere with decoding of DSM frames should a Spektrum receiver be connected instead. However, I am unable to test this as I don’t have any Spektrum kit. If there is anyone here who uses a Spektrum satellite and would be willing to test my firmware and make sure it doesn’t break anything, that would be great!
For anyone else with XBus kit who’d like to connect it to Pixhawk, my firmware should work for you. Simply follow the instructions here for building from source, but replace the PX4Firmare directory with my version:
mv PX4Firmware PX4Firmware_orig
git clone https://github.com/omcaree/PX4Firmware.git
To connect the XBus to the DSM port you’ll need to make up a custom cable which provides power to your receiver from your BEC (the power output from the DSM port is 3.3V, JR receivers need 5V), but routes the XBus signal to the DSM Rx pin (the leftmost pin in this image).
If there is anyone else using other SRXL compatible radios (e.g. Multiplex, Graupner, etc…) and you would like me to add support for a particular protocol just let me know.
Cheers,
Owen