Community
Search
Notices
RC Radios, Transmitters, Receivers, Servos, gyros Discussion all about rc radios, transmitters, receivers, servos, etc.

PC to R/C interface

Thread Tools
 
Search this Thread
 
Old 09-30-2002, 02:43 PM
  #1  
Myolp
Junior Member
Thread Starter
 
Join Date: Sep 2002
Location:
Posts: 2
Likes: 0
Received 0 Likes on 0 Posts
Default PC to R/C interface

This question has probably appeared a number of times, but I can't find the answer I'm looking for, so here goes...

How can I control an R/C using a computer? Are there any R/C with a USB or serial interface which allows me to write a program that will control my RC device?

I am supposed to find a way to make a Draganflyer 3 being controled by a computer. I've been searching for som etime now without finding any information on the subject.

Please help! =)
Old 10-01-2002, 08:55 AM
  #2  
amcross
Senior Member
My Feedback: (2)
 
Join Date: Jan 2002
Location: Tuscola, IL
Posts: 2,636
Likes: 0
Received 0 Likes on 0 Posts
Default PC to R/C interface

Thank you for your recent e-mail.

Your email contained the words robot, battle bot, or reference to twin
stick tank-style control. Based upon this information, we are provide the following:

Servo operation for robotics:
http://www.geocities.com/BourbonStre...rvobasics.html
http://homepages.ihug.co.nz/~atong/

Digital servos:
http://www.futaba-rc.com/servos/digitalservos.pdf

If you wish to utilize an RC aircraft radio with 6 or more channels to
operate a Battle bot, you must do so utilizing a ground (75mHz) legal
frequency and PCM modulation. For more information please visit:
http://www.futaba-rc.com/faq/product-faq.html#q38
http://www.futaba-rc.com/faq/product-faq.html#q54

Looking for information on using servos through a computer without an RC
system? Please see the attached document and this FAQ:
http://www.futaba-rc.com/faq/pricing-faq.html#q13

If you are seeking battlebot sponsorship, regrettably the US sponsorship
program is full at this time and we are not currently accepting
applications.

Are you seeking tank-style control with 2 sticks both centering
automatically?
http://www.futaba-rc.com/faq/product-faq.html#q181

Some commonly requested information:

The signals that go from the RECEIVER TO THE SERVO are in the exact same
format whether using straight AM, FM or PCM. The signals MAY differ in the
length of the frame, number of channels and so forth but the FORMAT is the
same. These are ANALOG signals in PULSE-POSITION modulation. Each CHANNEL
within every frame may vary in length anywhere from about 1000
micro-seconds to 2000 micro-seconds, with center usually being around
1500uS. Most servos are analog, but now DIGITAL servos are making their
way into our industry. Please see the link above.

Frame lengths vary depending on the number of channels. Futaba typically
can be anywhere from 19-22 milli-seconds. In any frame, the channels are
bundled together at the BEGINNING. Any extra room in the frame it will
come at the END.

The voltage of the pulses will vary depending on the voltage of the DC
power source to the Rx, with an absolute minimum operational voltage
usually in the 4.0V range.

The rotation of the servo output IS directly proportional to the width of
the respective pulse (channel). The minimum width of any pulse (channel)
will be about 1000 micro-seconds, never 0 seconds. The maximum width of any
pulse (channel) will be about 2000 micro-seconds.

PCM modulation ONLY refers to how signals are converted to digital when sent out of a transmitter, then decoded and converted back to analog by receiver.

The receiver draws only the current it needs to operate, as do the servos.
Old 10-01-2002, 10:51 AM
  #3  
Steve Lewin
Senior Member
 
Join Date: Mar 2002
Location: Reading, UNITED KINGDOM
Posts: 904
Likes: 0
Received 0 Likes on 0 Posts
Default PC to R/C interface

Almost all transmitters have a "serial interface" called the buddy or trainer socket. But it's not a standard i/f and there is no PC s/w available to directly control it AFAIK though it wouldn't be too difficult to write some.

Anyway driving the transmitter is not the biggest problem. How will the PC decide what control signals to send ? How will it get feedback from the "Draganflyer" about its current position/attitude etc ?

Steve
Old 10-06-2002, 06:03 AM
  #4  
Myolp
Junior Member
Thread Starter
 
