• Please review our updated Terms and Rules here

RS-232 to Current Loop Interface

1944GPW

Veteran Member
Joined
Apr 26, 2011
Messages
645
Location
Brisbane, Australia
Nice looking work. I like #1 and #2. Also, it would be nice to have mounting holes in the four corners of the main board, or close to the corners.
 

glitch

Veteran Member
Joined
Feb 1, 2010
Messages
5,011
Location
Central VA
Well, since it's modular, I'm going with #1 *and* #3! Preassembled boards, if I do any, will include a surface mount transistor, but kit boards will use a 2N2907. I've sourced several hundred 2N2907s in metal cans, so heatsinks could be added if loop voltage is near the limit.
 

glitch

Veteran Member
Joined
Feb 1, 2010
Messages
5,011
Location
Central VA
Ordered the 20 mA loop receivers today:

current_loop_receiver.jpg

This is the one that uses a large metal can 2N2905. Current source is now temperature compensated.

I updated the 24V switchmode loop supply board to use a full wave bridge rectifier. Not ordering more prototype boards of that yet, since the basic design is fine.
 

glitch

Veteran Member
Joined
Feb 1, 2010
Messages
5,011
Location
Central VA
Protoboards for the receiver are in! Assembled:

dWsRWE2.jpg


As you can see, I've soldered 0.1" breakaway headers to this one and stuck it directly into a solderless breadboard. That was part of the design goal for modularizing. There's a 1 Ohm resistor in series with the loop converter for current measurement. The two 3.32 Ohm resistors in series are like that because I didn't have a 6.64 Ohm resistor on hand.

There's plenty of room for a "tophat" style heatsink on the 2N2905A. It gets warm at 24V loop voltage with basically the loop voltage directly across the receiver -- loop resistance equal to whatever the power supply's resistance is, plus the 1 Ohm sense resistor.

TTL output is provided by a NPN inverter, logic 0 is around 90 mV and logic 1 is around 4 V. Sources 3 standard TTL loads.
 

glitch

Veteran Member
Joined
Feb 1, 2010
Messages
5,011
Location
Central VA
Did some frequency response testing today. My target bitrate was 9600 -- way more than you'd usually ever need for current loop. Personally, I'll be using the converters as the passive end of a current loop with my PDP-11/10, probably at 1200 or 2400 bps. With slow old 4N30 Darlington optocouplers, I was able to get to a very reasonable looking output waveform at 9600 bps with a few component value tweaks:

d3UmQCR.jpg


Fall time is 8 uS from when the input goes low, rise time is 20 uS, which should be just fine for 9600 bps current loop, if anyone ever needs to run it that high.

Here's a few pictures of the test setup. I used my Lambda power supply to power the breadboard, a Fluke 8842A for voltage and current measurements, a Tektronix CFG250 function generator for input, and a Tektronix 2432A oscilloscope:

HByO07U.jpg


pBzPswm.jpg
 

glitch

Veteran Member
Joined
Feb 1, 2010
Messages
5,011
Location
Central VA
Proper value resistors came in, current is right where I calculated: 22 mA! Temperature compensation seems to work just fine, of course the board has to warm up to operating temperature. Swing during warm-up is a few tenths of a milliamp.

The current loop transmitter, revised 24V supply, and a breadboard breakout module are off to OSH Park for fabrication.
 

glitch

Veteran Member
Joined
Feb 1, 2010
Messages
5,011
Location
Central VA
See? It's not just overengineering!

2N2905A transistors arrived from Bulgaria, along with prototype boards from OSH Park. I have to verify these final module revisions, then I'm set to lay out the base board.
 

Tor

Veteran Member
Joined
Mar 14, 2011
Messages
984
Location
Norway/Japan
Haha, I indicated interest in this project exactly because I still have a hope of getting my own ND.. with 9600 baud current loop! :)

-Tor
 

glitch

