It all started with a conversation about the early days of computing. The next thing he knew, [Tim Jagenberg’s] colleague gave him a stack of punch cards and a challenge. [Tim] attempted to read them with a mechanical contact and failed. Undeterred, he decided to make a punch card-to-keyboard interface using optical parts from disassembled HP print stations. Specifically, he took apart the slotted optical interrupter switches to use their IR-LEDs and photo-transistors. Next, [Tim] drilled holes into two pieces of plastic, gluing the LEDs on one piece of plastic and the photo-transistors on the other. The photo-transistors tell the Teensy 3.1 whenever a hole is detected.
[Tim] developed an interpreter on the Teensy that reads the punch card according to IBM model 029 keypunch codes. The Teensy enumerates as a USB keyboard when connected to a computer. As a punch card is read, the Teensy outputs the decoded characters as key presses. When a punch card has been completely read, an ‘Enter’ key press is transmitted. Tweeting the punch cards is no more complicated than typing the text yourself. Naturally, the first message posted on Twitter from the stack of punch cards was “Hello World!” [Tim’s] binary and source code is available for download on Github.
We’ve enjoyed covering the backstory of the punch card and a previous project reading these cards using a digital camera setup. It’s always interesting to see the clever ways people use current technology and can-do attitude to read data from obsolete systems that would otherwise be lost. We wonder what is on the rest of those punch cards? Let’s hope [Tim] has more punch card tweets soon!
You’ll need a punch card writer, though…
Perhaps you have encountered the punch cards with pre-punched holes, they are used as ballots in Washington State and probably other places, they are responsible for the phrase “hanging chad” that was popular in political circles for many years.
Incidentally, if anyone knows of a place that can print and score IBM punchcards in a similar fashion, please let me know.
Most of Washington state uses optical scan ballots — even in 2002 they were on the way out. The Help America Vote Act (HAVA) provided incentives to get rid of them. I don’t know of any WA counties that still use em.
Very nice! It’s not clear, though, how the motion of the card is detected. How would it determine if your card had an unpunched row?
Usually the cards have a “clock” row of perforations to tell the scanner when there is a row to process. So no matter how unsteadily you push it through the scanner it knows when to scan. Unpunched rows either stand as spaces, or are unpunched in their clock row to be skipped.
That’s not the case for IBM punched cards: readers are expected to know where they are based on the start of the card and how far it’s been advanced.
Gray Code!
That’s all very well, unless you want to be able to read any IBM punched card, not just ones you prepared yourself with your own encoding.
It’s actually the un-punched part in-between columns which triggers the character decoding.
That’s why I asked about rows with nothing punched – how would you tell that you’d passed such a row?
Ah, those will be ignored. I added an additional encoding Y&X row for ‘space’.
This was in the comments for one of the previous punched-card posts and is worth putting back up there … what fun!
https://www.youtube.com/watch?v=6auO8djKRrM
LOL,
This is the first time in close to 30 years that I regret having thrown away all my punch cards. I had two programs I miss. One on ASCII signs and the other determined the best fit for an absorption spectra. Both written in Fortran IV.
I knew a guy who worked at a data center and they had a card punch. He brought his phone bill in to work, punched “//EOJ” on his phone bill and mailed it in. His next bill came with a handwritten letter asking him politely to not do that again.
I’d completely forgotten about that stuff: http://h71000.www7.hp.com/doc/73final/9996/9996pro_019.html
Wow we’ve regressed backwards from the 1832 punch card technology that did not need index holes.
teletype paper tape had sprocket holes that doubled nicely as index holes for optical sensors. The diameter of the index holes is slightly smaller so they make an ideal clock signal because the data holes will transition before the clock.
When I worked as a student at AECL in Northern Ontario during the summer, the lending library on the campus used old FORTRAN IV punch cards for the library date-slips for the books on loan. We used to compare the statements tucked into the backs of our borrowed books :)