Friday, June 5, 2020

Checking out my 3178 terminal components

INVENTORY AFTER DIGGING OUT ALL MY TERMINAL PARTS

Using IBM nomenclature, the 3178 C terminal consists of a monitor element, a logic element and a keyboard element. The logic element is what I have referred to as a controller box. 

I have two logic elements, thus can have a maximum of two working terminals. I have three monitor elements and three keyboards.

Two of the keyboards are 75 key units, marked C1 underneath, while the remaining keyboard is marked C3 and has 87 keys. 

TESTING LOGIC ELEMENTS

Both logic elements power up and appear to work fine, given that I don't have a coax connected to a control unit and thus see only local functions. It goes into Test mode and paints characters across the entire screen. In Normal mode I have the horizontal green line between lines 24 and 25, with all nulls visible in the remaining locations.

TESTING MONITORS

One monitor is intact and provides adequate but not strong brightness. The second monitor is intact but has a quite dim level, only suitable for a darkened room. The third monitor has a hole punched in the top of the case and when operated has a decently bright horizontal line right across the middle at about line 12 position. 



TESTING KEYBOARDS

All three keyboards seem to operate, as I can type and see some characters show up on the screen when the terminal is in TEST mode. In Normal mode, nothing happens since the terminal does not see the control unit on the other end of the coax. 

The behavior is the same for all three keyboards and across both logic elements. Pressing the alpha character keys yields the capital letter on screen that matches that keycap. However, the special character keys above the alpha top row (QWERTY etc) show up as decimal digits rather than the value on the keycap.

Further, the cursor arrow keys don't move the cursor, they just put certain special characters on screen. Shifting to upper and lower case on the keyboard still generates the same capital alpha letter. 

I don't know if this is the behavior that would occur on a fully functional 3178 while it had no coax connection and was in test mode, or if this signifies some mismatch between the keyboard elements I have and the logic elements. I won't really know until I have the 3174 control unit project cabled up and active with the terminals in Normal mode. 

INVESTIGATING THE BROKEN MONITOR

I opened the monitor element that had a broken top and no apparent vertical deflection. Right away I astutely noticed the electrolytic capacitor laying inside, disconnected from any PCB. The base had oozing electrolyte. 

I examined the PCB inside the monitor and see the spot where this capacitor (C312) had corroded off the board. It is in the Vertical section of the board, quite consistent with the behavior I observed. 


I intend to buy a replacement cap and install it, after cleaning the corrosion off the PCB. If the traces and connectivity check out okay, I will power up and see if the vertical scan resumes operation. At worst case, I have a fully functional PCB on the other monitor, the one that is excessively dim. I also have a good plastic top that I can swap onto this unit. Therefore I expect I can restore this to working order and have two sufficiently bright, working 3178 terminals.


Disappointing news after unboxing - my terminal is a 3178 rather than the color 3179

EXAMINING MY TERMINAL

I finally opened the box I had received years ago, believing it was a color 3179 terminal. Alas, it is the monochrome green 3178 terminal, like my other ones. 

PROJECT GOING FORWARD

This doesn't invalidate my project although esthetically I wanted the full color terminal experience. At some future time I can buy a 3179 and continue that aspect; this should cost in the range of 150 to 200 on ebay including shipping. For now, I will continue with the 3178.

Thursday, June 4, 2020

New project - experimenting with my IBM 3179 color terminals

SCOPE OF EFFORT

I own several 3179 terminals and have potential uses for them, but I don't have the control unit that drives and supports them, thus have no way to connect to them. Three possible uses are:
  1. I own a P/390 system, which is an IBM PC with a special board that implements the S/390 (and earlier 360 and 370) instruction sets and functionality. It comes with support software running under OS/2 that configures and controls the entire system. With it, I can boot up systems such as MVS or VM that work well with 3179 terminals attached.

    Barring the real terminals, I have to open windows on OS/2 to run 3270 emulator sessions, which is just not as satisfying.

  2. Eventually a team of us will recreate an entire 360/50 system. A 3270 terminal is a bit of an anachronism for this mainframe, but I think with a bit of work we can back port support to OS/MFT or DOS operating systems. We will be creating bus & tag channels for the recreated 360/50 and thus if I can create a control unit it could be attached. 

  3. A mainframe emulator called Hercules can run on a PC and also give me an MVS or VM system, but has the same dependence on 3270 emulator windows on the PC rather than using a real glass screen.
