Friday, April 2, 2010

Project 2: Accelerometer Random Melody Generator

For my second project I wanted to make something that accompanies my photoresistor instrument I made for the first project. I focused on the role of my hand holding and moving the light fan, and decided to use that as an input to trigger and control further sound production.

I used an accelerometer to read the movement of my hand. This accelerometer was then connected to an Xbee radio transceiver which transmitted the reading values to another Xbee attached to the computer. The circuit is powered by a 9V battery via a 3.3V regulator. This is how it looks like:



Then I wrote a program in processing which produces random melodies by taking the values from the accelerometer (x-axis and y-axis) to determine 1) the range of pitch from which melody is created (increase in y-axis results in wider range) and 2) the velocity of melody (increase in x-axis results in faster tempo).

In order to attach the circuit onto my hand, I pasted a velcro fastener on the back of the breadboard:


And one strip to wrap my hands:


and this is how they go together:


I also made a spare using Arduino, because the Xbee version was sometimes unstable (I later found out that the problem was in the accelerometer -- It became stable when I changed it with a new one)

No comments:

Post a Comment