Making a Lytian Emotion Mask, part 1

Earlier this year, I dreamed up a species of sci-fi aliens called Lytians who don’t have eyes or even faces. This is quite the communication barrier when interacting with species who use facial expressions to communicate. So the Lytians invented cybernetic masks that display their emotions in real time. Of course, not having eyes means their sight-related tech is far behind the rest of their Faster-Than-Light civilization.

These masks are primitive, using simple colored pixels to display low-resolution faces in one or two bright colors. They’re very cute, in my humble opinion, and very feasible to create using 2020 Earth technology like LEDs.

I decided to make a Lytian mask for myself to wear at furry conventions, and as a fun exercise to grow my programming and engineering skills.

And I’ll be documenting and sharing my process, in case it inspires or helps others with their own fun projects.

Step 1: Research and Shopping

First, I measured my real face, counted the rows and columns of pixels on the Lytian mask (28x26), and calculated how many LEDs per meter I would need to recreate the mask. The answer was somewhere around 124 pixels per meter. I wasn’t limited to that exact number, since I could always make new pixel-faces to match whatever pixel density I ended up with.

Then I searched for matching LED strips, which needed to be individually-addressable so I could control each LED’s color on the fly. I avoided LED matrix panels, since even the flexible ones can only flex in one dimension and I didn’t want the mask to look like a half-cylinder on my face, sticking out past my jaw on both sides. I want it to be naturally rounded like a real face. Additionally, LED panels are not transparent at all, so I’d either be blind while wearing the mask or I’d need to install an elaborate and expensive camera/screen system. That might be the right call for a large fursuit head, but it wasn’t a good fit for my low-profile mask plans.

I found a lot of great LED strips built on the WS2812 standard, aka NeoPixel, but most of them were too wide to be able to lay side by side and form an even grid of equidistant pixels. But one kind of strip was not only narrow enough to make a great grid, it even left some space between each strip for me to see through! That strip was Adafruit’s Ultra Skinny NeoPixel 1515 LED Strip, which is just 4 millimeters wide and 150 LEDs per meter. It’s seriously tiny! Sadly, those strips are pricier than the basic NeoPixel strips, and buying enough for the ~720 pixels I had in mind totalled to over 75% of the cost of the mask.

Before buying them, I made a really rough circuit diagram to help figure out how I would use this width of strip.

The black bars represent the LED strips, which are 4mm wide, and the gaps between will be 2.67mm wide (since the LEDs are 6.67mm apart on the strip). I plan to make a paper mockup to make sure I can see through such a gap before I actually start constructing the mask and cutting into the LED strips.

The red line represents both Power input and Ground, which can connect anywhere along each strip, and the green line is Data, which will need to zig-zag and connect all the strips into one long string.

Next, I had to search for a microcontroller (a tiny computer) that could control hundreds of LEDs and fit on my body somewhere while I wear the mask. I picked one that looked like it might work, asked for advice about it on the Adafruit forums, and got a helpful response right away. It turned out that the one I had been looking at was a bit too weak for what I wanted to do, so I upgraded to the ItsyBitsy nRF52840 Express, which has 256kb of RAM (the standard Arduino microcontroller has just 2kb). It also has Bluetooth built in, so I can control my mask’s facial expressions with a phone. And somehow, this powerful and tiny machine is only $18USD. Microcontrollers are amazing, and they’ve improved exponentially in recent years.

I ordered from Adafruit:

Because of the Lithium battery, the whole package had to travel by UPS Ground. And while I waited for it to arrive, I moved to my next phase.

Step 2: Learning and Making Tools

I knew I needed a way to get pixel art faces into the microcontroller to display on the LEDs, so I fired up Excel and made a 26 by 28 grid, entered numbers in the cells based on the colored pixels (1 for the primary color, 2 for secondary), and used Conditional Formatting to make it look somewhat like a picture instead of data.

Kinda cute, right?

