PDA

View Full Version : Current loop to RS-232?



NathanAllan
February 25th, 2012, 04:42 PM
Hiya guys,

I have two devices that need to connect to a serial port, one is a teletype and one is a Unix terminal. I can find lots of information around for making serial work on current loop but not the other way around.

Bot the tele and the term are current loop and they output the 20mA that will fry a serial port on the laptop that they will be hooked to. Help??

Chuck(G)
February 25th, 2012, 05:54 PM
There are commercial converters made. Here's an inexpensive example (http://www.l-com.com/item.aspx?id=6981).

You can also make your own converter. Basically you need some optos, a small power supply and a few miscellaneous components. This might be worth a read (http://www.daedalus.co.nz/don/computing/20mahack.html)

If you've got an original IBM PC serial card, it's jumperable to provide current loop instead of EIA signals.

tingo
February 25th, 2012, 06:41 PM
Thanks Chuck(G), this is useful.

kiyotewolf
February 25th, 2012, 10:26 PM
http://sound.westhost.com/appnotes/an011.htm
/
current loop stuff

http://www.extremenxt.com/gpa.htm
/
Powering a sensor by two wires, Mindstorms sensor stuff.. (uses two wires, and gets power from the lines it's connected to, and another example, may give you ideas.)



~Paul

vwestlife
February 25th, 2012, 10:50 PM
The original IBM 8-bit ISA serial port card (and exact clones) supported current loop, using some of the pins not normally used by RS-232C. As Wikipedia says, "The original IBM PC serial port card had provisions for a 20 mA current loop", and "on the original IBM PC, a male D-sub was an RS-232-C DTE port (with a non-standard current loop interface on reserved pins)".

I found the pinout:

Rs-232 Serial (Com) Pc Port Connector Db-25
DB-25 PIN (Male) FUNCTION ABBREVIATION
1 ---------------------------- Chassis/Frame Ground GND
2 ------------------------------ Transmitted Data TX or TD
3 -------------------------------- Receive Data RX or RD
4 ------------------------------ Request To Send RTS
5 ------------------------------- Clear To Send CTS
6 ------------------------------- Data Set Ready DSR
7 ------------------------------- Signal Ground GND
8 ---------------------------- Data Carrier Detect DCD or CD
9 ------------------------- Transmit + (Current loop) TD+
11 ------------------------ Transmit - (Current Loop) TD-
18 ------------------------- Receive + (Current Loop) RD+
20 --------------------------- Data Terminal Ready DTR
22 ----------------------------- Ring Indicator RI
25 ------------------------- Receive - (Current Loop) RD-
NOTE!! Current loop technology was supported in the PC and XT interfaces.
Current loop was discontinued when the AT interface was introduced.
Transmitted and receive data are referenced from the data
device and not the modem.

Chuck(G)
February 25th, 2012, 11:21 PM
You can also check the PC Techref (online) for exact details on the jumpers and pinout.

There weren't very many serial cards that supported current loop; even the original Compaq cards didn't.

Also, in connection with current loop, take a look at some of the RS232-to-MIDI converters--MIDI isn't anything but current loop interface. See here for example (http://www.compuphase.com/electronics/midi_rs232.htm). Of course MIDI is a 6ma interface, rather than 20, but that can be adjusted.

As a tidbit, early MIDI experimenters used the IBM serial card for MIDI experiments; the crystal was changed, because the bitrate is 31.25Kbit/sec and a resistor was added to drop the current from 20 ma. to about 5.

kiyotewolf
February 26th, 2012, 12:32 AM
A MiDi interface is just something driving an optoisolator on the other end of the wire.

Had a MiDi SENSOR, and all there was inside was a resistor and an LED.



~Paul

Which in that case, with your 20 mA current loop, I'd try a bi-color LED, one that's two in one, just reverse the current to go red to green, and a resistor, and see what happens.

NathanAllan
February 26th, 2012, 04:40 PM
Excellent information! Thanks, Chuck(G), that looks like a winner to me. I'm not using an IBM, but I will bear taht in mind if I ever get one. All I have are clones.

vbriel
February 28th, 2012, 03:13 PM
Check out the first book of KIM. In that book is a current loop to RS232 circuit and it can be done with 5V and ground only and it works. How do I know, well, I use this circuit in my Micro-KIM. The original KIM-1 had a TTY 20mA current loop interface and with just a few components you can convert that to RS232 levels. If you can't find the circuit, let me know I can dig it up. Very simple circuit to make.

Vince

Erik
February 28th, 2012, 07:51 PM
There are commercial converters made. Here's an inexpensive example (http://www.l-com.com/item.aspx?id=6981).

That's the exact one I have and it works great. I've had my teletype's connected to my PC and Altair via serial. I also have an SIO2 set up for current loop as needed (for the Altair, anyway) :)