Since the previous post I got my douser working, and then put it away. As it turns out, we didn't need the projector after all for what we were doing on that show. But at least I know have the thing in my kit, I know it works (I tested it in the building, on the actual projector), and the technology (and device) are not limited to that specific task.
One of the problems I ran into was physical space for all the desired connectors on the project box. This, and general simplicity, led me to get a 1.2 amp 5v wall wart and bypass the Arduino's power supply completely. I did add a couple of buffer capacitors on the shield, however.
No local store carried the opto-isolator I wanted. Another discovery I made was that MIDI hardware varies a bit within the physical spec. The device I was using to test the MIDI-in circuit on the breadboard turned out to put out a much stronger signal than the MIDI interface I meant to use for the final installation. I didn't discover this until after soldering up the circuit. Fortunately, one component substitution restored function; I bypassed the input resistor completely with a bit of wire.
There was a problem with the proto-shield I was using. These, available from a couple of sources, are small strip boards with pre-printed ground and power traces and headers that fit the standard Arduino layout. It makes it faster to create some basic circuitry around an Arduino. When I finished soldering and started testing the completed circuit, a number of things didn't work. Dreading the long hours ahead of tracing and repairing my circuit, I took the completed shield with me to dinner in hopes some idea for fixing it would occur while I ate.
Such an idea did. As I was turning it over in my hands, I noticed that although VCC was printed on the silkscreen, someone had made an error and forgot to include that trace in the copper! A quick solder job with a length of bare wire on my return home, and the circuit worked flawlessly.
In the final box, I had a jack for external 5v power supply, MIDI jack, a quarter-inch jack for use with a remote button (or sensor), and a red/green status LED. I love the red/greens. By strapping them across a pair of output pins you can indicate multiple conditions. I actually used up two PWM pins this time, meaning I could also dim the LED or have it pulse in "sleep" mode if desired. Right now, the software merely shines green for "ready" and red for "working."
The current software version sets the servo position by MIDI note number. In the case of switch input, the servo goes to a preset position and returns to "home" when the switch is released. There is also a test button on the main board that sends the servo to the preset position then automatically returns "home."
Although the software detects note velocity, it is currently locked to a default slew rate that inserts a millisecond delay between each step. But since the USB port is also brought out to the outside of the box, changing the software is easy.
Mechanically, the thing is as bulletproof as I could make it. The brass flag support and linkage was sweated together with silver solder and rides on plastic bushings. The Arduino is bolted to stand-offs. All the wiring is on ribbon cables, which connect to headers on the shield.
I am tempted to swap out the flag for a pointing hand, tweak the software to repeat octaves, and use it to point to current note being played on a MIDI keyboard. That being just one of the many possibilities I can dream up of for a servo in a box that can take commands over MIDI.
(Although I figured out and implemented Running Status in the software, I didn't get around to setting a CC mode, either...that would allow the servo to echo in real time the position of a controller knob, breath controller, or even a fader on a Yamaha mixer -- since that, too, can be set to spit out MIDI CC numbers.)