Week Ten: Input Devices

This week I designed a capacitive sensing piano with an ATMega328p programmed as a MIDI device.


This week I was unable to get the board I designed to mill properly, but I finished the project in Output Devices week and added a speaker to play music independent of a computer. I had an issue with the ATMega328 footprint I used from the SparkFun Eagle Library. The space between the pads was too small for the 1/64" end mill. I tried to mill the board using the .010" end mills but found that they were not strong enough to use for extensive milling. In Output Devices week I modified the footprint and used the 1/64" end mill to mill the board.


This week I managed to get just the keyboard from my design to mill properly so I cut it out and hooked it up with a breadboard and implemented capacitive sensing. I used a single digital output connected through 1 MΩ resistors to each key. Each key then had a connection to a digital input pin. I raised the resistor pin high, waited a fixed period, then went through each input pin to see if the input had gone high. If it had not gone high, it was an indication that there was more capacitance that had not yet fully charged. By playing with the delay I used, I was able to detect key presses.