The sensor board is built.  Well the first sensor board is built anyway.  I will need 90 IR sensors (88 notes plus the Soft Peddle and Sustain Peddle controls).  As it turns out, with 90 IR sensors, each taking 0.200 inches (or 1/5 of an inch), 90 sensors side by side would take 18 inches.  I managed to fit 60 IR sensors on the perf board I had

60 IR Sensors

My original idea was to perhaps put a couple of beads (the same beads you buy at the arts and crafts store) under each lead of about 30 of the sensors and then simply mount these sensors behind the first 60 slightly elevated by the beads.  But in trying this out I found that it was difficult to keep everything aligned.  More about the new sensor board in a bit.

About a week ago I built a single channel sensor board just to make sure things were going to work before committing to mounting 90 IR sensors.

IR Sensor Board Prototype

The basic idea is we will have the IR LED light bar on one side of the paper roll (mounted on the front of the spool box) and then fiber optic cables are inserted into each of the holes in the tracker bar of the spool box to bring the IR signal to the IR sensor board.   In testing this prototype, it worked very well.

Schematic Showing One of the 90 IR-To-5V Channels

Each IR sensor (the IR photo diode shown above) along with the 10K resistor will output a logic 0 (or 0V) when a hole in the paper is detected and a logic 1 (or 5V) at all other times.  This logic signal (all 90 of them) will eventually go to a PC to convert the notes (the holes in the paper) to MIDI.

Getting back to the IR sensor board prototype pictured before; I used two pieces of perf board mounted vertically to align the fiber optic cable.  Although this to work very well worked for the single channel prototype, I began to realize that it might not be practical for 90 channels.  Using the two vertical boards, although it would keep everything aligned, the fiber optic cable would need its jacket precisely stripped to fit between the two boards and to just touch the IR sensor.  The inner fiber of the cable is rather brittle and can sometime break when the jacket is stripped.  This would need to be done 90 times for the 90 cables.  This started to sound like a lot of work.

So, I needed a better solution.  My idea is to use a piece of poplar hard wood and to drill a bunch of holes to hold the fiber optic cables in place and to keep them aligned with the IR sensors.  The problem now was how to drill 90 holes and keep everything accurate enough to align with the IR sensors.

At Harbor Freight I found a vice with an X Y table that I thought might do the trick.

Harbor Freight Cross Slide Vice #32997

Well it certainly wasn’t any surprise, as is the case with most items from Harbor Freight, that this vice is a cheap piece of crap.  However, I was able to finesse enough to do the job though.  The odd thing about this vice is that the dials on the cranks are marked 0 to 29 and are calibrated to nothing!  The manual gives no indication as to what these numbers mean.  After some measurements and experimentation I found that each mark on the dial corresponds to about 0.004 of an inch (for you people who like math: 8 turns moves the vice 1 inch and each dial has 30 marks per turn, so 1 inch / 8 / 30 = 0.00416” per mark on the dial).  It wasn’t easy but I managed figured out what combination of numbers on the dials would give 0.200” spaced holes to align with the IR sensors.

Drilling 60 Holes

The 60th hole!

It took two tries but I got 60 holes drilled 0.200 inches apart and everything actually aligns with the IR sensors!

IR Sensors and Wood Block Lined Up

Fiber Optic Cable Plugged In

Each fiber optic cable will fit in each hole to stay aligned each IR sensor.

The next step is to build another IR sensor board also with a wood block to align the fiber optic cables.  This board will be 30 channels.

 

18 Responses to Player Piano Roll Reader Project: Part 2

  1. Adric says:

    Very nice so with the drilled poplar wood board, we will only need to cut and polish the cables, not cut strip and polish? That makes the lazy man in me happy,

    Next tuesday im going to be recruiting some manpower to show up and help strip some HDD’s for magnets. If your in town and to that point, If there is a good turnout for drive destruction, and we get through the batch quickly, then there may be spare volunteers for cutting/polishing.

    • Babylon says:

      Tuesday looks like a good time to do some fiber optic cable prep. Can you bring that jewelers rouge you mentioned before? We’ll only need a very small amount.

  2. [...] do you do with 100 player piano rolls but no player piano? You come up with a way to digitize the information for MIDI playback. The rolls have 90 columns worth of holes, 88 for the keys and two more for pedals. Voids in the [...]

  3. Annon says:

    The 0-29 are millimeters…. 8 turns = 8 mm.

  4. echodelta says:

    Put visible light photo diodes into the brass nipples on the tracker bar. To remove the lead tubing, heat with a soldering gun the old shellac. It will soften and the lead may be pulled off, it stinks, it works. Get rid of the lead and clean up the nipples. Then hinge mount a florescent light in front of the tracker bar. The sensitivity of the diodes has to ignore the transparency of the paper but react to the light bounding down the small curve in the tube. If this a problem then the fiber optic trick with short pieces may do.

  5. Max says:

    Do you have any midi files we can listen to?

  6. __volatile says:

    a camera and a bit of image processing would be easier…but this is i guess more phun

  7. Loreroth says:

    Another way of doing it would be to use a laser to shine a line across the paper, a camera conected to a computer would then see a hole as a gap in the line, simply checking the apropriate spot on the camera image would show if column was being played. (a bit like _volatile’s idea)

  8. Adric says:

    My favorite comment from the feed on Hackaday is “Music-pirating just got a little more steampunk!”

    http://hackaday.com/2011/01/11/digitizing-player-piano-rolls/#comments

  9. [...] do you do with 100 player piano rolls but no player piano? You come up with a way to digitize the information for MIDI playback. The rolls have 90 columns worth of holes, 88 for the keys and two more for pedals. Voids in the [...]

  10. Adric says:

    Here is a really neat Youtube video of how the rolls are made.

    http://www.youtube.com/watch?v=i3FTaGwfXPM

    It answers my question of did they ever make rolls that a human was not designed to be able to play?

  11. [...] do you do with 100 player piano rolls but no player piano? You come up with a way to digitize the information for MIDI playback. The rolls have 90 columns worth of holes, 88 for the keys and two more for pedals. Voids in the [...]

  12. Adric says:

    Yay It turns out my Night Vison Scope was not stolen from my car, so we can use it (being more sensitive to IR than a cellphone camera) to show the led’s are on/working. and verify output of the lightpipe cables.

  13. David says:

    Oh no…why did you stop?  It’s funny…I dismantled a player piano last year (it could no longer be tuned), and I had exactly this though, did a  quick search, and found your article.  Are further instructions available anywhere?

  14. Looks like oyu ar enot the only one. heres a HAD link where they used a webcam. http://hackaday.com/2013/01/07/reading-piano-rolls-without-a-player-piano/