Skip to content

9. Wearables

This week, we're diving deeper into wearables and e-textiles, exploring the magical world of soft sensors and actuators! 🎨🧡 Whether it's about detecting motion, light, or touch, these components bring life to our creations and let them feel and respond! πŸ’‘βœ¨

Research

Here are a few trailblazing artists and designers who have shaped this field:

week09 week09 week09

Process and workflow

To kick off my exploration of wearables and e-textiles, I started by diving into Adafruit’s learning platform.
It turned out to be a goldmine of ideas and tutorials, giving me tons of inspiration for my project. The guides on sensors, actuators, and microcontrollers were particularly helpful as I brainstormed ways to make my design interactive. πŸ’‘

Next, I discovered workshops by Becky Stern, who is a well-known expert in wearable tech.
Her tutorials helped me understand the practical aspects of working with components like soft circuits, conductive materials, and microcontrollers.Her hands-on approach made tricky concepts a lot easier to grasp and gave me the confidence to experiment with my designs. ✨🧡

These resources shaped the foundation of my project, inspiring me to combine creativity and technology in innovative ways! πŸš€

Finding Inspiration: Embroidery and Design Integration

Also during my research, I came across some beautiful embroidery patterns that truly inspired me.
The intricate connection lines in the designs sparked an idea:
I could use these patterns not just for aesthetics but as a functional way to integrate Adafruit components into my project.

week09

By combining embroidery with conductive materials, I plan to create a solution that seamlessly blends technology with design.
This approach will allow the circuits and connections to become a part of the artwork itself, enhancing both functionality and visual appeal. βœ¨πŸ§΅πŸ’‘

Wearable Design with Electronics ⚑

Our task is to create a wearable design with integrated electronics. We will combine fashion and technology by incorporating Adafruit components like the FLORA main board and RGB NeoPixels into a textile-based design. The goal is to create an interactive piece that responds to user input, with embedded lighting effects controlled by electronics.


Tools Used:

Here’s a breakdown of the tools I used to bring this design to life:

Tool Description
FLORA Main Board A compact, sewable microcontroller that controls the NeoPixels and handles inputs.
FLORA RGB NeoPixel An addressable LED that can display a wide range of colors, managed by the FLORA board.
Conductive Thread Electrically conductive thread used to stitch electrical connections between components.
Standard Thread Regular sewing thread to secure fabric and stitch the overall design.
Embroidery Floss Decorative, colorful thread used for adding texture and enhancing the visual appeal of the design.

Implementation Steps:

As part of the wearable design, I followed the instruction and made sure to connect the FLORA main board with the NeoPixel and snap switch properly. Here’s what I did:

NeoPixel Connections πŸ”Œ:

  • The D6 pin on the FLORA board is used as the data bus to control the NeoPixel.
  • I connected VBATT and GND from the NeoPixel to the + and - pins, respectively, to provide the necessary power.

Snap Switch Integration ⚑:

  • I used a snap switch as a means to control the connection to the NeoPixel.
  • One half of the snap is connected to GND, and the other half is connected to TX (also referred to as D1, but any digital pin on the FLORA board will work).
  • When the bottom two pieces of tape are pulled together, they complete the circuit, activating the NeoPixel.

week09

How to Test and Upload Code:

To get started with the FLORA main board, I follow these steps:

  1. Plug in the USB cable to connect the FLORA main board to my computer.
  2. Open up the Adafruit Arduino IDE.
  3. Test the Pixel Connections:
  4. File >> Examples >> Adafruit_NeoPixel >> strandtest and upload the sketch to the FLORA board. This will test the connection to the NeoPixel and ensure it's working correctly by running the built-in animation.

  5. Upload Custom Code:

  6. After confirming the connection, upload the following code to make the NeoPixel change color when the snap switch is connected or disconnected:

Code Example

Use the three backticks to separate code.

#include <Adafruit_NeoPixel.h>

// Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
//   NEO_RGB     Pixels are wired for RGB bitstream
//   NEO_GRB     Pixels are wired for GRB bitstream
//   NEO_KHZ400  400 KHz bitstream (e.g. FLORA pixels)
//   NEO_KHZ800  800 KHz bitstream (e.g. High Density LED strip)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(1, 6, NEO_GRB + NEO_KHZ800);
const int buttonPin = 1;     // the fin snap is connected to FLORA TX, the other half of the snap is conntected to GND
int buttonState = 0;         // variable for reading the snap status

void setup() {
  strip.begin();
  strip.show(); // Initialize all pixels to 'off'
    // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT);
  digitalWrite(buttonPin, HIGH);
}

void loop() {
    // read the state of the pushbutton value:
  buttonState = digitalRead(buttonPin);

    // check if the pushbutton is pressed.
  // if it is, the buttonState is HIGH:
  if (buttonState == LOW) {     
    // turn LED on:    
    strip.setPixelColor(0, strip.Color(200, 211, 254)); // color when snap is connected
  strip.show();  
  } 
  else {
    // change LED color
    strip.setPixelColor(0, strip.Color(250, 0, 0)); // color when snap is disconnected
  strip.show(); 
  }

    delay(50);
}

For the snap switch functionality, I used conductive tape. When the bottom two tapes are pulled together, they connect, allowing the NeoPixel to turn on and change colors based on the code uploaded. When the tapes are pulled apart, the connection is broken, turning off the NeoPixel.

This simple on/off mechanism allows the wearer to control the electronics by physically manipulating the conductive tape, making the design interactive and easy to control without the need for traditional buttons or switches.

Embroidery for Aesthetic Enhancement ✨:

After setting up the electronics, I started to embroider the design to make it more beautiful and visually interesting. This added a layer of creativity, blending technology with traditional craftsmanship.

Experimenting with XIAO RP2040


Tools Used:

Here’s a breakdown of the tools we used to bring this project to life:

Tool Description
XIAO RP2040 Board A small but powerful microcontroller board that reads inputs and controls outputs.
Servo Motor A motor that we programmed to move based on the analog signals from the stretch sensor.
Conductive Thread Used to create a DIY stretch sensor by embroidering it into fabric.
Alligator Clips Used to connect the conductive threads and components for easy testing and adjustments.
Cables Additional wires for connecting the servo motor to the XIAO board.
Arduino IDE Software used to upload code to the XIAO board and monitor analog signals.

Soldering the XIAO RP2040 and Board Together πŸ”§

In our experimentation, we also soldered the XIAO RP2040 board directly to the main board, which was an important step in ensuring that the components worked together seamlessly. This process was crucial as it involved not only soldering individual parts but also connecting the XIAO RP2040 to the rest of the system, making sure all the parts were properly integrated into the circuit.

Soldering Process ⚑

  • XIAO RP2040 Integration: We carefully aligned the XIAO RP2040 board with the main board, ensuring the pins and pads lined up correctly. This process required precision, as the small size of the XIAO RP2040 made it a bit challenging to solder the pins cleanly.

  • LED and Resistor Soldering: After positioning the LED and resistor, we soldered them onto the board. We made sure to attach the LED in the correct orientation and soldered the resistor in series with it, following the appropriate value for the current and voltage needed to drive the LED.

  • Testing Connections: Once everything was soldered together, we conducted several tests to ensure all connections were stable and working. The XIAO RP2040 board communicated properly with the LED, and the current-limiting resistor did its job, allowing the LED to light up correctly without overloading.

XIAO RP2040 LED Blinking with Arduino

For this assignment, I worked with the XIAO RP2040 board and used the Arduino IDE to make an LED blink as a test for setting up the board and understanding its functionality.

First, I connected the XIAO RP2040 board to my computer using a USB cable. Once the board was connected, the power LED turned on, indicating it was powered.

