Rachele Didero's site Welcome to Rocky 96's HTMAA world

Welcome to Rocky96's
HTMAA world

A free, fully responsive (?) font of inspiration (?) designed by Rachele Didero for How to Make (Almost) Anything Course @ MIT Media Lab
and released for free .

December 19, 2023

Week 13

Final Project

- Knitted Glove, Laser-Induced Graphene (LIG), music output -

Stromenti diversi sotto innumerevoli dita

Documentation of my final project masterpiece that integrates the range of units covered, answering: What does it do? Who's done what beforehand? What did you design? What materials and components were used? Where did they come from? How much did they cost? What parts and systems were made? What processes were used? What questions were answered? What worked? What didn't? How was it evaluated? What are the implications? Prepare a summary slide and a one minute video showing its conception, construction, and operation Your project should incorporate 2D and 3D design, additive and subtractive fabrication processes, electronics design and production, embedded microcontroller design, interfacing, and programming, system integration and packaging Where possible, you should make rather than buy the parts of your project Projects can be separate or joint, but need to show individual mastery of the skills, and be independently operable Present your final project, weekly and group assignments, and documentation

1. Concept and Background research

For my final project, I drew inspiration from Gabriele D'Annunzio's poem "La pioggia nel pineto," (Rain in the pine forest) where he finds himself in a forest during a storm, listening to the unique sound produced by raindrops falling on various leaves. The intensity of the sound varies depending on the weight of each raindrop. In the poem, D'Annunzio mentions "different instruments in the hands of many," conveying the idea of diverse sounds created by raindrops on different surfaces. This concept inspired me to create a wearable that could serve as an instrument, giving voice to "the sound of newer words that speak in drops and foliage from afar." So, I thought of creating a knitted glove through which I could thread conductive wires to recreate a glove capable of modulating sounds. I aimed to integrate both finger pressure on any surface and wrist movement. For the motion aspect, I drew inspiration from the Mimu Glove.

2. Wrist movement

To accomplish this step, I drew inspiration from Week 8, "Input Devices," where I calculated the difference in resistance during the movement of a finger in a knitted glove.

3. Fingertips Pressure

To accomplish this step, I drew inspiration from Week 13, "Wildcar Week," where I created fingerprints with LIG in which I was able to calculate the difference in resistance.

4. PCB Design

For this step, I took inspiration from the PCB board I designed in Week 8 "Input Devices" . However, for the final project, I wanted to utilize all four ANALOG PINS of the XIAO RP2040. This would allow me to obtain four different outputs (and therefore, notes) instead of just one. So, I designed a simple circular board with holes to sew it onto the knitted glove. The four ANALOG PINS are connected to a 102-ohm resistor and to the GROUND (PIN 13). The conductive wires are then connected at one end to the analog pin and, at the other end, to the 5V (PIN 14).

For this step, I took inspiration from the PCB board I designed in Week 8 "Input Devices" . However, for the final project, I wanted to utilize all four ANALOG PINS of the XIAO RP2040. This would allow me to obtain four different outputs (and therefore, notes) instead of just one. So, I designed a simple circular board with holes to sew it onto the knitted glove. The four ANALOG PINS are connected to a 102-ohm resistor and to the GROUND (PIN 13). The conductive wires are then connected at one end to the analog pin and, at the other end, to the 5V (PIN 14).

I see there's a mistake in my schematic, so I change the design and remill it. I always have four resistors and now I also have 2 0 OHMS, one connecting A1 and A1, the other one connecting Ground to ground.


5. PCB Fabrication

For the fabrication I encountered some problems and I had to repeat the process several times.


I understand which resistor I should use, trying different resistors with my sensors using a XIAO and this schematics:


I needed to fabricate two different boards, because I couldn't use the first one I made for a mistake in the soldering step. For the second one, I had to increase the thickness of the schemathics and change the shape of the holes. I modify everything first on Fusion 360 and then on Photoshop in order to create the PNG. It finally looks like this:


5. PCB Testing

Before connecting the wires to the board I tested the board with Arduino. I first make it blink with a basic code, then I tested if the analogic pins (A0, A1, A2, A3) are working. To test this step I use the following code:

Analog Pin Arduido


	/*
	ReadAnalogVoltage
  
	Reads an analog input on pin 0, converts it to voltage, and prints the result to the Serial Monitor.
	Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu).
	Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.
  
	This example code is in the public domain.
  
	https://www.arduino.cc/en/Tutorial/BuiltInExamples/ReadAnalogVoltage
  */
  
  // the setup routine runs once when you press reset:
  void setup() {
	// initialize serial communication at 9600 bits per second:
	Serial.begin(9600);
  }
  
  // the loop routine runs over and over again forever:
  void loop() {
	// read the input on analog pin 0:
	int sensorValue = analogRead(A0);
	// Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
	float voltage = sensorValue * (5.0 / 1023.0);
	// print out the value you read:
	Serial.println(sensorValue);
	delay(100);
  }
  



With the first PCB I created I noticed it doesn't work, after several trials.


I needed to fabricate two different boards, because I couldn't use the first one I made for a mistake in the soldering step. Before soldering to the wires, I test also the second board:

6. Knitting the Glove

