Control your plane via your computer - no expensive cable needed - Page 2 - RC Groups
Thread Tools
Mar 11, 2010, 11:45 AM
glider pilot in training
webdragon's Avatar
I'll work on the cable this weekend and get you a recording of the DX5e.

any progress on the windows version?
Sign up now
to remove ads between posts
Mar 11, 2010, 11:50 AM
Registered User
Originally Posted by webdragon
I'll work on the cable this weekend and get you a recording of the DX5e.

any progress on the windows version?
im just working late at night so don't expect ultra quick releases but so far:
controlling the joystick with directx is done (well, it took 5min to be honest)

outputing low latency audio is not done (it took 2h and i still haven't found whats best haha)

"Linux people" are saying the ALSA audio API is not well documented and difficult.. uff.. its a dream compared to xaudio2/xna/directsound/asio/waveout xD

hopefully i get something useable via xaudio2 tonight if i'm not too tired, in that case i'll have a basic joystick to ppm program available... if not, then i hope/guess over the weekend or smth
Mar 11, 2010, 12:57 PM
Wrend's Avatar
Well, I tried recording the output from my Futaba transmitter then playing it back to it to control 4 servos on a receiver corresponding to the 4 main stick channels. Unfortunately, it doesn't seem to work. I'm not sure if the sample rate is too low (I recorded at 48kHz) or if the trainer link needs more data transferred to it than just the PPM signal.

I tried fine tuning the volume but it had no effect but to cause the servos to jitter at high enough levels. Curiously, I didn't need to hold down the trainer switch for this to happen. So it would seem that the signal was only interfering with the normal transmission and not being broadcast through it, though I can't say for sure.
Last edited by Wrend; Mar 12, 2010 at 12:58 AM.
Mar 11, 2010, 01:18 PM
Registered User
when you record, if you get any signal, just send the raw wav
from that its possible to deduce the signal "by hand" then reproduce it
this way you have only one resampling done and the signal is higher quality (i have actually successfully recorded and replayed "directly" at 44.1khz as well but the signal wasnt very nice..)

i think the futaba isnt as sensible as the spektrum/jrs when it comes to output levels (at least, my esky which is "futaba ppm compatible" isnt)

also be careful not to damage the futaba when using it in replay mode (not recording)
the smartpropoplus modifications to the cable probably are good enough to protect it both ways (?)

eventually i'll include whatever i think futaba uses as ppm (or deduce it from the esky) at some point, it might just work out, we will see
Mar 11, 2010, 01:32 PM
Wrend's Avatar
I'll try a few things to improve the audio resolution (as it were) to see if I can get it working. There could be some amplification noise being generated on the audio input I used too.

Either way, I look forward to testing out your program. Also, If you want any samples, I'll pass them along to you. I'm using a Futaba 6EX 2.4GHz radio for this.
Last edited by Wrend; Mar 12, 2010 at 01:07 AM.
Mar 11, 2010, 01:56 PM
High-power Rocket Gliders
iter's Avatar
Originally Posted by jimbob00
If you didn't read my previous link...
Originally Posted by jimbob00
are you another hardware reseller or smth like that? Declaring that intel hd audio is resampled in software is quite wrong in my world its called FUD
Originally Posted by jimbob00
I will dumb it down a lot:
Originally Posted by jimbob00
This will give you a proper, visual idea of what's happening here:
Originally Posted by jimbob00
Feel free to point me wrong
I am not in the business of proving people right or wrong. You can see my profile and my website if you want to know what I do. I notice that you make many assumptions about what I read, what I sell and what I understand. I make no claims about your hardware or the capabilities of any particular chipset. I share my experience, particularly with generating modulation waveforms through Linux audio drivers.

I notice that you use "good," "bad," "right," "wrong," "proper" a lot. These have no meaning to me unless I know the goals you wish to achieve. If your goal is to prove someone wrong (me, or MelihK) you are achieving this goal fabulously. You have done what we haven't. If you have another, more quantifiable goal in this project, I invite you to formalize it share and it with us.

If you have a measurable goal, it's easy to know how well you are achieving it. For example, you might say, "My DX7 stores 20 models. I want a TX just like DX7 but with unlimited memory." Then it's easy to know if your solution is "good." As another example, you might say, "I want a transmitter that is better than the DX7." In this case, it's difficult to know how "good" your solution is and opens us up to an argument about the meaning of "good" and "bad."

Mar 11, 2010, 04:06 PM
Registered User
You insisted and discarded my arguments and persisted, that "alsa is resampling the audio" etc etc (after i said it wasn't)

What do you expect me to say, really? :P

My goal is to have a joystick controlling rc toys via the radio, be reliable/no lag/precise enough. Just happens to be that it can be very precise, which i noted but didn't make a fuss about. I don't really care all that much, i mean, it works.

Your no "right" or "wrong", is actually correct. You're not using right or wrong. That's the spirit of FUD (fear uncertainty and doubt), instead of facing right/wrong choices, one just spread uncertainty.
I really prefer certainty, and i prefer being pointed wrong when i am. it's a respectable business actually!

If that somehow got misunderstood, my apologies.

In short:

Via audio you can represent 1024 steps, and close to 2048 using good enough audio (intel hd audio, 192khz)

Via "poorer" audio (AC97, 96khz) you can represent nearly 1024 which is pretty good enough. Note that intel hd+AC97 is the majority of PCs.

Via really poor audio, you can get at least 44.1khz which isnt enough for 1024 steps, but still works, at least with the DX7.
For the actual explanation refer to previous posts. For the "proof", check the program and change the values i suppose ^^
Mar 11, 2010, 06:36 PM
High-power Rocket Gliders
iter's Avatar
Thank you for clarifying your goals. I understand that you wish to control R/C toys with a link that is reliable enough, precise enough and has no lag. I wonder if you can quantify these goals further: e.g., how many milliseconds of lag you are willing to accept in your system.

I'm not clear on how you intend to generate 1024 or 2048 steps out of a 192kHz device. You get 44.1 steps out of a 44.1kHz device; 192 steps out of a 192kHz device. To generate PPM with 1024 steps you need a 1mHz audio card.

Mar 12, 2010, 03:25 AM
Registered User
You should return the other adapter if not comply with your requirements.
Last edited by renatoa; Mar 13, 2010 at 01:05 AM.
Mar 12, 2010, 06:41 AM
G=667x10^-8 cm^-3 gm^-1 sec^-2
dissymmetry's Avatar

x64 Vista and Windows 7 Users

I thought I'd share this for anyone else crippled by the new x64 versions of Windows, and it's overenforcement of driver signatures. To start with, the only way to get around the driver signature enforcement on these systems is in the F8 menu at Windows startup, there is a disable driver signature enforcement option. The problem is that you have to start Windows that way every time, if you want the hardware with the unsigned driver to work, even after it's installed with enforcement disabled. I found a solution to this irritation, called "Ready Driver Plus", it ammounts to be a macro that will be added to your start menu (giving you one, if you only have one os installed) options as the default, and it runs through the F8 menu routine automaticly, unless you deliberately select the normal startup. It's very convenient.
This is how you get this working on x64 Vista and Windows 7.
Mar 12, 2010, 08:37 AM
Registered User
Originally Posted by RENATOA
You got an (almost) free sample of other similar device specifically designed for Futaba, without owning the proper radio, under the request to develop open software for that device.
You weren't able to make it working, obviously, maybe you damaged it, based on your oscilloscope readings. Then, started bashing in the other thread devoted to that device, and now opened this thread where you continue to spread the same BS and nosense.
My opinion is that you must immediately return it or forward to other developer the free offer device, and start stopping referencing it at all, if you weren't able to comply the requests of the offer.
what are you talking about?
- there was zero request with the offer, i don't have to comply to anything
- i have no bashed anything
- ive been a flytron supporter for a long time
- the signal from my device is not very nice, but it works perfect with the esky (you know, its rated for esky and JR too)
- i did ask for the DX7 before getting it
- i gave all necessary info to make spektrum work with it (not going to reverse the firmware myself)
- got zero feedback on the spektrum signal or usb device signal except "it must be broken" (but it works on every other radio actually..)
- i made a new thread when asked to do so about the audio ppm

oh and i'm not going to reply to you further as its a waste of time at this point. By not being a vendor i dont have to care about such crap since ive nothing to sell.
Mar 12, 2010, 08:48 AM
Registered User
Originally Posted by iter
Thank you for clarifying your goals. I understand that you wish to control R/C toys with a link that is reliable enough, precise enough and has no lag. I wonder if you can quantify these goals further: e.g., how many milliseconds of lag you are willing to accept in your system.

I'm not clear on how you intend to generate 1024 or 2048 steps out of a 192kHz device. You get 44.1 steps out of a 44.1kHz device; 192 steps out of a 192kHz device. To generate PPM with 1024 steps you need a 1mHz audio card.

actually, you can get up to 384 steps out of the intel hd audio based cards.
I thought i was able to combine the 8 dolby channels at 192khz but i misread it (it would be between 1024 and 2048 steps), you've maximum 96khz. its a final maximum 768 steps using this technic/hack and require sometimes to modify your wiring or using a different plug.

Most cards thus generate "easily" 384 steps using both channels and interleaving the signal, cheaper cards usually 192 steps, even cheaper 88, and dolby 5.1 ones 240 with modifications. (via dolby the loud ".1" channel is obviously omitted, this goes at like 100hz max)
I think most will get an effective 384 steps.
its actually good enough for the goal albeit does not achieve the higher precision i claimed 2-3 posts higher, my apologies and thanks for proving me wrong (or whatever you call it!)

About the lag, I can't quantify it easily, but when i move the joystick from the computer it feels the same as moving it from the radio. certainly there's at least 22ms lag induced by the ppm train, and i'd estimed a grand total of like 30ms, but i'm unable to mesure or to feel the difference.
not that if you use the sound system (alsa on linux) in normal mode instead of async, you'll feel the lag (i estimate at least 300ms lag "feeling")

Also updated the python code to use higher sampling rate if available (else its software downsampled) and joystick "dirty" support
Mar 12, 2010, 04:42 PM
High-power Rocket Gliders
iter's Avatar
Thank you for clarifying your design for high-resolution signal generation. As I read it, you intend to engage left and right output channels out of sequence to double your sampling rate. I encourage you to implement your solution and post an image of an oscilloscope screen with a 384kHz square wave on it. I wonder if you intend to use the same out-of-sequence technique on the input side.

You appear to believe that 22ms is the lower bound of lag when you generate a PPM pulse train. It is if you generate your packet in one go, buffer it, and then wait for it to play out the audio port. 22ms can be the upper bound if you generate your signal one pulse at a time. 400us of the high pulse is plenty of time to calculate how long the pulse for that channel needs to be and encode it.

I notice that you measure lag by estimating your feelings. This methodology seems to be working well for you and I encourage you to continue doing what's working for you. I note that one feature of this methodology is that it's hard for others to reproduce. Your feelings about the lag might even change between one measurement and another, making it hard for you to reproduce. I wonder if you can come up with a more portable measure of lag that you can put some numbers on.

Mar 12, 2010, 05:53 PM
Registered User
it is impossible for me to measure the complete lag without having a synchronized clock on both sides, unless you have a better idea (?)

i know the theoretical "lag" introduced by my sound output is around 3ms (not calculated by me). the lag induced by the DX7 is also unknown.

The lag "feeling" is not reproducible or even quantifiable, there's just no lag feeling when the output is not in blocking mode, it feels instant. I think it's what matter when you fly, you push the stick and you don't feel any delay. (just like when you use smartproplus with a simu, you dont feel the delay)

The ppm signal is generated frame per frame (can't guess whats the next frame will be!) asynchronously and there's quite a bit of IPC in the python script, however this is happening quite fast.
this part is "timable", and i did just for you, it takes 0.006s max (and much less "low") on my pentium M 1.1ghz, including the print+timing calls, i think its discardable.
i timed from reading the joystick input (fdopen of /dev/input/js0) to write complete on the sound card.

I'm having more troubles on windows to achieve the same latency however, but eventually it'll be as quick.
Mar 13, 2010, 12:56 AM
mkmkmk13's Avatar
when should we expect the windows version?

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Help! Pats brakes outer cable needed! elkay31 Motorcycles 35 Mar 04, 2010 08:53 PM
Mini-HowTo Using your computer to make templates for painting flyrcehelis Painting and Finishing Tips 0 Mar 01, 2010 02:16 PM
Help! Control your RC Via your PC dasc Electric Motor Design and Construction 3 Mar 03, 2009 09:40 PM
Discussion RC control via a computer perfectdark111 Power Systems 3 Oct 30, 2007 05:51 PM
Help! T6XAsuper DLG flap control via throttle stick (channel 3) help needed slowracing Radios 1 Jan 09, 2006 12:35 PM