Serial in eepe/eepskye

eepSKYe is the desktop too for flashing and managing your sky9x firmware.
User avatar
jhsa
Posts: 17812
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Serial in eepe/eepskye

Post by jhsa » Wed May 14, 2014 2:58 pm

First of all I would like to start by saying THANK YOU to 2 members of this forum for this feature. Mike and Mbanzi. It started as a crazy idea when reading about the simulator in eepe/companion. some people wanted the bars going one way, some others wanted them going the other way because it was more correct, etc..
I just thought. if we could see what was happening on the model itself, all that argument would be irrelevant. But obviously all that required a lot of programming knowledge that I don't have, both for an arduino and companion.. Then I decided to do what I do best.. To nag people :mrgreen:
No, not really. I think I even opened a thread about this, at the time I think I requested it for opentx and companion, but I think there wasn't much interest on this feature. One evening I was chatting with mbanzi, a member from this forum and I mentioned this.. He thought it was a great idea and he started to spend some hours of his time. he got some working code on an arduino, and also a modified version of companion. Here is a video showing it working:

https://www.youtube.com/watch?v=KwqIogHXirM

Then we asked Mike for some help, which he did. But companion needed far too many changes and we were not sure that the opentx team was going to implement this on companion, so the project went a bit quiet. We all have life to deal with as well. But Mike kept making some changes in eepe/eepskye that would make this possible in the future. Well, the latest change included the serial output and it was the last step to have some working serial sent by eepskye.

But enough of history now 8-)

We have serial between ersky and eepskye working over bluetooth on the 9XR-Pro, 9x radios with skyboard, and Taranis, but that would leave out the people that use the 9x radio with er9x, and the ones that don't have a bluetooth module installed in the tx. So, there is some code for an arduino board to allow those to use the feature. I use the arduino pro mini 16Mhz 5V with atmega328 via a FTDI adapter connected to the computer via USB, to allow it to receive the serial data from eepskye and output a PPM stream. But other arduino boards may also work.. I will try a nano board next.
Until now eepskye only sent 8 channels over serial but now with the new Frsky "X" modules and receivers it is possible to have up to 16 channels per module using the known S-Bus protocol. So, why not make eepskye (and eepe) output 16 channels over serial? So Mike decided it was a good idea and implemented 16 channel output on eepskye. It was working more or less ok over bluetooth but not with the arduino code that Mike was also changing to support the 16 channels.. there was a lot of latency and the servos moved in steps.
So, after some testing and fiddling with the arduino code, Mike decided to dump the actual serial code in eepskye and use the much better and faster S-Bus protocol on eepskye to send the 16 Channels, as ersky9x already uses this protocol as well anyway.. He also wrote some code for the arduino board that receives the S-Bus data and outputs two PPM streams on pins 9 and 10.
Chennels 1 to 8 on pin 10, and channels 9 to 16 on pin 9.
I don't have to say that this is working very well. Thanks Mike ;)
The arduino also provides a full S-BUS (inverted at 100000) output on Pin 11. This is driven by hardware (timer 2), but otherwise like a software serial port.


You can find the eepskye file here:

viewtopic.php?f=7&t=4676

The one from the 9th of October or later. Just extract it to your eepe directory.. Backup the old one first. At the moment only eepskye has this feature but I think Mike will also implement it in eepe soon.
You will also need to update ersky9x on your radios to the latest test versions from 9th of October so it can receive S-Bus as trainer over Bluetooth.



So what does this do and what can we do with this?
Well, you can make changes to your model, program a new model, etc, by programming the model in eepskye. Use the bluetooth dongle installed on your radio or plug the FTDI and arduino to a USB port on your computer, start eepskye, open/create a model, start the simulator, select the correct COM port, Click on the "Send (SBus)" button, power the model, and see your model's controls move as you move the virtual sticks in eepskye. Cool, right?? ;) :D
Make changes on the editor, and see them happening in real time on the model itself. you don't even need to close the editor or stop the serial connection when you edit the model. No more need to guess which way each aileron is going by looking at the bars. You can see it happening.

RULE NUMBER 1

