NEW KEYPUNCH INTERFACE DEVELOPMENT
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.
SAC INTERFACE FOR ADDING PERIPHERALS TO THE 1130
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 |
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?
ReplyDeleteA 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.
ReplyDeleteMy 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.