Andrew Kay has recently attacked this problem and developed a control unit to drive his 3278 (monochrome) terminal for attachment to Hercules. He has made the code and hardware open source, sharing it with the community.

I am building the interface hardware using his design and PCB layout. This is a shield that mounts atop an Arduino Mega 2560. The shield hosts a coax connector allowing a cable to be connected between the shield and the controller box on a real 3270 type terminal. A USB cable serial stream connects the Arduino to a host system of some type where Python code provided by Alexander will implement the control unit functionality. 

His code makes a TCP/IP connection from his Python code to a TCP socket in Hercules, thus allowing use of his 3278 for software running in an emulated mainframe on Hercules. While this is sufficient for my purpose number 3 above, it may or may not work properly with the color support of the 3179 since he has not tested it with a color terminal. 

To implement my first two purposes from above, I will be modifying the controller. Eventually I would migrate this into an FPGA based hardware device since I will be implementing a bus and tag channel in that hardware to hook to the recreated 360 system. 

I am not yet sure how I will hook into the P/390 system. Some research is required to design the right approach. 

IBM 3179 COLOR TERMINALS

These were a part of the IBM 3270 family of CRT terminals first released with S/360 in the late 1960s and used with mainframes for decades after. The 3179 is a newer version of the 3279 which first brought color to this family; the original 3270 line were monochrome green screens. 

The terminal itself consists of a monitor, keyboard and controller box. Their is relatively little intelligence in the terminal itself, with an external control unit such as 3274 or 3174 providing the majority of the functionality. One control unit would handle multiple terminals typically, as an example 16 3179 terminals might be connected to one control unit. The connection between terminal and control unit is a 93 ohm coaxial cable. 

The control unit itself is connected to the mainframe by one of several methods ranging from local attachment to a bus & tag channel through various telecommunications link types. The programmer communicates with a terminal by sending streams of commands, orders and data to the control unit.

Inside the terminal's controller there is essentially just a large buffer with one location for every character position on the screen. A typical 3179 would have 24 lines of 80 characters plus a 25th bottom line that indicated the status of the terminal. Thus the controller would have a buffer with 2000 locations which was continually drawn on the screen as the terlable for update. Some presses would send a special code instead, for example a Program Function button. 

The terminal controller waits for the control unit to send it a query, for example polling it to see if any key was pressed. The terminal can't signal the control unit or mainframe on its own, it has to wait as a slave device. If a key was pressed, the terminal controller sends codes to identify which key was pressed, as well as status and other information. 

The control unit can ask the controller to send part or all of its buffer, which is used to satisfy the commands and orders coming from the programmer. If the terminal user has typed in data at various locations on the screen and then hit the ENTER key, the response showing the ENTER key is followed by the control unit reading any modified part of the buffer; these are the fields where the user typed in content. 

Writing to the terminal is done by sending updates to the buffer from the control unit to the terminal controller, after which the new data and formatting is visible on the screen. 

Making plates to hold the mini-WASP pins

CONNECTOR ANCHOR PLATES BEING FABBED

I carefully designed the lasercutting outlines for the plates, yielding a total of six plates. Each of the three connector types - Power Supply Module, Relay Module and Electroluminescent Panel Module - have a pair of plates. The lower plate has .07" diameter holes cut through the maple hardboard, into which the nylon holders of the mini-WASP pins will be pressed. The upper plate has .03" diameter holes that are large enough to allow the wirewrap post tails of the pins to stick through but will retain the nylon holders. 

The power supply plate only has 12 pins, but the relay module plate can hold 137 and the EL panel plate an even more numerous 160 possible pins. In my current project I will partially populate the three plates as I don't need every connection. For example, the relay module only uses 81 pins while the power supply is just 7 to 9. 

