Controlling 16ch via SBUS on Taranis Tx (external analog inputs)
-
- Posts: 6
- Joined: Sun Aug 27, 2017 8:44 am
- Country: -
Controlling 16ch via SBUS on Taranis Tx (external analog inputs)
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?)
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?)
- MikeB
- 9x Developer
- Posts: 17993
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: Controlling 16ch via SBUS on Taranis Tx (external analog inputs)
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.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
- 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)
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).
ErSky9x on Taranis, Sky9x, 9Xtreme radios.
3D-Printing: (https://openrcforums.com/forum/viewforum.php?f=129).
-
- Posts: 6
- Joined: Sun Aug 27, 2017 8:44 am
- Country: -
Re: Controlling 16ch via SBUS on Taranis Tx (external analog inputs)
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).
Is there a spec somewhere that describes the data sent via SBUS (Will help reduce time to understand going through eepskye code).
-
- Posts: 6
- Joined: Sun Aug 27, 2017 8:44 am
- Country: -
Re: Controlling 16ch via SBUS on Taranis Tx (external analog inputs)
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...
- 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)
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.
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).
ErSky9x on Taranis, Sky9x, 9Xtreme radios.
3D-Printing: (https://openrcforums.com/forum/viewforum.php?f=129).
Re: Controlling 16ch via SBUS on Taranis Tx (external analog inputs)
No, OpenTX takes SBUS in just the same.
A 30 sec search brought this: https://github.com/bolderflight/SBUS
A 30 sec search brought this: https://github.com/bolderflight/SBUS
-
- Posts: 6
- Joined: Sun Aug 27, 2017 8:44 am
- Country: -
Re: Controlling 16ch via SBUS on Taranis Tx (external analog inputs)
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.
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)
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.
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)
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: 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)
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)
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.