Neopixel LED Face Mask

29,482

289

52

Introduction: Neopixel LED Face Mask

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)

https://github.com/AlbertGBarber/General-PCBs/tree...

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):

https://github.com/AlbertGBarber/General-PCBs/tree...

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.

Supplies:

(You might be able to find most of the parts for lower cost at places like Aliexpress, Ebay, Banggood, etc)

PCBs:

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.

Electronic Parts:

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 or a similar one 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

Other Parts:

  • 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.

Tools:

  • 3D printer + 1.75mm filament
  • Hot Glue Gun + Hot Glue
  • Wire strippers
  • Wire cutters
  • Crimper for JST terminals: Found Here
  • Heat gun
  • Soldering iron w/ fine tip
  • PH0 screwdriver
  • Scissors
  • Small needle-nosed pliers (like for bead work)
  • Tweezers (for SMD placement/soldering)

Step 1: (Optional) Some Design Notes

These are just some notes on the general design of the mask. Reading this step is optional.

  • As with all my Instrucables, I wanted to the mask to be fairly easy to assemble, so I mostly tried to use readily available, through-hole parts. After assembling the first mask using a few of my own PCB's, I thought the assembly was a bit too fiddly, and so I designed an all in one PCB to make it easier. However I didn't want to build a whole new mask, and so I don't have pictures using the all-in-one PCB. Hopefully my notes in each of the steps will be enough for everyone.
  • If you'd like to tweak/view any of the PCBs you can find them here, here, and here
  • Currently, when it comes to controlling WS2812b LEDs, it's hard to beat esp8266's because they feature far more memory and processing speed than most common Arduino boards, while also being very inexpensive. As a bonus you also get the possibility of wifi.
  • From the set of common esp8266 breakout boards, the Wemos D1 Mini is my favorite due to its size, availability, ease of programming (it features a ch340g usb to serial chip, so you don't need a boot button for programming) and cost.
  • The Wemos is a 3.3 volt device, while WS2182b's are 5 volt. In general, this means that you need a logic level converter(LLC) to communicate between the two. However, I have found that you can power both using a 1s LiPo battery (4.2 Volts, 3.3 volts nominal) without the need for an LLC. This is great because LiPo's are ideal for portable devices.
  • My previous Instrucable used an external power bank as it's power source. This was because there was not enough room for an LiPo on the shades. On the other hand, the mask's straps have plenty of space, so mounting a LiPo was not a problem. This is better because it keeps the mask as an all-in-one package.
  • The LiPo is charged using a TP4056 breakout board. I use these all the time as they are cheap, common, and offer a decent 1A charging current.
  • Each of the mask's three buttons have a debounce circuit. Theory on the circuit can be found here. I could have just debounced in software, but I decided it was easier to add a couple of components, and then not have to worry about it at all.
  • I used silicone wire for most of the wiring on the mask. Silicone wire is more flexible than standard wire, and should withstand any repeated flexing from taking the mask on/off. Eventually it will probably fail, but this may be after many thousands of flexes.
  • Rather than wire together a bunch of individual LEDs, I used LED strip. Not only does this save on wiring, but it also ensures than the LEDs are evenly spaced. I tried to cram as many LEDs as possible into the mask so I went with the highest density WS2812b LED strip available (144 LEDs/m). However, the strips do need some space around them to conform to the mask properly. The result is that the LEDs are spaced out more horizontally than vertically. This does mean that some animations appear stretched, but overall it's not a huge issue.

Step 2: Mask Assembly Step 1: Add a Diffuser to the Mask

Remove the straps attaching the mask harness to the mask body (you may want to take a picture of the strap setup so you can re-attach it later).

Place the mask on you face as if you were wearing it. Bend the mask so that it conforms to your face's shape comfortably.

Take a section of whatever diffusing material you've chosen (LED foam, felt, cloth, etc) and glue it to the outer rim of the mask. You'll need to push the diffuser into the mask and probably trim it in certain places to get it to conform the the mask's shape. The closer you can get the material to the mask's outer mesh the better. Be especially careful of the nose area; you want to get the material as deep as possible to ensure there will be enough room for your nose once the mask is finished.

Your choice of glue will depend on your diffusing material, but hot-glue worked fine for me. I recommend only gluing around the outer rim of the mask, not to the mesh directly.

Once the glue is dry, trim away any excess material from the edge of the mask with scissors/hobby kife/etc. The end result should be similar to mine as shown in the image above. Note that the edge around the mask does not need to be super clean, as long as it still conforms to the mask's shape; you'll be covering all this up with more fabric later anyway.

Step 3: Mask Assembly Step 2: Cut the LED Strip Into Sections

Cut the LED strip into sections as shown in the image above. Cut the strip along the contact areas between the LEDs. Be sure to cut them evenly so that you have enough room to solder onto the remaining pads.

You should have 12 sections in total:

  • Two 5 LED long sections
  • Four 7 LED long sections
  • Two 9 LED long sections
  • Two 11 LED long sections
  • Two 13 LED long sections

For a total of 104 LEDs.

Step 4: Mask Assembly Step 3: Solder the LED Strip Sections Together

Arrange the LED strips as shown in the image above. For WS2812b LEDs, data only flows in one direction, with each LED passing data to the next LED in line. This means that the orientation of the strip sections is very important. If you do not orient them correctly data will not be able to flow. Make sure to match the orientation shown in the the image above.

This step is the same for both options 1 and 2.

Leave about a 5mm gap between each strip as shown in the image above. Solder 22Ga wire sections to join the strip sections together. These are for power distribution, we'll do the data wires in the next step. You do not have to follow what I've done in the pictures exactly, as long as each section is connected to power and ground.

Step 5: Mask Assembly Step 4: Add Data Wires to the Sections

Flip the strip sections over and solder data lines between each section using 22Ga wire. Use the images above as a guide. Data lines should be added such that data flows out of one section and into the next in a zig-zag pattern. If your strip has adhesive backing you'll need to remove a section of it using a hobby knife in order to solder on the the strip's pads.

This step is the same for both options 1 and 2.

Make sure to tin the pads before soldering, this helps a lot, as the pads are fairly small. Try to avoid heating the strip for too long to avoid potential damage to the LEDs.

(Optional) At this point you should test the strip to ensure it works properly. Skip to Mask Assembly Step 6 and add the data input wire. Then continue on and build the controller. Test the strip and return here to finish the mask assembly.

Step 6: Mask Assembly Step 5: Glue the Strip Sections to the Mask

Glue the strip into the mask. Make sure the orientation is correct; data should flow from left right (when viewed from the front). You need to bend the strip sections to make them conform to the mask's shape. The exact position is up to you, but don't put the strips too high, or they'll push into your nose.

Use hot-glue to secure the strip in place. You should remove the paper covering any adhesive backing before gluing.

Finally, add a ground and positive wires running from one side of the mask to the other as pictured. This is to ensure a steady voltage across all strip sections.

Step 7: Mask Assembly Step 6: Attach Power/Ground/Data Input Wires to the Strip

Cut three 28cm long sections of 22Ga silicone wire. These wires will connect the strip to the control box and will flex repeatedly when the mask is put on/off. Silicone wires should last much longer than normal wires. The colors are up to you.

Solder these wires to the first (right-most) strip section of the mask. You should attach one wire to the ground, positive, and data pads. The data wire should be attached to the first pad of the first section. Be sure to tin the pads first before adding the wires. Be careful when soldering, you'll likely heat up any hot glue in the area, which can make soldering difficult.

After the wires are attached secure them with hot glue. Be liberal; you want to avoid any of the solder joints flexing directly.

Using a crimping tool and crimp connectors, add a 3 pin JST-XH male connector to the other end of the wires. The order should be positive, data, ground. See the images above. You can also add some heat shrink to help keep the wires together.

For option 2, the JST-XH order is reversed, so it should be ground, data, positive. If you get it wrong it's not a big deal, you'll just have to re-do the JST connector by removing the pins.

Step 8: Mask Assembly Step 7: Attach Cloth Backing to the Mask

Similar to Mask Assembly Step 1, glue a cloth backing to the mask to cover up the LED strip. Any thin, light fabric should work. You want to be able to breath through it easily.

Like with Step 1, try to conform the fabric as best you can to the inside of the mask, then glue it into place with the glue of your choice (hot glue again for me). Finally, trim off any excess fabric around the edge of the mask. This is the last layer, so the neater the better.

Step 9: Controller Assembly Step 1

Grab the Wemos D1 Mini LiPo Combo Board (see pictures). Flip the board over and find the VIN, D5, D6, D7, and D8 jumper pads. Leaving these pads empty allows you to use a logic level converter and 3.3V regulator to power the LEDs, but we don't need to use either of these for this project. Bridge each of the pads with solder as pictured.

Next, cut three 55mm lengths of 22Ga wire. Solder these to the three pads on the left side of the board. Makes sure the wires are on the Wemos side of the board as pictured. These wires will eventually be connected to the power switch.

Please note that the Wemos LiPo Combo Board is a general PCB that I use to mount Wemos D1 Minis. It has a number of optional components that we don't use, so don't worry if it seems like you're missing parts at the end of the assembly.

If you're doing option 2, skip this step.

Step 10: Controller Assembly Step 2

Cut two ~45mm lengths of 22Ga wire. Using two colors will help keep things orderly. Next, strip and solder each of the wires to the VIN +, - positions on the Wemos LiPo Combo board, as pictured. Note that I attached one wire to the top of the board, and one wire to the bottom. This helps keep the bottom of the board less crowded.

Next, solder the two wires to a female 2 pin JST-XH connector as pictured. Pay careful attention to the connector's orientation! It should be oriented with the open side of the connector facing the bottom of the PCB (side with the LLC and VIN jumpers) and the wires should be connected such that the negative wire is closest to the PCB. This will be the connection to the LiPo battery.

Optionally you can add some 3mm heat shrink to shield the connections to the JST.

If you're doing option 2, solder the 2 pin, right angle JST-XH connector to the board (ignore the solder pads under the connector). Make sure it is on the side with the TP4056 and buttons.

Step 11: Controller Assembly Step 3

Cut two 55mm and one 35mm lengths of 22Ga wire. Use three colors if possible. Strip and solder the two 55mm lengths to the D8 pin and a ground pin as pictured. Strip and solder the 35mm length to large pad on the right side of the board closest to the "ON" silkscreen label. The side of the board (top or bottom) that the wires are on doesn't matter.

Solder the three wires to a 3 pin JST-XH female connector. Just like with the 2 pin connector, orientation is critical. As pictured, the connector should be oriented such that its open face faces the bottom side of the PCB (side with the TP4056 and LLC jumpers). The ground wire should be connected to the pin that is closest to the PCB. The wire connected to D8 should be connected to the middle pin. Finally the positive wire should be connected to the outer pin. Optionally you can use 3mm heat shrink to shield the connections. This connector will be used to pass power and data to the mask LEDs.

If you're doing option 2, solder a 3 pin right angle JST-XH connector to the PCB in the appropriate place. It should be on the same side as the 2 pin JST connector.

Step 12: Controller Assembly Step 4

Get the triple button PCB. Using clippers, cut two of the mounting legs off the PCB as pictured. Next, solder three 0805 1k, and 100k resistors and three 1uf capacitors to the bottom of the PCB as indicated. These added components create a de-bounce circuit for the buttons. Finally, solder three 6x6x9mm tactile switches to the top of the PCB.

If you're doing option 2, do the same steps as above, but attach the components to the Wemos Button Combo PCB instead. The buttons should be facing the side with the JST connectors.

Step 13: Controller Assembly Step 5

Cut five lengths of 22Ga wire: three ~20mm lengths and two ~25mm lengths. At least the two 25mm lengths should be different colors.

Now we're going to connect the pushbutton PCB to the Wemos Combo PCB.

Begin by soldering the two 25mm lengths of wire to the 5V and G pins of the pushbutton board. Then solder the other ends to VCC and GND pins on the Wemos Combo board. 5V should be connected to VCC and G connected to GND.

Next solder the three 20mm lengths of wire to the K1, K2 and K3 pins on the pushbutton PCB. Then solder the other end of the wires to pins D5, D6, and D7 on the Wemos Combo Board, as pictured. The connections should be: K1 to D5, K2 to D6 and K3 to D7. If you switch them around it's fine, but you'll have to change a few lines of code later.

If you're doing option 2, skip this step. The buttons are already wired on your PCB version.

Step 14: Controller Assembly Step 6

Do this step for both assembly options 1 and 2.

Solder male 2.54mm headers to the Wemos Combo PCB for the Wemos D1 Mini and the TP4056 as pictured. You may want to use the Wemos and the TP4056 to help align the pins. Trim off any excess pin lengths.

Step 15: Controller Assembly Step 7

Do this for both options 1 and 2.

Before you do this, you should confirm that you can program the Wemos, and that it's working correctly.
Begin by following the instructions here to install the ESP8266 core for the Arduino IDE.

This allows you to program the Wemos as if it was an Arduino. Once installed open the IDE and connect the Wemos to your computer using a micro-USB cable. Under tools->board, select "LOLIN(WEMOS) D1 R2 & Mini". Also select the port the Wemos is connected to under tools. Try uploading blink (or your own favorite test program). If everything's OK, the Wemos's LED should start blinking once a second.

Press the Wemos D1 Mini and TP4056 onto their respective male headers. Solder them in place. Trim off any excess lengths of pins.

Step 16: Controller Assembly Step 8

Solder the three wires you attached in Controller Assembly Step 1 to the slide switch tabs. Make sure the order of the wire ends attached to the switch matches the order that they are attached to the pads on the Wemos Combo PCB (the middle one is the most critical to match correctly, everything will still work, if you switch the outer wires).

If you're doing option 2, you should mount a 3 pin male 2.54mm header to the area labeled "Switch". Mount it so the long legs are on the side with the TP4056.

Step 17: Controller Assembly Step 9

Using a 3D printer, print out each of the parts found at:

https://github.com/AlbertGBarber/Pixel-Mask/tree/m...

You'll need to print out a few copies of "Strap Cable Guide.stl"

Depending on your battery mounting method (see Final assembly Step 1) either print two

"Battery Strap Mount V2.stl"

or

print two "Battery Rear Strap Mount pt 1.stl" and one "Battery Rear Strap Mount pt 2.stl"

or

If you're using a different battery, then you'll have to design your own strap mount.

if you're doing option 1, print out "Box V1"

If you're doing option 2, print out "Box V2"

Print three copies of the button caps for both options.

Step 18: Controller Assembly Step 10

Place all the electronics in the control box as pictured. Make sure you align the USB ports of the TP4056 and Wemos D1 Mini with the corresponding holes in the box. The JST connectors should slide into tabbed mounts. There are a couple of domed pegs for the slide switch to rest on.

Use hot glue to secure everything in place except the pushbutton PCB.

Attach the lid to the box using a length of 1.75mm filament as a hinge pin.

Press the button caps onto the pushbuttons. Using the lid, offer-up the lid holes with the button caps.

Once it's offered-up, glue down the pushbutton board.

If you're doing option 2, your box and board will look a bit different, but you should be able to insert the board into the box without issue. As above, secure it with hot glue. You'll need to slip the slide switch into position on the male headers you attached in the last step.You should cover up the pads below the switch with a bit of tape to avoid shorting to the switch's case.

Step 19: Controller Assembly Step 11

Glue the "Wemos Box Strap Mount" to the control box as pictured. Make sure you leave a gap at the bottom the insert the strap.

Step 20: Controller Assembly Step 12

Create an adapter between you're LiPo's output connector and the control box's JST-XH input connector. Use 22Ga silicone wire and crimp terminals. In my case my LiPo has a red JST connector, so I used the female version for my adapter. The adapter doesn't need to be very long, just a few cm's.

Make sure you pay attention to the connector's orientation. Positive should connect to positive, and ground should connect to ground. This is very important, you do not what to short out your battery!

For option 2 the positive and ground connections to the JST-XH connector should be reversed from the image above.

Step 21: Final Mask Assembly Step 1

Do this for both options 1 and 2.

Slide three "Strap Cable Guides" along the lower right strap of the mask's head harness. Run the cable coming out of the mask through each guide. This helps keep the cable in place.

For the battery, you have two options:

1: Slide two "Battery Strap Mounts" along the lower left strap of the mask's head harness. Then slide you LiPo into the mounts.

2: Glue a pair of "Battery Rear Strap Mount pt 1"'s to a "Battery Rear Strap Mount pt 2", as pictured. we'll attach it to the harness in the next step. Using this option may help reduce wear on the harness's elastic straps.

Reattach the harness to the mask front.

Step 22: Final Mask Assembly Step 2

Attach the control box to the mask's head harness as pictured. The main harness strap should slip into the control box's strap mount hooks.

Secure the control box's lid with an 8mm M2 screw.

If you're mounting the battery on the large rear strap, hook the mount onto the strap just like the controller.

Slide the LiPo into the battery mount.

To connect the LED strip to the controller, insert the the 3 pin male JST connector into the corresponding 3 pin port on the control box. Make sure your wiring is correct; positive to positive, data to data and ground to ground.

To connect the LiPo to the controller, using the adapter, Insert the the 2 pin male JST connector into the corresponding 2 pin port on the control box. Make sure your wiring is correct, a short could damage your LiPo and possibly you as well. Positive should connect to positive, and ground should connect to ground.

Step 23: Code Uploading

The code largely mirrors what I wrote for my LED Pixel Shades, so I'll repeat most of what I said there.

I've written code for the mask that includes 40 different effects. It can be found at my Github in the folder "Pixel_Mask_Code". Before you can upload the code to the Wemos, you'll need two libraries:

  • My "PixelStrip" library
  • The Adafruit Neopixel library

You can download the PixelStrip library from here. Download all the files and place them in a folder named "PixelStrip" in the libraries folder of your Arduino install directory.

You can install the Adafruit Neopixel library using the Arduino IDE's library manager.

Once you've installed both libraries you can open Pixel_Mask_Code.ino and upload it to the Wemos. If everything's good, the shades should begin cycling effects. Your shades are now complete! :).

If something's wrong, please post a question and I'll try to help.

Changing Effects:
If you'd like to disable an effect you'll first need to find it in the Pixel_Mask_Code.ino file. It will be in the large switch statement in the main void loop(). The effects aren't individually labeled, as it's hard to describe them with just comments, so you might have to do a bit of hunting. Once you've found the effect, you just need to change the case number to anything higher than the total number of effects (99 for ex) to disable it.

You're also welcome to modify or add your own effects. To add an effect, add it to the switch statement in the main void loop(), and increase the "numEffects" var.

My library is capable of doing a wide range of effects, but it is a bit difficult to work with. It originally began as just a small storehouse for effects, but I later extended it to run effects across odd shapes of pixels (rings, stars, etc), so it's become a bit jumbled. At this point I have an architecture for the library, and I fully intend to re-write it in the future. In the meantime, the current library is fully commented and bug free (look in segmentSet.h for comments about segments), but you'll probably have to do some experimentation to understand how each effect works.

The Github page includes an Excell spreadsheet containing the numerical layout of the LEDs. This maybe helpful in creating effects.

Buttons:
The mask control box has three buttons. When using my code, they do the following things:

  • Button 1: Next Effect (or restarts current effect if effect rotation is off)
  • Button 2: Effect Rotation on/off. This makes the current effect repeat indefinitely
  • Button 3: Brightness cycle. You can adjust the increments by changing the "brightnessLevels" array in my code.