Join Date: Sep 2002
Location:
Posts: 2
Likes: 0
Received 0 Likes on 0 Posts
Default PC to R/C interface

Almost all transmitters have a "serial interface" called the buddy or trainer socket. But it's not a standard i/f and there is no PC s/w available to directly control it AFAIK though it wouldn't be too difficult to write some.
Ok, but are the any converters available for this? I could easily write the software for sending digital signals myself, as long as the R/C can take such as input.

Anyway driving the transmitter is not the biggest problem. How will the PC decide what control signals to send ? How will it get feedback from the "Draganflyer" about its current position/attitude etc ?
This is a different problem. The easiest way would be to mount a ultrasonic sender and receiver connected to a seprate radio-transmitter. The Draganfly comes with a Eyecam, a small wireless camera, so this is already possible. This problem is thus already solved.
Old 10-15-2002, 05:24 PM
  #5  
pave-low
Member
 
Join Date: Jul 2002
Location: Tacoma, WA,
Posts: 81
Likes: 0
Received 0 Likes on 0 Posts
Default PC to R/C interface

It is a misnomer to say R/C transmitters have a "serial interface". They actually have kind of pulse input/output port. I have just started a similar project with a twist. The twist is you need a stamp or other sort of intermediate processor between the p.c. and your R/C transmitter. The reason: Windows sucks for timely delivery of messages. The pulses have to be exact and Windows can't deliver exact. The intermediate processor acts as the guarantee that pulses are accurately timed no matter what Windows is doing at the time.

My plan is to start with an R/C car first to get the feel for this. First just forward/back then start with steering patterns. And a few years down the R/D path hook this up to my helicopter. The big thing with the aerial stunts you need is the feedback as to what the bird is doing and where it is. A car doesn't get blown off course (of course). That is why I say years down the road.

I am just now starting and plan to use the circuit Risto Koiva developed. I am also planning on using a Handyboard (see handyboard.com) single board computer on the ship itself to help make sense of all the telemetry and make some decisions in the air (landing gear deployment, flaps, lights, multi axis gyro auto hover, etc) Here is the URL to his plan:

http://www.mp.ttu.ee/risto/rc/electronics/pctorc.htm

I do urge caution on this whole undertaking. Make sure you still have someone at the controls to click the trainer button and take over no matter how well you think things will work. Small sucesses lead to lack of attention and the next thing you know your Trax-ass is headed for your (well you get the picture).

Good luck and keep me informed on your progress!

THX-
Old 10-16-2002, 06:18 PM
  #6  
pave-low
Member
 
Join Date: Jul 2002
Location: Tacoma, WA,
Posts: 81
Likes: 0
Received 0 Likes on 0 Posts
Default Maybe a better source

I decided to talk to Risto about having him build and program a board for me as I have some big projects this fall keeping me from heating up my solder.
He wrote back that he would build one and ship it for $1000.00 (yes I choked on my lunch as I read his e-mail).

Another guy has a pre-programmed PIC and PCB board (you build it)

I am going to send him some cash today and I will let you know if it works.

THX-
Old 05-30-2003, 01:37 AM
  #7  
foobar
Member
 
Join Date: May 2003
Location: Toronto
Posts: 37
Likes: 0
Received 0 Likes on 0 Posts
Default PC to R/C interface

Windows can do exact. I do 96 kHz audio in 10's of channels at 24 bit with 3 ms latency almost every day.

I run soft synths (real-time software simulations of real world synthesizers) and they play and sound like the real thing (better actually)

If i understand what you're suggesting, it's that the trainer cable sends the PCM or whatever other form of encoded signal to the other box's transmitter. Basically cuts in right before the TX amplifier?

I'd be surprised if those pulses couldn't be captured perfectly by a run of the mill soundcard, perhaps with a bit of impedence matching or re-amplification required. Yes the radio is in the MEGAHz and audio is in KILOHz but the underlying encoding i bet is in the auditory range. No?

Aside from a cable, its just a matter of software to be able to do this. And yes, radios that don't work together will also need different software "drivers" in order to work with the computer.

I'm surprised there isn't a product that does this out there. Maybe i've found a niche? (I'm a programmer, pretty sure i could do this if i knew the radio's encoding scheme)

