PDA

View Full Version : Discussion pc-to-rc-interface


PranksterO
Jan 01, 2006, 08:02 PM
Hi,

Anyone have any experience in building this?

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

Malc C
Jan 02, 2006, 06:34 AM
To be honest that would appear a tad dated now, as USB RC-PC interfaces that emulate a standard "windows joystick" are more common.

Two things to watch with that CCt:
1) Unless the VB program overcomes the issue, under XP there is no direct port mapping, so access to LPT port may result in communication errors (this is why people use applications like PPJoy)
2) The project doesn't include the HEX code for the PIC, so bear in mind that you have to purchase a pre programmed PIC at £6 ($11 USD)

Just my 2c worth... if you go ahead and purchase the PIC and build it, let us all know how it works and what you can do with it

slipstick
Jan 02, 2006, 07:55 AM
To be honest that would appear a tad dated now, as USB RC-PC interfaces that emulate a standard "windows joystick" are more common.

I've never seen a USB interface with a program to allow the PC to drive the Tx. Generally PCs don't send commands to joysticks. Do you know of such a program/interface, it could be interesting ?

I've only ever controlled a Tx years ago by driving a serial port directly and that's considerably trickier to do post-Win98.

Steve

PranksterO
Jan 02, 2006, 05:02 PM
Malc, Im looking for a solution to allow a pc to drive the transmitter not a joystick interface.

I have purchased the pic and completed the circuit yesterday. The reason Im posting is because I can't get it working. I am using windows xp, could this be my problem? Im sure that the circuit is put together correctly. I have checked and rechecked all connections. Im using a futaba T4YF 4ch transmitter. It has a 9pin square connector that looks like this:

(futaba 9 pin)
------------
| 3 2 1 |
| 6 5 4 |
------------

I connected the output from the circuit to input pin 6 and the ground to pin 2. According to this site http://www.model-gadgets.com/info/infopage/infopage.htm this is the correct way to connect it to this transmitter. I also opened it up to verify.

When I try to start up his sample visual basic program I get an error saying that the interface is not connected. If I flip the trainer switch on my radio one of my channels(the throttle) goes at full speed and the servos go through a glitching pattern.

Just today I found a link to an article in Servo Magazine that does a very similar project. Here: http://www.servomagazine.com/preview.php?issue=5
I was able to find a research paper that the author wrote that includes the schematic. Found here: http://prism2.mem.drexel.edu/~paul/papers/greenIcar2005.pdf
The two designs look very similar. The .hex files are even provided for the project on Servo's site: http://www.servomagazine.com/downloads.php?5 I tired running the software provided and it doesnt give me the error message. :D but it still fails to control the transmitter.

Ive tried contacting the seller but he hasnt responded yet. Anyone have any ideas?

Chippie
Jan 02, 2006, 05:15 PM
I've never seen a USB interface with a program to allow the PC to drive the Tx. Generally PCs don't send commands to joysticks.
Steve
I'm guessing that what is needed here is an interface that connects to the buddy box socket....so the pc replaces the joystick interface on the tx, and outputs to the model via the rf stages.....otherwise I've lost the plot completely.... :confused:

slipstick
Jan 02, 2006, 05:16 PM
Prankster, I imagine Win XP is your problem. It will not allow you to directly control the parallel port, which I believe is what Ken's program is trying to do. If you can find an old PC with Win 98 on it will probably work.

Chippie, I think that's what is required too. The problem with Win XP is not the interface itself but writing a program to control the parallel port in the way required i.e. where the timing of all signals is controlled by the PC.

Steve

Malc C
Jan 02, 2006, 06:40 PM
I'm guessing that what is needed here is an interface that connects to the buddy box socket....so the pc replaces the joystick interface on the tx, and outputs to the model via the rf stages.....otherwise I've lost the plot completely.... :confused:
OK I've re-read the details on Kens website

There have been a lot of people asking how to connect a PC to an RC transmitter via the buddy box socket so that they could have their PC control some sort off RC vehicle.

So in esssance, the interface works in reverse of a game simulator, in that the data from the PC is sent to the transmitter, via the interface which generates a PPM signal and feeds it to the transmitter to send it via RF to a receiver fitted to an RC model.