A single face staring straight ahead wouldn’t make a great demonstration, so I made some variations too (I eventually want to be able to switch eye direction on the fly with every different facial expression, and maybe add automatic blinking to make it really feel alive):


Then, using some Excel wizardry, I made a tool that converts those little faces into huge blocks of hexadecimal color codes (like 0xbc169a), ready to paste into my mask’s code.

Sorry about that nightmare-fuel number-face at the bottom there ;)

While my parts were on their way from New York, I also took the time to read a bunch of awesome guides and watch videos about other people’s LED projects. This Disco Band Camp Jacket project happened to match my LED and software plans perfectly, and this NeoPixel Infinity Mirror Coaster uses the same hardware and wiring setup as me, so I owe those guide-creators a ton. Finding examples of displaying pre-set images on a grid was more difficult, but I pieced together what I needed from some reddit posts and the FastLED examples included with the code library.

Step 3: Connecting

My shipment finally arrived (I wish I had paid for faster shipping), and I started by getting the microcontroller talking to my desktop PC and testing the components. I also got distracted for a couple hours because Adafruit threw in another microcontroller in my order for free, a colorful Swiss-Army-knife of a board called the Circuit Playground.

After a bit of flailing around, I got the ItsyBitsy connected to my PC (in Arduino mode rather than the simpler CircuitPython option, since I plan to use the Arduino-specific FastLED code library). Then I hooked up one of my 75-LED strips to it and ran some example code on it just to prove the LED strip was working. The lights all blinked in sequence, and my color and brightness code tweaks worked!

Then came the scary part: soldering. I haven’t soldered anything since I modded my Xbox (not a 360 or One. I mean the original Xbox. It was a long time ago…), and I was definitely rusty. But over two evenings I got everything soldered together without ruining anything, at least not permanently. I had to un-solder the wires from the ItsyBitsy, since the way I did it made it really hard to swap in LED strips for testing. Doh!

But here’s a photo of the fixed setup:

The yellow and silver block at the top left is the battery, which charges through the silver port on the front edge of the ItsyBitsy. That’s it on the right, sitting in a bread-board so I can easily connect wires to it without further soldering. The black thing on the left is a simple power switch, and it connects to the backpack (the smaller blue chip in the center). And there’s a US quarter for scale. This stuff really is itsy bitsy :)

And here’s one strip of 75 LEDs, still curled up since I don’t want to stress them more than necessary:

Well, I proved the parts all worked, and that I could put code on them, but now what?

Step 4: Programming part 1

You know how I mentioned Arduino and CircuitPython earlier? And that free Circuit Playground Express I got? Well, I learned that experimenting with CircuitPython code on the Circuit Playground is super easy and lightning fast. I can make a change, hit Ctrl-S, and see the pretty lights reacting immediately. With Arduino code… not so much.

Not only is the Arduino code pretty picky (it’s built on C/C++), but each change requires a multi-step process to upload onto the board, and it takes a minute or so every time; not ideal for a newbie like me just trying to figure things out through experimentation. I also didn’t want to cut into my LED strips and solder them into an array just yet, so I had no good way to see my code in action.

That’s why I sought out an emulator that would simulate a microcontroller and a grid of LEDs. That emulator is Wokwi’s NeoPixel Matrix Playground, and it’s a complete lifesaver. With its help, I was able to experiment with my code, learn from my many mistakes (C++ is not a forgiving programming language, especially regarding variable and memory use), and finally get an actual face displaying and animating.

Sadly, the memory on that emulator is based on the pitiful 2kb RAM Ardiuno, so I wasn’t able to reproduce my full desired setup, but I managed to get a 22x22 grid working and that was good enough for the proof of concept.

Ta-da! Here are 2 of the 3 faces I loaded into it. It cycles through them every second or so:

Now I was on a fruitful path towards making a real functional mask, but of course, there were more obstacles in my way, including one big hardware-related roadblock. Tune in next week for that story!