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.
- 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:
- 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.
I used this mod for use with modified Mikrokopter firmware.
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.
Yeah, I checked out his code. It was pretty unreliable for me too, he tried to avoid adding a hex inverter by using one of the pins as an interrupt driven inverter. (Pretty clever actually.) I found it to be *very* susceptible to timing irregularities though. However, I was using a 16MHz part, so it may be that the extra 4MHz made the difference.
Also, the raw SBUS values didn't appear to be normalized, but that may have been taken care of in the PPM out timing circuit (which I never got as far as testing).
I made a hex-inverter based version which works beautifully, but then started thinking about rolling a board and decided the shortest distance between me and having my APM2 running was to just code it into the firmware ;)
Are there other places where a S.BUS -> PPM converter would be useful? Would it be possible to have it up on the DIYDrones store? I think I'd probably be pretty flaky too if I had to do order fulfillment ;)
What about a simple S.BUS demux? That's pretty easy to do as well.
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.
Yeah, the PPM encoder is probably a better spot. SBUS runs at 100kbps, so it takes a really short interupt cycle to keep up. I'm seeing dropped packets from over-interrupted SBUS processing in the above posted code.
There's enough high priority stuff going on that it seems like support should be moved off into its own chip, like the spektrum adapter.