Experimental: Futaba SBUS support for APM2

Hi,

I'm new to this diy drones thing. Please pardon my unfamiliarity with how things are done 'round here :)

I've seen a few threads about building SBUS->PPM converters, and about integrating SBUS support into the ArduPilot code base. I have a 14ch Futaba transmitter and some small receivers with SBUS out. I saw that there was a feature request for SBUS support, but that it was marked "later".

I really wanted this feature, so I borrowed Captain Ixi's mod to the MultiWii platform and created a new APM_RC_APM2_SBUS class. I've tested it out on the ground only, so it's probably not ready for prime time just yet. Hopefully it will inspire someone with a bit more familiarity with the ArduPilot code base to do proper integration.

Some notes:

- Uses Serial2, which conveniently has the pin pattern GND - 5V - RX on the APM2 board.

- Requires an inline inverter on the sbus out signal. Use a 74HC14 or similar 5V inverter. You can solder them inline between a pair of mail servo leads. Or if you're in Europe this store sells them pre-built:

https://www.mikrocontroller.com/index.php?main_page=product_info&products_id=669&zenid=126f30fd014cba7ef3f8f5a8401def3f 

- The code could probably be improved by hooking directly into the serial interupt and watching the frame timing resets there. 

- I made a few small changes to the ArduCopter.ino file to init the Serial2 FastSerial interface, and to pass that to the APM_RC_APM2_SBUS class on init.

Cheers!

--mikest

ArduPilotMega_SBUS_Support.zip

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Mike,

    Did you ever get around to flying using your code ?

    I'm currently converting my DJI Phantom 2 to use APM 2.5, and I've build a SBUS to PPM converter using an Arduino Mini and an inverter (74LS00 NAND that I had in my box of junk)

    Although this seems to work OK, it seems like a retrograde step to convert the incomming digital SBUS data, to effectively analogue PPM and for the APM to have to decode the PPM again and turn it back into digital (nunbers)

    I appreciate that putting additional CPU load on the APM is probably not a good idea, so I"m wondering if there is some halfway between SBUS to PPM and your code (which is reliant on the APM to decode the high speed SBUS bitstream)

    Hence I was thinking that perhaps I could modify the SBUS to PPM code in my Arduno so that it outputs something else other than PPM, which could be then more easily read by the APM.

    I guess it could still use Serial 2 that you have programmed, but the data rate could be a lot lower and hence be less load on the main CPU.

    Alternatively.

    Perhaps a better way to do this is to either do the SBUS decoding in the ATMEGA32U2 (ArduPPM) co-processor,

    of in my case perhaps modify the ArduPPM to communicate to my SBUS to PPM converter (Arduino Mini)

    I guess I'll need to post to the ArduPPM forum to find out the best way to do that

    Cheers


    Roger

  • Mike,
    Wow! This is very cool. I've been wanting to implement SBUS on APM 1 and 2 for a number of months and have dabbled at it but haven't spent any serious time or brainpower. Your work will help. I want to implement it in the on-board PPM encoder. Have you looked at that? Apparently you got it working but I'm loath to add more load on the APM's host processor - it's already underpowered.

    Thanks,
    Ron
  • The Eagle Tree OSD system is supposed to be PPM compatible soon. Even though there is the Mikrokopter hack, as new versions of firmware are released, there is no guarantee that the hacked firmware will continue to be updated. There has been conflicting info on whether or not MK will ever officially support SBUS. The last I heard was that it will.I plan on building an Ardupilot quad soon but will probably use my TSLRS which has PPM out. I know there have been quite a few people interested in the sbus to PPM converter but I am not sure how many have not found an alternative solution already.

  • I used this mod for use with modified Mikrokopter firmware.

    http://www.mikrokopter.us/index.php/topic,3125.0.html

    It works great but I really would like an SBUS to PPM converter. There was a guy (sebastian) on the Mikrokopter forums that made one and it was hit or miss if the one you got worked (Mine didn't). The code etc is online and open source. I really would like to see a reliable one available. I would buy several.

    Mikrokopter.us
This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…