Mark Harris' Illuminated Sweater Combines the Holidays with Wearable Electronics
See how Mark Harris designed, assembled, and wove many custom PCB modules into a festive sweater complete with fun lighting effects.
The idea
Few clothing items are as festive as a Christmas sweater, so what better way is there to celebrate the season than combining blinking lights with an ugly sweater? In his latest video, element14 Presents host Mark Harris sets out to make one of his own using custom e-textile PCBs and conductive thread with the goal of showcasing fun lighting effects and rapid board assembly.
Designing the hardware
The concept relies on many small boards that each support bright RGB colors and the ability to be chained together for more complex effects. Because of these requirements and the need to keep costs low, Harris chose the ATtiny416 microcontroller IC. Each chip supports enough independent PWM channels for driving a total of four LEDs: red, green, blue, and white at varying intensities. Even better, the ATtiny416 supports single-wire programming which eliminates the need for a large ICSP or JTAG header.
PCB assembly and flashing
Harris needed a lot of boards and fast, so he turned to his pick-and-place machine which could accurately source and place the surface mount components on the panel of PCBs with far greater efficiency than doing it by hand. Once the solder paste had been reflowed, the next challenge was how to load the firmware onto each microcontroller. Attaching wires to every test point is far too tedious, so a 3D printed jig was created that holds a series of pogo-pins in place and presses them onto the power and single-wire programming test pads.
Programming
The code for this project was written with the PlatformIO VS Code extension and set of board support packages which allows people other than Harris, such as a group of girl scouts he mentors, to more easily extend the program. It starts by configuring the LEDs to only show certain colors along with selecting specific supported patterns such as fading or chained effects. Then in the main loop, it uses these flags to adjust the current colors and gather external inputs if configured. There is even a random fade function that picks a random color and duration to fade in each cycle.
Getting the sweater to work
Once Harris was confident the individual boards would work, he moved onto the final step of assembling them on the sweater. Power is delivered through pairs of conductive thread which helps to minimize the voltage drop from their high resistance. The sweater was split into three main lighting zones, with the reindeer's nose being lit in a constant red glow, its antlers in a random fade pattern, and the snowflakes near the top as a chasing white effect thanks to the extra input/output pins for synchronizing patterns across multiple modules.
Future plans
As Harris states in the video, the sweater turned out great, but there were a few areas he could focus on improving in a later iteration. Primarily, he found the simple in/out communication scheme to be too primitive, so the next version would support UART across all modules for individual, addressable control over the colors and brightness. To see more about the process of building this festive LED sweater, you can watch Harris' video here on the element14 Presents YouTube channel.