PDA

View Full Version : Discussion TX -> Computer -> TX ?


kdhoward83
Jan 29, 2008, 09:59 PM
Is it possible to send a signal from the trainer port in a TX, to the computer COM port, then take the signal from a computer and feed it out a seperate COM port which is connected through the PCBuddy cable sysem (http://www.rc-electronics.co.uk/pcbuddy.htm) to a seperate transmitter which would control servos in real time?

Confused?

Basically TX (trainer port) -- (COM Port#1) --> Computer --(COM Port #2)--> --(PC BUDDY - Serial to PWM)-->TX (trainer port) -> Servos.

There's a specific project I am working on. I have the signal from COM#1 and COM#2 all setup. COM#2 is on an onboard autopilot system, with COM#1 on the ground station.

Im trying to see if there is a way to do all this without getting "messy"..

vintage1
Jan 30, 2008, 02:51 AM
I don't see why not. Given the right interface hardware between com ports and TXes..
What the problem?

slipstick
Jan 30, 2008, 04:20 AM
TX into PC is the sort of thing simulator interfaces have been doing for years.

PC out to TX is what Ken's PCBuddy is designed for.

The thing you've missed from your diagram is the radio link and receiver. Assuming it really goes

....COM2 > TX2 > RF signal > RX > Servos

I can't see a problem. How close to real time it is depends on how good your programming is in modifying and moving the signal from COM1 to COM2.

Steve

vimb
Jan 30, 2008, 07:43 AM
I've wanted to do exactly this, but since I didn't already have any investment in 72MHz PPM systems, I went straight to 2.4GHz radios.

Some radios (like the Spektrum LP5DSM) natively use TTL-level serial between the transmitter microcontroller and the transmitter RF module - this is great because all you have to do is split that wire, run the microcontroller end (via a level shifter) to the RX pin on your COM1 and run the TX pin from COM2 (via a level shifter) to the RF module end. Actually, given that you're only using the RX on one port and the TX on another, you can easily consolidate to a single COM port. No PPM translation involved = less mess for you to wire up and lower latency for the underlying hardware.

Step-by-step guide to interfacing a PC with the LP5DSM (including sample code):
http://coptercontrol.sourceforge.net/howto/control.html

I haven't really tried this on any other 2.4Ghz radios, but I strongly suspect it will work with the Spektrum DX7 and DX6i. The DX6 will not help you (it uses PPM between the uC and the RF board). I have no idea about the Futaba FASST series.

If you want to reuse an existing PPM-based radio system, then none of this will help you. But if you're starting fresh, this is by far the way to go (especially since you get all the other advantages of 2.4Ghz radios as well). A used LP5DSM + 6-channel RX should run you ~$150, and come with a nice little coaxial helicopter to play with as well (Blade CX2). Or you can probably find just the TX for ~$50 and another ~$40 for an RX. The LP5DSM does have a limited range (300ft?), so if you need more than that, it's time to look at a DX7 or a DX6i.

kdhoward83
Jan 30, 2008, 10:53 AM
Does the PCBuddy do the same thing as any PC Interface cable? Ex:

http://www.amazon.com/Futaba-Compatible-Simulator-Transmitter-Interface/dp/B000RO5RKC

I know this sends the signal for flight simulator.. but if the COM port is outputting the inputted transmitter signal, would this same cable transmit that data to a transmitter via trainer port?

slipstick
Jan 30, 2008, 11:50 AM
Does the PCBuddy do the same thing as any PC Interface cable?
No it does pretty much the opposite.

Couple of things....your link is a USB connection not a serial (COM port) connection and sim interfaces usually only have the TX OUTPUT signal connected. The TX INPUT is on a different pin. And of course the conversion code in the interface only works one way, PPM to Serial. It doesn't do Serial to PPM.

Steve

kdhoward83
Jan 30, 2008, 12:00 PM
No it does pretty much the opposite.


Yeah.. thats what I thought. Damn.

Are there any alternatives to the PCBuddy that anyone knows of? The project I'm working on is funded by my school's Aero. department and they won't order internationally.

Building my own is feasible.. but Id rather work smarter than harder.

Malc C
Jan 30, 2008, 01:50 PM
Im confused (yeah I know, easily done !)

If I follow this right, you are wanting to hook up a TX to a PC via its trainer port, then connect some form of servo controller direct to the PC so in effect control ther servos from the transmitter - WHY ?

The simple answer is to use the normal TX - RX combination and leave out the PC ?

The only assumption is that you want to use the TX as a joystick tp control the servos, if so then google "Serial servo controllers" as some of the top end modules allow direct control from a PC joysick. You could then use a standard USB sim interface to hook up the TX if you wish as most are seen by windows as a standard joystick.

kdhoward83
Jan 30, 2008, 02:38 PM
If I follow this right, you are wanting to hook up a TX to a PC via its trainer port, then connect some form of servo controller direct to the PC so in effect control ther servos from the transmitter - WHY ?


I'm trying to control a droppable device from the aircraft relayed through an autopilot system. I have the relay working.. (tested with hyper-terminal), but it is in the form of a serial output. So I have a serial signal coming out of the autopilot and I need to control servos on the aircraft I am going to have detach and glide down. I assume translating the serial signal to PWM for trainer port interface would be the best way... with the TX on board the aircraft.

My main issue: Serial output stream from a transmitter needs to be converted to interface with the trainer port on a separate transmitter.

Just wondering if there is anything commercially available that will do this (aside from PCBuddy).

slipstick
Jan 30, 2008, 05:13 PM
Sorry but you're not making any sense. Are you saying you have a PC in an aircraft and you're dropping something from the aircraft ? And then you want servos in the aircraft to be controlled.....where from and what by ? What's the autopilot and is it in the aircraft or in whatever you dropped from it ? If the transmitter is in the aircraft where's it transmitting TO and what is it's receiver controlling ? Where did the first Tx used as input to the PC come in ?

If you can draw a block diagram showing all the components of this system including any/all radio links and physically where everything is located it might be possible to work out what's going on and help. Until then, like Malc C I'm just getting more and more confused.

Steve

Malc C
Jan 30, 2008, 05:54 PM
Until then, like Malc C I'm just getting more and more confused.

Steve

Glad to hear I'm not alone.. :eek: :D :D

Assuming a model is being dropped from a full sized aircraft, then why use a auto-pilot controlled by a PC - IMO a simple way would be to use standard RC TX and RX and fly the model behind the real aircraft

So I have a serial signal coming out of the autopilot and I need to control servos on the aircraft I am going to have detach and glide down

So the model (drone) has this autopilot device and it is connecting to the servos via a serial (rs232 com ?) port... but you want to connect to the model via the trainer port on the back of a TX --- so the drop craft will in effect be teathered ? IMO a simple way would be to use standard RC TX and RX and fly the model behind the real aircraft

Most of the drop aircraft I've seen from larger RC aircraft are simply controlled by a second operator using a standard RX transmitter / receiver arrangement. For the life of me I can't see what advantage this autopilot PC arrangement has - and as Steve said... where does the PC fit in.. ??

Sorry if I seem a bit negative, and I'm not having a personal attack on you, but I just can't see what it is you actually want to achieve, and how it can't be done using a second operator couldn't do with normal RC equipment

Malc C
Jan 30, 2008, 06:10 PM
So I have a serial signal coming out of the autopilot and I need to control servos on the aircraft I am going to have detach and glide down. I assume translating the serial signal to PWM for trainer port interface would be the best way... with the TX on board the aircraft.

Normal PPM signals to control a servo are logic pulse of around 1ms - 2ms, repeated every 20ms. The center position of the servo is typically around 1.5ms pulse width. A traditional receiver received a sequential train of pulses (normally one for each channel and a sync pulse) is decoded and each channel is sent a pulse of the correct length to move the servo. Normal serial servo controllers work on a similar fashion, only that the sequential data is sent to the controller from the com port (rs232 or usb) on the PC. Most serial controllers use a decimal value between 0 and 255 to represent the 1ms and 2ms full deflection of the servo. However some will use more than 8 bit resolution for finer control. The PC software will also send a code that instructs the firmware on the controller which servo to move, so for example
01
128
02
255

Would move servo 1 to centre and servo 2 full deflection. Your auto-pilot system would some how need to replicate this protocol, or you would need to program a PIC in such a way it understood the protocol sent from the device.

kdhoward83
Jan 30, 2008, 06:11 PM
Sorry, this makes sense in my head, Im just having trouble putting it into words.. maybe this will help. The circled green part is the connection I am trying to solve. I have a serial output from the Piccolo and need to send that data to another on board TX (TX#3) to control aircraft #2.

I'll try words one more time:

TX#1 = dSpace: Used to control Aircraft 2 - connected to G.S. Computer (COM 5). Compiled C++ software separates the stream an puts it on a localhost to the Piccolo serial line (which has 5 COM ports). COM1 on the piccolo port is used to transmit the TX#1 signal. Data is spit out via serial cable.

Ground Station: Self explanatory. Connected to G.S. Computer (COM 2)

TX#2: Controls the Aircraft, connected via FUTABA trainer port to G.S.

TX#3: ??? Needs to connect to the outputted serial transmission on COM1 of the Piccolo to relay TX#1 signal to control aircraft #2. This is the connection I need to figure out if there is something I can commercially buy.

Note: The goal is to control this smaller aircraft 5 miles away (ideally). The smaller aircraft will have a camera system attached (already have this working) and is too small for another autopilot.

http://xs123.xs.to/xs123/08054/connections709.jpg

kdhoward83
Jan 30, 2008, 06:14 PM
I have it setup now to where I can connect the serial cord from the piccolo into a seperate "simulator" computer and it reads the 1-2mx pulse width via hyperterminal.

Building my own setup is def. an option. But I am lazy and would rather buy something than fiddle with something I know little about.

Malc C
Jan 30, 2008, 06:17 PM
Why not simply control aircraft 2 direct from the ground station via TX#2 by another receiver ?

kdhoward83
Jan 30, 2008, 06:19 PM
Why not simply control aircraft 2 direct from the ground station via TX#2 by another receiver ?

Not sure what you mean. The piccolo itself is the receiver for the G.S. signal..

slipstick
Jan 31, 2008, 04:55 AM
Ground Station: Self explanatory. Connected to G.S. Computer (COM 2)
It's not self-explanatory to me. Anyway now I've googled the Piccolo AP I'm out. I'm allergic to miltary-style UAVs so I'll leave you to it ;).

But since you're flying out of visual range and not direcly controlling the TX (in the plane) you can't legally use standard RC frequencies anyway so whatever your TX3 ends up as it should not be an RC Tx so why would it be using RC-style PPM inputs ? Since you need to be on a license-free legal band (like the 900MHz which the Piccolo uses) why not just use a TX module which already takes serial input ?

Steve

Malc C
Jan 31, 2008, 01:16 PM
Anyway now I've googled the Piccolo AP I'm out. I'm allergic to miltary-style UAVs so I'll leave you to it ;).

Steve

All I got when I googled Piccolo AP was a set of taps or musical instrument :eek: :D :D :D

AndyKunz
Jan 31, 2008, 02:13 PM
Try googling for "piccolo autopilot" instead (no quotes).

Andy

Malc C
Jan 31, 2008, 03:15 PM
Andy, you take life too seriously ;)

AndyKunz
Feb 01, 2008, 08:51 AM
I'll have to tell my kids that. They think I'm nuts.

Andy