Thursday, November 13, 2014

Wiring SAC socket into new enclosure, plus zeroing in on the keypunch interface reset issue


The instrumented calls to report free memory show that the hangs or resets of the Arduino are not due to exhaustion of free memory, but likely an electrical issue. I added a large capacitor to buffer power sufficient to keep the Arduino operating, after which I tested again. The problem recurred, so it was not sagging power.

Next I looked closely at the relay and SMS board connections and nearby pins to see if something in the keypunch is shorting or causing problems for the Arduino. I did find that when I removed the second multipunch relay wiring and restored the circuit, I put the pins onto the N/C rather than the N/O contacts of the DUP2 relay. It shouldn't have affected the Arduino nor the keypunch, but I put things right.

After fixing the DUP2 connections, my test caused a reset much quicker - within the first few spaces punched, the microcontroller restarted. Sigh. I will put this aside for a bit and work on something with a lower ratio of frustration to accomplishment.


I began wiring up my interface boards to the new 160 pin socket, preparatory to installing everything in a project enclosure. I have to find a good box to house everything before I proceed too far, as various connectors will need to be attached before they are fully wired up. Right now I am just wiring the boards to the female pins, but not inserting them into the socket body until after I have it physically attached to an enclosure.

Enclosure to implement the SAC Interface Unit
I selected a mini-ATX computer case, suitable for what I want with plenty of space and not too cumbersome to repurpose from a PC to this interface. After I picked it up, I continued assembling the socket and installing it onto the new enclosure. I have all 77 signal lines installed into the socket. Next up are 83 ground lines and then I can begin hooking up the wires to the four interface boards.

Preparing female pins for insertion in socket

First group of pins installed

All 77 signal lines installed, view from the rear of the socket

outside view of the socket (on the back of the interface enclosure)
I made some braces to hold a stack of four interface cards inside the enclosure and began to install the ground lines, twisting them around their associated signal wires and soldering the pair to its assigned circuit on one of the four boards.  I am about 35% through installing the ground lines and twisting the pairs.

Twisting the ground and signal lines into pairs

Twisted pairs bring some order to the wire coming out of the socket


  1. Re the Arduino resets: could it be transients? The inside of a KP is an electrically noisy place, with big armatures picking and dropping, relay contacts making and breaking fairly juicy current loads, plus the transient mechanical loads on the motor would make its current draw jump up and down. Maybe some random spikes of voltage are coming back up your cable to reset the Arduino? I seem to recall there are bypass capacitors around quite a few relay contacts to suppress arcing. Maybe one or more of those has opened up with age? Or it could be normal noise that is unimportant to a relay system but hard on microelectronics?

  2. A possibility - although I am pretty well isolated from the circuits. The Arduino is connected to relay boards in my box - these relay boards have photoisolators to decouple the Arduino from the small relay on the board. That relay switches contacts which activate the solenoids/relays down in the keypunch and I have arc suppression in place for those contacts. Still, no way that the voltages can flow through wiring.
    My reed switch to detect whether a card is registered (actually detects if the card lever relay is energized, which means the same thing), is only coupled magnetically.
    The sensing pins are isolated by the DUP replays from the rest of the keypunch while I use them.
    There may be EM coupling but it isn't flowing through connected wires, it is induced, if that is the cause.
    Maybe my choice of a shiny plastic enclosure wasn't so smart, if a metal enclosure would have blocked any fields.
    Still don't really know what is causing the problem, but I will figure that out in order to make whatever correction is necessary.