SBUS Trainer input
- MikeB
- 9x Developer
- Posts: 17995
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
SBUS Trainer input
I've just been testing a new feature in ersky9x. Following a request from Wayne at Aloft Hobbies, I've added the ability to use a SBUS signal as the trainer source into the COM2 input of the SKY board, the 9XR-PRO, and the serial port in the battery bay of the Taranis.
This is all working, and I've also added PPM9 to PPM16 mix sources to allow all 16 channels to be used.
This make the implementation of a wireless trainer system quite easy.
I've passed the code to Bertrand and this feature should also therefore be in openTx.
I'll hopefully post a test version of ersky9x tomorrow sometime with this in.
There is an option in the TELEMETRY2 menu for the COM2 Function. You select either "Telemetry" or "SbusTrain".
If necessary, I should be able to extend this to allow COM1 to be used for this function for those who need COM2 for telemetry.
Given the support for 16 trainer channels, I'll look to extend the Bluetooth as trainer to use 16 channels as well. It might make sense to use SBUS protocol over Bluetooth rather than the existing protocol, which is very simplistic.
Mike.
This is all working, and I've also added PPM9 to PPM16 mix sources to allow all 16 channels to be used.
This make the implementation of a wireless trainer system quite easy.
I've passed the code to Bertrand and this feature should also therefore be in openTx.
I'll hopefully post a test version of ersky9x tomorrow sometime with this in.
There is an option in the TELEMETRY2 menu for the COM2 Function. You select either "Telemetry" or "SbusTrain".
If necessary, I should be able to extend this to allow COM1 to be used for this function for those who need COM2 for telemetry.
Given the support for 16 trainer channels, I'll look to extend the Bluetooth as trainer to use 16 channels as well. It might make sense to use SBUS protocol over Bluetooth rather than the existing protocol, which is very simplistic.
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!
Re: SBUS Trainer input
Nice one Mike. Question. Do you mean send ALSO the Sbus signal over bluetooth, or replace the existent serial completely?
I'm asking because of some of us still using the arduino and also the DJT that doesn't have sbus..
Of course I am thinking about the trainer communication between the radio and eepskye.. or am I missing something?
I'm asking because of some of us still using the arduino and also the DJT that doesn't have sbus..
Of course I am thinking about the trainer communication between the radio and eepskye.. or am I missing something?
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: SBUS Trainer input
Thanks Mike. This one is ready for tests in the nightly builds here:
http://jenkins.open-tx.org/nightly-21/
(backup your eeprom as it will be automatically converted on first start)
You will also have a 3rd timer in this version, with timer names etc. = a preview of OpenTX 2.1
http://jenkins.open-tx.org/nightly-21/
(backup your eeprom as it will be automatically converted on first start)
You will also have a 3rd timer in this version, with timer names etc. = a preview of OpenTX 2.1
- MikeB
- 9x Developer
- Posts: 17995
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: SBUS Trainer input
An update from Wayne. He really wanted to use a pin in the module bay, so he can produce a "plug and play" module. I discovered that pin 2, which is for a "heartbeat" signal from the XJTs (internal and external), is wired up, but not used by the XJT. As luck would have it, it is wired to a processor pin the supports a currently unused USART. So, a quick bit of code, and I have the SBUS signal read and processed from pin 2 in the module bay of the Taranis. (Code e-mailed to Bertrand).
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!
Re: SBUS Trainer input
The heartbeat signal is actually present, but the XJT has an open collector output. So there might be a conflict during the heartbeat pulse.
- MikeB
- 9x Developer
- Posts: 17995
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: SBUS Trainer input
I put my 'scope on it, before I connected the SBUS signal, and there was no obvious signal present, just noise pickup from the PXX input signal.
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!
Re: SBUS Trainer input
Sorry Mike, I might be getting to much sun on my head lately but I don't really understand what is going on.. maybe it is just a stupid question? or am I completely lost here? Will eepskye continue to send a trainer signal that the arduino understands? Or will the arduino have to be programmed with the Sbus protocol for the trainer? or maybe we are talking about 2 different things?jhsa wrote:Nice one Mike. Question. Do you mean send ALSO the Sbus signal over bluetooth, or replace the existent serial completely?
I'm asking because of some of us still using the arduino and also the DJT that doesn't have sbus..
Of course I am thinking about the trainer communication between the radio and eepskye.. or am I missing something?
thanks,
João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
- MikeB
- 9x Developer
- Posts: 17995
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: SBUS Trainer input
I won't be changing the eepskye output any time soon, if ever, don't panic!
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!
Re: SBUS Trainer input
Ha ha, ok.. Thanks Mike. As I said, too much Sun on my brain..MikeB wrote: don't panic!
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
Re: SBUS Trainer input
That was my observation, so I asked Adela. The signal IS driven by the module as open collector, but due to the circuitry in the radio not pulling it up it's barely noticeable. It should still pull your SBUS signal down though.MikeB wrote:I put my 'scope on it, before I connected the SBUS signal, and there was no obvious signal present, just noise pickup from the PXX input signal.
- MikeB
- 9x Developer
- Posts: 17995
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: SBUS Trainer input
According to the schematic I have, there is a 10K pullup in the radio, and I still didn't see it getting pulled down. I'll have a closer look tomorrow.
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!
- MikeB
- 9x Developer
- Posts: 17995
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: SBUS Trainer input
Just checked the heartbeat signal from the XJT. It is not only open collector, but also has a 500 ohm resistor in series with the output. This means the SBUS input is able to override the heartbeat signal.
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!
Re: SBUS Trainer input
Cool, all good then!
Sent via mobile
Sent via mobile
Re: SBUS Trainer input
I really like the direction this is going and truly appreciate the work and energy you put into it! I love the idea of being able to put receivers etc. in the module bay of the Taranis, especially for wireless trainer systems!MikeB wrote:An update from Wayne. He really wanted to use a pin in the module bay, so he can produce a "plug and play" module. I discovered that pin 2, which is for a "heartbeat" signal from the XJTs (internal and external), is wired up, but not used by the XJT. As luck would have it, it is wired to a processor pin the supports a currently unused USART. So, a quick bit of code, and I have the SBUS signal read and processed from pin 2 in the module bay of the Taranis. (Code e-mailed to Bertrand).
Mike.
Would it be possible to also enable CPPM input on pin 2 of the JR module bay? This would be great for simpler receivers that do not support SBUS or other DIY projects.
Greetings,
Philipp
- MikeB
- 9x Developer
- Posts: 17995
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: SBUS Trainer input
I've already scheduled work on that for this weekend! I've taken time off from coding today to go flying!
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!
Re: SBUS Trainer input
Good you went flying Mike. I hope you had a great time
João
João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
- MikeB
- 9x Developer
- Posts: 17995
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: SBUS Trainer input
All basically working. I can select between CPPM on the Jack (trainer) input, SBUS on pin 2 in the module bay and CPPM on pin 2 in the module bay. Just got a few minor things to tidy up.
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!
Re: SBUS Trainer input
This sounds awesome!
How much effort would it be to implement a binding procedure for CPPM capable receivers?
I am thinking of the OrangeRX R615X in particular (http://hobbyking.com/hobbyking/store/__ ... _CPPM.html).
Bind Mode is entered by pulling the CPPM signal pin low while applying power to the receiver.
Why would one want to do this?
Here's why:
Conncetions to the Taranis are trivial, only [CPPM_IN] eg. [HEARTBEAT], [VBAT] and [GND] needed, these are found in the correct order next to each other in the JR module bay of the Taranis, meaning one could use a regular 3 pin female to female servo lead and just plug it in.
For reference: (http://eastbay-rc.blogspot.de/2014/01/t ... n-out.html)
[thumbnail=left]http://3.bp.blogspot.com/-tsTSoDzvDGQ/U ... Pinout.jpg[/thumbnail]
Of course binding via a menu option is not necessary, one could simply use a regular bindplug or a tactswitch, I just think it would be really neat and quite useful if you want to teach all your Spektrum friends how to fly a particular model of yours.
What do you think?
How much effort would it be to implement a binding procedure for CPPM capable receivers?
I am thinking of the OrangeRX R615X in particular (http://hobbyking.com/hobbyking/store/__ ... _CPPM.html).
Bind Mode is entered by pulling the CPPM signal pin low while applying power to the receiver.
Why would one want to do this?
Here's why:
Input voltage range is ideal for the stock 6S NiMH pack and might work for a 3S LiFe aswell, an additional BEC / VREG might be necessary for a 3S LiPo though.Features:
[...]
• Compatible with DSM2/DSMX 1024/2048 aircraft radio and module systems
• CPPM output allowing for single line connection with compatible CPPM devices
[...]
Specification:
Channels: 6
Input voltage: 3.7~9.6V
Size: 19.5x30x10mm, 43x22x13mm with case
Weight: 3.7g / 9.8g with case
Conncetions to the Taranis are trivial, only [CPPM_IN] eg. [HEARTBEAT], [VBAT] and [GND] needed, these are found in the correct order next to each other in the JR module bay of the Taranis, meaning one could use a regular 3 pin female to female servo lead and just plug it in.
For reference: (http://eastbay-rc.blogspot.de/2014/01/t ... n-out.html)
[thumbnail=left]http://3.bp.blogspot.com/-tsTSoDzvDGQ/U ... Pinout.jpg[/thumbnail]
Of course binding via a menu option is not necessary, one could simply use a regular bindplug or a tactswitch, I just think it would be really neat and quite useful if you want to teach all your Spektrum friends how to fly a particular model of yours.
What do you think?
- MikeB
- 9x Developer
- Posts: 17995
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: SBUS Trainer input
Not directly possible. The heartbeat signal (pin 2) has a transistor buffer that make the pin input only. It would probably need pin 5 to be wired in parallel with pin 2 to be able to drive the signal low when required.
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!
- MikeB
- 9x Developer
- Posts: 17995
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: SBUS Trainer input
I can confirm the R615X does work in CPPM mode. I tested this in my Taranis running ersky9x with the R615X connected to GND and pin 2, but separately powered. The student Tx was a 9XR-PRO with a prototype DSM2/X Tx module, already bound to to the R615X.
To use the power pin in the module bay will need some extra code to turn it on in the Taranis.
Mike.
To use the power pin in the module bay will need some extra code to turn it on in the Taranis.
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!
Re: SBUS Trainer input
Would this interfere with the function of the internal XJT module? Pin 5 is used for the SMART Port, right? Wouldn't the internal module pull this pin low while receiving telemetry, or are there separate inputs for that?
- MikeB
- 9x Developer
- Posts: 17995
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: SBUS Trainer input
Yes, it would probably need some extra circuitry, and may not work at all. In that case, maybe we can use pin 1. This is specific to the external module connector, and has a transistor driver with a 10K pullup resistor.
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!
Re: SBUS Trainer input
I personally think using pin 5 is too complicated and does not go well with the idea of keeping this plug and play. Pin 1 should work without additional circuitry, however one would lose the PPM output which limits you to using the internal module. Therefore it might be the best option to use a pushbutton and keeping this pressed while plugging the receiver in.
Or did I get something wrong?
Or did I get something wrong?
- MikeB
- 9x Developer
- Posts: 17995
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: SBUS Trainer input
If you are connecting to the module bay connector then surely, you are losing the option of using an external Tx module anyway so must be using the internal module.
Connecting to the external module pins, while there is a module in the bay will be difficult.
You can currently (is in ersky9x, should be in openTx), use SBUS on the serial connector in the battery bay. I'm looking into allowing CPPM on the receive pin of this connector. I think there is an unused timer associated with this signal, so it should be possible to implement. You can, of course, use CPPM on the trainer jack.
Mike.
Connecting to the external module pins, while there is a module in the bay will be difficult.
You can currently (is in ersky9x, should be in openTx), use SBUS on the serial connector in the battery bay. I'm looking into allowing CPPM on the receive pin of this connector. I think there is an unused timer associated with this signal, so it should be possible to implement. You can, of course, use CPPM on the trainer jack.
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!
Re: SBUS Trainer input
I am going to integrate a R615X in my diy DM9 spektrum module, thats why I do not want to sacrifice pin 1 for binding. That's just my personal use case though, others might appreciate binding via pin 1. This could be useful for the plug and play modules Aloft seems to be interested in making.
I did not know that pin 2 is a buffered input, I was thinking of it as a regular 'Arduino style' GPIO which would have made binding very easy.
I did not know that pin 2 is a buffered input, I was thinking of it as a regular 'Arduino style' GPIO which would have made binding very easy.
Re: SBUS Trainer input
For reference: viewtopic.php?f=40&t=4868&p=97508#p97508
Thanks for implementing this feature, Mike! It's awesome
Thanks for implementing this feature, Mike! It's awesome
Re: SBUS Trainer input
Mike, thanks for implementing this!
One question, though. Is it possible to *concurrently* use the trainer port (jack) on my Taranis?
I'd like to use the Quanum 3-axis no-drift head tracker (http://www.rcgroups.com/forums/showthread.php?t=2440420) connected to the jack (providing channels 6-8), and the Linker on CPPM (with a D4R) in the module bay for a spotter to gain control of channels 1-4.
Is that currently possible?
Sent from my iPhone using Tapatalk
One question, though. Is it possible to *concurrently* use the trainer port (jack) on my Taranis?
I'd like to use the Quanum 3-axis no-drift head tracker (http://www.rcgroups.com/forums/showthread.php?t=2440420) connected to the jack (providing channels 6-8), and the Linker on CPPM (with a D4R) in the module bay for a spotter to gain control of channels 1-4.
Is that currently possible?
Sent from my iPhone using Tapatalk
- MikeB
- 9x Developer
- Posts: 17995
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: SBUS Trainer input
I doubt it currently works. Are you using ersky9x or openTx on your Taranis?
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!
Re: SBUS Trainer input
Just so we understand, would that mean using the PPM/Serial pin in the module bay as an input? If so, that for sure offers a few possibilities, like dealing with 2 different trainer inputs at the same time. With the new trainer profiles in ersky9x it would be a piece of cake managing both inputs. Good for FPVers for example..
Not sure how hard it would be to implement it as I have no idea about programming other than flashing LEDs, and only if they are of the same color
João
Not sure how hard it would be to implement it as I have no idea about programming other than flashing LEDs, and only if they are of the same color
João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
- MikeB
- 9x Developer
- Posts: 17995
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: SBUS Trainer input
No, the PPM pin is still an output. On the Taranis, pin 2 is defined as a "heartbeat" signal (input) from the module, but we can use this to input CPPM or SBUS as a trainer input for wireless trainer operation.
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!