CONCERN OVER ACCURACY OF FABRICATION

I did the drawing using Inkscape, which is a freeware alternative to Adobe Illustrator. It allowed me to be very precise in the sizes and spacing of all the features. This is essential as the nylon holders must fit in the holes and be spaced in a grid with .125" spacing pin to pin. 

When I uploaded the design file to Ponoko.com, their system showed the size of the group of plates to be almost twice as big as in my drawing. This was quite concerning as accuracy was important. Their FAQs recommend changing the size of the group manually on the website, which I did.

However, my drawing is a collection of six plates with spacing between them, thus I have to hope that they determined the bounding rectangle or size of the group exactly the same way that Inkscape does when I select everything. If this is true, then they should scale properly. However, there is a very real danger that my $55 order will arrive late next week with the plates larger or smaller than designed, rendering them useless. 

Tuesday, June 2, 2020

Designing test setup using DSKY modules and EL panel

SCOPE OF PROJECT

This project will make use of one Power Supply Module from a block I DSKY, one Relay Module from a block I DSKY and an early version of the EL Panel for a block II DSKY. Controlling all the elements on the display requires four relay modules, thus I can only display contents on part of the EL panel.

I chose to animate the PROG, VERB, and NOUN displays, each are two digits formed by seven segment patterns. I will also light the fixed lines and text legends. Finally, I will animate one of the signs (for the register R1). If I had a second relay module I could light up all of R1 and another sign, for example, but the modules on hand limit me. 

PLAN FOR MINI-WASP CONNECTORS

We have some of the very precious mini-WASP connectors that were fabricated by Samtec to support our Apollo Guidance Computer restoration. I will need roughly 150 female pins for the project as defined. This is a demonstration project and as such I want those pins returned for use in future projects once this one is complete. That requires a strategy for building connectors that leave the pins 'as new' when eventually disassembled.

The normal method to build a mini-WASP (MW) connector is to take a flat aluminum plate and drill .07" diameter holes in a grid with center to center spacing of .125" both vertically and horizontally. The MW pins are pressed into the holes, compressing the nylon body of the pin. The rear of the pins are tall wire-wrap posts, which can be cut down and soldered onto PCBs to form permanent connectors. 

Cutting the pin tails, soldering them, and compressing the nylon by press-fit are all irreversible acts. I had to work out a scheme that did none of those steps yet gave me a workable connector with wiring attached.

The first part of the solution is to use wire-wrap to make the connections. This winds a thin insulated wire around the post that is the pin tail. The post is a square cross section and each of the corners will cut through the insulation of the wrapped wire to make a solid electrical connection. The wire is wound several turns on the post. This does not damage the post at all.

The second part of the solution is to use a softer material for the grid of drilled holes, such that the plate itself is compressed while the nylon remains unaltered. I chose wood for this purpose. I will use a laser-cutting service to build wood plates of .13" thick hardwood with .07" diameter holes cut to hold every pin.

A second plate of hardwood, the same size as the base plate with the mounting holes, will have much smaller diameter holes at .125" spacing, just large enough to pass over the post tails of the MW pins. A dab of wood glue at the outside edges will hold the two plates together forming a sandwich to protect the MW connectors.

These won't be removable with this method, because the cumulative force needed to unset 47 or 91 pins for the two larger connectors will exceed the friction hold of the wood around the nylon bodies. If I try to pull them up, the wood will just slide up off the pins. 

Therefore, these are 'permanently' installed on the modules, with the sandwich pressed down to seat the MW connector to the module side pins, then wirewrapped to provide connectivity. To remove them, I have to first remove all wire-wrap, then pull up the board and finally pull off all the MW pins that remain seated on their companion pins on the modules. This is acceptable for the purposes of this demonstration. 

As with other projects requiring laser-cutting, I will use Ponoko.com as the fab to produce the wood plates I need. The designs are being produced using Inkscape (a freeware Adobe Illustrator alternative).

PLAN FOR CABLING

I will use some form of cable wrap to cover and protect the many discrete thin wires that come off each of the connectors. This is sufficiently robust for the demonstration but hardly rugged enough for a permanent installation. 

