Page 1 of 1

Controlling 16ch via SBUS on Taranis Tx (external analog inputs)

Posted: Sun Aug 27, 2017 9:00 am
by roachslayer
I have a project where I need to use my x9d to transmit, but I want to feed all the inputs myself via arduino or raspberry pi (analog inputs, etc). Traditionally this has been done by sending PPM through the trainer port. But I just learned the right connector (in battery compartment) is a serial connector that I could send data through and use all 16ch.

Has anyone done this? I'm finding projects where an arduino is used on the other end (reading data from the Rx), but what about the other way around, as a custom controller sending data?

(I haven't dug in yet, but I did notice posts/libraries for decoding for arduino, but what about encoding?)

Re: Controlling 16ch via SBUS on Taranis Tx (external analog inputs)

Posted: Mon Aug 28, 2017 2:46 pm
by MikeB
eepskye includes the option of sending data to ersky9x using SBUS format, so you will find the encoding code in there. ersky9x also uses SBUS over bluetooth to handle wireless trainer operation, so SBUS encoding code is also in there.

Mike.

Re: Controlling 16ch via SBUS on Taranis Tx (external analog inputs)

Posted: Mon Aug 28, 2017 11:16 pm
by bob195558
So roachslayer could use erSky9x on Taranis !

Re: Controlling 16ch via SBUS on Taranis Tx (external analog inputs)

Posted: Tue Aug 29, 2017 12:44 am
by roachslayer
Ok thanks. So I take it no arduino lib already exists for the express purpose of encoding? (vs decoding)

Is there a spec somewhere that describes the data sent via SBUS (Will help reduce time to understand going through eepskye code).

Re: Controlling 16ch via SBUS on Taranis Tx (external analog inputs)

Posted: Tue Aug 29, 2017 12:47 am
by roachslayer
bob195558 wrote: Mon Aug 28, 2017 11:16 pm So roachslayer could use erSky9x on Taranis !
Does openTX implement protocol differently than erSky9x?

The only thing I know about openTX is that as of v2.1 it supports input through the serial connector, though that was a year ago and I have not seen anyone actually produce anything like a Bluetooth adapter, etc. I don't know anything about erSky9x, but I am now looking...

Re: Controlling 16ch via SBUS on Taranis Tx (external analog inputs)

Posted: Tue Aug 29, 2017 2:13 am
by bob195558
I use erSky9x on my Taranis-x9d and like it a lot, it can do some stuff that opentx can not do.
MikeB can answer better than I am able to about implementing protocols.

Bob B.

Re: Controlling 16ch via SBUS on Taranis Tx (external analog inputs)

Posted: Tue Aug 29, 2017 10:44 am
by Kilrah
No, OpenTX takes SBUS in just the same.

A 30 sec search brought this: https://github.com/bolderflight/SBUS

Re: Controlling 16ch via SBUS on Taranis Tx (external analog inputs)

Posted: Tue Aug 29, 2017 6:11 pm
by roachslayer
I've found that too, and many similar libraries. But the example code leaves me with almost nothing in how to actually use this thing. I have no problem admitting, I'm not a bit pusher or driver dev, so I wont get into the structure of data packets (low level), but I know how to write apps and logic (for rPi, arduino, etc) if an API is well documented so I can go to town.

Getting super practical for a moment: I have 3 analog inputs (eg. values 0-1024) into an arduino and I want to send the appropriate data to the transmitter to move, say, channels 2,3,4.

Re: Controlling 16ch via SBUS on Taranis Tx (external analog inputs)

Posted: Sun Sep 10, 2017 1:15 am
by emef
I've just completed a proof of concept of this today for my own project. I used the XJT external transmitter module and the XM+ receiver, both from frsky.

I'm not sure if you can do it directly through the x9d but I was able to control the XJT external module (you can find on amazon). I supplied 9v power/ground and a PPM signal wire from my microcontroller running on a beaglebone. The PPM protocol is pretty straightforward and I've seen some reference code for the arduino (this is a good one: https://quadmeup.com/generate-ppm-signal-with-arduino/)

If you want to see the code for the beaglebone you can see my repos here:

https://github.com/emef/beaglebone_ppm

https://github.com/emef/beaglebone_sbus

Let me know if you want more specific details, but maybe this can help you get started.

Re: Controlling 16ch via SBUS on Taranis Tx (external analog inputs)

Posted: Wed Jan 24, 2018 5:11 pm
by pghbabya
No stickys about bumping older threads, so apologies in advance :)

emef: would your beaglebone code be affected in any way if I were to use a Spektrum DM9 transmitter hooked up to my Taranis QX7? I have a couple of e-flite aircraft and the motors are integrated with the rx board... so I'm not sure I can swap out the receiver.

Re: Controlling 16ch via SBUS on Taranis Tx (external analog inputs)

Posted: Sun Feb 04, 2018 6:47 am
by emef
I imagine that the spektrum transmitter also speaks PPM so it would likely be fine.

Re: Controlling 16ch via SBUS on Taranis Tx (external analog inputs)

Posted: Sun Feb 04, 2018 7:34 am
by Kilrah
It does but is picky about the usually non-significant PPM polarity and pulse timings so you might need to play a bit with the parameters to get it to work.