For Halloween this year, I decided to make what I'm calling a "Fallout Doctor" costume. The distinctive beak of plague doctor masks was filled with herbs and other aromatic items, which were ostensibly put there to protect them from the plague (but which likely only protected them from the smell). That seems an awful like the dark ages version of a gas mask, so I thought it'd be cool to combine the two into a kind of post-apocalyptic plague doctor costume.
I really wanted to play up the heavy-duty gas mask aspect, so there are hoses running from the beak of the plague doctor mask, through the gas mask canister, and down to a satchel. The EL wire runs through the tubes, and blinks to make it look like I'm breathing bright blue oxygen or something.
I also stuck NeoPixels around the eyes of the mask, which normally go through a blue spinning light pattern that I hope evokes a sort of passive "searching" vibe. But, there is a switch attached to the glove on one hand. When I point a finger, the LEDs around the eyes start quickly flashing red. This is designed to scare small children and bartenders.
Attach the LEDsTo get started, you'll need to wire up your LEDs and attach them to the mask. Because I used cheap knockoff NeoPixels, each individual WS2812B LED sits on a pretty long piece of strip, so I could only fit six of them around each eye. If you use real Adafruit NeoPixels, the LED density of the strips is much higher and you can fit more, which will look a lot nicer.
First, you'll need to cut the strip into sections of one LED each. Then connect the 5V+, ground, and data pads with small pieces of wire about half an inch long. Halfway through the chain, use wires that are about 2 inches long to cross from one eye to the next. Be sure that they're connected in the right direction, with the output of one connecting to the input of the next. The first LED in the line should have wires about 4 feet long, which will lead to the Arduino.
Next, drill a small hole in the bridge of the mask's beak for the three wires to fit through. While you have your drill out, drill larger holes near the tip of the beak for those wires and the EL wire to fit through. My mask had two convenient "port" type things at the tip, so I drilled holes through there.
Then feed the three NeoPixel wires through the hole at the bridge. Start using hot glue to attach the LED strips around the eyes of the mask. Start at the inside closest to the bridge of the beak. If you're looking at the mask, the LEDs should be attached to the right eye in a clockwise pattern, cross over the beak, and then go around the left eye in a counterclockwise pattern. That will simplify the Arduino programming.
Program the ArduinoTake the three NeoPixel wires, and connect them to your Arduino. The 5V wire should go to the Arduino's 5V pin, the ground to ground, and the data wire to pin 8. Then, connect your momentary button with one wire going from any leg to Arduino ground, and another wire going from the opposite (so diagonally-across) leg to Arduino pin 4.
Upload the following code to your Arduino (file is also attached to this post). Note that if you use more than 6 LEDs per eye, you'll need to modify the relevant variables and counters.
#include <Adafruit_NeoPixel.h>
#define PIN 8
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(12, PIN);
int mode = 0;
int eyeOff = 0;
int eyeOn = 1;
bool flip = false;
const int buttonPin = 4;
int buttonState = 0;
void setup() {
pixels.begin();
pixels.setBrightness(85); // 1/3 brightness
pinMode(buttonPin, INPUT);
digitalWrite(buttonPin, HIGH);
}
void loop() {
uint8_t i;
uint32_t t;
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH) {
mode = 0;
}
else {
mode = 1;
}
switch(mode) {
case 0: // Blue spins
pixels.setPixelColor( eyeOff, (0,0,0)); // First eye off
pixels.setPixelColor( (eyeOff + 6), (0,0,0)); // Second eye off
pixels.setPixelColor( eyeOn, 0x008B8B); // First eye on
pixels.setPixelColor( (eyeOn + 6), 0x008B8B); // Second eye on
pixels.show();
eyeOff++;
eyeOn++;
if(eyeOff > 5) eyeOff = 0;
if(eyeOn > 5) eyeOn = 0;
delay(100);
break;
case 1: // Red alert
if (flip == false){
for(i=0; i<12; i++) {
pixels.setPixelColor( i, 0xFF0000); // First eye
}
flip = true;
}
else {
for(i=0; i<12; i++) {
pixels.setPixelColor( i, 0x000000); // First eye
}
flip = false;
}
pixels.show();
delay(50);
break;
}
}
Now, when you connect the Arduino to power, the LEDs light up in an aqua blue color and spin around the eyes. If you push the button, they'll start flashing red.
3D Print the Gas Mask CanisterIf you ordered the gas mask I linked to, it will come with a filter canister. You should probably just throw that away—I have no idea what the filter element is made from, or if it's safe to breathe through. You'll be replacing that with the 3D printed canister that I modeled in Fusion 360, which you can find here (also attached to this post):
https://www.thingiverse.com/thing:3186472
Keep in mind that if you use a different kind of mask, the threads likely won't fit.
Printing this is easy, and should work on printing with a volume higher than 4x4x4 inches. PLA is fine, and it doesn't require any supports. If you give it a 0.15 layer height and an infill of around 20%, that should work well.
This is a good time to go ahead and modify your gas mask as well. Thoroughly clean the gas mask rubber with soap and water, and then dry it. Use some scissors to cut out the eye covers (just enough to remove the glass and frames). You can also pull out the little rubber flap near the threads to make it easier to breathe, thought he canister has a large opening so breathing shouldn't be difficult.
Prepare the HosesTrim your tubing down so that the total length is about a foot shorter than your EL wire. Then, cut the tube in half. Put one half through each of the holes in the side of the 3D-printed canister. Slide the EL wire through one section of tubing, and then into one of the holes on the tip of the plague doctor mask's beak. Then feed that, along with the three NeoPixel wires, back out of the other hole on the tip of the beak.
The three wires and the EL wire will feed back through the second section of tubing. So, the EL wire will be making a loop through both tubes, while the NeoPixel wires are just going through the "output" tube.
Plug your NeoPixel wires back into the Arduino, and test it to make sure everything still works—it will be really hard to modify anything after this point.
Once you're confident that everything is working correctly, put on the gas mask and then the plague doctor mask over that. Position the tubes where you want them, and then use a Sharpie to mark where the tubes enter the canister.
Pull the masks back off, and then hot glue your tubing into place. You'll want glue where the tubes meet the beak of the plague doctor mask, and where they go through the canister.
Setup the Glove SwitchYou'll want to attach the momentary switch to your glove in such a way that it toggles when you point your finger. This is highly dependent on the gloves you're using, as well as the type of switch.
The only thing that's important here is that it's not pressed when your hand is in a natural position, but then gets pressed when your finger is extended. Copious amount of tape will help here. I 3D-printed a small mount that I could glue the button to, and then taped that to the finger of the glove.
Modify a USB Cable and Permanently Solder ConnectionsTo provide power from the battery pack, you're going to need to modify a USB cable. Take a short cable with USB A connector on one side, and then cut off the other connector. Strip that end, then cut off the white and green data wires. That will leave the black and red wires, which are ground and power respectively.
Take those and solder them to your perf board. Then, solder your Arduino to the same perf board. The only pins that actually need to be soldered are Vin, Ground, Pin 4, and Pin 8. Then, solder the three NeoPixel wires and the two button wires to another portion of the perf board.
With those all in place, you can solder the corresponding connections:
- USB Ground to Arduino Ground
- USB Ground to NeoPixel Ground
- USB Ground to Button Wire
- USB Power to Arduino Vin
- USB Power to NeoPixel Power
- Arduino Pin 8 to NeoPixel Data
- Arduino Pin 4 to Button Wire
Now, when you turn on the battery power back and EL wire inverter, everything should light up properly.
There won't be much current draw on the battery pack, which can cause problems with some models. If so, you'll need to put it into "low current mode." On mine, which I linked to in the components list, you put it into low current mode by double tapping the power button.
And that's it! Tuck the electronics at the end of the hoses into the satchel that came with the gas mask, and you're ready to go trick or treating!
Comments