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 .

November 8, 2023

Week 8

Input Devices -

- Knitted Glove measuring Resistance Input-

MetaGlove

Adding a sensor to a microcontroller board that I have designed and reading it

I want to measure the resistance applied on a conductive cord inserted along the first finger inside a glove. I want to measure the change in resistance of the cord when I bend and straighten my finger. 1. I had to first decide which type of filament to use to measure the resistance change. I then tested the resistance change using a multimeter, applying the ends to the input jacks. I initially tried with conductive yarn, but it proved to be too unstable with too low a resistance change. Following Wedyan's advice, I then used a conductive rubber cord.

2. Once I had chosen the material to incorporate into my knitted glove, with the assistance of Wedyan, I devised a circuit that could calculate the resistance change. The circuit includes, in addition to a XIAO RP-2040, a resistor. One end of the resistor is connected to an analog pin on the XIAO board (pin 4), and the other end is connected to the GROUND on the XIAO (pin 13). I want to connect my two ends of the conductive filament to the resistor.


3. To design the shape of my PCB, I draw inspiration from Arduino Lilypad because it will need to be sewn onto the glove and positioned at the wrist level. I have to incorporate holes that I connect to other pins on the XIAO. On the design, I have also added a Zero Ohm resistor because at one point on the board, two routes of my resistor overlap.



4. Once I understood how to design the PCB, I had to consider the structure of the rubber conductive cord on the glove and how to connect it to my board. I cut the ends of the rubber conductive cord to match the size of my index finger, allowing me to insert it only on the part where I want to measure the resistance change. With the help of Ozgun, I connected the ends of the rubber cord to a finer conductive filament. I removed the insulating coating from the thin conductive filament with scissors and began the process of joining the thin filament to the conductive rubber cord.
5.I mixed together with a 1:1 ratio of silver epoxy A and B until I obtained a consistency suitable for application at the junction between the two filaments. Once the silver epoxy was applied, I inserted the filaments into an oven at 150°F for 15 minutes to solidify the silver epoxy. I perform this step to establish contact without soldering because the rubber won't allow soldering, so we use silver epoxy. After 15 minutes have passed, we apply shrink tubes with the heat gun - we use shrink tubes to isolate the connection.




6.At this point, I can weave the entire filament through the holes in my glove and secure some parts with nylon sewing thread.
7. I test it with the following code on Arduino suggested by Wedyan:

Code to measure resistance

i = 0;

int analogPin = 4;
int raw = 0;
int Vin = 5;
float Vout = 0;
float R1 = 1000;
float R2 = 0;
float buffer = 0;
									
									
void setup(){
Serial.begin(9600);
}
									
void loop(){
raw = analogRead(analogPin);
if(raw){
buffer = raw * Vin;
Vout = (buffer)/1024.0;
buffer = (Vin/Vout) - 1;
R2= R1 * buffer;
Serial.print("Vout: ");
Serial.println(Vout);
Serial.print("R2: ");
Serial.println(R2);
delay(100);
}
}

print 'It took ' + i + ' iterations to sort the deck.';
8. At first it didn't work and I coulnd't understand why.

9. Then Wdyan figured a connection on my board wasn't working for a mistake a did while soldering the PCB.

10. But finally we obtained the indut we were looking for: