Reading punch cards with an Arduino and digital camera

[digitaltrails] wanted the data on a few old IBM 80-column punch cards he had lying around, but didn’t have decades old computer hardware in his garage. He decided to build his own out of LEGO, an Arduino, a digital camera, and a bit of Python.

The hardware portion of [digitaltrails] build includes a crank-operated feed mechanism made entirely out of LEGO. For each turn of the crank, the feed mechanism sends one card down a chute where a photodetector wired into an Arduino tells a camera to take a picture. After that, a servo is activated, sending the card into the ‘already scanned’ bin.

On the software side of the build, [digitatrails] used the Python Imaging Library to scan one row of pixels where each column is expected to be. The software outputs the code and data contained on the 80-column card as well as a very cool ASCII art version of each card.

Considering you just can’t go down to Fry’s and buy an IBM 80-column punch card reader, we’re loving [digitatrails]‘ clever way of getting data off an otherwise unreadable storage medium. Check out the video of the card reader in action after the break.

Comments

  1. Sven says:

    Since he has built it out of lego, and is using an arduino, why isn’t the crank motorized?

    Yet another completely useless use of an arduino sneaks into hackaday because it means they can put “arduino” in the title.

    • Eirinn says:

      …You honestly believe that they put an arduino in there to get more page views? You don’t think it has something to do with the fact that it’s the easiest prototyping tool released in years? :)

      • Cyril says:

        Not. True. At. All.
        Picaxe, Basic Stamp and Mindstorm – just to name a few.
        Actually it’s this sort of hyperbole/hubris that breeds (at least some of) the dissent.

        The remarkable/key thing here is the python. The feed mechanism was unremarkable and certainly did not READ the punchcard as the title (dishonestly) implies. If it had then it would be remarkable. Further, the maker does not express this hubris.

    • kendall15 says:

      Correction: My guest it is not motorized because he did NOT have a motor.

  2. Zee says:

    Why is there an arduino there anyway? What does it do? I can’t seem to find the reason for it.

  3. MS3FGX says:

    Arduino is definitely pointless in this build. Since the user has to sit there the whole time in order to operate the crank (which is kind of odd to begin with), he could just as easily press a button to take the image rather than having the Arduino play around with a photosensor.

    Unless the idea is to eventually automate it completely? That’s the only thing that would make sense.

    • Sven says:

      That was my thought, but in that case this should not have been sent in, nor published since it’s a half finished build.

      The guy building it should have waited until he was finished before sending it to HaD.

  4. Transfixer says:
  5. xorpunk says:

    reading low-baud instruction medium with high bandwidth devices that replace them with a few lines of code..

  6. SavannahLion says:

    I’m really struggling to see the value in this one. I don’t really have much. An example of, “if you have an Arduino, look what you can do?” Maybe the Python code that reads the cards… I did mine using Perl and Tesseract but to each their own I guess.

    A few days a go, a MAME controller concept and “parts list” and today this? I know HaD wants us to ease back on the negative posts but it’s a tough sell when even the introductory stuff has so little meat. If I didn’t know any better, I would say some of the projects are being created just to make an appearance, the same kind of gaming that prompted me to stop visiting sites like Digg.

  7. foogoid says:

    Wow. Sounds like some people have a bad case of the Monday’s…

    I find this an interesting project, with exemplary documentation and presentation. Here’s someone who not only applied the tools he had (and wanted to use) to fulfill a function, but also went to the trouble of documenting the whole process and making it available to everyone.

    If there’s nothing you can take from the project itself, then at least take some notes on presentation. (What’s that? You don’t actually make anything or present it? Thought so…)

    Also, I think this is the ideal use for an Arduino. It is the microcontroller equivalent to the Lego. On my projects, I use bare AVR’s, first test everything on a breadboard, then make a PCB (usually perfboard). But those are for dedicated applications, and see prolonged use. For having something flexible, that can you quickly set up, the arduino seems more useful.

    Lastly, I don’t know how stiff those cards are, but I have an office-type printer/scanner with automatic paper feed. I think that might do away with the whole set-up, and only require the image recognition ;)

    • Tech Joker says:

      Those cards will go through a scanner quite readily. They were designed to go through card readers at a rate of several per second. They are ‘card stock’. The odd size can be problematic for some scanners.

      The problem with using a scanner would likely be issues with false readings since the holes would show ‘black’ and could be confused with ink, blotches… on the cards.

      Most cards have the text of what the holes say at the top of the card. Might be easier to OCR that, though there were special control characters that wouldn’t be ‘readable’.

      Nice solution for low volume needs.

  8. morbo says:

    Good for low volume readins. I have seen entire boxes of cards being shoved into a CDC reader (about a 4ft track of cards). For that… (if that kind of data/sw is remotely useful anymore) I would think about… a motor :)

  9. Q says:

    I like the build, but was blown away that cards hold not only code but also the comments; seems like a waste of space on so low density medium – at fisrt… But after so much time the comments make it legible.

  10. I like how he took the result of the conversion and loaded it in a compiler/simulator for a full end-to-end result. He actually used the cards to get a 32 year old program running again.

    This shows one of the advantages of physical media (as opposed to magnetic media) for durability. You probably couldn’t take a 32 year old disk pack and read it with a handful of LEGOs, an Arduino, a camera and some Python script. (I wonder if I have any of that punch paper tape around somewhere…)

  11. Eddie says:

    I have several boxes of IBM punch cards that I would like to convert to files for CD storage.

    I’ve thought about it for a while – how to do it.

    I thought I could use IR detectors – one per row – and drop the card through a chute.

    Sample the 10 or so light detectors, storing values in RAM.

    I would measure the time from start of card to end of card as it fell through the chute.

    Then I would calculate the time per column – 80 columns (ignoring the header/trailer, and sample the stored light presence/absence polled values in RAM.

    I believe that would work – but I haven’t gotten around to implementing/testing my plan.

  12. ColinDNZ says:

    I hate to spoil a good hack, but just read the card. The interpreted char is printed on the card…

    • Tony says:

      The text is only on the card if you used a card punch that provided the interpretation. If you used a hand punch there is no text printed on the top of the card.

  13. Bob says:

    Once, while at DEC, I tried to stop the Sorcerer’s Apprentice that was the Columbia Record Club. Finally, I took their punch card, which was NOT printed and read it to find only my address and account. I stepped it through a card punch to a blank space, punched “Cancel me, Asshole!” and sent it in.

    I never heard from them again.

  14. razor386 says:

    Jesus christ people…what if he already owned an Arduino before the project started. He shouldn’t NOT USE IT because of HaD critics. I know when I build something I don’t NOT use something because its too powerful. I’m not sitting here playing solitaire and suddenly stop, go to a 486 laptop and then feel better about myself like some people on here apparently must.
    GET A LIFE CRITICS

  15. Joel says:

    Uhm, excuse me? Do any of you remember this? http://hackaday.com/2011/07/27/hackaday-comment-policy-were-cleaning-up/

    If you don’t have something constructive to say about this post, DO NOT POST. Your criticism is absolutely not welcomed here.

    Sven, Cyril, MS3FGX, and SavannahLion should be the first to be added to the official Hackaday Hall of Douchebaggery. Now, take your severe case of douchebaggery somewhere else, and let us hack in peace.

  16. Erik Johansson says:

    The easiest path is to put camera on continuous shooting. This can now give you enormous amount of duplicates but when I did it my camera did two pics per sec.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 94,628 other followers