Veteran Member
Joined
Feb 1, 2010
Messages
5,011
Location
Central VA
OK, nearly done with the board layout for the base board! I think rather than put a DB9 or DB25 on the board, I'm going to put a 5-pin header so it can be assembled with whatever connector you like, or daisy chained onto the baudrate + USB converter I'll be designing to go with it. It would also make it easier to mount in a project box. Thoughts?
 

glitch

Veteran Member
Joined
Feb 1, 2010
Messages
5,011
Location
Central VA
Went ahead and sent it off with the 5-pin header for RS-232 and two 4-pin headers for the current loops:

14NihuO.png


E7rWJFa.png


Had space to put all of the pinouts on the back side in the silkscreen! The images are OSH Park renderings, but the board is being manufactured in China -- cheaper to get 5 boards made in China (with shipping!) than three in the US, and the turnaround times are faster anyway.

The base board is also done in KiCad instead of EAGLE CAD. The modules will probably stay in EAGLE for now, but if there's major changes to be made I'll move them to KiCad too.

With the AUX and READER RUN loops, this converter can be either end of the console link for a PDP expecting paper tape control -- that is, it can simulate a Teletype, or it can be connected to a Teletype and control the reader relay.
 

glitch

Veteran Member
Joined
Feb 1, 2010
Messages
5,011
Location
Central VA
Prototype base boards are in:

g31Tioj.jpg


I'll probably populate one this weekend and get it tested out.
 

Dwight Elvey

Veteran Member
Joined
Jun 21, 2003
Messages
4,804
Location
Santa Cruz
Years ago, I worked at Intel, when they made systems.
While I was there, I learned some about specmanship.
We had problems getting serial current loops to work at
9600 and some times even 4800.
We traced the problem to the optical isolators.
The biggest problem was the darlington ones.
Two factors were involved.
First, the turn off spec was done with the higher
end of current flow, while the turn on spec was
done by the lower current flow. Both of the timings
where tested under their optimal condition for
shortest time.
They usually have the lead for the intermediate emitter
base connection.
A resistor can be added there to optimize the circuit
for best turn on and turn off at the desired current
drive.
This only worked for a short time.
It seems, there is no spec for the gain of each separate
transistor. Form one manufacture to another there
is a large difference. In some,the photo transistor
has more or less gain and the difference is made up
by the output transistor.
The fix should have been to not use darlington optical
isolators but it was decided to only use one manufacture.
The conclusion I'm coming to is that if one needs
higher speeds, don't design using the darlington
outputs.
Dwight
 

Tor

Veteran Member
Joined
Mar 14, 2011
Messages
984
Location
Norway/Japan
Was this project put on ice? I'm more interested than ever now that I've got myself a minicomputer which requires a console terminal w/current loop.. I've got one of those, but the future plans involve a RPi3 w/wifi connected to the console port, for remote operations. :)
 
Last edited:

glitch

Veteran Member
Joined
Feb 1, 2010
Messages
5,011
Location
Central VA
The XT-IDE rev 3 project kind of pushed it out of the way. Aside from the Slot 8 support board, that's pretty much out of the way. I'll try and dig this out today or tomorrow -- I have the prototype assembled, but haven't fully tested it.
 

glitch

Veteran Member
Joined
Feb 1, 2010
Messages
5,011
Location
Central VA
Got everything assembled and tested it over the weekend:

02lMcho.jpg


Unfortunately something is not 100% right -- it works fine up to 1200 bps, gets flakey at 2400 bps, and doesn't work at 9600 bps. I haven't broken out the 'scope to look at it. Odd, since I tested the modules with a square wave at what would be 10 kbit/sec. Baseboard and power module fully tested though -- the baseboard had the same "silkscreen effectively wrong" LED issue as the XT-IDE rev 3 board, an artifact from importing from an old version of KiCad!
 

essay

Member
Joined
Apr 24, 2016
Messages
12
I have sourced several hundred 2N 2907s in metal cans, so heatsinks could be added if loop voltage is near the limit.
 
Top