View Single Post
Old Mar 12, 2010, 07:48 AM
jimbob00 is offline
Find More Posts by jimbob00
Registered User
Joined Aug 2009
1,530 Posts
Originally Posted by iter View Post
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
jimbob00 is offline Find More Posts by jimbob00
Reply With Quote