Touch Project Documentation (Leah)

Date:  May 18th, 2018
Project Name: Piano on ham
Description: This touch project creates a piano keyboard on a pair of jeans. There are fives for five fingers and each one in turns corresponding notes Do to sew. The circuit is connected with Bluetooth to the computer, and the notes are made through processing.
Idea: When learning piano, students may unconsciously tap on their ham when they are set as if they are playing the piano. So I came up with the idea to have a “piano on the ham”. There will be a keyboard on the ham to let the user who wears it tap on the keys and it will actually make the sound from the computer.
Process:
I started with coding the notes. I searched for source code on “processing piano”. I found sources using minim library.  The source code allows the user to play with the keyboard.
 Here is the source code link:
 https://www.openprocessing.org/sketch/99584#
Then I changed the code to serve my purpose. I want to let my Arduino control the keys instead of the keyboard of the computer. For the Arduino, it could be as easy as the circuit being connected or not using a button since I don’t need to control the volume so I just need value 1 or 0 to tell whether the sound is made. So I used if statement to do that, letting if the value == 1 than they the processing would make a sound.
Then I started my circuit with the breadboard. I tested the circuit with button and resistor. I didn’t use Bluetooth connect at this time for I need to ensure the circuit work in the first place then go to the next step.
Then I tried to connect with HC-05 Bluetooth connect to connect my circuit. However, I had a big trouble uploading the code. The circuit was right but I can’t upload my code to Arduino when connecting to the port HC-05. I asked Professor Antonius for help, I found that I made the mistake of Bluetooth connection. I should first upload code to Arduino wire, then Bluetooth is just a way of sending single. When first uploading code with wire, I should unplug the RX and TX to make sure Bluetooth connect would not affect the wire connection. Then after uploading the code, just change the port to HC-05 Bluetooth connection and I don’t have to upload code again since the Arduino had been programmed. I did that and succeed got Bluetooth connection worked.
Here is my final Arduino Code
Antonius then gave me another important suggestion, I don’t have to use buttons to control the circuit since the button is not wearable and comfortable on the clothes. Instead, the button just served to cut or reconnect the circuit, so I can just use conductive tapes and other material to make a wearable switch. It reminds me of the “sandwich switch” in our textbook, so I referred to the textbook to make the switch.
Then is to actually connect the circuit to the jeans. I choose a hole jeans so it is more convenient for me to put the wires around. I first sewed the resistors with the sandwich switches together with conductive thread. Then I soldered resistors with the wires connected to the ground (black wires). I used other two wires connected with power (red wires), and digital output pines ( yellow wires). I finished with the first button but when I was testing with the second button, it didn’t work and got short-circuited, I tested servals, but didn’t figure out why, during this process, my Arduino board was burnt due to the short circuit.
Here is one demo before the Arduino was burnt
I borrow another Arduino board and found out the reason. When I sewed the resistor to the switch with conductive thread, I accidentally sewed two conductive sides of the switch together which caused the short circuit. I took the switches apart and re-sewed them with normal threads. Then instead of using conductive thread, I made holes on the switches and made a loop on the resistor. In this way, the resistors and wires are still connected to the switch but it would connect with each other and cause the short circuit.
I finished other four switches and made the switch black and white to make it looks like keys of a piano.
Here is the demo
Lessons learned and further improvement:
1 I could use glue to product the connects. Both to make the connections more stable and prevent the short circuit.
2 I could couch the wires to the jeans to make the wires more stable
3 design and debugging take much more time than coding.

Leave a Reply