eRecorder
My brother-in-law plays the recorder, a type of flute. He wants to be able to practice without disturbing other people, so asked me to build him a electronic recorder that plays over headphones instead of out loud. It sounded like a fun project, so I took it on.
The first thing I had to figure out was how to detect when when the player's finger were blocking the holes in the recorder. Design considerations are:
My first attempt was to use a touch-activated switch circuit from "Engineer's Mini-Notebook, 555 Timer IC Circuits" by Forrest M. Mims. Unfortunately, I was unable to get this circuit to work reliably. It also would have required 5 x 556 chips, which I would have trouble fitting into the barrel of the recorder.
My second attempt was to build a capacitor from a pair of aluminum tubes that I bought at the local RC hobby shop. The larger tube fits within the finger holes, and the smaller tube is about 1/16" smaller in diameter. I cut a 0.25 inch section of each tube, put heat-shrink tubing around the smaller tube, glued the larger around the smaller, and attached wires to both. I built an RC circuit with the sensor that I charge from a PIC output point, then feed the capacitor voltage into an input. By measuring the time it takes to charge to the 0/1 switchover voltage, I can measure the capacitance of the circuit. The capacitance changes markedly when a finger is put on the end of the sensor. This sensor has the disadvange of requiring both an output and an input, but if I charge half the sensors per output (while the other half are discharging), I can get by with 2 outputs and 10 inputs. Actually, I have decided to bend objective 4 by adding a 10:1 multiplexor circuit to feed all the inputs into the PIC's interrupt I/O pin so that I can accurately measure the time without having to tie up my main program polling the input pins. This adds more I/C's but may allow me to use a 18-pin PIC instead of the 28-pin 16F876 I am developing on.

Other sensor concepts I thought about include:
I am taking two different approaches to sound generation. The first is to generate a tone to a speaker/headphone circuit directly out of the PIC. I will use the PWM output for this, so I have a "set and forget" frequency generator. Because the frequency range for the notes I want to generate is below the minimum PWM frequency, I will build a "Divide by 20" circuit from a PIC 12C518 to step down the output frequency. This will be a cheap and easy solution, but won't sound much like a recorder. I may try wave shaping techniques to make it sound more like a recorder, but that will be on a later prototype.
The second sound generation approach is to implement a MIDI output port from the PIC's USART output. Feed this into a computer sound card or synthesizer, pick the right General Midi voice, and you can have recorder sound as good as sound card/synthesizer's tone generator will produce. I have played with MIDI (Musical Instrument Digital Interface) a bit for a project at work, so I am pretty sure I can make this work.
11/17/02:
Some pictures of the process of building a capacitive touch
sensor.

My first attempt to cut open a recorder to mount the sensors
ended in failure. I was using a coping saw to cut the recorder
lengthwise. The saw blade heats up as it cuts. If the saw gets
too hot, it starts melting the plastic that the recorder is made
of. When I paused sawing, the melted plastic "froze"
again, locking the saw blade in place. While attempting to free
the saw blade, I broke the recorder at about 1/3 of the required
cut length. Fortunately, I had allowed for this problem, and had
several inexpensive recorders on hand.

My second attempt was more successful. By frequent pauses, I
was able to keep the saw blade cool enough not to melt the
plastic.

3/10/03:
Derek Johnson sent me a link to his home page,
which describes his PIC-based MIDI projects. I hadn't thought
about including an opto-isolator on the MIDI interface circuit -
it is certainly a good idea. I will also probably end up
borrowing some of his code.
Last modified 04/03/03.