“Hi everyone, in this Instructable I’m going to show you how to make an animated face mask using WS2812b LEDs (Aka Neopixels). That description doesn’t really do it justice, so go check out the video above! Please note that many of the animations use randomly chosen colors, so you’ll get different effects each time. I thought this would be fun to wear around during the current pandemic while also helping to keep other people safe. The mask fully covers your mouth and nose and while remaining easy to breath through. Obviously it’s not medically rated, but it should capture any moisture you exhale, and so should be safe to wear while out and about. Just to be certain you are keeping yourself and others safe, I suggest wearing a normal cloth mask underneath mine. This also helps keep the mask clean, as you’re basically limited to lightly soaking the back of the mask with soapy water otherwise (or using a UV light for straight disinfection).
I should also add that the LEDs are not super visible in direct sunlight, but they certainly are in any shade or indoors.
The mask uses 104 WS2812b LEDs, assembled from sections of commonly available 144 LEDs/m LED strip. WS2812b’s are individually addressable, meaning that you control the color of each led. This lets you create almost any effect you can imagine (as long as you can code it). If you’re not sure what effects you might like, or don’t want to write a bunch of code, don’t worry; I’ve written code to control the mask, including 41 different effects, which you can control using a series of buttons. The LEDs are controlled using a Wemos D1 Mini, an Arduino compatible micro-controller featuring an ESP8266 as the processor. This gives you plenty of memory and power to run as many effects as you’d like. It also gives you access to WiFi functionality (although not currently implemented in my code). The mask is powered externally via a 1S LiPo cell. Although the mask can run for a long time on just one cell, by keeping the cell external, you can easily swap in a fresh one. The all the components are mounted on custom PCB’s (except the LED strip).
You have two options when assembling the mask controller:
1. Follow the steps in this Instrucable using a few separate PCB’s all designed by me. You will have to do a bit of soldering to wire everything together.
You can find all the PCBs here (Click on the link in Github and there should be a download button on the right hand side):
https://github.com/AlbertGBarber/General-PCBs/tree… (Use 3v3 Reg version)
and the 3D Printed parts here:
https://github.com/AlbertGBarber/Pixel-Mask/tree/m… (Use V1 Box Parts)
2. Use a single, all-in-one PCB designed by me to mount all the components. This is easier to assemble than option 1, but I have not tested the board myself. I designed the board after assembling the original mask. I have not built another one, and so I have not tested the board. That said, it is essentially just a combination of the boards from option 1, and so I’m very confident it will work without any issues. It will also give you the option of adding a MAX4466 mic (for audio reactive effects) and a HC-05 Bluetooth breakout board, although my code currently doesn’t incorporate either of them. I do not have assembly pictures for you to follow for this option, but the steps mostly match option 1, and I will add notes for option 2 when needed.
You can find the PCB here (Click on the link in Github and there should be a download button on the right hand side):
and the 3D Printed parts here:
https://github.com/AlbertGBarber/Pixel-Mask/tree/m… (Use V2 Box Parts)
Regardless of which option you choose, both boards will require some SMD soldering, but nothing smaller than 0805, which can be soldered by hand with a fine-tip iron. Finally, you will need access to a 3D printer to make a few mechanical components.
I recommend reading through the whole Instrucable to familiarize yourself with the steps and components. This is especially true for option 2 as you’ll have to rely on my notes over pictures.
One note: the mask is powered using an external LiPo battery. These batteries can be dangerous if miss-treated. If you do not have any experience with LiPo’s I recommend you do some research into them before attempting this build.
If you have any questions, please leave a comment, and I’ll get back to you.
(You might be able to find most of the parts for lower cost at places like Aliexpress, Ebay, Banggood, etc)
If you’re building option 1 you need to order two PCBs: One Wemos LiPo Charger Combo board and one Triple Flat tactile button board. You can find both these at the Github links above.
If you’re building option 2 you just need one PCB: a Wemos LiPo Button Combo board. You can also find it using the Github links above.
If you’ve never ordered a custom PCB before, it’s easy. I briefly go over it in Step 2 of one of my other Instrucable here. As with that Instrucable, all the ordering defaults should be fine for this project.
For Either Option:
Three 6x6x9mm Tactile Push-Buttons: Found Here
One JST-XH 2.5mm 2 Pin Male Connector: Found Here
One JST-XH 2.5mm 3 Pin Male Connector: Found Here
Five JST-XH 2.5mm Crimp Terminals: Found Here
2.54mm Male Headers (can probably improvise with what comes with the Wemos)
One 19 x 6 x 13 Slide Switch (these are pretty common, the actuator should be 4-5mm long): Found here or here
Three SMD 0805 1k Resistors: Found Here
Three SMD 0805 1uf Capacitors: Found Here
Three SMD 0805 100k Resistors: Found Here
One Wemos D1 Mini V3: Found Here
One TP4056 LiPo Charger: Found Here
22Ga Silicone Wire in Various Colors: Found Here
One (or more) 1S LiPo Battery(s). The capacity is up to you, but I’d recommend 850mah as a minimum. You can buy the one I used here. If you buy a different pack you’ll have to also design a strap mount to attach it to the mask.
One Female Connector that matches your LiPo’s output connector. It’ll probably be a red JST connector: Found Here
For Option 1:
One JST-XH 2.5mm 2 Pin Female Connector: Found Here
One JST-XH 2.5mm 3 Pin Female Connector: Found Here
For Option 2:
One Right Angle JST-XH 2.5mm 2 Pin Female Connector: Found Here
One Right Angle JST-XH 2.5mm 3 Pin Female Connector: Found Here
One Airsoft Mesh Half Mask: Found Here
~40mm of 10mm Dia. heat shrink (any color, optional)
~40mm of 3mm Dia. heat shrink (any color, optional)
One 8mm M2 Screw
300 x 600mm (1x2 Feet) of 2mm LED Foam (Plastazote): Found Here or here or here (US seller). This goes in the front of the mask to diffuse the LEDs. LED foam is great for diffusing, but it can be difficult to find, so shipping may be expensive depending on where you are. As an alternative you can probably use felt or other fabrics with similar results, but be sure to test it first. Helps if it’s easy to cut with scissors.I encourage you to experiment, you might find something that works even better than mine.
300 x 600mm (1x2 feet) of dark cloth. I don’t have a link for this as I don’t remember where I bought it. This is to cover the back of the mask. Any thin fabric should do. Helps if it’s easily cut-table with scissors.
3D printer + 1.75mm filament
Hot Glue Gun + Hot Glue
Crimper for JST terminals: Found Here
Soldering iron w/ fine tip
Small needle-nosed pliers (like for bead work)
Tweezers (for SMD placement/soldering)”