Serial in eepe/eepskye

eepSKYe is the desktop too for flashing and managing your sky9x firmware.
nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: Serial in eepe/eepskye

Post by nigelsheffield »

Mike posted a version here too which has failsafe in case of s.bus signal loss, it will do what moatasem wants, ie 16 channels pwm output, it can be used as you wanted powering the decoder first and so better connection to servos and then from there powering the RX.
Just look for the last post by mike with a few s.bus to ppm files and choose the one with latest date time.

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

Re: Serial in eepe/eepskye

Post by jhsa »

There's a Sbus to PWM here too.. eepskye sends sbus to communicate with models and there is a decoder for 16 PWM channels posted. It can work with the frsky and original sbus I think.
So he didn't post in the wrong place. ;)

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: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Serial in eepe/eepskye

Post by MikeB »

MigF117 wrote:I have Arduino Mini Pro ATmega328, I need to build a decoder to take SBus from Futaba RX and output 16 PMW channels. Which you have developed already but I've some questions.
1- There is more than one sketch to download on the top post, which one is the final one?
2- I use the failsafe on the radio, so will it work with this decoder or I've to use the failsafe button on the decoder?
3- I'll power the decoder from a powerbox with 5V, so the RX to be powered from the decoder through the SBus cable and the servos will be powered directly from the powerbox, is this setup will cause any problem?
1. I date the files so use the most recently dated/timed one.
2. The failsafe operates if there is NO SBUS input. If the radio goes into failsafe, then the SBUS should send out the failsafe settings so the Arduino won't use its failsafe.
3. I can't see any problems wit your power setup, but I don't have a powerbox myself.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa »

The file on the first post you want to download is this one. It is at the bottom.

Eepskye_SBus to PWM.zip

But I think I might bave renamed something wrong or put the wrong file in the zip.. :(
will have to investigate later..

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
MigF117
Posts: 9
Joined: Thu Mar 12, 2015 5:14 am
Country: Australia

Re: Serial in eepe/eepskye

Post by MigF117 »

Thank you Mike and Joao..

I'll give it ago ocne I manage to get the Arduino software to upload the sketch to the board ...... :x :x :x :x :x :x
I've spent the last 2 days trying to overcome this error.

avrdude: ser_open(): can't open device "\\.\COM3": Access is denied

I tried on 3 different computers (Win 7, 8, 8.1) with no luck..

any thoughts???

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

Re: Serial in eepe/eepskye

Post by jhsa »

It looks like a permissions problem.. But I don't know how to help you on that one.
Had a similar problem on linux a while ago and I solved it..
There are some other people here more qualified for this kind of problem :)

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
MigF117
Posts: 9
Joined: Thu Mar 12, 2015 5:14 am
Country: Australia

Re: Serial in eepe/eepskye

Post by MigF117 »

I tried a lot of things but with no luck at all..

I'm that close of giving up on the whole project....
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa »

I'm sure some people will help you. It's very late now on this side of the world.. give it a few hours and people will see your problem.. ;)

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
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: Serial in eepe/eepskye

Post by mstrens »

Which version of Arduino IDE are you using? Normally with IDE version 1.0.5 or 1.0.6 it should works.
Did you already try to reinstall the IDE? Do you get error messages,
Which device are you using when you try using the sketch. Is it a FTDI?

In the arduino IDE, there is a menu "tools". In this menu you have submenu Board. Did you select the right type of board(e.g. Arduino pro mini 16 mz with 328)?
In the arduino IDE, there is a menu "tools". In this menu you have submenu Programmer. Did you select the right type (e.g. USBasp if you use a FTDI)?
In the arduino IDE, there is a menu "tools". In this menu you have submenu Serial port. Look at the port that is displayed when USB is unpluged and when USB is pluged. When USB is pluged, you should have one entry more in the list. It is this entry that you sould use when you try to upload the sketch.

Hope this can help.
nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: Serial in eepe/eepskye

Post by nigelsheffield »

I had a similar problems
1 was I needed to hold the arduino reset button and then release it as the sketch tried to upload
2 was simply unplugging the USB device in whilst arduino ide was running.
But check all the thing mstrems has pointed out too.
And make sure you have the connections right too.
User avatar
MigF117
Posts: 9
Joined: Thu Mar 12, 2015 5:14 am
Country: Australia

Re: Serial in eepe/eepskye