PLEASE REMOVE THE PROPS WHEN USING THIS FEATURE. ALWAYS. THAT IS A MUST.

We shouldn't have props on when working on the models anyway.

How can we connect things up?
There are a couple options.
1 - Ersky9x radios (includes the 9XR-PRO, 9X with Skyboard installed, and Taranis with ersky9x installed). Bluetooth if the radio has a module installed. In this case a model for the serial must be created. Model file is attached to this post.

2 - with arduino via a FTDI adapter, using a RF module (or two if you want to use the 16 channels) and a receiver bound to it.
The arduino outputs two PPM streams on pins 10 and 9.

Pin 8 of the arduino also goes low (off) when serial link is lost. that means that with some additional circuit, maybe a FET transistor or a relay, we can power the RF module OFF when the serial is lost therefore allowing the receiver to failsafe and keep throttle channel at minimum. This is a safety feature. (Will work on this next and provide a circuit to power the RF module(s) )
Eepskye-Serial_Arduino.jpg
You can also use eepskye to help program your model's failsafe.. much easier than using the tx itself.
Always set failsafe

[BBvideo 425,350]https://www.youtube.com/watch?v=Yqt-Yn1187o[/BBvideo]

3 - With arduino via FTDI, and the PPM output connected to your tx's trainer input.

You must then create a model (Attached to this post) on the tx only for this feature, configure the trainer input for the first 4 channels and/or make some mixes with the PPMn inputs as source in the mixes, and set the weight to 80%. Set the limits on the limits menu to -125 to 125. Here are my settings.. at the moment I set it only for the first 4 channels so I'm using only the trainer input menu on the radio.. You can set it for the full 16 channels by using the PPMn (n = PPM input 1 to 16) as source in the mixer.

on the trainer menu:
RUD := 80% ch1 Switch RUD
ELE := 80% ch2 Switch RUD
THR := 80% ch3 Switch RUD
AIL := 80% ch4 Switch RUD
We will have to calibrate the trainer to the PPM signal from eepskye. just make sure throttle stick is at center in eepskye, the same procedure we use to calibrate another Trainer TX.

Or if you're using the PPMn sources directly in the mixer, you could use something like this:

CH1 80% PPM1 Switch RUD
CH2 80% PPM2 Switch RUD
CH3 -100% FULL
. . R 80% PPM3 Switch RUD
CH4 80% PPM4 Switch RUD
CH5 80% PPM5..... etc, etc,..

As I said before a "Model file" is attached at the end of the post ;)

Note that on channel 3 (my throttle channel) I force the output to -100 when the Trainer/Serial is disabled.

In er9x/ersky9x if a valid PPM signal is not present on the trainer port the trainer will disable itself automatically and give control to the teacher. That includes the PPM sources in the mixer. in this case if the serial is lost, the control will return to the radio and throttle will be forced to minimum.

Limits menu:
All 16 channels at -125 to +125
Here is a little video showing how to connect it this way:

https://www.youtube.com/watch?v=lmvIIV9OyLU

4 - In case you don't have a rx available, or don't want to use the tx or an RF module, there is another possibility :) And this is my favorite method when programming a new model. No RF involved, so no draining of the radio battery. We might need it charged in case we need to go to the field if the Sun comes out, or if it stops raining :mrgreen:
This is a project that converts PPM to PWM using a 4017 IC. All details here:

viewtopic.php?f=84&t=5067


You just connect this converter to the arduino's PPM output on pin 10 and/or pin 9, and use it as if it was a receiver.. ;) For 16 Channels use two of them as the 4017 supports only 8 channels.
Power this little board and the servos using a 4 cell NiMh receiver pack, a BEC, or another suitable power supply.
We can also power it using a circuit connected to pin 8 of the arduino (yet to be designed and the same for the RF module from option 2 above) to trigger the failsafe and stop pulses. Normally ESCs will not run the motor if pulses are lost but as said before, Always remove the props

PPM to PWM decoder_Pins-Channels.jpg
My favorite setup to learn to work with the tx and try new setups. ;) :D
My setup.jpg

I hope you enjoy this feature as much as I will ;) and a big thank you again to Mike and Mbanzi