There are a few outside wires that will connect to traditional connectors on the connector plates.  These include external power, ground, a source of 800 Hz and all the control signals from an Arduino that will set/unset the relays to activate the module. 

PLAN TO CONTROL RELAY MODULE

The relays are activated by spacecraft level switching, +28V, but the final circuit that drives all of these consist of an open collector transistor that will pull a line to ground to activate or let it float. Thus, my Arduino will need 20 such transistor circuits to fully control the project.

Some simple firmware in the Arduino will provide a command interface over serial to my laptop where I can set the codes for all the digits and the sign. A simple script can run to animate various displays on the panel. 

Sunday, May 31, 2020

Further testing of power supply shows it healthier than originally thought

EFFECT OF BOOSTING VOLTAGE INTO POWER SUPPLY MODULE

When I looked at the effect of ramping up the two voltages provided to the power supply module, +14 and +28, I discovered that there was no point looking for a higher level supply as I originally thought. Changing the +28V supply had essentially no effect on the output AC voltage of the power supply module. It was, in fact, the +14V supply whose boost would visibly brighten the electroluminescent panel.

BRIGHTNESS OF SEGMENTS WITH A MODEST BOOST

I then hooked up some digit segments and noticed that the lines and text legends I had lit up were intentionally dimmer than the numeric digit and sign segments. In fact, the brightness was quite acceptable with input voltages of 16 to 17V. 




NEXT STEPS

Each digit on the panel has seven segments with a pin on the rear for each segment. With 21 digits, it takes 147 pins to drive the segments. Each of the three signs requires two pins each, then the line/text features take a pin, the COMP ACTY area takes a pin, and a few pins are assigned to provide ground. The panel as 160 total pins on the back, constructed with the Malco mini-Wasp connectors.


The power supply module needs 7 pins between +14, +28, 800 Hz input, ground and the AC output pair. One side of the AC output is routed to the panel ground pin, while the other AC output line is hooked to between 1 and 155 pins to light up the desired output.


In between these two modules, power supply and electroluminescent panel, the DSKY uses four relay modules. These modules will connect the AC output to the individual segments on the panel, latching in the connections so that the digits and signs stay lit using many tiny latching relays. The guidance computer sends commands to select a particular row of relays and feeds a word to them that set or reset the various relays in that row. 

Each relay module has 137 pins on its connector. There are other circuits besides those that light segments on the electroluminescent panel (obviously since they collectively have 548 pins while the panel has only 160). Adding to the complexity, the seven segments for each digit on the panel are controlled by only five bits coming from the guidance computer. 


I currently have one relay module which I have fully tested and found completely functional. It can drive only a portion of the panel, for example, six numeric digits out of 21 plus one or more sign segments. To do even this subset, I need more than 45 connections from relay module to panel, seven pins for the power supply, and quite a few control and input pins to cause the relay module to latch various values into the digits. 

There are no sources for the mini-WASP connectors, other than a modest number that were built at great expense by Samtec to support our restoration of the Apollo Guidance Computer. I am loathe to deplete the supply building permanent connectors to produce a demonstration with six digits, signs with my one relay module.

I have tried to use some connector pins I found that form a U or open box shape slightly larger than the mini-WASP size. The can make a loose connection but easily pop off. Trying to wire up more than a hundred to link the three modules is very difficult.

Our custom built mini-WASP pins have a wire-wrap tail, which potentially could be used to temporarily wire these together. The connectors could be used for another project afterwords. The way that a 137 or 160 pin connector is built using the mini-WASP is unusual.

Each pin has a nylon holder that is pressed into a hole drilled into an aluminum plate. The holes provide the spacing and arrangement of pins into the desired grid. Pressing a pin in the plate commits the pin to that use, but I want these to be fully available for future projects. Therefore, I need to find a way to arrange the pins and hold them in place without using a press fit. If I can solve that, I can hook up the demonstration. 


Tuesday, May 26, 2020

Attempt 2 at an alternative driver for 800 Hz to the power supply module of the DSKY

LOOKING FOR OTHER DEVICES TO PULL 13V DOWN TO GROUND

