Almost a month ago, I received my October 2020 Alien3D UFO subscription box. One of my favorite parts of that box is the Arduino project. The package included parts for a voice-activated NeoPixel Halloween mask. I originally planned on doing a 70’s inspired robot with the kit, but like many things in 2020, that didn’t work out (I’m still working on that idea for a con in 2021, though).
So the hardware sat on a breadboard, like many unfinished projects I have. Yesterday I suddenly had the idea that it would be cool to upgrade the masks we have to wear every day. This post outlines the basic steps I took to upgrade my mask with voice-activated NeoPixels.
The October 2020 UFO box contained the following hardware:
- Arduino Nano (with headers)
- KY-038 Sound Mic sensor
- 30 Light 0.5 Meter NeoPixel Strip
- Dupont jumpers
- 9VDC battery clip
- Power switch
The additional hardware I used in this project was:
- Custom Dupont jumpers to accommodate multiple 5V and GND connections.
- Arduino without headers.
- 90-degree header for the Arduino.
- Zip tie.
- 3D printed mask insert.
- COVID mask.
- Electrical tape.
- 9VDC battery
Getting the project breadboarded
I had this project breadboarded right away, almost a month ago. It’s a reasonably simple setup, so it takes only moments to get going.
The code for the project can be downloaded from the Alien3D website. The code separates the NeoPixel strip into five groups of six lights. The mic sensor takes constant readings and lights up a number of rows, depending on how loud the sound is coming into the mic.
If you do this project, you will want to breadboard this up first. For the circuit to work, the potentiometer on the mic sensor has to be adjusted. The instructions for doing this are included in the code. Serial monitor is used in determining where to move the potentiometer to. I found it is also essential to test the circuit now before the hardware is in the mask. To do this, put the mic an inch in front of your mouth and speak at different volumes. It is much easier to make further adjustments to the potentiometer on the breadboard than inside a mask.
After finishing calibrating the sound, the code needs to be modified to turn off the serial monitor. Two lines of code have to be commented as such:
// Serial.begin (9600); // Can remove this after the step above
Printing out the mask insert
The hardest part of this project was trying to determine how to mount the hardware into a mask. I spent a few hours playing around in Fusion360 and browsing Thingiverse before coming across something I thought would work well. On Thingiverse, Costa_D posted a simple mask frame, Thing 4207252. The only piece I printed from this Thing was Mask_Adult_2. This particular frame gives a lot of room to mount the NeoPixel strips.
I printed the frame using black Sunlu PLA+. I used PLA+ partly because I thought it would hold up better. I also chose it because I have an almost gone roll, perfect for a small print like this. I don’t think it matters what filament is used. If I were to use this frequently, I would probably print it out of PETG.
Preparing the NeoPixel strip
I had never actually cut apart a NeoPixel strip before. While soldering is an integral part of this hobby, I try to avoid it due to my shaky hands. But the process is relatively simple, and even my trembling hands couldn’t mess it up. I used this guide on the Adafruit website to learn the technique.
The basic steps I used were:
- Use a flush-cut trimmer to cut precisely through the middle of the pad connecting neopNeoPixels Due to my shaky hands, I messed one of these up and didn’t get it perfectly centered, but even with a small amount of the pad on one side, it soldered fine.
- Use a Xacto knife to cut away the silicone. I made sure to cut through the silicone, but not into the circuitry below.
- Use 22 AWG stranded silicone wire to solder the sections together. Just make sure the 5v goes to 5v, DiN goes to DiN, and GND goes to GND.
- I did tin each pad on the strip and each wire end before attempting the solder job.
- Remove the paper from the back of NeoPixel strips and place them on the mask frame.
Here is what the NeoPixel strip looks like connected to the mask frame. Please don’t just the soldering job too severely; it is not an exaggeration that I have shaky hands (25 year-ago me would be horrified to have soldering joints look like these).
Assembling the other electronics
The other electronics all go on the other side. Since the KY-038 has to be very near the mouth to work, I mounted it right in the middle of the frame. The picture below shows the mic sensor away from the face. After testing, I found this was the wrong way to mount this board. I had to flip the board so the components face towards my mouth. Then I had to adjust the mic, so it pointed more towards my mouth. After doing that, I was able to get consistent results from the sensor. (this sensor practically needs to be in the mouth before it seems to pick up noise).
I used a zip tie to secure the switch to the left side of the mask frame. I used electrical tape to connect the Arduino and mic sensor. Looking back, it might have been better to try utilizing zip ties for them as well. I put a couple of electrical tape strips over the wiring before putting the frame in the mask. That helped make it easier to insert into the mask. The 9V battery was in the mask, just under the switch. I thought it would be bothersome there, but it really wasn’t.
At this point, I discovered another benefit to the mask frame chosen. The frame fits in the mask fine, but the openings on each side are somewhat narrow. I had to fold the whole assembly in half to get it into the mask. Doing so was no problem at all.
Testing it out.
The final step was to test it out. Here is a short video clip of the mask in action. As you can see, I used a Ghostbusters mask. I am a South Dakota Ghostbusters member and hope to use this mask to do charity events.
I am pleased with the result. I did find that a little more tweaking of the potentiometer is needed. With the mic adjusted towards my mouth, I got a good light reaction to my voice.
Future changes planned
This is just a prototype. I already have some changes planned. First, I want to cut down the devices’ wiring lengths and get rid of all the Dupont connectors. Directly soldering everything together with shorter wires will make the whole setup a lot more compact. Since I always wear a cap when wearing this mask, I plan to run the battery’s power along one of the mask straps and up into a recess in my cap. Eventually, I might also add either a tactile pushbutton switch or an IR sensor to switch between various lighting effects. That is the fun of tinkering; it’s a never ending process!
Song of the day: Ghostbusters
Anyone remember the scene in Ghostbusters 2 where Ray and Winston are entertaining kids for a birthday party. I could imagine Ray creating a mask like this for those parties. Here is a music video for Ghostbusters from the second movie.
Bonus Video: Alternate Video for Ghostbusters 2
This video features the Bobby Brown contribution to Ghostbusters 2. I’m not a huge Bobby Brown fan, but the song is good enough. Plus, whoever made this video did a great job of picking the picks.