Mike please feel free to comment or correct any inaccuracy And I do apologise for my English. You all know how bad it is :mrgreen: :mrgreen:

I will be updating this post as we get new ways to connect eepskye to your model ;) :)

João

P.S. - Ahh, one last warning. :shock:

Do not use this to fly your model...
Doing it could be very bad to your( or someone else's) health or property

Eepskye_Serial_NEG_Pulse16.zip
This is the arduino code..
PPM 1 to 8 on pin 10, PPM 9 to 16 on pin 9, and SBUS signal on pin 11..
(2.59 KiB) Downloaded 124 times
PPM Serial.zip
This is the model file to receive and scale the S.Bus and PPM data. Just unzip it, open eepskye, download your eeprom from the radio, right click on an empty model slot and then click "Load model settings". Burn your eeprom back to the tx. Alternatively copy the model file to the "Models" folder on the tx's SD Card, and use the option "RESTORE" from the "Model select menu"
(461 Bytes) Downloaded 130 times
[hr]
[hr]

Arduino as an SBUS Decoder and Outputting 16 Servo Channels with Failsafe on all Channels

Above we saw How we can connect an arduino to eepskye via serial and output 2 PPM streams, that you can feed directly to a TX's trainer port or to an RF module.

Thanks To Mike eepskye now sends out a SBUS signal with 16 channel information through USB and we can decode it using an arduino.. In my case I'm using an Arduino pro mini 16Mhz 5V with an FTDI adapter.. Some other arduino like the Nano for example, that already has the FTDI chip built in can be used.
The project I'm sharing now can decode the SBUS signal from eepskye and also the normal SBUS signal from other devices, and will detect them automatically.. Eepskye outputs the signal at a lower baudrate, 57600 baud and the normal SBUS signal is 100000 Baud and inverted.
According to what Mike said (the bit I understood :) :P ) the PC has trouble to send the signal at 100000 baud. But anyway, the artduino can decode both but I'm only able to test the code with eepskye as I don't own any SBUS equipment. Mike is also working on a version that will use an arduino running at 8Mhz 3.3V. This could probably allow it to be used on a model without the possibility of the arduino having a brown out due to the servos loading the battery too much causing the voltage to drop and a consequent reboot..Not good.. The 3.3v arduino will solve that problem..
So, After a lot of programming work from Mike (Thank You so Much) and some testing we seem to have some working code for this project.. I did design a little stripboard for the project. as you can see on the pictures from mine below, the pins are too close to the arduino and I have changed the design so you don't have to sand your arduino so it fits in between them, like I had to do to mine :mrgreen:
Here are some pictures.
SBUS to PWM-Stripboard.jpg
20141020_154828.jpg
The resistor values used here are not correct.
Option 1 - A board with the arduino and all the components to add the capability to also use an external SBUS source from a frsky receiver for example.. This could be also used to install in your aircraft together with a frsky "X" series receiver and have the extra channels up to 16.
Mike is developing a version of the code that uses an arduino at 8Mhz and 3.3V to avoid brown outs when using a 4 cell NiMh battery pack to power the servos. They could cause the voltage to drop beyond the arduino's working voltage.. Will attach the code to this post when is ready.
Sbus to PWMBoard-Top.jpg
This picture shows the top side of the little board. You can see the failsafe push button on the top right corner. Also on the top left is the External SBUS input.
You have a couple options to power the arduino here. You can power it and the servos from the SBUS power supply, but you have to make sure that the power wires from your SBUS line are thick enough to handle the current from all the servos.
You just have to place the little jumper on the 2 pins near the push button.

