Multiplexing Lots Of Analog Signals Into A Uc

88 keys
1 reflective object sensor per key producing 88 analog signals.

16 * 6 = 96 = 88 + 8 extra analog inputs for sliders and knobs.

A single controller board has a controller.

Six MUX boards each have a 16:1 analog MUX, 16 reflective object sensors, and passives. One of the boards is half-populated with reflective object sensors.

4 digital outputs drive the channel select pins on the 6 16:1 muxes.

The six MUX outputs are fed into six Analog Microcontroller inputs.

Pin totals: 4 Digital outputs, 6 analog inputs.

If all slots are populated, the keyboard would be one key short of a Bosendorfer 290 (97 keys). Note also that the Muxes dramatically simplify the PCB layout compared to a key scan matrix.

More figuring to figure out if sampling with A/D is the way to go:
An Arduino (Atmega168) has 6x10 bit analog inputs and 14 digital outputs. The 6 inputs are multiplexed internally to the Atmega168. The A/D converter can do up to 76.9 kSPS (Up to 15 kSPS at Maximum Resolution). Assuming nothing special is done for the last octave, it will take 6.4 ms to sample the 96 key slots at full resolution. If the atmega168 is running at 20Mhz, this corresponds to 1,333 clocks per A/D sample, so the chip has ample time to think between samples. Unfortunately, 6.4ms is a long time. At fff, a piano key travels at about 10 m/s; at that velocity, the key would travel 64mm between samples. NOT ACCEPTABLE!

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution 3.0 License