SMALL - espritmodel.com SMALL - Telemetry SMALL - Radio
Reply
Thread Tools
Old Nov 02, 2010, 09:38 PM
Registered User
dathird313's Avatar
Joined Jul 2006
76 Posts
Yippee!
USB 2 PPM converter (arduino)

I completed this stage of this project several months ago I think it was February or March. I got a bit burned out by programming every night and I was originally waiting to have a full working protoype, but seeing as there is a bit of interest in the subject I'm posting a sample video to show that the idea is sound and working.
usb2ppm arduino (0 min 51 sec)


Here is what is currently working.

1. Theoretically any standard HID joystick device to any positive shift module.

Here are future features that are half way working.

Mapping any input to any channel with any function, expo, limits, reverse in between. To do this I allocate a block of memory and use a parser to be able to figure out what functions to call at runtime. This is working, but not in the video. The video is of an older prototype, and I didn't want to risk my new code not working and having nothing to show for it.

LCD module and menu system. This is working, and in the video if you have a quick eye you may notice that I have a remote hard wired into the arduino. So you will be able to make changes at runtime.

EEPROM is also working, so you can store your settings.

Its pretty neat stuff, and if you go to circuitsathome you can see that with his new mini usb board, you can have the whole system to play with for only $40. Oleg is also a really nice guy to deal with. He donated the LCD module I am using in the project and helped me out when I thought I had burned out the shield.
dathird313 is offline Find More Posts by dathird313
Reply With Quote
Sign up now
to remove ads between posts
Old Nov 03, 2010, 04:20 AM
SILURIA / UK
Shikra's Avatar
United Kingdom
Joined Jun 2009
2,440 Posts
Keep us posted. Cool project
Shikra is offline Find More Posts by Shikra
RCG Plus Member
Latest blog entry: MultiWii OSD - MWOSD NG
Reply With Quote
Old Nov 03, 2010, 11:12 AM
Registered User
Germany
Joined Mar 2007
200 Posts
Hi,
I am working on a similar project and want to extend it. At the moment I use a joystick, a PC and a USB2Serial interface to control an IR 3 channel helicopter. My plan is to replace the PC with a Freeagent Dockstar (http://www.seagate.com/www/en-us/pro...gent_dockstar/) that can run a small Debian from the Internal flash. But I also want to extend the software towards 2.4ghz systems that need as I understand it so far ppm input. To generate these ppm or pwm signals is rather simple with my software but where do I find information about the characteristics of the different signals? I understand that different manufacturers use different protocols but where can I find information about it?

Keep up the work and keep up posting.

Darkstar.
Darkstar2000 is offline Find More Posts by Darkstar2000
Reply With Quote
Old Nov 03, 2010, 02:23 PM
Registered User
Aberdeen, Scotland, UK
Joined Dec 2007
607 Posts
dathird313,

I was away to ask you how you managed to get the Arduino into host mode....:-).....but then saw your link to the shield. Nice one!

Glad to see there are more PPM Joystick projects appearing. With my own one it's been great fun.

PS............please post a build thread!

Ian.
IanJ is offline Find More Posts by IanJ
Reply With Quote
Old Nov 03, 2010, 02:31 PM
Registered User
Romania, Dolj, Craiova
Joined Sep 2007
14,640 Posts
Quote:
Originally Posted by Darkstar2000 View Post
...But I also want to extend the software towards 2.4ghz systems that need as I understand it so far ppm input. To generate these ppm or pwm signals is rather simple with my software but where do I find information about the characteristics of the different signals? I understand that different manufacturers use different protocols but where can I find information about it?

Keep up the work and keep up posting.

Darkstar.
PPM is the same for all, no module system use a proprietary input.

I would be interested about such box connecting an USB Joystick and outputing PPM, without any mixers, reversing, D/R and stuff.
Just a 1:1 joystick to channel mapping.
I do this in this moment with a laptop, a Flytron usb to ppm adapter, and a mapping software written by me, but I would like to be able to do it without laptop.
All the mixings are done in my radio, no need any external intelligence or display. What do you think ?
renatoa is offline Find More Posts by renatoa
Last edited by renatoa; Nov 03, 2010 at 02:45 PM.
Reply With Quote
Old Nov 03, 2010, 04:22 PM
Registered User
dathird313's Avatar
Joined Jul 2006
76 Posts
Darkstar, sound a lot like my earlier version of this project
http://www.rcgroups.com/forums/showthread.php?t=1174012

Its a nice idea, but my issue is that embedded linux boxes start slowly. You do have that nice bundle of having all the usb hid code done for you, but you are back to having to wait for it to boot. Plus $40 is a lot better than $100, or even $50.

RENATOA,
I could certainly put together a version that would simply take axes and output PPM. What type of radio do you have that can do that type of advanced mixing?