Post by MigF117 »

Hi Guys

Thank you all for your responses.

I'm using IDE 1.6.1.
The programmer is FT232R FTDI.
I confirmed all the settings and the COM port number.

I uninstalled IDE 1.6.1 and installed IDE 1.0.6, the error now is
"processing.app.debug.RunnerException: Serial port 'COM1' already in use. Try quiting any programs that may be using it."
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: Serial in eepe/eepskye

Post by mstrens »

In IDE, when FTDI is not connected, which COM port do you see in the list (using menu Tools and submenu Serial port.
When you put FTDI in USB plug, which COM port do you see in the list. There should be 1 more and it should be checked.

Did you check the setup of your devices under windows.
E.g. I am under windows 7.
In device manager looking at USB bus controller, when FTDI is not connected, I get a list
When I plug FTDI, I get an entry more in the list (name is USB serial converter). Is it the same on your side.
When I plug FTDI, device manager shows me also an entry (in the root) with "Ports (Com and LPT) and in this item, there is a sub item named "USB serial port (com5)"; com5 is the com port that is added in the IDE when I plug FTDI.

Does windows shows any exclamation marks before some items?

I remember that I already has some issues and had to delete some entries in the devices manager lists. Every thing was fine afterward when Windows recreated them plugging the FTDI in.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa »

Normally the com1 is not used by external devices.. I think it is the parallel port on the PC..

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
MigF117
Posts: 9
Joined: Thu Mar 12, 2015 5:14 am
Country: Australia

Re: Serial in eepe/eepskye

Post by MigF117 »

Attached are 2 screen shoots (one when the FTDI is plugged and one not plugged).

I'm a Systems engineer and have been in IT for years, but this thing is really killing me..............
Attachments
UnPlugged.jpg
Plugged.jpg
User avatar
MigF117
Posts: 9
Joined: Thu Mar 12, 2015 5:14 am
Country: Australia

Re: Serial in eepe/eepskye

Post by MigF117 »

when I use "Upload Using a Programmer" from the File menu in IDE, I get different error

"avrdude: error: could not find USB device "USBasp" with vid=0x16c0 pid=0x5dc"
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa »

This might have nothing to do with your problem but do you have the FTDI correctly connected to the arduino?
Some arduinos you buy on ebay (if not most) have the connections reversed. some FTDI adapters from ebay also have reversed connections. Better always to check that the arduino and FTDI are correctly connected..
Also is your FTDI a real one and not one of those adapters with the CH3240G chip?

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
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: Serial in eepe/eepskye

Post by mstrens »

It seems that FTDI is recognised and use COM3.
Still, as said, in my case, when I plug FTDI in, I get an additional entry in the usb controller list (USB serial converter).
It seems that you do not have this entry. I do not know if that is the reason of the issue.
When I open the properties of this item, in the pilot details, I get a list of 5 files (1 sys and 4 dll).
I could send you those files if you want (I am under windows 7 64)
User avatar
MigF117
Posts: 9
Joined: Thu Mar 12, 2015 5:14 am
Country: Australia

Re: Serial in eepe/eepskye

Post by MigF117 »

IT IS WORKING...

the problem was with the driver..
I downloaded an older revision of the driver and re-installed it in different sequence (Bus first then the port) and now everything is working...

Thanks to everyone here who helped..
Now time to program and try..

I'll keep you all updated.

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

Re: Serial in eepe/eepskye

Post by jhsa »

Good job :)

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 »

I've got this installed in my minimoa now and along with an x4r I have the pwm from x4r controlling the throttle rudder and elev, and this s.bus decoder for the wing surfaces, all working on ground testing including failsafes, just need the wind to die down so I can have a few test flights. Can't see any reason for it not to work though but I'm always a little nervous with new things especially something I built controlling my plane!
I should not be though because I probably do a better solder job then most manufacturers if I say so myself,
Other day swapped a battery connector over and the one I took off (a big red connector on a 5400mah 4 cell lipo from hk) was only actually soldered at the very edgeof the bullet connector looking perfect at first inspection but no solder inside the bullet where the wire goes at all,it would have probably melted off at the 50 or so amps I will be pulling!
Anyway I will update when I fly it and if call goes well I will be buying some more arduino and making more of my wings s.bus and easy to remove, thanks again!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa »

Good luck ;)