You can also power the arduino from the servo battery by installing the jumper. This is used if you are receiving an external SBUS signal and the arduino IS NOT CONNECTED TO THE FTDI.
DO NOT place the jumper if you have the FTDI connected to the arduino. Also, unless you are powering the receiver from the external (Servo) power on this board, please remove the +V (RED?) pin from your SBUS connector, leaving only the signal and ground wires.
If you use a ESC with BEC in your aircraft just connect it normally to your throttle channel and it will also power the servos. In this case an external battery for the servos is not needed :)
Ahh, no need to say.. again... REMOVE THE PROPS OR ROTORS
Sbus to PWMBoard-Bottom.jpg
This is the bottom side of the board.The green wire connects pin A4 to the failsafe switch. Please note that the A4 and A5 connections on the Arduino Pro Mini don't line up with the holes on the board.. I had to solder 2 pins to the vias, and then bend them a bit backwards to line them up with the board.. You will see what I mean when you build it ;). Please note the RED and BLACK lines.They are the power rails connecting all the +V and GROUIND on all servo connections I used a little bit of single wire and soldered it at the same time I soldered the pins as you can see on the other picture above.
Sbus to PWMBoard-Cuts.jpg
This picture shows the cuts that must be made on the stripboard.. Please note that some cuts are made on the holes and some are made between 2 holes. This is very important to get right
Signal Inverter.jpg
Transistor can be a general use NPN. For example the BC546, 547, 549, etc
You can find all these pictures and also the arduino code inside the .Zip file attached to this post.

Option 2 - This version is for use with eepskye only in case you just want to program your models from the PC and see what is happening on your model in real time.
It doesn't use the extra components for the external SBUS source and it is much easier to build. On this version the arduino is powered only from the FTDI, so no need for the little jumper to power it from the servo battery. Servos are, of course powered by an external battery or BEC. If you use a ESC with BEC in your aircraft just connect it normally to your throttle channel and it will also power the servos. In this case an external battery for the servos is not needed :)
Ahh, no need to say.. again... REMOVE THE PROPS OR ROTORS
Sbus to PWMBoard_eepskye only-Top.jpg
If you just want to connect the SBUS to PWM (servo) converter to eepskye via an FTDI adapter and not actually use it to fly, you can build this simple version that doesn't use the external SBUS input. Therefore, no transistor, no resistors are needed, as well as the ability to power the arduino from the servo battery or from the SBUS power. The arduino in this case will be powered from the USB via the FTDI adapter. The arduino's FTDI pins face the top of the picture.
Sbus to PWMBoard_eepskye only-Bottom.jpg
Bottom side of the little board. As you can see, a few less components than the version with the external SBUS capability.
Please note that the A4 and A5 connections on the Arduino Pro Mini don't line up with the holes on the board.. I had to solder 2 pins to the vias, and then bend them a bit backwards using some pliers to line them up with the board.. You will see what I mean when you build it ;). Please note the RED and BLACK lines.They are the power rails connecting all the +V and GROUIND on all servo connections. I used a little bit of single wire and soldered it at the same time I soldered the pins as you can see in one of the other picture above.
Sbus to PWMBoard_eepskye only-Cuts.jpg
This picture shows the cuts that must be made on the stripboard.. Please note that some cuts are made on the holes and some are made between 2 holes. This is very important to get right..
THE ARDUINO CODE USED ON THIS VERSION IS THE SAME AS FOR THE OTHER VERSION WITH THE TRANSISTOR AND RESISTOR, AND IT IS IN THE ZIP FILE ATTACHED TO THIS POST

How to connect to eepskye

To connect the eepskye, please download the latest test version (not released yet) from here

viewtopic.php?f=7&t=4676&p=65894#p65894

And copy it to your eepe installation folder overwriting the existing one.. But please before backup the old one or just rename it..

Connect the arduino (assuming that you already flashed it with the code ) using the FTDI adapter.
Open eepskye and create a new model. You can program some basic mixes like you would do when programming a new model on your radio.

Start the simulator on eepskye. At the top you can select the correct COM port for your FTDI adapter. When done, hit the "Send SBus" button.

Assuming that you already connected all the servos ;) :D Power the Servos by connecting a Battery / BEC to the power pins. You should now be able to control your servos from eepskye.
Please pay attention to the voltage you connect to your servos. Most accept voltages of around 5V. Some until 6V.

How to set Failsafe