Other thing i was thinking was that the Trainer-Cable jack (mine's a 5 pin DIN like a MIDI, is this fairly standard for radios?) might in fact just be 4 pins of voltage off each axis (i have a 4 channel) and a ground. That would be possible too, with an adaptor to go to the computer's joystick port (this way would work Radio-->Computer direction only...so you could fly a flight sim with your radio.) But you say the Trainer Cables dont workt hat way?

All very interesting....
Old 05-30-2003, 05:32 AM
  #8  
Lynx
Senior Member
 
Join Date: Sep 2002
Location: Rochester, NY
Posts: 1,373
Likes: 0
Received 0 Likes on 0 Posts
Default PC to R/C interface

Windows can not do exact. Not with timeing that is.
96khz is about .00001 seconds per sample, an RC frame is .021 long. Each pulse is between .001 and .002 seconds long. Even using a full 96khz sampling rate you'd only get a possibility of 100 steps. Even by RC standards that's crude, OLD PCM uses 512 steps. Only 1 pin on a trainer cable carries data, and that's the PPM baseband signal (standard 21ms RC frame)
Old 05-30-2003, 01:01 PM
  #9  
foobar
Member
 
Join Date: May 2003
Location: Toronto
Posts: 37
Likes: 0
Received 0 Likes on 0 Posts
Default PC to R/C interface

Thanks for that info but i don't see why you think a regular soundcard couldn't capture it.

96kHz is 96,000 samples per second...meaning i can accurtely reproduce any frequency that's less than half that.

The smallest pulse you could record/output would be .0000104166666666667 seconds, a hundredth of a millisecond!!! If your pulse widths range from 0.001 to 0.002 (1 to 2 milliseconds) in length, you'd be able to digitize/encode approximately 100 different pulse-widths - which would seem to be sufficient resolution for joysticks that are only an inch long anyway.

Make sense?

And that's just using sound. If you have USB2 or Firewire you can get about 40 times finer resolution/timing granulatiry than with USB1.
Old 05-31-2003, 06:01 AM
  #10  
Lynx
Senior Member
 
Join Date: Sep 2002
Location: Rochester, NY
Posts: 1,373
Likes: 0
Received 0 Likes on 0 Posts
Default PC to R/C interface

100 steps might seem to be enough accept that they phased out 512 step PCM because people felt that it was too steppy, and that's with 512. You're talking about the control surfaces of a plane, a little bit goes a long way. 100 steps at 140 or so degree's (good servo range) is more than a degree per step, that's a LOT for some control surfaces. The more steps you have the finer the control. You need to have pulse width to voltage converters and ADC's for a PC to be able to make sense of them. That's all the TX to PC interfaces do is convert the Pulse signal to a voltage signal instead then it can be sampled by the PC in as fine a resolution as you want to. PCM can be generated via a sound card, but PPM can't (not well enough) PCM has a fixed pulse width, so it's relatively easy to deal with.
Old 06-01-2003, 03:25 AM
  #11  
strato911
Senior Member
 
Join Date: Sep 2002
Location: West Jordan, UT
Posts: 1,479
Likes: 0
Received 0 Likes on 0 Posts
Default PC to R/C interface

Lynx - I have to agree with Foobar. My outdated sound card can sample at up to 48K samples per second. I don't even need that level of resolution to acurately capture the PPM signal in my Tx using the Oscilloscope software from http://polly.phys.msu.su/~zeld/oscill.html

If my old, outdated, SoundBlaster® PCI 128 can do that, I'm sure it could re-create it as well. As Foobar said, with firewire, even more acurate output is possible.

Here's what I captured from my Hitec's trainer port with a meager 20ms sweep:



Today's soundcards have far more computing power than our transmitters are likely to EVER have.
Old 06-01-2003, 03:37 AM
  #12  
strato911
Senior Member
 
Join Date: Sep 2002
Location: West Jordan, UT
Posts: 1,479
Likes: 0
Received 0 Likes on 0 Posts
Default PC to R/C interface

Originally posted by Lynx
PCM can be generated via a sound card, but PPM can't (not well enough) PCM has a fixed pulse width, so it's relatively easy to deal with.
The individual pulses in a PCM stream are FAR smaller than the pulses in a PPM stream. As long as you write the software so that the sound card does the computing, not the main processor you should be fine.

You could always resort to machine code, and hardware specific instruction sets running from a DOS floppy in order to bypass Windows, but it can be done. One of my projects in computer engineering involved designing (and building) an interface between a robotic car and a 486 (back when 486 was new), using a cordless phone as the tranmitter interface because we weren't allowed to build our own transmitter. I think that was before cordless phones could do 900Mhz.
Old 06-01-2003, 03:41 AM
  #13  
foobar
Member
 
Join Date: May 2003
Location: Toronto
Posts: 37
Likes: 0
Received 0 Likes on 0 Posts
Default PC to R/C interface

You both have a point.

Yes, our maths both agree...a little over 100 steps for the full travel of the servo and yeah, that's over 1 degree per step

Though by the time the movement gets to my control surfaces thats only about 45 degrees, max. Also, my transmitter's joysticks only have about 2" throw in each dimension. So that's about half-millimeter resolution. That's a pretty small movement for a finger, though it's true that finer effects the trim tabs would be somewhat quantized.

Anyway, my interest was in flying a PC sim from my tansmitter, not so much the other way around (how could a PC control a plane unless you could have some kind of attitude telemetry downlink - i suppose it could playback pre-programmed sequences of movements, but without the feedback of seeing what it's actually doing to the plane in the real world, it seems of little value.) I've found a product that offers to translate trainer-cable to a joystick connector (with custom driver) at http://www.ripmax.com/ProductFrames/P-SIM100.html

I might just figure out how to wire the cable myself!

Thanks for the help folks!
Old 06-01-2003, 03:45 AM
  #14  
foobar
Member
 
Join Date: May 2003
Location: Toronto
Posts: 37
Likes: 0
Received 0 Likes on 0 Posts
Default PC to R/C interface

strato: again i have to point out that i do low latency (< 3ms) real time audio with the computer with not a single sample dropped and in TENS of channels at once. It's NOT hard for a Windows (or Mac) machine these days to keep up with the bandwidth of an audio channel and do meaningful processing in near-real time.
Old 06-01-2003, 03:49 AM
  #15  
strato911
Senior Member
 
Join Date: Sep 2002
Location: West Jordan, UT
Posts: 1,479
Likes: 0
Received 0 Likes on 0 Posts
Default PC to R/C interface

I agree - IF the processor is powerfull enough, and you don't have to many background apps running, and if your application is given a high enough priority thread.

I was merely providing an alternative, in case Myolp (the thread originator) doesn't have a powerful enough computer to do this through Windows. Personally, I love (and miss) DOS.
Old 06-01-2003, 04:13 AM
  #16  
foobar
Member
 
Join Date: May 2003
Location: Toronto
Posts: 37
Likes: 0
Received 0 Likes on 0 Posts
Default PC to R/C interface

That's silly. Windows does real time far better than DOS ever did.

Even a substandard Windows box will beat up whatever computer you used for your happy DOS experiences. Jeeze, you could EMULATE a 20 MHz IBM AT in an average Window2K/XP box and still have enough clock cycles left to do a lot of other things.

Yes, there can be things that'll make Windows choke and sputter, but a properly configured system can keep up no problem. Even a 5+ year old 133 MHz machine has 1,385 clock cycles to think about things for EACH 96 kHZ audio sample. That's a LOT of instructions.

Stuff that has to be fast on Windows should be written as a driver. You may have seen some clunky apps in the past, and 16 bit Windows 3.1 was clunky as it used non-preemptive multitasking, but any 32 bit Windows (Win 95 and later) is a very capable real time processor.

I'm not about to trade preemptive multitasking, multithreading, and 32 bits for DOS's single thread and 16 bits. You know what they say, you can never go back.

Anyway, just my opinion.
Old 06-01-2003, 04:27 AM
  #17  
strato911
Senior Member
 
Join Date: Sep 2002
Location: West Jordan, UT
Posts: 1,479
Likes: 0
Received 0 Likes on 0 Posts
Default PC to R/C interface

Originally posted by foobar
Yes, there can be things that'll make Windows choke and sputter, but a properly configured system can keep up no problem. Even a 5+ year old 133 MHz machine has 1,385 clock cycles to think about things for EACH 96 kHZ audio sample. That's a LOT of instructions.
A 133Mhz will not keep up if you plan to run Windows on it. The OS has to much overhead.

For specialized tasks, a 486-66 running a dedicated app will run circles around a 133Mhz computer running Windows, and one equivilant app.

But we digress... This wasn't the purpose of the original thread.
Old 06-01-2003, 09:17 AM
  #18  
Banksy
Member
 
Join Date: May 2003
Location: London(ish)Kent, UNITED KINGDOM
Posts: 37
Likes: 0
Received 0 Likes on 0 Posts
Default PC to R/C interface

Guys,

I'm sitting here with my Futaba Tx plugged into my Soundblaster PCI64, flying FMS.....

Very good idea, and works great,

Check out http://www.sekiriki.jp/smartpropo/index.html

Best of all the cable is just the signal of the buddy DIN cnnector to a 2.5mm audio jack.

It only works with fms, there is some software on his site that claims to mount rhe Tx as a windows game controller, but it didnt work for me...

Si.
Old 06-11-2003, 01:26 PM
  #19  
pave-low
Member
 
Join Date: Jul 2002
Location: Tacoma, WA,
Posts: 81
Likes: 0
Received 0 Likes on 0 Posts
Default Windows vs. dos not a performance question

The windows versus dos isn't really a performance (or horsepower) issue. It is a predictable timing issue. If windows hesitates for just second it will miss the sending the pulse. Or just think of a BSOD event. That is why you use the daughter processor to make the pulses. The big fear with windows OS is that it will get distracted with some other process and not be timely on sending the next movement command or just crash. Even NASA uses DOS to operate the shuttle robot arm the last time I checked.
Old 06-11-2003, 01:33 PM
  #20  
bushwhacker
Member
 
Join Date: Jun 2003
Location: TamworthStaffs, UNITED KINGDOM
Posts: 41
Likes: 0
Received 0 Likes on 0 Posts
Default PC to R/C interface

try www.customelectronics.co.uk for interfaces
Old 06-11-2003, 01:44 PM
  #21  
pave-low
Member
 
Join Date: Jul 2002
Location: Tacoma, WA,
Posts: 81
Likes: 0
Received 0 Likes on 0 Posts
Default Another 1

http://www.welwyn.demon.co.uk/PC_RC/PC_to_RC.htm

This uses a stamp circuit in the middle.

I haven't had time order this and try it out (nor have I had time to start any of my gassers this spring!) but I plan to soon.
Old 06-11-2003, 02:40 PM
  #22  
Steve Lewin
Senior Member
 
Join Date: Mar 2002
Location: Reading, UNITED KINGDOM
Posts: 904
Likes: 0
Received 0 Likes on 0 Posts
Default PC to R/C interface

Actually Ken's circuit does not use a Stamp module. It is instead based round a PIC 16C54 microcontroller. Ken no longer sells a kit or PCB but I think he does still sell the preprogrammed PIC. It will indeed do what was originally asked for. I'm sorry I forgot all about it.

Steve
Old 06-11-2003, 07:25 PM
  #23  
foobar
Member
 
Join Date: May 2003
Location: Toronto
Posts: 37
Likes: 0
Received 0 Likes on 0 Posts
Default PC to R/C interface

The windows versus dos isn't really a performance (or horsepower) issue. It is a predictable timing issue. If windows hesitates for just second it will miss the sending the pulse.
If this were true i couldn't use Windows as a real time music synthesizer / multitrack audio recorder - i do it almost every day and it gaks...never.

If you have real time problems like this, you just have a misconfigured (or ancient) system. Windows does FINE in real time these days. Hell, even a Mac would probably work

Thanks for the hardware tips guys!
Old 06-12-2003, 04:27 AM
  #24  
Lynx
Senior Member
 
Join Date: Sep 2002
Location: Rochester, NY
Posts: 1,373
Likes: 0
Received 0 Likes on 0 Posts
Default PC to R/C interface

foobar you're forgetting the buffers that your real time synthesizers use, you can't do that in RC generates too much of a delay. pave-low said it best, it's not a horsepower issue it's a predictable teeming issue. If you don't believe it then just try to write a windows program that can generate a PPM signal with at least 1024 step resolution on the pin of a parallel port that can be updated with less than 10ms of delay between a control input and the resulting output change. I'll give you 100 bucks if you can do it.
Old 06-12-2003, 05:48 AM
  #25  
4*60
My Feedback: (41)
 
Join Date: Mar 2002
Location: Shuswap, BC,
Posts: 1,753
Likes: 0
Received 1 Like on 1 Post
Default PC to R/C interface

100 bucks!! WOW!


Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service -

Copyright © 2024 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.