Player Piano Roll Reader Project: Part 2 18

(Part One is here)

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.

About RayFinch

I have been a hacker type dealing mostly in hardware and embedded processor stuff and some software for about 20 years. I am an Lead Engineering Technician by trade. Currently I work for a multinational corporate conglomerate government contractor - not as bad as it might sound - Really! I am fortunate to already have a personal hackerspace where I do most of my projects. I am interested in Quelab because I think it is a really cool concept and I would like to help Quelab grow and become something special. For Quelab I am available to give technical advise, to help with projects, or to get you pointed in the right direction get if you don't know where to start. If you see me at Quelab, stop and say "Hi!" and tell what you're working on.

18 thoughts on “Player Piano Roll Reader Project: Part 2

Comments are closed.