Well, if you are reading this post from the beginning you should know by now that is not a good idea to have any type of propellers, rotors, knives, shovels, etc, attached to your model's motors. So please remove them.
The failsafe in this case is more to avoid your servos getting damaged in case some unexpected problem happens, like computer or eepskye (or both :D ) crash, that could move the servos to one side damaging them. The failsafe will kick in if serial is lost and your servos will go to the position you've previously programmed.. Of course THROTTLE SHOULD ALWAYS BE SET AT MINIMUM.. ;) This is basic knowledge :)

To set fasilsafe on all 16 channels, or just the ones you are using, use eepskye to put the channels where you want them to be. You can use those buttons (hold x, hold y, fix x, etc...) above the sticks so they don't return to center and stay where you put them. Wouldn't you want to have this on the radio as well sometimes?? :mrgreen:

After you put the channels where you want them, just press the failsafe button on the board.. Done. The channel positions are now saved on the arduino's eeprom. You can test it by stopping the serial on eepskye.
Ok, I think i didn't forget anything, but I will read all this again later..
Please enjoy it and even if you're not using er9x or ersky9x you can just install eepe and eepskye on your PC and play with this toy. You don't even have to own a radio. AND IT'S FREE :mrgreen:

It is very easy to program a model from scratch this way. Actually I have a dummy model that I'm using to test new mixing and learn a bit more. And it is fun..

Once again a big thanks to mbanzi for starting this project, and a special THANK YOU to Mike that made all this possible

João
Attachments
Eepskye_SBus to PWM .zip
(4.92 MiB) Downloaded 51 times
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

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

Re: Serial in eepe/eepskye

Post by MikeB » Wed May 14, 2014 4:51 pm

Code is in eepe, just need to build and test it.

On er9x/ersky9x, if you have a mix with PPMx as the source AND the mix is controlled by a switch, then on loss of PPMx, the mix is disabled (i.e. treated as the switch is off).

ersky9x is getting a menu option to use the bluetooth input as the trainer input.

Mike.
ersky9x/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

User avatar
jhsa
Posts: 17812
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa » Wed May 14, 2014 5:02 pm

Thanks Mike. I wasn't sure about it. So, we could ignore the trainer menu for this and just use the mixer. On er9x for the 9x radio the resolution on the trainer's menu weight still doesn't allow to change the number by 1 unit. By using the mixer, that is possible..

Will do some more testing later.
For the circuit to power an RF module triggered by arduino's pin 8, a FET should be ok, right?

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

User avatar
jhsa
Posts: 17812
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa » Wed May 14, 2014 5:25 pm

Question, could we eventually connect the serial "TX" pin on the back of the frsky module (DJT/DHT) via a level converter to the arduino, and send telemetry back to the PC through the same serial connection used for the PPM? Could eepe/eepskye then receive the telemetry?
Obviuosly, changes to the arduino code would be necessary ;)

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

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

Re: Serial in eepe/eepskye

Post by MikeB » Wed May 14, 2014 6:31 pm

You'll run out of hardware serial ports on the arduino trying to do that.

Mike.
ersky9x/er9x developer
The difficult we do immediately,
The impossible takes a little longer!


User avatar
jhsa
Posts: 17812
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa » Wed May 14, 2014 6:34 pm

Can't use the same serial port?
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

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

Re: Serial in eepe/eepskye

Post by MikeB » Wed May 14, 2014 6:49 pm

You are receiving the control data from the PC at 57600 baud, to receive the telemetry data, which is at 9600 baud, you need another serial receive.

Mike.
ersky9x/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

User avatar
jhsa
Posts: 17812
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa » Wed May 14, 2014 7:15 pm

Ahh, now I understand.. so, if they were both at the same baudrate it would be possible then?? ;)

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

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

Re: Serial in eepe/eepskye

Post by MikeB » Thu May 15, 2014 9:05 am

On the arduino mini you still only have a single hardware serial port.

Mike.
ersky9x/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

User avatar
jhsa
Posts: 17812
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa » Thu May 15, 2014 10:07 am

so that would need a second arduino then.. At the price they cost now that wouldn't be a problem I guess.. :)

I'm uploading a little video that explains how to connect the arduino to the computer and start eepskye. Mike if you find some time to watch the video and you can see how eepskye doesn't fit on the screen :) I will post the link here as soon as it finished uploading..

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

