16.System integration

Material List

Product Quantity Mexican pesos Dollars Store
XIAO ESP32 C61128.006.64Unit Electronics
Thread6174.009.03Unit Electronics
Sensor LV-EZ0 MB10001613.0031.81Amazon
Rechargeable battery1390.0020.24Radio Shack
Velcro136.001.87Deportextil
Black zipper16.000.31Deportextil
Fabric "Pinguino"189.004.62Deportextil
Fabric "Kyoto"1.5114.005.92Deportextil
LEDs SMD10N/AN/AFab Lab
Resistors 1260 0Ω4N/AN/AFab Lab
Resistors 1260 270Ω10N/AN/AFab Lab
Resistors 1260 330Ω1N/AN/AFab Lab
Resistors 1260 10kΩ1N/AN/AFab Lab
MOSFET N 30V1N/AN/AFab Lab
Female pins1N/AN/AFab Lab
Phenolic plate1N/AN/AFab Lab
Wire cable3N/AN/AFab Lab
Total cost$1,550.00$80.44

This is a graphic showing how I arranged the cables and the conductive thread. Everything is placed on the inside of the vest so that nothing is visible from the outside. This makes it more comfortable and only the light from the LEDs is visible.

1

implemented methods of packaging

1

Integration with the LEDs

I used conductive thread to connect the LEDs. This method is more comfortable when someone wears the vest.

1

Integration with the PCB

The PCB is placed on the inside of the vest.

  • I soldered all the cables. I couldn't use conductive thread in this case because all of them would be in contact, which could cause short circuits. So, I used cable on the PCB and then soldered it with the conductive thread. To solder it, I covered one end of the thread with conductive tape.
  • I left some holes in case I want to add more LEDs later. They don’t affect the circuit and can work like antennas.
  • 1 1
1 1

Case in the vest

To protect the PCB, I made a silicone cover. I didn’t seal it completely so that air can circulate.

1 1

Integration of the Sensor

The way I connected the sensor is shown here. I left some holes in the back part of the vest to mount it.I used cables and placed them inside and at the back of the vest.

  • To keep the sensor in a stable position and avoid false readings, I secured it tightly with screws.
1

Battery Placement

I placed the battery in another pocket of the vest to keep the cables organized.

Electronics desing and production

Main Board

The schematic contains:

  • A MOSFET that controls all the LEDs. I added 10 terminals, but I only used 1 because the other 9 lines use conductive thread.
  • Pinout for the sensor; in this case, I’m using an analog input.
  • Extra pins for additional components like a vibration motor, Bluetooth module, and button.

In the PCB design, I used 0-ohm resistors as bridges.

electronics design electronics design electronics design
electronics design electronics design

Parameters and desing rules checker

Processes

The tools I used were:

  • Engraving: V-shaped tool
  • Hole cutting: 0.8 mm tool
  • Edge cutting: 2 mm tool
electronics design electronics design electronics design electronics design electronics design

Leds PCB

On the inside part, I decided to create a module where I added the LEDs, similar to Lilypad modules.

Example Image

I fabricated some modules and started placing them on the vest to achieve the desired lighting effect.

electronics design

Laser Cutting

The pattern design for the vest can be seen in week 2 laser cutting

I cut the fabric in parts using 100% polyester. The laser settings I used were:

  • Power: 70%
  • Speed: 30%
laser cutting

Usign the laser cutting

  1. I activated the power supply.
  2. I verified the air system was working.
  3. I turned on the laser machine.
  4. I deactivated the emergency stop button.
  5. I inserted the key and turned it to power the laser.
  6. I connected the USB drive to the machine.
  7. I chose my file from the USB.
  8. I pressed "Frame" to check the cutting area.
  9. I turned on the laser.
  10. I pressed "Start" to begin the cutting process.
laser cutting laser cutting laser cutting laser cutting laser cutting laser cutting

Molding and Casting

To make the vest comfortable at the pockets, I decided to use flexible silicone because it is soft.

You can see the detailed process in Molding and casting week

molding and casting molding and casting

Conductive Thread and Sewing

I sewed each module by hand because the conductive thread was too thick for the sewing machine.

Sewing Sewing Sewing

To make it washable, I added Velcro in some parts of the vest to attach and detach the LED modules.

Sewing

Sewing the Vest

  1. The shoulder seams of both the outer fabric and lining were sewn separately.
  2. The zipper was inserted between the outer fabric and lining (right sides facing) and sewn on both sides.
  3. The neckline, front edges, and lower front hem were sewn, joining the outer fabric and lining (right sides together).
  4. Two internal pockets were added with hidden openings to discreetly route electronic components.
  5. Velcro was sewn inside the vest, allowing for a removable fabric panel with conductive thread.
  6. The armholes were sewn, joining the outer and lining fabric (right sides together).
  7. The side seams were sewn, connecting outer and lining layers.
  8. The vest was turned right-side out.
  9. The final opening was closed using an invisible stitch.