I thought the item was some form of interface for use with a sim or something. The better alternative if you simply want to control servos from the PC then a serial servo controller like this one (http://www.rentron.com/SerialServo.htm) is more practical, unless the model is going to be some distance away from the PC.

Steve is also spot on that XP is the more probable cause of your communications problem, As I stated in my other post, under XP you can not directly access the ports in the same way as you can under Win95, 98, and ME. My guess is Ken originally wrote the VB program before XP was released (a hint might be in the sentance "A windows demo program written in Visual Basic 3.0" which I think is an old version as I think the current version of visual Basic is 6) - It might therefore be worth sending Ken an e-mail to see if he can resolve the issue.. other than that it might be worth looking for a 3rd party "driver" that will give the current version software port access.

PranksterO
Jan 02, 2006, 08:53 PM
Thanks for the help Malc and slip! Im going to install win98 on an old system and try that, Ill let you know how it turns out.

PranksterO
Jan 02, 2006, 11:03 PM
WinXP was the problem! I switched over to a box running 98 and it works great!

chinlin0924
Jan 03, 2006, 02:44 AM
It seems that the Win98 version 's driver can't access the kernel mode of WinXP.
But it is very interesting with PC-to-RC interface. That will have a lot of application. If we record the fly actions (ppm signal), and re-play it through PC-to-RC interface in real situation with a pre-specified height (that prevent from crash easily), and do some maneuver by pre-recorded fly. That would be a challenge. because the status of motor, battery, and the wind speed is different each time, that will result in un-predictable flying situation(very dangerous, keep distance from it). But just for fun.
:P

Malc C
Jan 03, 2006, 06:02 AM
Glad to hear you have found a resolution for the device... I would probably stick to cars or boats for experiments... flying a helicopter through the transmitter is hard enough.. doing it via commands from a PC could be tricky :)

chinlin0924
Jan 03, 2006, 06:21 AM
but I lack of knowledge about the electronics and ICs.
If the product is come out, I would buy one.
If the product is for Linux OS embbed, and is open for using its SDK to control the radio controller and get the status from the RC(ex: height, air speed, GPS location, camera video,and so forth) that would be very great! I can use GNU C/C++ to program the RC flying automatic control system with its SDK and extra componets for plugging on RC fuselage.

just some fun idea!! It is a bit like UAV, but focus more on its API for people to use it and do some experiments.

:D

VinceHaworth
Jan 03, 2006, 06:00 PM
My advice is to go the USB route and save yourself a lot of hassel. :rolleyes:

Ready made units are available from;
http://www.milehighwings.com/usb_cables.htm

Or - if you are into electronics like me, you can build your own. You will need to be able to program a 16C745 pic and build a simple circuit. If you do not have a pic programmer you can buy a ready programmed pic from the circuit designer.

http://www.cattopasto.com follow the link on the left menu bar to 'FMSUSB'

Note that the hex code for the pic has been removed from the website. I can supply it to anyone that wants it. Just PM me.

I have used this interface with my Futaba FF7 super and Aerofly Pro. It emulates a pc joystick and it works really well. Very pleased with it. :D

Malc C
Jan 03, 2006, 06:27 PM
Vince mate, looks like you too missed the plot :)

The original poster (Prankster) wants to send instructions from a PC to the transmitter and not the other way round.

VinceHaworth
Jan 04, 2006, 07:32 PM
Vince mate, looks like you too missed the plot :)

The original poster (Prankster) wants to send instructions from a PC to the transmitter and not the other way round.

oopps :eek: sorry about that !

rclinks2002
Mar 31, 2006, 03:17 PM
I guess this ties into what you guys are doing, but I will throw it out anyway. Ok so I am looking for a setup that will allow me to control an RC servo controller (any particular type reccomended?) with 2 standard computer joysticks. Using rs232 connections between the computer and the servo controller? Any thoughs?

GlowFly
Mar 31, 2006, 05:37 PM
There a few PIC microcontroller projects that provide servo signals and connect to a PC via RS232. Typically they allow servo positions to be sent over the serial port, and the microcontroller then generates an approx 1mS-2mS signal on a number of servo channels. I can't remember the names but google for them.

Secondly, Windows NT, 2000 and XP operating systems prohibit user mode access to the PC hardware. However there are a number of utilities that change the permissions such that access is allowed at a slight performance penalty while accessing the hardware. Look for 'giveio' for example.
--
Steve

rclinks2002
Mar 31, 2006, 06:57 PM
I was going to run the servo controller with a laptop running lenux or windows 98. I just cant figure out how to control the servos using a joystick...

GlowFly
Mar 31, 2006, 07:10 PM
You'd need to write some software to scan the joystick and determine values to send over the serial port to the external microcontroller generating servo signals.

Alternatively you could do this without an external microcontroller. Scan the joystick, and use it to toggle the parallel port I/O lines directly. One line for each servo - say 8 servos. There will be some jitter using software to determine pulse timing and it will be worse the more servos you try and control. You can minimise this by using say DOS to launch your program rather than W98.

