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

Electronic projects that are either related to the firmwares for the 9x, or simply great for radio control applications.
Post Reply
roachslayer
Posts: 6
Joined: Sun Aug 27, 2017 8:44 am
Country: -

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

Post 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?)

User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

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

Post 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.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
bob195558
Posts: 2377
Joined: Sun Dec 16, 2012 7:24 pm
Country: United States
Location: New England, Vermont
Contact:

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

Post by bob195558 »

So roachslayer could use erSky9x on Taranis !
Er9x on 9x radio, with Smartieparts Programmer and TelemetrEZ Board.
ErSky9x on Taranis, Sky9x, 9Xtreme radios.
3D-Printing: (https://openrcforums.com/forum/viewforum.php?f=129).
roachslayer
Posts: 6
Joined: Sun Aug 27, 2017 8:44 am
Country: -

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

Post 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).
roachslayer
Posts: 6
Joined: Sun Aug 27, 2017 8:44 am
Country: -

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

Post 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...

User avatar
bob195558
Posts: 2377
Joined: Sun Dec 16, 2012 7:24 pm
Country: United States
Location: New England, Vermont
Contact:

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

Post 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.
Er9x on 9x radio, with Smartieparts Programmer and TelemetrEZ Board.
ErSky9x on Taranis, Sky9x, 9Xtreme radios.
3D-Printing: (https://openrcforums.com/forum/viewforum.php?f=129).
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

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

Post by Kilrah »

No, OpenTX takes SBUS in just the same.

A 30 sec search brought this: https://github.com/bolderflight/SBUS
roachslayer
Posts: 6
Joined: Sun Aug 27, 2017 8:44 am
Country: -

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

Post 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.
emef
Posts: 2
Joined: Sun Sep 10, 2017 1:09 am
Country: -

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

Post 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.
pghbabya
Posts: 2
Joined: Wed Jan 24, 2018 5:07 pm
Country: -

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

Post 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.
emef
Posts: 2
Joined: Sun Sep 10, 2017 1:09 am
Country: -

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

Post by emef »

I imagine that the spektrum transmitter also speaks PPM so it would likely be fine.
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

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

Post 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.

Post Reply

Return to “General RC Electronic Projects and Discussion”