The thought
Few clothes objects are as festive as a Christmas sweater, so what higher method is there to have fun the season than combining blinking lights with an unsightly sweater? In his newest video, element14 Presents host Mark Harris units out to make one in every of his personal utilizing customized e-textile PCBs and conductive thread with the objective of showcasing enjoyable lighting results and speedy board meeting.
Designing the {hardware}
The idea depends on many small boards that every assist brilliant RGB colours and the power to be chained collectively for extra advanced results. Due to these necessities and the necessity to maintain prices low, Harris selected the ATtiny416 microcontroller IC. Every chip helps sufficient impartial PWM channels for driving a complete of 4 LEDs: crimson, inexperienced, blue, and white at various intensities. Even higher, the ATtiny416 helps single-wire programming which eliminates the necessity for a big ICSP or JTAG header.
PCB meeting and flashing
Harris wanted a lot of boards and quick, so he turned to his pick-and-place machine which may precisely supply and place the floor mount elements on the panel of PCBs with far higher effectivity than doing it by hand. As soon as the solder paste had been reflowed, the following problem was tips on how to load the firmware onto every microcontroller. Attaching wires to each take a look at level is way too tedious, so a 3D printed jig was created that holds a collection of pogo-pins in place and presses them onto the facility and single-wire programming take a look at pads.
Programming
The code for this venture was written with the PlatformIO VS Code extension and set of board assist packages which permits folks aside from Harris, comparable to a bunch of woman scouts he mentors, to extra simply prolong this system. It begins by configuring the LEDs to solely present sure colours together with choosing particular supported patterns comparable to fading or chained results. Then in the primary loop, it makes use of these flags to regulate the present colours and collect exterior inputs if configured. There’s even a random fade perform that picks a random colour and period to fade in every cycle.
Getting the sweater to work
As soon as Harris was assured the person boards would work, he moved onto the ultimate step of assembling them on the sweater. Energy is delivered by means of pairs of conductive thread which helps to attenuate the voltage drop from their excessive resistance. The sweater was break up into three primary lighting zones, with the reindeer’s nostril being lit in a continuing crimson glow, its antlers in a random fade sample, and the snowflakes close to the highest as a chasing white impact due to the additional enter/output pins for synchronizing patterns throughout a number of modules.
Future plans
As Harris states within the video, the sweater turned out nice, however there have been a number of areas he may deal with bettering in a later iteration. Primarily, he discovered the easy in/out communication scheme to be too primitive, so the following model would assist UART throughout all modules for particular person, addressable management over the colours and brightness. To see extra concerning the strategy of constructing this festive LED sweater, you possibly can watch Harris’ video right here on the element14 Presents YouTube channel.