PPM to USB Dongle
PPM to USB Dongle
Hey guys.. Why not build your own PPM to USB dongle?
I know, you can just buy one very cheap from China.. But I think it will give you even more pleasure building your own.. My 3 year old son doesn't let me fly on the simulator anymore so I decided to get another dongle so we can fly, eeerrrr... crash together
But then i did remember i saw this project and decided to give it a go.
it is based on a virtual USB port for AVR microcontrollers. you can find all about it here.. Veeeery nice stuff
http://www.obdev.at/products/vusb/index.html
And below is the link for the PPM to USB project.. There are a couple more projects like this one on the V-USB site.
It uses very few components.. I built it with an atmega 8 but would like to port it to an Attiny 45 or 85 if possible as I feel that using the m8 I'm wasting a lot of pins..
The project runs at 12Mhz
I would like some help if possible to port the FW to the attiny as I don't know much about it.. Don't even know if it is possible..
It would also make the project smaller
so, any help would be appreciated and i thank you in advance for it..
http://thomaspfeifer.net/ppm2usb_adapter_en.htm
Here is a little video I made from it working on the bread board
[BBvideo 425,350]http://www.youtube.com/watch?v=SB-9hS8L ... e=youtu.be[/BBvideo]
João
I know, you can just buy one very cheap from China.. But I think it will give you even more pleasure building your own.. My 3 year old son doesn't let me fly on the simulator anymore so I decided to get another dongle so we can fly, eeerrrr... crash together
But then i did remember i saw this project and decided to give it a go.
it is based on a virtual USB port for AVR microcontrollers. you can find all about it here.. Veeeery nice stuff
http://www.obdev.at/products/vusb/index.html
And below is the link for the PPM to USB project.. There are a couple more projects like this one on the V-USB site.
It uses very few components.. I built it with an atmega 8 but would like to port it to an Attiny 45 or 85 if possible as I feel that using the m8 I'm wasting a lot of pins..
The project runs at 12Mhz
I would like some help if possible to port the FW to the attiny as I don't know much about it.. Don't even know if it is possible..
It would also make the project smaller
so, any help would be appreciated and i thank you in advance for it..
http://thomaspfeifer.net/ppm2usb_adapter_en.htm
Here is a little video I made from it working on the bread board
[BBvideo 425,350]http://www.youtube.com/watch?v=SB-9hS8L ... e=youtu.be[/BBvideo]
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
Re: PPM to USB Dongle
It would be cool to refactor the above mentioned code so that it would run on usbasp hardware. Hard to get much cheaper than that. the pinouts would have to be redone. usbasp use PB0(ICP) for the usb side and this project uses that pin for the ppm input side. the usbasp does use the v-usb code though.
Wow and for an advanced project. modify the er9x/opentx firmware to output the ppm on one of the pins used to reflash the 9xr ( I cant remember if any of them arent used as switch inputs during normal Tx operation) . then you could reflash a usbasp with a modified version of this code, plug yourusbasp PPM dongle into the programming port and interact with the simulator. this is probably too much work for the small use case though. Just a mental exercise
Wow and for an advanced project. modify the er9x/opentx firmware to output the ppm on one of the pins used to reflash the 9xr ( I cant remember if any of them arent used as switch inputs during normal Tx operation) . then you could reflash a usbasp with a modified version of this code, plug yourusbasp PPM dongle into the programming port and interact with the simulator. this is probably too much work for the small use case though. Just a mental exercise
Re: PPM to USB Dongle
A couple pictures of it.. Nice little project..
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
Re: PPM to USB Dongle
Looks good
Re: PPM to USB Dongle
You can't see it but there are SMD (1206) caps and resistors on the other side of the board..
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: PPM to USB Dongle
I watched you flying the simulator. You made it look easy. I dont fly very well.
Did you use zener diodes ? The glass type? I notice some of the usbasb are moving away from the glass type.
Did you use zener diodes ? The glass type? I notice some of the usbasb are moving away from the glass type.
Re: PPM to USB Dongle
yes i did. Surface mount ones.
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: PPM to USB Dongle
Stiupid me, I meant to say through hole ones.. Only saw the mistake now sorryjhsa wrote:yes i did. Surface mount ones.
I was at work and had some drunk people wanting to play my guitar at the same time I was posting
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: PPM to USB Dongle
I wish I had my guitar at work. Drunks we got . Guitars not so much
Re: PPM to USB Dongle
In my case, the guitar is a tool I use for work
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
Re: PPM to USB Dongle
Yea
Cant let people mess with your tools
Cant let people mess with your tools
Re: PPM to USB Dongle
Just tested this circuit with my 9x sending 8ch.. No problem at all.. It's amazing that it works so well
The one I bought doesn't accept more than 6 channels..
I wonder if I can send more than 8.. I guess we will have to find out?
João
The one I bought doesn't accept more than 6 channels..
I wonder if I can send more than 8.. I guess we will have to find out?
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
Re: PPM to USB Dongle
Actually the dongle seems to work with more than 8 Channels.. Shame that the simulator doesn't
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: PPM to USB Dongle
Hi
I modified a usbasp to allow this code to run. Had to cut one trace and solder one jumper wire. Last night I got as far as plugging it into the computer and it was recognized as a 'HID joystick' or something like that. I'd like to test it tonight.
What simulator did you use ?
Do you know of a free simulator that will work with the dongle ?
How about anything that will run in linux ? Native or wine?
A guy at work got me started on rc simulator on my android tablet. Now I'd like to do it at home through my 9x or even an old dx4e that i stripped the rf module out of.
Thanks
I modified a usbasp to allow this code to run. Had to cut one trace and solder one jumper wire. Last night I got as far as plugging it into the computer and it was recognized as a 'HID joystick' or something like that. I'd like to test it tonight.
What simulator did you use ?
Do you know of a free simulator that will work with the dongle ?
How about anything that will run in linux ? Native or wine?
A guy at work got me started on rc simulator on my android tablet. Now I'd like to do it at home through my 9x or even an old dx4e that i stripped the rf module out of.
Thanks
Re: PPM to USB Dongle
FMS is free and it should work with it
I use aerofly..
I use aerofly..
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: PPM to USB Dongle
The attiny45 and 85 lack a hardware input capture that the code is using. So it seems that is out as an option .
-Gohst
-Gohst
Re: PPM to USB Dongle
Thanks for inspiring me
I got it built and tested it with the linux program 'jstest-gtk'. Havent tried it with a simulator yet.
I had already cannibalized the 1/8" PPM out plug so I had to hardwire it. I am using USB power for the TX. It only pulls about 50ma. The RF section was used for my DSM mod for my 9X.
I put a few pictures here
https://plus.google.com/u/0/10209286602 ... cJEYm7vBVq
and along the lines of 'license police' I like this guys code -BUT- He uses V-USB with is GPL, NOT LGPL. However this guy releases his code with a NON COM clause. Pretty sure, not 100%, but pretty sure, that is a NO NO. Then again, he could have paid V-USB for a com license, but then he wouldnt be releasing his code at all , I dont think. OK I'm done.
gohsthb is right about the ICP. That is the line I had to cut as USBASP uses that on the USB D- pin. I think the code could be completely rewritten using a 'pin change interrupt', but that is beyond my reach at this time. I just used his binary and hacked the usbasp hardware to match his pin utilization.
I got it built and tested it with the linux program 'jstest-gtk'. Havent tried it with a simulator yet.
I had already cannibalized the 1/8" PPM out plug so I had to hardwire it. I am using USB power for the TX. It only pulls about 50ma. The RF section was used for my DSM mod for my 9X.
I put a few pictures here
https://plus.google.com/u/0/10209286602 ... cJEYm7vBVq
and along the lines of 'license police' I like this guys code -BUT- He uses V-USB with is GPL, NOT LGPL. However this guy releases his code with a NON COM clause. Pretty sure, not 100%, but pretty sure, that is a NO NO. Then again, he could have paid V-USB for a com license, but then he wouldnt be releasing his code at all , I dont think. OK I'm done.
gohsthb is right about the ICP. That is the line I had to cut as USBASP uses that on the USB D- pin. I think the code could be completely rewritten using a 'pin change interrupt', but that is beyond my reach at this time. I just used his binary and hacked the usbasp hardware to match his pin utilization.
Re: PPM to USB Dongle
I was wanting to reduce the number of channels as the dx4e uses 6 ( i think.) I was having a glitchy channel 4. I looked at the code and realized there are 2 files that needed to be changed. My glitch ended up going away when I recalibrated the joystick in linux. I reduced the size of the dead zone in the middle of the stick. dont know why that helped but it did.jhsa wrote:Actually the dongle seems to work with more than 8 Channels.. Shame that the simulator doesn't
I dont know if this git diff will apply as a patch or not. I dont git around much
This reduced the number of ppm channels read AND the number of usb channels outputed.
Code: Select all
diff --git a/firmware/main.c b/firmware/main.c
index 8401cd9..38f176b 100755
--- a/firmware/main.c
+++ b/firmware/main.c
@@ -65,7 +65,7 @@ PROGMEM char usbHidReportDescriptor[50] = { /* USB report descriptor, size must
};
-static uchar reportBuffer[8];
+static uchar reportBuffer[4];
static uchar idleRate; /* repeat rate for keyboards, never used for mice */
diff --git a/firmware/ppm.c b/firmware/ppm.c
index 6766d50..8a156a3 100755
--- a/firmware/ppm.c
+++ b/firmware/ppm.c
@@ -27,7 +27,7 @@
^M
#define PPM_TCNT TCNT1^M
^M
-#define CHANNELS (8)^M
Re: PPM to USB Dongle
lol in my case I built thios dongle cos I wanted to use the 8 9x channels.. the chinese one only accepts maximum 6.. will check the glitch thing..
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: PPM to USB Dongle
I would like to do that as it seems to be pretty straight Forward.rperkins wrote:Hi
I modified a usbasp to allow this code to run. Had to cut one trace and solder one jumper wire. Last night I got as far as plugging it into the computer and it was recognized as a 'HID joystick' or something like that. I'd like to test it tonight.
What simulator did you use ?
Do you know of a free simulator that will work with the dongle ?
How about anything that will run in linux ? Native or wine?
A guy at work got me started on rc simulator on my android tablet. Now I'd like to do it at home through my 9x or even an old dx4e that i stripped the rf module out of.
Thanks
Is that possible on the new Version of the usbasp which Hobbyking sells?
Re: PPM to USB Dongle
I would say yes it should work with any usbasp as they all follow the same hardware schematic. Exactly where you need to cut and solder would be different though.
If you need more help I could probably tell you where to cut and solder if I had good pics of both sides of your usbasp. It would take me a little while to review the code as I dont remember all the details. I do remember it was the ICP pin that needed rerouted.
You know after making the change it wont work as a usbasp any more ?
If I was a better coder I think this code could be modified to work on a usbasp without any hardware changes. It would run off of a 'pin change interrupt' instead of the 'input capture pin' . If there is an interest I can see if I can make that work. Currently I am sidetracked on buying broken pro audio equipment and fixing it. gonna go look at a broken digital piano tonight, but I digress
If you need more help I could probably tell you where to cut and solder if I had good pics of both sides of your usbasp. It would take me a little while to review the code as I dont remember all the details. I do remember it was the ICP pin that needed rerouted.
You know after making the change it wont work as a usbasp any more ?
If I was a better coder I think this code could be modified to work on a usbasp without any hardware changes. It would run off of a 'pin change interrupt' instead of the 'input capture pin' . If there is an interest I can see if I can make that work. Currently I am sidetracked on buying broken pro audio equipment and fixing it. gonna go look at a broken digital piano tonight, but I digress
Re: PPM to USB Dongle
Yes of course I know itrperkins wrote:You know after making the change it wont work as a usbasp any more ?
I am looking for a cheap solution to have an 8 channel (at least) PPM2USB Interface.
Re: PPM to USB Dongle
great
Above I noted the two places the code needed to be modified to change the number of channels.
Above I noted the two places the code needed to be modified to change the number of channels.
Re: PPM to USB Dongle
The one described at the beginning of the thread, works with 8 channels and probably more.. No need to change any code.. I'm using the 8 channels that the simulator allow. I think it wouild be possible to use more as I injected 10 channels and the dongle didin't mess the channels up as some of the dongles do
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
Re: PPM to USB Dongle
Thx!
2x - Turnigy 9X with 9xtreme board;
2x - Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s;
Radiomaster TX16S Max mark II.
2x - Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s;
Radiomaster TX16S Max mark II.
Re: PPM to USB Dongle
Yes I used that dongle on the Taranis trainer port and it gave me 8 channels.
Re: PPM to USB Dongle
Really?tonnie78 wrote:Yes I used that dongle on the Taranis trainer port and it gave me 8 channels.
Which simulator do you use?
2x - Turnigy 9X with 9xtreme board;
2x - Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s;
Radiomaster TX16S Max mark II.
2x - Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s;
Radiomaster TX16S Max mark II.
Re: PPM to USB Dongle
Realflight RC7
Re: PPM to USB Dongle
Octavio, that one works here with PhoenixRC. But it is not quite legal. Yes, and I have the original PhoenixRC dongle
Re: PPM to USB Dongle
ok, i dont have that one.tonnie78 wrote:Realflight RC7
Me too, the same (5.0v). But in case your stock original dongle stops working, and mine is out of warranty time, this is a nice backup. Unless you know where to buy the standalone dongle without paying again 100€+ for a new sim bunble.kalle123 wrote:Octavio, that one works here with PhoenixRC. But it is not quite legal. Yes, and I have the original PhoenixRC dongle
Also i know it works with phoenix RC and others. But, can you take more than 4 channels?
Everytime i try to to configure a new controller only 4 channels were available (RTEA) and nothing more.
2x - Turnigy 9X with 9xtreme board;
2x - Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s;
Radiomaster TX16S Max mark II.
2x - Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s;
Radiomaster TX16S Max mark II.