From: rbono@necis.UUCP (Rich)
Newsgroups: rec.models.rc
Subject: Re: Conversion of radio to RS232
Date: 18 Nov 92 16:57:16 GMT
Organization: still seeking it

In article <1992Nov17.080934.32734@kronos.com>, ed@kronos.com (Ed Baker) wrote:
> In article <1992Nov16.192827.6372@samba.oit.unc.edu> tracton@radonc.unc.edu
>  (Gregg Tracton) writes:
>>
>>Model Netters,
>>
>>Does anybody know how to convert a Futaba Attack-4 radio so that it
>>outputs RS232 in place of it's radio signal?
> 
> RS232 describes the physical method of sending digital data over a serial
> communications line; it does not prescribe the actual information being
> sent/received.  Questions of baud rate, character length, parity,
> character set, etc. must be addressed.  Then the format of the data must
> be described.
> 
> The radio outputs a variable resistance for each of it's channels.  This
> value must be measured and converted to digital format for transmission
> on the RS232 line.  A circuit could be built to accomplish this, but the
> interface requirements would have to be documented.
> 
>>Then, I could use it with a flight simulator.
> 
> If so, then you need to know the baud rate and protocol for the particular
> software package.

 I will agree with a lot of this, except the part about the radio outputting
a variable resistance for each of its channels.  These radios output the
pulse stream from the enocoder circuit.

 It basically is each of the pulses that will get routed to the proper
servo.  Let's see if I can draw a simulated four channel pulse stream:

       +---+     +---+     +---+     +---+
       |   |     |   |     |   |     |   |
 ------+   +-----+   +-----+   +-----+   +-----------


  The "width" of each pulse determines the position of each channels' repective
servo.  Usually 1.5ms (center) with +-.5ms for full travel in each direction.
This signal is the same signal that is used to modulate the R/C transmitter.

 Yes, indirectly this output was generated by a variable resistance, but it
is not itself a variable resistance.  By the way, I may have the polarity of
this signal inverted.  I can't remember, but this signal may already be
within the RS-232 voltage range.  I just don't remember the measurements
that I have taken..... Now that I think about it.  I think that the signal
starts at ground (0 volts) and the goes positive (or was it negative?) to
+ (-) 10 volts (actually, within one volt of the battery supply which is
a nominal 9.6 volts in these systems).

  So, to read the stick position with a computer, one would only have to
time the width of the pulses.  This could be done by feeding this input into
an apropriate input pin (i.e.: DTE), and program that input to generate an
interrupt upon a change in the signal state.  Then use a hardware timer to
measure the proper intervals.  The nessesary hardware is all built into the
average IBM-PC compatible system (you may have to add some hardware 
level conversion or isolation).

 Of course, this isn't going to help you unless you are writing your own
simulator software.  Other programs may use other methods of reading the
stick position.  I know that the "Dave Brown" version uses a transmitter
case with only the sticks and potentiometers.  The pot's are simply wired to
the IBM-PC game port.  It will actually work with two standard IBM-PC type
joysticks.

 I hope that this information helps you,

 Rich
-- 
 /**************************************************************************\
 * Rich Bono                     IMRICH         UUCP:rbono@necis.ma.nec.com * 
 * (508) 635-6300                 NM1D          AMPR: nm1d@nm1d.nh.usa.noam * 
 \**************************************************************************/
Newsgroups: rec.models.rockets