[GreenKeys] 60mA current loop
John Nagle
nagle at animats.com
Sun Dec 6 18:45:03 EST 2009
Dave Hunter wrote:
> Glad I could help. Of course, now you're faced with the problem of how
> to get your machine to copy from a computer:...
>
> Step one is to set up an interface between your PC and the current loop.
>
> 1. At the start of the computer revolution, loop-to-RS-232 interfaces
> were common, since Model 33 Teletypes were the terminal du jour
> for PDP-8 and other low-end computers. You'll see them on Ebay all
> the time, in the $50 range.
20mA interfaces are reasonably easy to find, because they were used
in the minicomputer era. If you need 60mA, that's harder.
> 2. If you choose to roll your own, the technical work has already
> been done for you, since the a member of the Morse Telegraph Club
> long ago designed an interface that connects RS-232 devices (e.g.,
> modems) to local Morse sounder circuits. Since Morse sounders are
> solenoids just like your machine's selector magnets, there's no
> need to reinvent that particular wheel. I'll provide details on
> request.
I'd like to see that. I have a level converter design at
http://www.aetherltd.com/connecting.html
which I use. I'm more cautious about isolation than some here, so
I designed something that's entirely optoisolated in both directions
and suppresses both selector magnet inductive kickback and keyboard
contact arcing.
> Once you have a circuit in place to convert your RS-232 serial signal to
> a current loop, you then need to figure out how to get your PC to
> produce Baudot output. Fortunately, there's an easy workaround here as
> well: assuming you can re-time your serial port to 45 baud, you need
> only send ASCII characters which are equivalent to the Baudot letters
> you really want. The Baudot sequence "RY", for example, is simply "u+"
> in ASCII: the "high order" bits, which are transmitted last, are all "1"
> in the equivalent ASCII sequence, so that the Baudot teletype sees them
> as a stop pulse followed by an inter-character gap.
On Windows, for machines with standard serial ports, this is easy.
Just open the serial device at 45 baud, 5 bits, 1.5 stop bits, no parity,
and it works.
It's painful on Linux, because Linux has a fixed set of baud rates.
There's a workaround for standard serial ports on Linux; see the documentation
for Heavy Metal.
Most USB serial devices will not go 45 baud. I use this $29 device
http://www.aetherltd.com/connectingusb.html
for that. This works with both Windows and Linux. I use a little
EeePC 2G Surf to drive a model 15 Teletype.
> If you _can't_ get your serial port to go that slow, then the plot
> thickens: you'll need to use ASCII characters which will translate
> multiple bits into a single bit position of the Baudot code. For
> example, you could clock out an entire ten-bit ASCII character in 22 ms
> by setting the UART serial clock to 454 bps, and that means that every
> ASCII character you sent would occupy _one_ Baudot bit position at 45
> baud. Assuming your serial port can be set to _not_ send parity, you
> could then send ten ASCII characters in place of a single Baudot
> character, i.e., the ASCII sequence
> NUL-DEL-NUL-DEL-NUL-DEL-DEL-DEL-DEL-DEL would be equivalent to a Baudot
> "Y" if sent at 454 baud. I know that's confusing, but it does work.
You'll still have a 4ms SPACE period at the end of each ASCII
character, for the ASCII stop bits, so you won't be sending the
correct waveform. Look at the output with a scope. It might
work, but I wouldn't count on it.
For Baudot software, there's Heavy Metal, and my "baudotrss"
"https://sourceforge.net/projects/baudotrss/". I'll put up a new
version of "baudotrss" soon which can receive SMS messages as well
as RSS feeds. Right now, you have to download the source from
the Subversion repository; there's no easy installation.
John Nagle
More information about the GreenKeys
mailing list