I'm pretty busy at the moment. I'm hoping someone is interested enough in the project to buy a board and a shield, and I'll be glad to post some code. I think the project is certainly worth $40, plus I'll be glad to provide assistance.
dathird313 is offline Find More Posts by dathird313
Reply With Quote
Old Nov 03, 2010, 04:57 PM
Registered User
United States, FL, Pembroke Pines
Joined Sep 2010
53 Posts
My 6 year old son loves to fly my rc plane but not so good with controls, I decide to make a PPM control using an analog joystick for controls connected to trainer input of my 7C fut 2.4ghz. It took me 2 days to put it together, works very well too. I will post pictures of it later.
ToshCom is offline Find More Posts by ToshCom
Reply With Quote
Old Nov 04, 2010, 07:47 AM
Registered User
Romania, Dolj, Craiova
Joined Sep 2007
14,640 Posts
Quote:
Originally Posted by dathird313 View Post
...RENATOA,
I could certainly put together a version that would simply take axes and output PPM. What type of radio do you have that can do that type of advanced mixing?
...
Futaba 9C.
But any radio able to apply its own mixers on top of student input, in trainer mode, will be able to do the same.
renatoa is offline Find More Posts by renatoa
Reply With Quote
Old Nov 04, 2010, 08:58 AM
Registered User
dathird313's Avatar
Joined Jul 2006
76 Posts
I only have older JR radios, so I didn't know how the mixing works on newer radios. But its certainly easier than what I'm doing right now.
dathird313 is offline Find More Posts by dathird313
Reply With Quote
Old Nov 04, 2010, 11:35 AM
Registered User
Germany
Joined Mar 2007
200 Posts
Ok, the time to boot the system maybe an issue, but so far I use my laptop and so I don't care about the boot time.
I got the box for 20 which is around 28$ at the moment. As long as there are linux (open source or armel precompiled) drivers available it should be no problem to use any available usb input or output device. So far I use a simple USB2Serial interface with an FTDI 232 chipset but I am currently switching to the 2232 highspeed version.

@RENATOA
Can you maybe post a link where I could find e.g. a timing diagram of the PPM used in remote controls?
Darkstar2000 is offline Find More Posts by Darkstar2000
Reply With Quote
Old Nov 04, 2010, 11:53 AM
Registered User
dathird313's Avatar
Joined Jul 2006
76 Posts
here's a good diagram of how PPM works, however it depends on your transmitter, the main difference is shift, which is just a matter of inverting the signal.

http://api.ning.com/files/WmjViE3faL...g_Diagram1.jpg

And here is what you need to make your project work

http://www.rcgroups.com/forums/showthread.php?t=1174012

Bottom of first page I have links to my old code. First one is the computer side C code, which will read joystick information from /dev/input/js0, and the second part is the arduino code which will take the serial information and create a PPM signal out of it.

You can improve upon it as you want, however I'm not sure what the advantage is over your current system of using a laptop, as a router is just a slower laptop, and you have to go through the linux USB stack to get the joystick information.
dathird313 is offline Find More Posts by dathird313
Reply With Quote
Old Nov 04, 2010, 11:57 AM
Registered User
Romania, Dolj, Craiova
Joined Sep 2007
14,640 Posts
dathird was faster

This could help also too, is one of my contributions to FrSky developement:
http://www.frsky-rc.com/ShowProducts.asp?id=48
renatoa is offline Find More Posts by renatoa
Last edited by renatoa; Nov 05, 2010 at 02:50 AM. Reason: typo
Reply With Quote
Old Nov 04, 2010, 05:01 PM
Registered User
Germany
Joined Mar 2007
200 Posts
@RENATO and dathird313
Thanks for the information. Together with other sources I am now that far:

- A servo needs a pwm signal between 1 and 2 ms (sometimes also 0.7 to 2.3)
- All the pwm signals are added up to a single ppm signal
- The ppm signal is formed by generating a short (0.3ms) puls at the beginning of the first pwm pulse and the end of all pwm pulses (which are the beginning of the following pwm puls).
- The pause at the end fills up the gap to an overall package length of 20ms
- The difference between various system is the orientation of the ppm signal: either low to high, or high to low.

Did I understand it right?

Quote:
You can improve upon it as you want, however I'm not sure what the advantage is over your current system of using a laptop, as a router is just a slower laptop, and you have to go through the linux USB stack to get the joystick information.
I just want to be independent of my laptop and have a system that only has to be plugged into the wall. And although it is slower as my laptop it still starts up faster and has far enough power (1GHz arm core) for this task. As there are plenty IO channels on my USB2Serial (16) interface I could indicate the status of the software (joystick calibration, error, working etc) with LEDs.
Darkstar2000 is offline Find More Posts by Darkstar2000
Reply With Quote
Old Nov 04, 2010, 07:25 PM
Registered User
dathird313's Avatar
Joined Jul 2006
76 Posts
I just looked up the specs on the DockStar, and I have to say I"m impressed. Things have certainly progressed from the days where I was using the WRTSL54GS. Hopefully USB HID support will work with OpenWRT by default. I had quite a hard time getting it working, had to recompile with the bleeding edge version of OpenWRT. It was a fun project. I wish you luck. I would suggest trying it out on a pc version with linux, and then moving it to the dockstar.
dathird313 is offline Find More Posts by dathird313
Reply With Quote
Old Nov 05, 2010, 07:57 AM
Registered User
Aberdeen, Scotland, UK
Joined Dec 2007
607 Posts
Hi,

FYI, both my own Arduino based Joystick projects have code examples of Futaba compatible PPM posted.

Joystick 1 - PPM only

Joystick 2 - PPM + Integrated Tx

Ian.
IanJ is offline Find More Posts by IanJ
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Mini-HowTo PIC 10f202 pwm to ppm converter (BL-converter) Cesco DIY Electronics 15 Apr 01, 2011 04:29 AM
Discussion New I2C to PWM converter for standard ESC obor Multirotor Talk 158 Feb 11, 2011 12:52 PM
Discussion Arduino Code to read PPM timings Nase DIY Electronics 16 Jan 25, 2011 01:59 PM
Discussion What software for Easycap/ AV to USB converter? Rooster433 FPV Talk 4 Oct 09, 2010 10:49 PM
Question PPM to TX problem with arduino generated PPM Nase DIY Electronics 63 Sep 23, 2010 10:41 AM