User avatar
jhsa
Posts: 17812
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa » Thu May 15, 2014 11:05 am

Here is the video: Please excuse my Portugenglish.. :mrgreen:

João

https://www.youtube.com/watch?v=lmvIIV9 ... e=youtu.be



I have a question. I've noticed that when I use the eepskye serial on my laptop the controls jump a bit. they move in steps.. Also the LED on the FTDI adapter that shows data connection, flashes at about half speed than when connected to my main PC. Could that be because of the laptop being slow? When I tried mbanzi's companion on the same laptop it didn't jump (check the video on my first post).

Thanks
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

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

Re: Serial in eepe/eepskye

Post by MikeB » Thu May 15, 2014 11:38 am

Probably the laptop being slow as you say. I'm only sending the position data every 40mS, so 25 times/second at present. I set this before I increased the baudrate from 9600 to 57600, so I can speed this up to 50 times/second.

What is the screen vertical resolution?

Mike.
ersky9x/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

User avatar
jhsa
Posts: 17812
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa » Thu May 15, 2014 12:07 pm

Hi Mike.. on the video the resolution was 800x600. Now before the photos I changed it to 1024x600.
There was an option for 1024x768, but it doesn't change when I try to select it.
It still doesn't fit.. on the sim you can't see channel 7 and 8. Can't it be made to adjust to the screen automatically??

About the jumping problem.. it only happens on the laptop. the main computer is ok.. What I find strange is that the led on the ftdi adapter also flashes slower with the laptop. But for me it is not a problem as I won't use it to fly.. ;)

João
Attachments
20140515_134852.jpg
20140515_134829.jpg
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

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

Re: Serial in eepe/eepskye

Post by MikeB » Thu May 15, 2014 12:57 pm

I've just posted an updated eepskye (with the r205 ersky9x).
I've speeded up the serial update rate (it was in fact 20 times/sec., now 50/sec.), and I tried to make the simulator window shorter.

Mike.
ersky9x/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

User avatar
jhsa
Posts: 17812
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa » Thu May 15, 2014 12:59 pm

testing. ;)

Thank you.. report in a while..

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

User avatar
jhsa
Posts: 17812
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa » Thu May 15, 2014 1:36 pm

Ok, report.. the serial on the laptop is as fast as my main computer before. big improvement. But now with the main computer it got even faster. The data LED on the FTDI now flashes so fast that it seems to be always on. The response of the controls is excellent.. ;) It looks like processor speed might be affecting the serial..

Bad news on the display side. it's about the same.. and it isn't only the sim window.. the editor also doesn't fit..

João
Attachments
20140515_151943.jpg
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

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

Re: Serial in eepe/eepskye

Post by MikeB » Thu May 15, 2014 3:11 pm

I'll look further at the SIM window first. Can you try shrinking the window vertically when it is running? In the Qt form editor, I have a minimum size I can get, but when running, it will go shorter, not sure why (yet).

Mike.
ersky9x/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

User avatar
jhsa
Posts: 17812
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa » Thu May 15, 2014 3:21 pm

I can shrink/expand it horizontally but not vertically.. I can't reach the bottom side and it doesn't shrink by trying to move the top. Also the diagonal doesn't work
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

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

Re: Serial in eepe/eepskye

Post by MikeB » Thu May 15, 2014 3:48 pm

Try the eepskye.exe here: viewtopic.php?f=91&t=2835#p40030.

Mike.
ersky9x/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

User avatar
jhsa
Posts: 17812
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa » Thu May 15, 2014 4:04 pm

Thanks Mike. Answered here:

viewtopic.php?f=91&t=2835&p=77967#p77967

Maybe more appropriate..

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

User avatar
jhsa
Posts: 17812
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa » Thu May 15, 2014 5:01 pm

Another video. this time using the PPM to PWM converter mentioned on the first post. I had to change the arduino pulses to "negative" so this would work. And it does ;)

João

https://www.youtube.com/watch?v=rpKlw9Y ... e=youtu.be
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

User avatar
jhsa
Posts: 17812
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa » Thu Oct 02, 2014 8:53 pm

