For their final project in ECE 4760 at Cornell, [Christina] and [Joe] made a small single octave keyboard using LEDs as the input. They used a total of 63 LEDs to make the keys. Each key consists of 9 LEDs, with the center one acting as a sensor. When you lay your finger on it, the light reflects off of your finger and is picked up by the center LED. An ATMega 664 runs custom code to play a sound. You can find out more details about the construction as well as download the source code on the site. You can also download an example movie of it in action ( 7MB .mp4)
26 thoughts on “LED Buttons”
i’m just guessing here.. but you probably cannot play more than one key at a time, can you? other than that its pretty awesome
why not use just one LED and have it do both the lighting and sensing? 9 analog inputs and you’re good to go.
They are missing something easy – they could detect how strongly the finger is pressed against the LED’s and thereby control the volume of the notes, either by the pressure or the rate of change of the pressure.
Actually, we can detect up to all 7 keys at once, and play all 7 notes at once. The scanning of the buttons is done sequentially in about 16 ms intervals.
As far as detecting the press, we do an ADC conversion to detect basically how close someone’s finger is to the button, but the problem with detecting volume is that people with different skin reflectivity will give different values after the conversion. Mainly the paler you are the more sensitive the keys are.
wow, this is the culmination of a 400 level engineering class? I’m surprised and disappointed.
You could at least sense velocity by seeing how quickly the light level ramps up to the maximum. You could also have to self calibrate to skin color…or require that musicians wear white gloves.
You could at least sense velocity by seeing how quickly the light level ramps up to the maximum. You could also have it self calibrate to skin color…or require that musicians wear white gloves.
‘Mainly the paler you are the more sensitive the keys are’
hahah it’s a racist keyboard!
instead of using one color of LED’s, why not have ir, regular color, and UV led’s and average out the values? That way skin tone would affect the results less.
Also, are you doing an analog or digital read on the sensors? if you’re doing digital, for the volume of the notes, you could have 2 sensor LED’s with one of them having a slightly more opaque sensor and measure how much time is between the regular sensor going high and and the opaque one going high. Somewhat like the way most drum pads measure velocity.
I’ve seen a matrix version of this ~2 yrs ago where they alternated the leds’ function between sensing and lighting, making it a “sensing display” with distance sensing too. that might have been overkill but it looked beautiful on video.
I think that was posted here on HaD.
This thing would be playing if I was on the other side of the room (I’m translucent-white)
^ how it’s done
“writing the code: joe
testing the code: both
ordering and buying parts for the project: joe
designing the hardware: joe
testing the hardware: both
soldering the parts: both
integration and final testing: both
writing the report: both
creating the webpage: cristina”
my love for the light emitting diode grows stronger every day….
This is sad for a senior design project. We do projects more complex than this in our 362 microprocessor class here at Purdue, and our “mini-projects”,as they are called, are completed in the last 2-3 weeks not over an entire semester.
@justDIY yeah many undergrad “design projects” are really just “basic hobbyist projects” that you get credit for. I say this as someone with a masters in engineering
@james further evidence why “team projects” should be mostly done away with.
hey, purdue sucks
@aman Yeah, it would have been a pretty sad senior design project, but if you would have done a better job reading the description this is one of those “mini-projects.”
The project was completed in around 3 weeks. This is a class project, not a senior design project.
if you made a strip of vertical sensor LEDS between 2 strips of ligt LEDS you could do pitch bend per note or some other modulation. it really needs to be a MIDI or OSC controller rather than a dinky piano :D
all right, everyone here needs to chill. this project is awesome.
also, aman, good for you and purdue. want a cookie?
Can we use PIC16F877A as the microcontroller?
Do we need to revise the code that is compatible to PIC?
can you email the schematic diagram?
you over-all schematic diagram is not clear, it is very small picture..
how can the LED become sensor?
i want to do this project..
but i dont know how to start..
can you email me the schematics of the project, the picture is very small
Umm, wouldn’t the center one be a photodiode, or a photoresistor, not an LED? LEDs are output only, not input.
Please be kind and respectful to help make the comments section excellent. (Comment Policy)