The code stores the effect number, brightness, and rotation on/off in flash, so they should be remembered after turning the mask off/on. In other words, if you cycled to effect number 5, and set the brightness to level 2 before turning the mask off, when you next turned it on, it would start with effect number 5 at brightness level 2.

The slide switch on the side of the control box turns the mask off and on.

If you've made it this far, thanks for reading! I hope you have fun with your mask, and stay safe. If you have any questions, please leave a comment and I'll get back to you.

Lighting Challenge

This is an entry in the
Lighting Challenge

Be the First to Share

    Recommendations

    • Puzzles Speed Challenge

      Puzzles Speed Challenge
    • "Can't Touch This" Family Contest

      "Can't Touch This" Family Contest
    • CNC Contest 2020

      CNC Contest 2020

    52 Discussions

    0
    splat238
    splat238

    Reply 21 hours ago

    Not specifically, but I did do an image search for led masks to help brainstorm when first developing this project, so maybe it popped up. I don't really remember haha.

    0
    SeanR3
    SeanR3

    Reply 18 hours ago

    Right on! I've built hundreds of these masks using the configuration in that post. One worry I have with your design is with the wiring between LEDs, specifically that they're horizontal and fairly taut. As you bend the mask throughout its life they'll slowly either break away from the contact pads or break internally, and if they're glued over they'll be a nightmare to repair or completely ruin the mask if the design doesn't support repairs. Also, you'll find with all the weight from your battery pack and controller case that the straps are going to degrade pretty fast; I repair tons of masks with that same airsoft frame and the straps lose their elasticity even with moderate use and a little weight attached after a few months when pulled tight each time. If intended for repeated use, those bulky addons might be better suited being worn at the waist or as part of a jacket/necklace.

    As it happens I'm actually building one of these right now, my design has the controller embedded inside the mask and runs for 1-6 hours (depending on the mode/brightness) but with half the LED density off 3 triple A batteries.

    IMG_20200806_011408.jpgIMG_20200806_012131.jpgIMG_20200806_012136.jpgIMG_20200806_012146.jpg
    0
    splat238
    splat238

    Reply 13 hours ago

    Good things to know, and it's nice to see an alternate design. It's true that flexing the mask a lot will damage the wiring eventually, but if you pre-bend the mask so it fits your face, it should minimize any flexing. Likewise, the mask should be handled with some delicacy. As for the battery, I was thinking of mounting it with the controller on the large rear strap. This should take the strain off the elastic, as the rear strap is supported by your head when worn. I'll update the design asap.

    0
    Ellu29
    Ellu29

    1 day ago

    Really great. Have to try this <3

    0
    seerena
    seerena

    1 day ago

    You are a Genius! Great work!

    0
    Nikhil Pahan
    Nikhil Pahan

    6 days ago

    Nice project you have build during quarantine

    0
    HarryA37
    HarryA37

    8 days ago

    Just a quick thing. If you can blow out a flame with the mask on it doesn't work. It's just an easy way to make sure the mask is efficient and works! Otherwise great project!

    0
    splat238
    splat238

    Reply 8 days ago

    Good to know. You definitly cannot with my mask haha.

    0
    HarryA37
    HarryA37

    Reply 8 days ago

    It's Corona Safe Then!

    0
    bluegizmo83
    bluegizmo83

    8 days ago

    It would be really cool to redo this mask with the Adafruit Mini Skinny 144/m Neopixel strips! They are about half the width of the normal Neopixel strips so you could fit about twice as many LED strips in the mask. But that would also mean twice the power consumption and current, and a major rewrite of the code ☹️

    0
    bluegizmo83
    bluegizmo83

    9 days ago

    Note about the LED foam. It appears LED foam is just EVA foam, which is easy to find.

    2
    splat238
    splat238

    Reply 9 days ago

    LED foam (plastazote) is different from normal EVA foam. It is significantly less dense, and allows more light through. I used LED foam mainly because I already have a bunch, and it works well. It's difficult to get directly in the US, but I have found one US seller, which I've linked to in the supplies list. That being said, you can definitely use other materials as a diffuser, so I encourage you to experiment.

    0
    bluegizmo83
    bluegizmo83

    Reply 9 days ago

    Yeah I realized that after I posted that comment lol. However, I still think I'm gonna try EVA foam, as it can also be molded with a hairdryer so it should contour to the mask shape nicely. I'm also going to use 1mm EVA foam instead of 2mm since it's denser. My plan is also to use an ESP32 instead of the 8266, as I can find several models of ESP32's that have built-in lipo power/charge circuits which will simply the build. I'll have to make some minor changes to your code for it to work with an ESP32 but that shouldn't be too difficult.

    0
    bluegizmo83
    bluegizmo83

    Reply 9 days ago

    I'll also have to redesign a 3d printed enclosure since I'm gonna use a different controller. I'm also trying to come up with a way to use an 18650 cell for the battery, either in a separate battery box or inside the controller box, I'm not sure which yet.

    1
    splat238
    splat238

    Reply 9 days ago

    Good luck! Btw, if you do go with an ESP32, be sure to test it with the LEDs before putting everything together. Since the ESP32 is newer, it's support is a bit more patchy than the ESP8266, and I've had them produce visual glitches when driving ws2812b leds. I think this is fixed when using the FastLed library, but I've been using the Adafruit one for a while, and have not had the time to port my code over.

    0
    f3rland
    f3rland

    9 days ago

    Wow! You did an awesome job! Thanks for sharing!

    Just wondering.. How do you wash/clean it?

    0
    splat238
    splat238

    Reply 9 days ago

    You can't really do a super intensive cleaning unfortunately. You can lightly soak the back fabric with soapy water, but be sure to disconnect the controller first and wait until the mask is thoroughly dry before reconnecting everything. You could also disinfect it with UV light. If you'd like the wear the mask a lot, I'd suggest wearing a regular cloth mask underneath, to catch/absorb moisture.

    0
    patrickstare
    patrickstare

    9 days ago

    I'm on it. This is going to be my next obsession for a couple weeks! :-) I'll post a picture when it's done.

    0
    HGC
    HGC

    10 days ago

    I really like the mask you used, can you post a link to it also?