Skip to content

9. Wearables

What the week looked like

As worried as I was about learing electronics in general, this week seemed very well paced. Especially since our mentor Rico wanted all 3 of us; Koshi, Shefali and Me; to work together and divide & conquer the assignment. Knowing that we could divide the research and only have to work on separate parts, trusting that we could depend on each other to catchup on the research side of explorartions we didn't pursue ourself, was quite liberating.

This week we happened to have a hoilday on weekday and me & Shefali decided to work together, escpecially since our access to electronic materials was limited.

Takeaways from Global Session

The sessions with Liza are always extremely inspiring and insightful. We were shown a spectrum of wearbles intergrating electronics, especially microcontrollers.

Especially thankful to her for sharing her entire presenation and a vocabulary list of terminologies used in the lecture.

Checklist for the week

test

Personal thoughts and Ideas

Based on what Liza showed and what Rico showed us in the Local session, i decided to not look at this sesion as something to finalaise what i would want to do in my final project, but just as a chance to explorre what all is possible through a hands-on approach to attempting these visual, audio and movement actuators.

Since electronics is not my forte, the materials available at our electronic lab became the main guiding principle of what devices i could experiment with. I made a list of ALL the materials mentioned on the website and marched into our lab to dig for them. Managed to pickup Servo Motors, LEDs and Neopixel Strip (which eventually didn't work since it was defective).

Apart from the materials in the lab, few things i am curious to explore later are Fibre optics and Thermoreactive Pigments. I plan to get my hands on them eventually and attempt some basic explorations with these as well, if posssible.

Research & Inspiration

I was blown away by the examples that Liza showed us in class of integration of electronics within the fabric. So far, i have looked deeper into the examples that she shared.

Softwares & Tools

SOFTWARES:
  1. Audurino
  2. TinkerCAD
TOOLS:
  1. Audurino UNO
  2. Servo Motor
  3. LEDs (20 minimum)
  4. Jumper Wires (male to male)
  5. Jumper Wires (female to female)
  6. Jumper WIres (male to female)
  7. Resistors (100 ohm)
  8. 3v Battery cell (to test LED)

Work Flow:

Shortlisting possible explorations

Based on the long list of materials that i made from Liza's presentation, i could only find Servo Motors, LEDs and NeoPixel strips, that fit the criteria for this week's assignment. I also had magnetic beads and was planning on trying to use them for making FlipDots.

After our Local session, i went forward with researching and laying out the possible materials needed to create these circuits, as well as shortlisting relevant YouTube links for tutorials. During this i researched about Servo Motor connections, Flip Dots, Charlieplexing LEDs and NeoPixel Strips.

Based on my research about the circuits, i reaalised that we didn't have materials on hand to experiment with FlipDots, so had to chuck that option. And during our hours of experimenting with NeoPixels and attempting atleast 5 different tutorials, figured that our NeoPixel strip was defective, and endeed up leaving that out as well.

Finally i was left with Servo Motors and LEDs, and had a lot of fun playing around with the code for the motor and integrating LEDs onto my Poncho Module from Open Source Circular Fashion!

Experimenting with Servo Motor

Installing Servo Library on Audrino

The Audrino software has an extremely straightforward userflow to install a Library.

  1. Go to Sketch > Include Library > Manage Libraries.
  2. A Library Manager screen opens up.
  3. Select 'Audurino UNO' in the 'Select Board' option.
  4. Next, search for 'Servo' in the Search bar, and a list of options show up.
  5. Select the 'Servo by Audurino' library and press Install

To begin work, we need to now access the library, inorder to integrate it into the code.

  1. Once installed, go to File > Examples > Servo > Sweep.
  2. A new sketch is created with an existig template of Sweep code for Servo Motor.

Circuit Making

For making the circuit, i refered to this video which was extremely straightforward in explaining how to connect the motor to the audurino.

Attached images below show the circuit diagram (made on TinkerCAD) and the actual circuit we made.

test

Playing with the Code

In order to get the Servo Motor running, i referd to this video that also explained how to edit the code to play with the delay and position settings of the motor.

Basic Code

Below is the Basic Code as available on Audurino using the Servo Library.

#include <Servo.h>

Servo myservo;  // create Servo object to control a servo
// twelve Servo objects can be created on most boards

int pos = 0;    // variable to store the servo position

void setup() {
  myservo.attach(9);  // attaches the servo on pin 9 to the Servo object
}

void loop() {
  for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
    // in steps of 1 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15 ms for the servo to reach the position
  }
  for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15 ms for the servo to reach the position
  }
}
Reducing the Delay

Here the delay is reduced to 5 from the previous value of 15.

The motion observed here was ...

#include <Servo.h>

Servo myservo;  // create Servo object to control a servo
// twelve Servo objects can be created on most boards

int pos = 0;    // variable to store the servo position

void setup() {
  myservo.attach(9);  // attaches the servo on pin 9 to the Servo object
}

void loop() {
  for (pos = 0; pos <= 360; pos += 1) { // goes from 0 degrees to 180 degrees
    // in steps of 1 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(5);                       // waits 15 ms for the servo to reach the position
  }
  for (pos = 360; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(5);                       // waits 15 ms for the servo to reach the position
  }
}

Inreasing the Delay

Here the delay is increased to 30, from the original value of 15.

The motion observed here was...

#include <Servo.h>

Servo myservo;  // create Servo object to control a servo
// twelve Servo objects can be created on most boards

int pos = 0;    // variable to store the servo position

void setup() {
  myservo.attach(9);  // attaches the servo on pin 9 to the Servo object
}

void loop() {
  for (pos = 0; pos <= 360; pos += 1) { // goes from 0 degrees to 180 degrees
    // in steps of 1 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(30);                       // waits 15 ms for the servo to reach the position
  }
  for (pos = 360; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(30);                       // waits 15 ms for the servo to reach the position
  }
}
Separate Delay times

Here the attempt was to increse the delay to 30 between the First & Second motion, as well as reduce the delay to 5 between the Second & First motion.

The motion observed here was ....

#include <Servo.h>

Servo myservo;  // create Servo object to control a servo
// twelve Servo objects can be created on most boards

int pos = 0;    // variable to store the servo position

void setup() {
  myservo.attach(9);  // attaches the servo on pin 9 to the Servo object
}

void loop() {
  for (pos = 0; pos <= 360; pos += 1) { // goes from 0 degrees to 180 degrees
    // in steps of 1 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(30);                       // waits 15 ms for the servo to reach the position
  }
  for (pos = 360; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(5);                       // waits 15 ms for the servo to reach the position
  }
}

Here the attempt was to increse the reduce the delay to 5 between the First & Second motion, as well as increase the delay to 30 between the Second & First motion.

The motion observed here was ...

#include <Servo.h>

Servo myservo;  // create Servo object to control a servo
// twelve Servo objects can be created on most boards

int pos = 0;    // variable to store the servo position

void setup() {
  myservo.attach(9);  // attaches the servo on pin 9 to the Servo object
}

void loop() {
  for (pos = 0; pos <= 360; pos += 1) { // goes from 0 degrees to 180 degrees
    // in steps of 1 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(5);                       // waits 15 ms for the servo to reach the position
  }
  for (pos = 360; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(30);                       // waits 15 ms for the servo to reach the position
  }
}

Video compilation of the different movements achieved

Charlieplexing with LEDs

We were introduced to the idea of attempting to do this by our mentor Rico. This was also attempted by our mentor Mina, whose documentation i referred to to understand the scope of the experiment.

Circuit Making

To attempt this, i refered to this video exactly and was successful in Charlieplexing 12 LEDs on the first attempt itself!

Below is the Circuit design (made on TinkerCAD) and the pictures of the real circut building.

test

Playing with the Code

The video also came with a reference to the code used. Since we were working with 12 LEDs and there were soo many wired connections, it took a while to understand and edit the code towards the desired outcome.