I had trouble with a bullet connector once.. But I wasn't so lucky. Plane stopped working mid-air.. Not nice. So, no more of those for me. I use XT60's now and very happy with them :)

I am using the S.Bus to servo decoder to program my models using eepskye on the computer. It's wonderful to see the plane's surfaces move accordingly when you program it on the PC :) No more guessing which direction the controls will move when programming my models as i see it real time ;)

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 »

Thanks for the good luck wishes! :)
Xt60 is what I replaced it with and what I prefer to use in most everything.
Seeing your plane drop out of the sky is never good, its happened to me more then once and its always something that I never even thought about like a retract unit shorting out the 5v ubec and destroying it and then the plane....

I like the idea of the s.bus decoding the eepskye outputs, I have so many planes set up on the opentx now that changing over would be a big hastle I think, though I might be tempted if lua scripts were enabled and to be honest I probably could do better setups now if I started from scratch but I am lazy lol!
Maybe opentx will adopt the s.bus output , they seem to get around to implimenting mikes ideas and coding eventually.....
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa »

nigelsheffield wrote: Seeing your plane drop out of the sky is never good, its happened to me more then once and its always something that I never even thought about like a retract unit shorting out the 5v ubec and destroying it and then the plane....
I had the rudder servo shorting on one of my planes. Fortunately it was just before takeoff ;)
Me and another forum member we are working on something that could prevent that, along with other situations. I´m not going to say more at the moment as the project is still on its beginning.
Waiting for parts at the moment :) But it will be free for everyone to build it of course.. Let's hope it will work. :) Hopefully it will make the hobby a bit safer. That is the intention..
I like the idea of the s.bus decoding the eepskye outputs, I have so many planes set up on the opentx now that changing over would be a big hastle I think, though I might be tempted if lua scripts were enabled and to be honest I probably could do better setups now if I started from scratch but I am lazy lol!
Maybe opentx will adopt the s.bus output , they seem to get around to implimenting mikes ideas and coding eventually.....
You don't need to change to ersky9x to play with it.. You just need one of those decoders and an arduino that can communicate to the computer via serial ;) It's a very good tool to practice and ersky9x and opentx are still not that different. The basics are the same. ;) :)

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 »

Please let me know when you are ready to share your idea on the servo short problem , apart from putting a fuse of some sort on each servo line I have no idea how to protect against a short on the 5v line and still allow 5v to be available for the working servos.
Looking forward to your solution.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa »

That is easy ;)
Solder something like this on you servo plus wire. When there is a short it will warm up quickly and open the circuit. When the short is repaired, it will return to normal operation.. :) Simple ;)

http://www.ebay.com/itm/10pcs-RXEF110-1 ... 2a3da2f2ef

It doesn't have to be this exact one. It must match your servo current specification.

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 »

Flew this morning with the s.bus decoder, 3 batts a nd about 90 mins and all was fine.
I will give it a few more flights when weather allows again just be sure and in the name of testing(this is what I tell my wife) but I would call this a success.
Thanks again guys and I will keep an eye out for more interesting projects like this.
Nigel.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Serial in eepe/eepskye

Post by jhsa »

MikeB wrote:You might like to try this then:
SbusToPpm.zip
SbusToPpm.zip
SbusToPpm.zip
I haven't actually tested it, but I think it should work OK.

Mike.
Mike, I think to avoid confusion, perhaps it would be better to remove the older files and leave only the latest?

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
flarssen
Posts: 15
Joined: Wed Feb 25, 2015 11:37 am
Country: -

Re: Serial in eepe/eepskye

Post by flarssen »

MikeB wrote:You might like to try this then:
SbusToPpm.zip
Mike.
I tried this one on an 8Mhz 168 3.3V pro mini, and get 3ms pulses every 40ms.
Code has many defines regarding serial input and timing (incl 8MHz), but seems like they are not used in the code.

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

Re: Serial in eepe/eepskye

Post by MikeB »

You are correct that the millisecond timing and the pulse generation assume a 16MHz clock, although the serial input does, I think, adapt to the selected clock.

I'll see if I can find time to look into this.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
flarssen
Posts: 15
Joined: Wed Feb 25, 2015 11:37 am
Country: -

Re: Serial in eepe/eepskye

Post by flarssen »

Thanks. I think serial input is off too, since the outputs doesn't change.

Fred

Post Reply

Return to “eepSKYe”