Ok, today I needed to set the failsafe on my plane and thought that there must be an easier way than trying to hold the sticks and then press the failsafe button on the rx. I could program some safety switches on the radio to keep the channels where I want them when a switch is on, but that takes time and then I must delete them again. It takes some time again. So, I thought I have eepskye, I have bluetooth on my tx so I can connect both.
Downloaded my eeprom from the tx into eepskye, and selected that model in eepskye. then I already keep a model on my tx called "PPM Serial", that is configured for the serial communication between radio and eepskye. After, I started the simulator and connected both eepskye and the tx over bluetooth. Turned the model on. In eepskye's simulator highlight the buttons "Hold x" and "Hold Y". This will hold the simulator's sticks wherever you leave them.. Move them to the required position for setting the failsafe. Now that you have both hands free, just press the button on the frsky receiver :) done :D
Here is a video..

João

https://www.youtube.com/watch?v=Yqt-Yn1187o
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

User avatar
jhsa
Posts: 17812
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa » Fri Oct 10, 2014 2:42 pm

Guys, this feature was updated with some cool stuff. Thanks to mike. Eepskye now sends 16 channels using the S.bus protocol..
Arduino code also updated to support 16 channels and S.Bus. Servo response is much faster than with the old serial.
Check it out on the first post..

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

User avatar
jhsa
Posts: 17812
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa » Sat Oct 11, 2014 6:43 pm

Arduino code updated on the first post.. this version fixes a little issue when disconnecting the serial. Also this new version provides a full SBUS (inverted at 100000) output on Pin 11. This is driven by hardware (timer 2), but otherwise like a software serial port. Thank you so much Mike

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

User avatar
jhsa
Posts: 17812
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa » Mon Oct 13, 2014 10:34 pm

Arduino code updated. Small fix..
Thanks Mike :)

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

User avatar
jhsa
Posts: 17812
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa » Tue Oct 21, 2014 12:34 am

Ok, Just a little update.
We will have one more possibility to connect eepskye to a model through a serial connection.. as I said before, eepskye now sends 16 channels via SBUS. The latest update allowed for 2 PPM streams on Pins 9 and 10 of the arduino. Now, it will be also possible to connect 16 servos directly to the arduino. So, we receive the sbus signal from eepskye through USB and a FTDI adapter and we have 16 channels available on the arduino. With failsafe.
It will be also possible to receive the SBUS signal from other devices like the frsky "X" series receivers and have the 16 channels available, but Mike is still finalizing this feature..
I have built a little stripboard with the arduino on it, as well as the pins to connect power, the 16 channels, an external SBUS input, and a push button for setting the failsafe. To set the failsafe just use eepskye to put the channels where you want them, and press the button once. if you lose the serial connection, the servos will now go back to the positions you've set.
Anyway, here are a couple videos of it working and a picture too..
More to come in the next few days. I will post the code and my stripboard design as soon as Mike finishes the programming and testing. A huge thank you to Mike. This is really some cool stuff. ;)

https://www.youtube.com/watch?v=QyD7CZj2gqc

https://www.youtube.com/watch?v=Rh-eMzumuZM

João
Attachments
SBUS to PWM-Stripboard.jpg
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

User avatar
jhsa
Posts: 17812
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa » Tue Oct 21, 2014 6:30 pm

First post edited with all the info and files for the SBus to PWM decoder.

Thanks Mike

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

User avatar
jhsa
Posts: 17812
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa » Wed Oct 22, 2014 9:40 am

First post revised and updated with a board design without the transistor and resistors for an external SBUS source,just in case you just want to use this with eepskye. The code is the same used for the other version.
Enjoy

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

nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: Serial in eepe/eepskye

Post by nigelsheffield » Tue Mar 03, 2015 3:12 pm

Thanks guys, i just loaded this onto my arduino board and it works well.
Now I just need to decide which I want, easy channel changing from 1 to 8 or 9 to 16 on my small board I built with just 8 channels, or failsafe!
spoilt for choice! :D

User avatar
jhsa
Posts: 17812
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa » Tue Mar 03, 2015 3:44 pm

;) :D
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

Post Reply

Return to “eepSKYe”