I have been working on knitting a glove on the computerized knitting machine by Shima Seiki for a long time. I knitted my own gloves but for the final project, decided to use a glove Shima Seiki made, due to some problemathics in knitting the version of the same glove with a longer slI've dedicated a significant amount of time to knitting a glove using the computerized knitting machine from Shima Seiki. While I successfully crafted my own gloves, I opted to utilize a glove manufactured by Shima Seiki for the final project. This decision was prompted by certain challenges encountered when attempting to knit an extended sleeve version of the same glove. I use the machine MACHx2-123, it's a wholegarment machine that knits already finished pieces. The programming is very complex as well as the machine settings. I chooese I yarn that is slightly elastic and that fits the 15 gauge of the machine.


7. Creating connections for LIG sensers and placing PDMS on glove

I need to create long wires that pass through the tubular structures in my glove. To establish the connections, I solder the ends of the wires together and thread them through my cable. To place the PDMS on the knitwear structure, I use Sil-Poxy (silicon glue). I leave it cure for 15 minutes.


7. Testing an old board with a sensor to test the code

In order to create sound, I use CircuitPython, run on Visual Studio Code. I install CircuitPython on my XIAO downloading this: the latest stable release of CircuitPython that will work with the Seeed Studio XIAO RP2040. In order to do so I follow these instructions: Seeed Studio XIAO RP2040 with CircuitPython The code I used on Visual Code is the following:

Circuit Python Code On Visual Studio Code


				import time 
import board 
from analogio import AnalogIn 
import adafruit_midi 
import usb_midi 

from adafruit_midi.note_on import NoteOn 
from adafruit_midi.note_off import NoteOff 

midi = adafruit_midi.MIDI(midi_out=usb_midi.ports[1], out_channel=0) 
analog_in = AnalogIn(board.A3) 

def get_voltage(pin): 
    return (pin.value * 3.3) / 65536 

notePlaying = False 

while True: 
    val = get_voltage(analog_in) 
    print(val) 
    if val <= 0.8 and not notePlaying: 
       midi.send(NoteOn(44, 120)) # 44 first number = note and 120 (second number is intensity) 
       notePlaying = True 

    if val > 0.8 and notePlaying: 
       midi.send(NoteOff(44, 0)) 
    time.sleep(0.1) 

								
								

In order to make it work, I installed MIDI on my Computer and then I used Garage Band to Set the sound.

I built the glove of the video in Week 8, "Input Devices,"


As I explained in the note of the code, in "midi.send(NoteOn(44, 120))" # 44 stands for the note and 120 indicates the intensity.


6. Testing the Glove - Final -

The code on Circuit Python for one sensor (1 analog PIN):

Circuit Python Code On Visual Studio Code


				/*
  ReadAnalogVoltage

  Reads an analog input on pin 0, converts it to voltage, and prints the result to the Serial Monitor.
  Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu).
  Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.

  This example code is in the public domain.

  https://www.arduino.cc/en/Tutorial/BuiltInExamples/ReadAnalogVoltage
*/

// the setup routine runs once when you press reset:
void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
}

// the loop routine runs over and over again forever:
void loop() {
  // read the input on analog pin 0:
  int sensorValue_1 = analogRead(A0);
  int sensorValue_2 = analogRead(A1);
  int sensorValue_3 = analogRead(A2);
  int sensorValue_4 = analogRead(A3);

   Serial.print(sensorValue_1);
  Serial.print("\t");
  Serial.print(sensorValue_2);
  Serial.print("\t");
  Serial.print(sensorValue_3);
  Serial.print("\t");
  Serial.println(sensorValue_4);
  delay(100);
}


								
								

The code on Circuit Python for four sensors (4 analog PINS):

Circuit Python Code On Visual Studio Code



import time 
import board 
from analogio import AnalogIn 
import adafruit_midi 
import usb_midi 

from adafruit_midi.note_on import NoteOn 
from adafruit_midi.note_off import NoteOff 
from adafruit_midi.pitch_bend import PitchBend 

midi = adafruit_midi.MIDI(midi_out=usb_midi.ports[1], out_channel=0)

sensitivities = [2.2, 1.0, 2.0]
notes = [60, 64, 67]
pins = [board.A3, board.A2, board.A0]

notePlaying = []
sensors = []
for pin in pins:
    sensors.append(AnalogIn(pin))
    notePlaying.append(False)

pitch = AnalogIn(board.A1)

n_sensors = len(sensors)

def get_voltage(pin): 
    return (pin.value * 3.3) / 65536 

print("Started")

while True: 
    for i in range(n_sensors):
        val = get_voltage(sensors[i]) 
        if val <= sensitivities[i] and not notePlaying[i]: 
            midi.send(NoteOn(notes[i], 120)) # 44 first number = note and 120 (second number is intensity) 
            notePlaying[i] = True 

        if val > sensitivities[i] and notePlaying[i]: 
            midi.send(NoteOff(44, 0))
            notePlaying[i] = False

    val = get_voltage(pitch)
    pitchVal = int(((val-0.65)/0.2)*16383)
    if pitchVal >= 0 and pitchVal <= 16382:
        midi.send(PitchBend(pitchVal))
								
								


11. Nice Pictures and Videos

12. A big special thank to

Wedyan Babatain

Ozgun Kilic Afsar

Lancelot Blanchard

Lucy Li

as well as all the TAs in HTMAA 2023. Thank you all!!!


Now, just a lil recap video!!