I don't know of any freely available software to do this, but that doesn't mean there isn't any!
--
Steve

rclinks2002
Mar 31, 2006, 08:05 PM
"You'd need to write some software to scan the joystick and determine values to send over the serial port to the external microcontroller generating servo signals."

That is my problem....I have absolutely no practical computer programming experience....I will keep on looking...

Malc C
Apr 01, 2006, 03:50 AM
Some sites that may be of interest for you:

http://www.brookshiresoftware.com/vsa_overview.htm
http://www.servocity.com/html/servo_controllers.html
http://www.digitalnemesis.com/info/projects/picservo/
http://home.planet.nl/~j.havinga/servo/servo.htm (I've built this and it works very well)

Also if you do a saerch for Scott Edwards Serial Servo Controller (SSCII) you'll come up with loads of info. However you still may have to come up with the custom software for scanning your joystick input and converting the value between 0 and 244 and then send this value to the SSC

GlowFly
Apr 01, 2006, 04:57 AM
That looks like an excellent starting point Malc, even a ready built option! Also the OP could look at some of the amateur robotics web sites, I'm sure that will turn something up for him.
--
Steve

Malc C
Apr 02, 2006, 02:46 PM
Cheers Steve, just a few bookmarks I had floating around :)

LukeZ
Apr 02, 2006, 04:15 PM
Here's a few more links to other serial servo controllers:

Tom's RC SC-8000: http://www.tti-us.com/rc/index.htm. This is controlled by USB port actually.

Parallax Servo Controller:
http://www.parallax.com/detail.asp?product_id=28023 (Serial)
http://www.parallax.com/detail.asp?product_id=28823 (USB)

Picobotics PicoPic: http://www.picobotics.com/PicoPic.html
Picobotics Servio: http://www.picobotics.com/Servio.html

Pololu Servo Controllers: http://www.pololu.com/products/pololu/#servcon - They have about four different models, serial and USB.

Pontech SV203 serial servo controller: http://www.pontech.com/products/sv200/index.htm

Anyhow, these are just the servo controllers, but it goes to show you have a lot of choices. You still need to write the Windows/PC software that interprets joystick movements and sends out the appropriate serial commands. It wouldn't actually be too incredibly difficult, but if you're new to computer programming it would be daunting. Maybe someone on these boards could whip up a Dos program to do it....


Luke

Malc C
Apr 02, 2006, 06:25 PM
Wow.. my list of servo controller bookmarks has just increased :)

Thanks Luke,

It was interesting to see that the PicoPIC from Picobotics has a Scott Edawrds compatibility mode, making it possible to use some of the software stated in my post above.

I would love to find a site with schematic and asm or HEX files for an 8 way SSC that is compatible with this protocol and be based on a Microhip PIC. - If you come across one , let me know

LukeZ
Apr 02, 2006, 08:40 PM
By the way, the Pololu controllers are also compatible with software written for the Scott Edwards Mini SSC.

Another interesting thing to point out is that Tom's RC SC-8000 has the option to output PPM. This means that you can feed this output into your transmiter through the trainer port, and basically drive your TX from the computer. If you want to fly any of the other serial servo controllers from the ground, you'll need a wireless serial link, which can be expensive (computer to wireless serial on the ground, wireless serial to servo controller on the plane). With the SC-8000 the servo controller stays on the ground, attached to your PC. It sends signals to your TX and your setup in the plane stays the same as with normal RC use.

Of course none of this still solves the challenge at hand, which seems to be the production of software to read a computer joystick and translate it into serial commands...


Luke

LukeZ
Apr 02, 2006, 08:47 PM
I would love to find a site with schematic and asm or HEX files for an 8 way SSC that is compatible with this protocol and be based on a Microhip PIC. - If you come across one , let me know Well, it's not open source, but I was just reading more at the Pololu site and they will sell you just the PIC (http://www.pololu.com/products/pololu/0276/) used in their 8-servo serial controller. It's a PIC16F628A. There's a schematic at the end of their user guide (http://www.pololu.com/products/pololu/0290/). This addresses three out of four of your wishes - SSC compatible, based on a PIC, schematic available - but you can't read the code.

Still it's kind of a neat idea to sell just the chip, that way you could build it into your own circuits.


Luke

Malc C
Apr 03, 2006, 04:54 AM
Sounds good - I have a servo contoller based on the 16F628, but the protocol is different and thus will not work with the software mentioned. I just might order one of their chips afterall 3 out of 4 ain't bad (sounds like a remake of a Meatloaf song :) )