If I had a decent NPN transistor that would be the most straightforward way to drive the circuit. With the virus lockdown, I can't go out and buy any parts but I may have something in the garage that would work. With a bit of hunting I located a 2N5551 and wired it up.

This is equivalent to the interface circuit in the Apollo Guidance Computer that provides the 800 Hz drive for the power supply. It is an NPN transistor through a 2K load resistor This restricts the current to a maximum of 2.5ma when tested with 5V but using the spacecraft power level of 14V it can sink up to 7ma, a tenth of a watt dissipation.

Up first was a direct test of the driver transistor delivering the appropriate 800 Hz signal at a few milliamps current, which is well below the max I want to drive the single transistor. It was breadboarded and hooked to the scope, with exactly the results I wanted.

Then I wired it to the power supply module through this driver circuit. The function generator gave me the 800 Hz square wave, then the driver transistor will sink the 14V to ground, after it passes through the primary of the first coil inside the power supply module.

RESULTS AND OBSERVATIONS

For this test, I hooked the power supply output to a segment on the electroluminescent (EL) panel to provide a proper load. I wanted to monitor the output waveform and measure the voltage using the scope. I started with the potentiometer wires open to reflect the cabin lighting pot set to max brightness. I ccould then insert a fixed resistor or short across the wires to simulate various dimmed settings.

The segments were no brighter than before - pretty dim actually. Their wasn't enough oomph to light the fixed lines and legends with the standard input voltages of +14 and +28. I had to see what the output voltage looked like on the scope. It should be 800 Hz AC with an RMS value of about 275V.

The high voltage is isolated from the input side and spacecraft ground, thus the scope has to be grounded only on one side of the output. I turned on the test bench and observed the output waveforms. It appears to produce a reasonable waveform but a bit low, just as the previous circuit did.
800 Hz with 250V peaks, therefore below desired level
The math in the scope isn't doing well interpreting the RMS AC value nor the frequency since it isn't producing clean sine waves. Looking at the time between peaks of about 1.25 ms confirms that this is operating at 800 Hz. The peak voltages are a bit above 200V each way which, with sine waves, would be an RMS reading of perhaps 145V. With no segments active it jumped to 240V each way and an RMS equivalent of 170VAC, consistent with the dim illumination.

Since there seems to be excess resistance in the ground side of the EL panel, that voltage drop might be confusing the current compensating circuit in the output, where the supply could be working just fine. To test this, I left it disconnected from the EL panel and measured the output voltage. Since the peak to peak approached 480V, it shows there is some effect but not enough to account for the low output.

At worst case, I will have to work with the El panel in a darkened room to get acceptable brightness. There are two other possibilities to brighten this up. First, I could recreate the entire circuit in discrete components, ensuring I can reach the voltage targets that I want. Second, I could find a way to 'amp up' the power supply output. The discrete component alternative is quite hard because of the specially wound transformer that is used to ensure constant brightness with a variable number of EL segments illuminated.

I can pump a bit more out of the circuit by boosting the supply voltage to the power supply module, although it introduces the risk that I will exceed the max voltages of the transistors inside causing a failure. Because of this, I can't ratchet the voltages up too much, but I should be able to go up about 25% with some safety. This was designed to operate in a spacecraft which did have some transients and high side excursions in power, thus the transistors would not have been chosen right at the margins.

Bumping up the +14V supply to 17.5 volts and the +28V supply to 35 volts would implement my 25% boost.  I gave it another try, with 17.5V and 32V since my supply can't produce the full 35V.  The segment was noticeably brighter even without the supply generating the full 275VAC that it should.

Partially boosted voltages improved brightness
I am not sure of the cause of the anomaly on the positive peaks. I decided to reverse the connection just to see if the problem shifts or is a scope/measurement artifact. Indeed, the strange waveform flipped. This is definitely a characteristic of the module under test.

Scope leads reversed, symptoms also reversed

I need to pull out another power supply to inject the full 35V for my original brightening plan. This is not readily at hand but the current illumination is adequate for viewing indoors in normal room conditions.

Decent illumination level