Prototyping An LED Quilt With My Mom

My mother is an amazing quilter, and as a long time admirer of LED art, I've wanted to collaborate and get some LEDs inside one of her quilts. Inspired by all the cool stuff I saw at the Hackaday Superconference and the fact that my mom just learned she'll be the featured quilter in a big show, I decided it was finally time to get started. So we did some prototyping!

a blinky blinky thing and some diffuse light coming through fabric

Goals

Inventory

The process

A basic test

The absolute first thing was to make sure this could be cool in the first place - which was not too difficult of a test - but to basically put some LEDs behind some fabric and see if it looked OK.

There's a number of questions here, because as it turns out, like everything, quilts are not so simple. There's the top layer, a collection of different colors and fabrics, the batting, which also has a wide variety of weights and thicknesses. The tightness of how pushed down the fabric is against the lights plays a role as well - all impacting the end effect. It was immediately clear there would be an overwhelmingly huge number of effects that could be done so we started basic.

We turned on the most simple lights I brought (the basic strip LEDs) and got to putting it behind various fabrics and batting. On initial investigation - the thick wool batting had the most diffusion, which we generally thought looked the best.

Here, without the batting, the dots of the lights are very obvious. This could be nice for certain effects, perhaps especially when animation is involved.

a
a combination of some dotted lights in red fabric and more diffuse white fabric

With the batting though - it's easy to get a beautiful glow.

a
a beautiful patterned backlit triangle

So in the first few minutes - we knew we were on to something potentially very cool. First goal accomplished!

☑️ Definitely got a sense that LEDs could look cool in a quilt!

Wiring up the cool shapes

Next came hooking up the adafruit neopixels. Things got a little trickier here.

Pretty much every single time I try to do something with electronics - I come across an annoying situation where having a very specific small tool makes a huge difference, and this was no exception. The problem came up with figuring out a nice way to connect the neopixels to the board.

Connecting wires to the 'jewel' and the 'ring' was easy enough, but connecting those wires to the board where I ran into trouble. Using a bread board, there's no problem, but my hope was to make this as easy as possible for my mother, who has no experience with electronics. The badge itself has standard pins on it, and it also has what should be really nice connection points. From the website:

On the bottom are two connectors labeled D2 and D3. These are 3-pin JST digital or analog connectors for sensors or NeoPixels. These pins can be analog inputs or digital I/O.

It should be so perfect! They designed the board for pretty much this exact use case. Unfortunately, those connections are STEMMA - something I'd never heard of. As it turns out, this is some sort of specific connection standard - which of course I didn't have. Luckily (I thought) there is a great electronics nearby so I took the 20 minute drive over there... and they didn't have them. STEMMA - from what I can tell - seems to be pretty new and something Adafruit came up with - so upon further thought it wasn't so surprising the electronics store didn't have it. So using the nice connections on the board was not an option.

In order to get the neopixel boards to work, they need to be hooked up to VCC (power), a GND (ground), and one of the D (digital out) pins. These are all on the back of the board, and not next to eachother, so it's an annoying and difficult experience hooking and unhooking them. I wanted my mom to be able to use it when I wasn't there, so the best I could think of to have a reasonably nice experience was to make breadboard compatible connectors (which I did have the materials for), stick a small breadboard on, and wire the power and pinouts around from the back:

the
the end wiring of the board

In order to make it as smooth for my mother as possible, I included some instructions:

the
the guide for my mother to use it

After walking through it - she seemed more than capable of hooking up the lights herself. I'll add - this is important so she can try sewing the boards inside - which is much easier when they're not attached.

☑️ Kinda made it easy to use (but not as much as I would have liked.)

Making sick animations

Finally, with everything wired, I got to focus on trying out different lighting and animations! This is really the fun bit- and writing code for the Edge Badge is a great experience. It came with circuit python - which not dealing with C++ or the Arduino IDE. It's extremely simple to get started with.

When you plug the badge, into the computer, you it just like a USB drive, and running the code is as easy as copying a code.py file onto the drive. As soon as you do so, the board handles compiling and running the code (this is a bit slow, which was annoying, but overall an amazing experience). On top of that, Adafruit provides really nice high level libraries for interacting with the board.

Getting the built in lights on the board to light up is as easy as copying this as code.py onto the drive:

from adafruit_pybadger import PyBadger

pybadger = PyBadger()
board_pixels = pybadger.pixels

RED = (255, 0, 0)
NONE = (0, 0, 0)    

def fill_pixels(color):
    for i in range(len(board_pixels)):
        board_pixels[i] = color

ON = False

while True:
    if ON:
        fill_pixels(RED)
        ON = False
    else:
        fill_pixels(None)
        ON = True

    time.sleep(1)

There are similarly nice libraries for both interacting with the buttons and the OLED screen. By the end of the evening, I was able to program a selection menu with a choice of many animations:

Check it out in action:

You can see the full code in this gist.

☑️ Had a lot of fun with the cool new hardware!

A big success!

And here's what some of the animations look like in fabric.

Looking ahead

Hopefully my mom can play with the lights behind more different fabrics and with different diffusions.

I'm hoping that will give her some ideas about what's possible. I'm not sure what will happen then, but in any case - I hope to track it here.