Close

Test punch card punched

A project log for Punched Card Reader for RC2014 Z80 Computer

Every computer needs a storage medium. For the RC2014, like many before it, the medium is punched cards!

spencerspencer 05/21/2016 at 21:163 Comments

So, a punch card reader isn't really going to be that great without some punched cards to read.

However, I don't have any punched cards.

So, off I head to Lasery McLaserface* to make some!

Now, of course I didn't just click the "cut punch card" button on the laser cutter. Things are a bit more involved with that, although one of the main goals of this project is to automate the the process of turning a text file in to a bunch of laser cutter ready .dxf files.

What I actually did was go to http://www.masswerk.at/keypunch/ and typed a message. From there I could download a .png file of a punch card

All of the cutouts are transparent, so from there, I used Imagemagick to convert it to a black image that retains the transparent sections.

Potrace should be able to trace the edges of the image and create a dxf - however, it doesn't like .png files and even as a bitmap I couldn't get the output right. So I used Inkscape (which has Potrace built in) to do this bit.

The .dxf looked good, and came out pretty well - although some of the holes had just the tiniest whisker of card holding the chad on. At 97mm x 255mm it is bigger than 83mm x 187 of a standard size card, but at least it gives me something to get started on.

As mentioned earlier, automating this side of things is will be key to this project. I don't consider myself fluent in Linux command line syntax, but I know it *should* be able to read a text file, convert it to hexadecimal strings, send that to a web page in an appropriate amount of chunks, download the resulting images, modify them and produce a single dxf file containing all the cards needed to be made. All I have to do is teach myself how to do that :-)

* Lasery McLaserface is the name of the laser cutter at Nottingham Hackspace

Discussions

Yann Guidon / YGDES wrote 05/21/2016 at 21:52 point

Wow that "pipe" is a bit... complex :-D

Why not just understand how bytes are transformed/encoded into punched cards directly ?

  Are you sure? yes | no

spencer wrote 05/22/2016 at 13:52 point

Understanding the transformation/encoding isn't the hard bit (Well, I hope not - I have to do the untransforming/unencoding bit later!).  

Getting from a set of 1's and 0's on a PC to a punched card shaped dxf file would pose a serious challenge to me though.  And if there's already a website that does that bit for me, why invent the wheel? :-)

  Are you sure? yes | no

Yann Guidon / YGDES wrote 05/22/2016 at 17:56 point

because the wheel is simpler than the brittle, funky and web-dependent workflow ? :-D

  Are you sure? yes | no