This code gets the LEDs to turn on one-by-one till the 10th position and then randomises the order.

#define delay50 100

int myled[] = {8, 9,10,11,12,13};
int num_of_leds;

void setup() {
  num_of_leds = sizeof(myled) / sizeof(int);
  for (int i = 0; i < num_of_leds; i++) {
    pinMode(myled[i], OUTPUT);
  }
}

void loop() {
  delay(1000);
  ledonn();
  delay(2000);
  ledoff();
  delay(2000);
  for (int i = 0; i < 5; i++) {pattern1();}
  for (int i = 0; i < 5; i++) {pattern2();}
  for (int i = 0; i < 5; i++) {pattern3();}
  for (int i = 0; i < 5; i++) {pattern4();}
  for (int i = 0; i < 25; i++){pattern5();}
  for (int i = 0; i < 5; i++) {pattern6();}
  for (int i = 0; i < 15; i++){pattern7();}
  for (int i = 0; i < 15; i++){pattern8();}
  for (int i = 0; i < 5; i++) {pattern9();}
  for (int i = 0; i < 5; i++) {pattern10();}
  for (int i = 0; i < 50; i++){pattern11();}
  for (int i = 0; i < 50; i++){pattern12();}
  ledoff();
  delay(5000);
}

//TURN ON ALL LEDs
void ledonn() {
  for (int i = 0; i < num_of_leds; i++) {
    digitalWrite(myled[i], HIGH);
  }
}

//TURN OFF ALL LEDs
void ledoff() {
  for (int i = 0; i < num_of_leds; i++) {
    digitalWrite(myled[i], LOW);
  }
}

//LEFT TO RIGHT
void pattern1() {
  for (int i = 0; i < num_of_leds; i++) {
    digitalWrite(myled[i], HIGH);
    delay(delay50);
    digitalWrite(myled[i], LOW);
  }
}

//RIGHT TO LEFT
void pattern2() {
  for (int i = num_of_leds; i > 0; i--) {
    digitalWrite(myled[i - 1], HIGH);
    delay(delay50);
    digitalWrite(myled[i - 1], LOW);
  }
}

//LEFT TO RIGHT FILL
void pattern3() {
  for (int i = 0; i < num_of_leds; i++) {
    digitalWrite(myled[i], HIGH);
    delay(delay50);
  }
  for (int i = num_of_leds; i > 0; i--) {
    digitalWrite(myled[i - 1], LOW);
    delay(delay50);
  }
}

//RIGHT TO LEFT FILL
void pattern4() {
  ledonn();
  delay(delay50);
  for (int i = 0; i < num_of_leds; i++) {
    digitalWrite(myled[i], LOW);
    delay(delay50);
  }
  for (int i = num_of_leds; i > 0; i--) {
    digitalWrite(myled[i - 1], HIGH);
    delay(delay50);
  }
  ledoff();
}

//ALTERNATE LEDs
void pattern5() {
  for (int i = 0; i < num_of_leds; i = i + 2) {
    digitalWrite(myled[i], HIGH);
    digitalWrite(myled[i + 1], LOW);
  }
  delay(delay50);
  for (int i = 0; i < num_of_leds; i = i + 2) {
    digitalWrite(myled[i], LOW);
    digitalWrite(myled[i + 1], HIGH);
  }
  delay(delay50);
}

//OSCILLATING LEDs
void pattern6() {   //osc
  for (int i = 0; i < num_of_leds; i++) {
    digitalWrite(myled[i], HIGH);
    delay(delay50);
    digitalWrite(myled[i], LOW);
  }
  delay(delay50);
  for (int i = num_of_leds; i > 0; i--) {
    digitalWrite(myled[i - 1], HIGH);
    delay(delay50);
    digitalWrite(myled[i - 1], LOW);
  }
}

