Wednesday, July 25, 2012

Punch Card Reader - The Movie

Last year I bought an Arduino micro controller and spent some time building the experiments that came with the kit. Having rediscovered some old punch cards, I wondered if I could combine the Arduino, the CHDK firmware for Canon cameras, and my Linux desktop, and read in these old card decks. This is the result:


  1. So I'm a little confused as to how you're aggregating the cards info after you've read them. Can you explain a little about that?

  2. It's probably not that noticeable in the video - the card feeder is pulling cards off the bottom of the deck, so all I have to do is allow them to fall into a box of approximately the right size positioned such that the cards have to stack up. For example, given a deck of of A,B,C,D; the deck is being read from the bottom D,C,B,A and stacked into the box in that order which results in the original deck order of A, B, C, D. The fact that the deck is photographed backward can be corrected before putting the images through the python script, or afterwards by using the Unix rev command (I think I omitted that step in the video edit).


  3. Thank you for your reply. I want to send you a picture of a punched card that is used for Jacquard Looming machines and I want to edit your code to read these punched cards as you did with the 80 columns IBM cards. I need your email to send me the picture of the card so we can edit the code with the new dimensions.

    1. A similar technique might be applied to any kind of punched card. You are free to download and modify the code under the terms of the GPL 3.0(GNU General Public License ). The download is at the bottom of .

      I'm not in a position to be able do any coding for you. Should you have the odd question concerning the code, it can be posted here, I'll endeavour to reply as an when I can.