Blog: Physical Computing

ITPG-GT 2301-005

Tutor: Tom

WEEK 4

Part I: 

First assignment project with Shin: The Invisible Piano Hand

Basic Imaginations & The Way Towards It

So, I guess the concept of "The invisible piano" sounds quite straight-forward: you would expect a glove, some sounds, and plenty of wires attaching to it.

That's our initial idea of it as well. Basically, thinking of a wearable device attaching to the hand, and the movement of fingers makes different pitches of sound: that's sort of 'imitation' of an actual instrument.

From the study and experiences from previous weeks, the principles behind using sensors to make sound can be crucial for this project. We also took Tom's idea of using the flex sensors as analog reads to trigger the different tones, of different fingers with different outputs.

Before looking back from beginning, let's see the outcome of the hand first, played by Shin:

And according to the original plan:

unnamed (8).jpg

First of all, I want to thank Shin for carrying me and teaching me everything which are important for this one.

 

So apart from using 5 flex sensors on the five fingers, we also became a bit more ambitious, and added an element of accelerometer which records the motion of hands, and users would be able to switch to higher keys by moving the hand from left to right or opposite.

Well for that part, we can talk about it later, anyway eventually it kind of failed.

unnamed (3).jpg
unnamed%20(4)_edited.jpg

For the first step, to check the readings of each flex sensors; they are different each, so making them organized will make it easier later.

void setup() {
  Serial.begin(9600);
}

void loop() {
  int sensorValue = analogRead(A0);
  Serial.println(sensorValue);
  delay(500);
}

Basically a very easy code like this.

Then here's a simple test with flex sensor, with a LED attached to the circuit, and by blending the sensor it controls the light of the LED. This is a basic for controlling the speaker. Resistor adjusted.

void setup() {
  pinMode(8,INPUT);
}

void loop() {
  int sensorReading = analogRead(A0);
  if (sensorReading > 80){
    digitalWrite(8,LOW);  
  }
  else{
    digitalWrite(8,HIGH);  
  }
}

B73B1480.JPG
B73B1488.JPG

Again many thanks to Shin, it's my first time to try to do soldering, and deal with the accelerometer.

With applying the notes to the desired connection of flex sensor, and using 5 "if" statements to determine if the speaker will sound. For now, the finger part is almost done. Until one of the data in the serial monitor gets bad.

The Broken Thumb

The read of value of "thumb" was not right. Sometimes it works well, but some times it jumps randomly. Some methods were taken, like changing the wires, changing the Arduino inputs, changing the resistor... It was still very unstable.

Then we realized the sensor itself might be broken. (because of me being a soldering noob and may had over-heated and broken the sensing film) So it became extremely stable: the read went over 1000 when it got short-circuit or disconnected, and went to 700 directly when it got connected again.

Also I don't know what happened to all the flex sensors in Brooklyn. I bought 5 in Amazon and they sent 2; I went to several different electronic supply shop and could only got one which was the last of the stock. So these three, plus the 2 Shin had got, we had only 5 for 5 fingers. There was no room for exchanging.

Finally the code for thumb has been changed, that if the user bends their thumb to a lucky angle and triggers the sensor to connect will cause this key to sound. Some playful elements in this project I suppose.

Finalizing and Assembling

Basically the tones are divided into 5 groups, starting from group 2, and the changing of the hand (swiping to left or right) will cause the currentMode to +1 or +-1, which changes the general tone of the piano. This sort of simulates the movement of hand playing piano, swiping from left to right from time to time.

However maybe the accelerometer we used doesn't seem to be that accurate and sensitive. After all, it has been changed to a way that twisting the wrist will cause the currentMode to change. The LED indicates the changing, when turning red means the degrading of the tone, and green means upgrading.

Picture1.jpg
Picture2.jpg

The assembling was tricky. I sacrificed one of my gloves as the wearable device body. It's warm, kind of hairy and very difficult to get the tape onto it. And the super glue may damage the wire and cause the short circuit.

The solution in the end was to use the band-aid. Super good for such condition. All the flex sensors were attached tightly with the fingers, and it kind of look cool as well. Everyone should stock some band-aid at home. So finally here's some pictures of the result, and in the very end there're 2 videoes of a close look to see how it functions.

unnamed (5).jpg
unnamed (7).jpg
unnamed (6).jpg

Video