21st Century Punch Cards Are 3D Printed And Read By OpenCV

What a punch card looks like to openCV

While a punch card is perhaps the lowest-density storage medium available, it has some distinct advantages. As [Bitroller] points out in the write-up of his punch card project, if he was using stainless steel instead of PLA his 3D printed punch cards would likely outlast everything he owns, and survive a five-alarm fire to boot. If you have 16 bytes you really, really don’t want to forget — or are willing to store your private key in a shoe box — this project might be of interest.

The nice part is that he’s built a handy Python script to generate printable files for the punch cards, which encode 16 bytes of information and 4 bytes of error correction using the Reed-Solomon algorithm. That’s just enough for a password and the error correction means up to two bytes can be recovered in the case of read failure.

The reading is where this gets interesting — again, [Bitroller] provides a handy script, but this one uses OpenCV to read the entire punch card at once from a webcam image, using the contrast between a black table and the light-colored PLA cards. It’s massively overkill and would have needed a supercomputer in the days when punch cards were common I/O, but that’s what makes this a great hack.

We only have one quibble: if you use additive manufacturing, can you still call it a punch card? Nothing was punched out, after all.

If you think punch cards are totally irrelevant in the modern day, well, you might be right– but that doesn’t stop us from playing with them. If punch cards make you think of Big Iron in the early days of computing, maybe think further back– they were used for everything from Jacquard looms to the original MIDI.

14 thoughts on “21st Century Punch Cards Are 3D Printed And Read By OpenCV

    1. Really does the punch cards I played with decades ago were about the size of a tissue box in footprint (rectangular of course not those cursed forever tearing cubes)

  1. “It’s massively overkill and would have needed a supercomputer in the days when punch cards were common I/O, but that’s what makes this a great hack.”

    I understand skipping a mechanical/optical reader, but you could implement a reader on a microcontroller easily without this level of overkill.

    Why not just use an electron microscope and scan it to 10,000 dpi, and process the data after a moon bounce?

  2. In a way, QR codes work in a similar way. You can 3d print a QR code with the black areas “punched out” and it might still be readable with a smartphone in certain angles and lighting

  3. Two things: One, I would like a printable template to do the punching so I can slot in a material and punch it myself, so I could either slot in some paper or card stock for quick easy punchcards or make steel or aluminum punch cards for the mentioned longevity. And second, then you could print a thin card with pre-weakened dots to punch out in said template

  4. Cool, I love this old skool stuff, there so much to learn from the ingenuity behind it. The concept of a script that can result in 3D printed cards is fun to play with, much keep this one in mind.

  5. I picked up a short piece of 8 channel paper tape yesterday, at my annual pilgrimage to The National Museum of Computing. I hope my daughter will be suitably impressed and horrified. Unfortunately there weren’t any punched cards available.

    Also had a pleasant chat about how single-bit adders and or/not gates were made using just one transistor. (OC42 transistorss were rare and expensive in the late 50s!)

  6. Best part of punched cards?

    Collecting all the punched out chads from all the cardpunches at the university and putting them down your friend’s car’s heater air intake (they didn’t have filters then).

    People are restoring those old cars now.
    Bet they wonder where all the tiny rectangles of heavy paper are from.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.