//INSIDE
void pattern7() {
  for (int i = 0; i < num_of_leds / 2; i++) {
    digitalWrite(myled[i], HIGH);
    digitalWrite(myled[num_of_leds - 1 - i], HIGH);
    delay(delay50);
    digitalWrite(myled[i], LOW);
    digitalWrite(myled[num_of_leds - 1 - i], LOW);
  }
}

//OUTSIDE
void pattern8() 
{
  for (int i = (num_of_leds / 2) - 1; i >= 0 ; i--)
  {
    digitalWrite(myled[i], HIGH);
    digitalWrite(myled[num_of_leds - 1 - i], HIGH);
    delay(delay50);
    digitalWrite(myled[i], LOW);
    digitalWrite(myled[num_of_leds - 1 - i], LOW);
  }
}

//LEFT TO RIGHT 3 LEDs
void pattern9() {
  for (int i = 0; i < num_of_leds + 3; i++) {
    if (i <= num_of_leds) {
      digitalWrite(myled[i], HIGH);
    }
    if (i > 2) {
      digitalWrite(myled[i - 3], LOW);
    }
    delay(delay50);
  }
}

//OSCILLATING 3 LEDs
void pattern10() {
  for (int i = 2; i < num_of_leds; i++) {
    if (i == 2) {
      digitalWrite(myled[0], HIGH);
      digitalWrite(myled[1], HIGH);
    }
    digitalWrite(myled[i], HIGH);
    digitalWrite(myled[i - 3], LOW);
    delay(delay50);
  }
  for (int i = num_of_leds - 4; i > -1; i--) {
    digitalWrite(myled[i], HIGH);
    digitalWrite(myled[i + 3], LOW);
    delay(delay50);
  }
}

//RANDOM EFFECT 1
void pattern11() {
  int randomnum = random(0, num_of_leds + 1);
  digitalWrite(myled[randomnum], HIGH);
  delay(delay50);
  digitalWrite(myled[randomnum], LOW);
  delay(delay50);
}

//RANDOM EFFECT 2
void pattern12() {
  int randomonn = random(0, num_of_leds + 1);
  int randomoff = random(0, num_of_leds + 1);
  digitalWrite(myled[randomonn], HIGH);
  digitalWrite(myled[randomoff], LOW);
  delay(delay50);
}

Video compilation of the LEDs litup

Hard Soft Connection

For this i wanted to integrate LEDs onto my Felt Poncho module from the Open Source Circular Fashion week. So i took forward my learnings from Charlieplexing LEDs and integrated 6 LEDs into the Felt Module.

Circuit Making

Below is the Circuit diagram (made on TinkerCAD) and the real breadboard connections.

test

Here are how the 6 LEDs were integrated into the Felt Module and the wire connections made.

test

Code Editing

I played around with the Charlieplexing code to account for 6 LEDs and not 12. I also edited it so that the LEDs in my design would light up one-after-the-other and then flash once together and so on.

#define delay50 100

int myled[] = {8,9,10,11,12,13};
int num_of_leds;

void setup() {
  num_of_leds = sizeof(myled) / sizeof(int);
  for (int i = 0; i < num_of_leds; i++) {
    pinMode(myled[i], OUTPUT);
  }
}

void loop() {
  delay(1000);
  ledonn();
  delay(2000);
  ledoff();
  delay(2000);
  for (int i = 0; i < 5; i++) {pattern1();}
  for (int i = 0; i < 5; i++) {pattern2();}
  for (int i = 0; i < 5; i++) {pattern3();}
  for (int i = 0; i < 5; i++) {pattern4();}
  for (int i = 0; i < 25; i++){pattern5();}
  for (int i = 0; i < 5; i++) {pattern6();}
  ledoff();
  delay(5000);
}

//TURN ON ALL LEDs
void ledonn() {
  for (int i = 0; i < num_of_leds; i++) {
    digitalWrite(myled[i], HIGH);
  }
}

//TURN OFF ALL LEDs
void ledoff() {
  for (int i = 0; i < num_of_leds; i++) {
    digitalWrite(myled[i], LOW);
  }
}