Final result: A fully lined vest with no visible seams, a neatly finished zipper, and two hidden internal pockets for integrating electronics.

Sewing Sewing

3D printing

To protect the sensor, I designed a custom case using SolidWorks and printed it with a Prusa MK4. In this case, I left enough space for the sensor’s pins, included an opening to ensure proper detection, and added holes for screws to securely attach the case to the vest. I also included an extra screw to allow adjustment of the sensor’s position as needed.


Imagen 1 Imagen 2 Imagen 3
Imagen 3 Imagen 2

Optical Fiber Modules

I designed modules to illuminate the optical fibers.


Imagen 3 Imagen 2 Imagen 2

Vinyl Cutting

I used textile vinyl to add my logo to the back of my vest.

I used the Roland CAMM-1 machine.

Work Parameters:

  • Pressure: 150 gf
  • Speed: 20 mm/s

I used the logo I created in week 2

  1. First, I turned on the machine.
  2. I placed the roll of textile vinyl in the machine by lifting and lowering the lever to secure it.
  3. I plugged in my USB drive, extracted my PNG image, and imported it into the program called Roland Cut Studio.
  4. I added the outline to my figure.
  5. I pressed "Origin" to have the machine size my figure.
  6. Then, the program cut the design.
vinyl vinyl vinyl

Sublimation

  1. I heated the machine to 150°C.
  2. While it was heating, I placed the design on the back part of the vest.
  3. When it reached the desired temperature, I pressed the machine down onto the design.
  4. I waited 15 seconds and then moved the press to the side.
  5. Finally, I removed the transparent layer and took out the vest.
vinyl

1. Libraries and Initial Setup

This line includes the Bluetooth Low Energy (BLE) library:

#include <ArduinoBLE.h>

These define pin numbers and settings for the LED and sensor:

#define analogPin A2
					#define ledPin D0
					#define N 5

2. LED Blinking Variables

Used to manage blinking behavior:

bool ledState = false;
					unsigned long previousMillis = 0;
					const long interval = 500;

The variable modo stores the current mode (off, blink, or sensor).

3. BLE Service and Characteristics

The BLE service and three "virtual buttons" (characteristics) for mobile app control:

BLEService ledService(...);
					BLEIntCharacteristic safeChar(...);
					BLEIntCharacteristic blinkChar(...);
					BLEIntCharacteristic offChar(...);

4. Sensor Activation Logic (10 Seconds LED On)

These variables keep the LED on for 10 seconds if motion is detected:

bool ledOn = false;
					unsigned long ledOnTime = 0;
					const unsigned long LED_DURATION = 10000;

5. Sensor Reading Functions

These functions read the sensor, convert the signal to voltage, and then to distance:

  • leerSensorPromedio() - Averages multiple readings
  • lecturaAVoltaje() - Converts ADC reading to voltage
  • voltajeADistanciaCalibrada() - Converts voltage to calibrated distance
  • promedioSensor() - Combines all the above for final result

6. setup() - Initial Configuration

Initializes serial monitor, LED pin, and starts BLE advertising:

  • Sets local BLE name to "BLE_LEDS"
  • Adds the service and characteristics
  • Starts advertising the device to be discoverable by mobile

7. loop() - Main Program Loop

Waits for a BLE device to connect. Once connected, it listens for commands and reacts accordingly.

8. manejarBLE() - BLE Button Handling

This function checks if any BLE button was pressed (on the app), and updates the current mode.

  • safeVal == 1 → sensor mode
  • blinkVal == 2 → blinking mode
  • offVal == 3 → turns everything off

9. manejarModo() - Executes Current Mode

This function performs actions based on the current mode:

  • Off: LED is turned off.
  • Safe mode: LED turns on for 10 seconds if an object is detected at 100–150 cm.
  • Blink mode: LED blinks every 0.5 seconds.

Summary

  • Uses BLE to control an LED from your phone
  • 3 Modes: Off, Blink, and Distance Sensor
  • Sensor is calibrated to detect a specific distance range
  • Great for safety/wearable projects!

Files

  • vest code
  • Conclusion

    Thinking about how to organize everything was a challenge because I didn’t know how to make it removable. I wanted the vest to be washable, so I needed to make the electronic parts removable to protect them. I also had to carefully consider the position of the sensor so it could read distance accurately. I’m happy with the result—no cables are visible, and it looks like a finished product. Everything is hidden inside the vest.

    Get in touch

    Follow