Then, I followed these steps to set up the Arduino IDE:

  1. Added the XIAO RP2040 board's URL in File > Preferences:
  2. Selected XIAO RP2040 under Tools > Board.
  3. Chose the correct Port under Tools > Port.

Next, I opened the Blink sketch from the Arduino IDE by going to File > Examples > 01.Basics > Blink.

After this, I uploaded the sketch to the XIAO RP2040 by clicking the Upload button in the Arduino IDE. Once the upload was complete, I observed the onboard LED blinking every second, confirming that the setup was successful.

const char LED1 = D10;

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

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

πŸš€ Working with the Seeed Studio XIAO RP2040 and Servo Motor πŸ’‘

Also we explored the XIAO RP2040 microcontroller and connected it to a servo motor to make it move! It was so exciting to dive into a hands-on electronics project! Here's how it all went down:

Setting Up the XIAO RP2040 πŸ”Œ

We started by connecting the XIAO RP2040 to our computer using a USB cable.

⚑ Pro Tip: To make testing connections easier, we used alligator clips for power and ground. Additionally, we used jumper wires to connect the board to the servo motor.

week09

Connecting the Servo Motor βš™οΈ

Next, we hooked up a servo motor. These motors are perfect for moving parts in wearables or interactive projects. After wiring it up (using the GND, VCC, and signal pins), we tested its motion with the uploaded program.

I used the code from the Arduino workshop to program the motor's movement. This code helped control the servo motor's rotation by sending precise signals from the XIAO RP2040.

// Define the pin where the buzzer is connected
const int buzzerPin = 6; // Change this number according to your pin

void setup() {
  // Initialize the buzzer pin as an output
  pinMode(buzzerPin, OUTPUT);
}

void loop() {
  // Simple melody
  tone(buzzerPin, 262, 500); // Note C (262 Hz) for 500 ms
  delay(500);
  tone(buzzerPin, 294, 500); // Note D (294 Hz) for 500 ms
  delay(500);
  tone(buzzerPin, 330, 500); // Note E (330 Hz) for 500 ms
  delay(500);
  tone(buzzerPin, 349, 500); // Note F (349 Hz) for 500 ms
  delay(500);
  noTone(buzzerPin); // Turn off the buzzer
  delay(1000);       // Wait for 1 second before repeating
}

DIY Stretch Sensor: Analog Signals in Action 🎨✨

For this part of the project, we decided to experiment with analog signals using a DIY stretch sensor made from conductive threads. Here's how it went:

πŸͺ‘ Creating the Stretch Sensor:

  • We embroidered conductive threads into a fabric design.
  • The embroidery made the sensor look not only functional but also visually interesting!

πŸŽ›οΈ Connecting to Arduino:

  • We connected the conductive threads to the Arduino using alligator clips for easy testing and adjustments.
  • By stretching or manipulating the threads, we could see the analog signal values change in real time on the serial monitor, which was super exciting!
    const int stretchSensorPin = A1; // Connect your stretch sensor to analog pin A1
int sensorValue = 0;            // Variable to store the sensor reading

void setup() {
  Serial.begin(9600); // Initialize the serial monitor at 9600 baud rate
  pinMode(stretchSensorPin, INPUT); // Set the stretch sensor pin as input
}

void loop() {
  sensorValue = analogRead(stretchSensorPin); // Read the analog value from the sensor
  Serial.print("Stretch Sensor Value: "); // Print a label
  Serial.println(sensorValue);            // Print the value to the Serial Monitor
  delay(100); // Small delay to stabilize readings (adjust as needed)
}

πŸ”„ Controlling the Servo Motor:

  • After testing the sensor, we connected it to a servo motor.
  • Using the analog signal from the stretch sensor, we programmed the servo to move based on how much the threads were stretched.
#include <Servo.h>

