The Smell of Molten Projects in the Morning

Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.

Punched Card Production

For reasons I cannot divulge at the moment, I have undertaken a project requiring Old School punched cards, although they will never be fed through a card reader. Because we live in the future, punched cards are no longer a cheap and readily available resource; I will always deeply regret trashing an entire box back in the day.

However, living in the future does confer some advantages:

Punched cards - Apollo 11 CM
Punched cards – Apollo 11 CM

The process involves a vast number of moving parts, not all of which I fully understand, but I can (generally) produce consistent results and that must suffice. This post is an overview; I will go into the moving parts in more detail so I can remember why I did what I did.

A Python program converts a line of text into an SVG file that contains either the card’s printable contents or the paths required to cut its holes & perimeter. A handful of command-line switches determines the outcome, so you run the program twice with different switches for each line of text to get a matched pair of SVG files.

A Bash script read a text file and hands each line to the Python program, producing two SVG files for each card. It then invokes Inkscape to convert the printable SVG into a PNG image, uses Imagemagic to composite the logo behind the card contents & scale the result to make my printer’s output match the laser’s dead-on positioning, then properly position the card image in a Letter-size PNG image that’s apparently the only way to print it accurately on a punched card:

Composited Letter layout - exvb-00000710-lt
Composited Letter layout – exvb-00000710-lt

That’s not full size.

N.B.: there’s no such thing as a blank card that will be punched later, because the printed card includes the text across the top. The program also suppresses the row digits where a punch will appear, thus making slight misalignments less painful and mismatched SVG files more obvious.

Print all the card images on precut 1/3 Letter size sheets of heavy cardstock:

Ext Verb cards - 0280 skewed print
Ext Verb cards – 0280 skewed print

Yes, the printing on the middle card is slightly skewed with respect to the precut card blank. The overall process must handle about two millimeters of positioning inaccuracy and whatever angular skew comes from the printer’s paper feed rollers / guides.

A DOS Windows BAT file feeds the SVG files with the holes & outline paths to LightBurn, one by one. No lie.

Put each printed card in a fixture and align its targets, whereupon LightBurn evaporates the holes and cuts the outline:

Punched cards - laser fixture overview
Punched cards – laser fixture overview

In my somewhat biased opinion, the results look good:

Ext Verb cards - 0270-0290 punched
Ext Verb cards – 0270-0290 punched

The Python program also produces cards with test patterns useful for wringing out the process:

Punched cards - character tests
Punched cards – character tests

“Punching” a lace card is no problem and, given an all-blank text line, the result looks like a blank card:

Punched cards - lace and blank tests
Punched cards – lace and blank tests

If you happen to have a card punch, be my guest.

The source text for the cards comes from the Apollo Guidance Computer in the Apollo 11 Command Module, via an amazing GitHub repository. You can run a virtual AGC in the privacy & comfort of your own home.

Useful links:

Comments

7 responses to “Punched Card Production”

  1. brentatedsblog Avatar
    brentatedsblog

    Very fun.

    I was born just early enough to use punch cards in _one_ class at university. I still remember the high speed chain printer – caged like the wild animal it was.

    IIRC the language was WATFIV Fortran, the compile and run process was called “Fast Batch”

    1. Ed Avatar

      Cue the story about me inadvertently filling the first column of the printout with the “page eject” character, page after page after page. :duck-and-cover:

  2. tantris Avatar
    tantris

    There are music boxes you can feed with punched tape. Search for combinations of “music box”, “tape”, “30 tone” , “20 tone”,”15 tone”.

    Never too early to think of next Christmas.

    1. Ed Avatar

      I discovered LightBurn doesn’t like turning the rotary more than 360°, so a really long / skinny pattern might not work as expected. It seems like a soft limit, but will require more poking around.

      Definitely a job for another SVG generator program, though. :grin:

  3. scruss2 Avatar

    Ed, it was great to hear that you’d found a use for something that I’d made, as opposed to the other way round. These cards look great! Almost no burn flash visible on the cut edges.

    1. Ed Avatar

      They’re getting better all the time! :grin:

  4. danielbmartin Avatar
    danielbmartin

    Can you do hanging chads?

Spam comments get trashed, so don’t bother. Comment moderation may cause a delay.