//LEFT TO RIGHT
void pattern1() {
  for (int i = 0; i < num_of_leds; i++) {
    digitalWrite(myled[i], HIGH);
    delay(delay50);
    digitalWrite(myled[i], LOW);
  }
}

//RIGHT TO LEFT
void pattern2() {
  for (int i = num_of_leds; i > 0; i--) {
    digitalWrite(myled[i - 1], HIGH);
    delay(delay50);
    digitalWrite(myled[i - 1], LOW);
  }
}

//LEFT TO RIGHT FILL
void pattern3() {
  for (int i = 0; i < num_of_leds; i++) {
    digitalWrite(myled[i], HIGH);
    delay(delay50);
  }
  for (int i = num_of_leds; i > 0; i--) {
    digitalWrite(myled[i - 1], LOW);
    delay(delay50);
  }
}

//RIGHT TO LEFT FILL
void pattern4() {
  ledonn();
  delay(delay50);
  for (int i = 0; i < num_of_leds; i++) {
    digitalWrite(myled[i], LOW);
    delay(delay50);
  }
  for (int i = num_of_leds; i > 0; i--) {
    digitalWrite(myled[i - 1], HIGH);
    delay(delay50);
  }
  ledoff();
}

//ALTERNATE LEDs
void pattern5() {
  for (int i = 0; i < num_of_leds; i = i + 2) {
    digitalWrite(myled[i], HIGH);
    digitalWrite(myled[i + 1], LOW);
  }
  delay(delay50);
  for (int i = 0; i < num_of_leds; i = i + 2) {
    digitalWrite(myled[i], LOW);
    digitalWrite(myled[i + 1], HIGH);
  }
  delay(delay50);
}

//OSCILLATING LEDs
void pattern6() {   //osc
  for (int i = 0; i < num_of_leds; i++) {
    digitalWrite(myled[i], HIGH);
    delay(delay50);
    digitalWrite(myled[i], LOW);
  }
  delay(delay50);
  for (int i = num_of_leds; i > 0; i--) {
    digitalWrite(myled[i - 1], HIGH);
    delay(delay50);
    digitalWrite(myled[i - 1], LOW);
  }
}

Final Piece Assembled and Litup

I put the lit up felt module as a neckpiece and it worked well, apart from all the wires hanging!!

test

video

Watch this video on YouTube

Learnings


People to thank for this week

This week in emojis:

Research

describe what you see in this image

"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."

weekly assignment

Check out the weekly assignment here or login to your NuEval progress and evaluation page.

about your images..delete the tip!!
  1. Remember to credit/reference all your images to their authors. Open source helps us create change faster together, but we all deserve recognition for what we make, design, think, develop.

  2. remember to resize and optimize all your images. You will run out of space and the more data, the more servers, the more cooling systems and energy wasted :) make a choice at every image :)

This image is optimised in size with resolution 72 and passed through tinypng for final optimisation. Remove tips when you don't need them anymore!

get inspired!

Check out and research alumni pages to betetr understand how to document and get inspired

Add your fav alumni's pages as references

References & Inspiration

"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."

  • Two images side-by-side

describe what you see in this image describe what you see in this image


Tools

Tools

Process and workflow

My sketches are ...

This schematic 1 was obtained by..

This tutorial 2 was created using..

footnote fabrication files

Fabrication files are a necessary element for evaluation. You can add the fabrication files at the bottom of the page and simply link them as a footnote. This was your work stays organised and files will be all together at the bottom of the page. Footnotes are created using [ ^ 1 ] (without spaces, and referenced as you see at the last chapter of this page) You can reference the fabrication files to multiple places on your page as you see for footnote nr. 2 also present in the Gallery.

Code Example

Use the three backticks to separate code.

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

Results

Video

From Vimeo

Sound Waves from George Gally (Radarboy) on Vimeo.

From Youtube

---

---

Fabrication files


  1. File: xxx 

  2. File: xxx