Servo myServo; // Create a servo object
const int stretchSensorPin = A1; // Analog pin connected to the stretch sensor
int sensorValue = 0;             // Variable to store the raw sensor reading
int servoPosition = 0;           // Servo position (0 to 180 degrees)

void setup() {
  Serial.begin(9600);           // Initialize Serial Monitor
  pinMode(stretchSensorPin, INPUT); // Set the stretch sensor pin as input
  myServo.attach(6);            // Attach servo to digital pin 6 (change if needed)
}

void loop() {
  // Read the stretch sensor value
  sensorValue = analogRead(stretchSensorPin);

  // Map the sensor value (0–1023) to servo angle (0–180)
  servoPosition = map(sensorValue, 0, 1023, 0, 180);

  // Move the servo to the mapped position
  myServo.write(servoPosition);

  // Print values to the Serial Monitor
  Serial.print("Sensor Value: ");
  Serial.print(sensorValue);
  Serial.print(" | Servo Position: ");
  Serial.println(servoPosition);

  delay(50); // Small delay for smoother servo movement
}

Highlights ✨

This was such a fun and interactive experiment! Watching the servo motor respond to the stretch sensor felt like bringing the project to life. Plus, the Arduino workshop really helped us understand how to read analog signals and control motorsβ€”thank you, workshops! πŸ™Œ

Adding an Artistic Touch: Embroidery for Aesthetic Appeal 🎨

During the week, I focused on enhancing the visual appeal of the design by incorporating embroidery into the project. Using embroidery floss and conductive thread, I carefully stitched patterns to not only secure the electronic components but also create a design that is both functional and beautiful.

This step allowed me to blend technology with art, resulting in a wearable that is as visually captivating as it is interactive. Below, you can see the final embroidered design, showcasing the intricate stitching and how it integrates seamlessly with the electronics.

To make the wearable fully wireless, I chose to power it using a 3V battery pack. The plan was to power both the FLORA board and NeoPixel from this single battery, making the design more functional for everyday use.


Testing with a 3V Battery πŸ”‹

I connected the 3V battery to the FLORA main board and the NeoPixel to test the power setup.

  • Expectation: The NeoPixel should display vibrant colors in response to input.
  • Reality: The NeoPixel lights were faint and the color-changing effect didn’t work as expected.

After troubleshooting, I realized that 3V wasn’t sufficient to power the components correctly. Time to experiment with a different setup!


Using Two 3V Batteries in Series ⚑

To resolve the power issue, I connected two 3V batteries in series, giving me a total of 6V to power the wearable. - Setup: Used alligator clips to connect the two batteries to the FLORA board and the NeoPixel, so I could test the system without permanent soldering.

week09


Measuring with a Multimeter βš–οΈ

To ensure the power was being distributed correctly, I used a multimeter to measure the voltage at different points in the circuit.

  • What I measured:
  • Battery pack voltage: Ensured it was delivering 6V.
  • FLORA board voltage: Checked that it was receiving the correct voltage.
  • NeoPixel voltage: Measured to ensure it was receiving enough power to light up fully.

  • Results: The FLORA board received 6V, but the NeoPixel still wasn’t working properly.


Troubleshooting the NeoPixel 🌈

After some testing, I realized the issue was not with the FLORA board, but with the NeoPixel, which needs a stable voltage to operate at full brightness.

  • Tests: I tested the circuit without the NeoPixel connected, and the FLORA main board worked fine. This confirmed that the problem was isolated to the NeoPixel.

  • Findings: Even with 6V, the NeoPixel wasn’t functioning as expected, likely due to inconsistent voltage.


Trying Different Battery Configurations πŸ”„

I decided to experiment with different battery configurations to find the optimal setup for the circuit:

  • Parallel and Series Combos: I experimented with different combinations of series and parallel connections to adjust both the voltage and current needed by the NeoPixel.
  • Result: After much testing, I found the right balance by combining 3V batteries

week09

Fabrication files