Interactive Predator Costume With Head Tracking Plasma Cannon
by arkhipenko in Craft > Costumes & Cosplay
25665 Views, 132 Favorites, 0 Comments
Interactive Predator Costume With Head Tracking Plasma Cannon
It started as an idea to build a head-tracking plasma cannon, "like in the Predator movie"...
Almost a year later, it became a full body size, interactive Predator Halloween costume featuring props, head-tracking plasma cannon, laser sights, original sounds and everything else the Predator could do (except being invisible).
Building this costume has been an incredible journey, and if you are willing to embark on this project please allocate a lot of time. It took me almost a year (working on weekends mostly) to design and build it. It covers a wide range of skills, and thus have been an amazing mix of cutting, sawing, spray- and brush-painting, gluing, sewing, soldering, programming, sound-editing, video-editing, 3d designing, and 3d printing.
The challenge was to either design everything from the scratch or modify existing (frequently unrelated) object to fit the theme. Although some components of the costume were purchased, almost none of them has been left untouched or unmodified.
I am grateful to my family for putting up with me during this lengthy process, and especially my daughter Alexandra, who helped with quite a few details, and nailed me one particularly project-messy days with a phrase "I still remember when this was just an idea...".
Overview
I will describe each component of the costume is much more details in the steps to follow. This is just a high-level overview
THE BODY:
The base of the costume is a Halloween costume available over the counter (for instance: here). I only kept the skin, leather props, and the gloves from this costume. The mask was so bad I had to throw it away. I added a zipper to the back of the skin and sewn all the leather props directly to the skin of the costume (losing velcro straps in the process, which gave the costume extra cheap look).
THE HEAD:
The Predator's face is another Halloween prop available for instance on eBay. It is a latex mask, that is rather big and therefore does not sit well on a regular-size human head. To give it proper look, I decided to insert a small size helmet (like this one) inside. The helmet gives the mask a "skull", and the mask sits perfectly on it. The helmet also sits tight on your head, thus giving you full motion control. Additionally, the helmet is great housing for all the electronic components required for head tracking, sound effects, and the lights.
The Predator faceplate (the famous Bio-Mask with 3 laser sights) was 3D printed. I borrowed the design from this Thingiverse author, but subsequently "assembled" the 3 pieces together in TinkerCAD, and enlarged to fit the latex mask. Actual 3D printing was done by the Voodoo Manufacturing (who are just amazing!) since the part ended up too large for home printing. I added "laser sights" to the Bio-Mask for additional "targeting" purposes. The dreadlocks on the mask looked so cheap that we decided to replace them all. See the steps below how it was done.
THE GAUNTLETS:
The design of both right and left gauntlets are borrowed from Thingiverse (left gauntlet, right gauntlet). Again, I "assembled" them in TinkerCAD, modified left gauntlet to house control electronics, and 3D printed using Voodoo Manufacturing as monolithic pieces. All the STL files are enclosed. Models are here: right gauntlet, left gauntlet, blades.
You can print the right gauntlet in pieces and assemble it so the blades can be extended. I decided against it since you cannot operate the blades in clumsy latex gloves anyway.
THE PLASMA CANNON:
Although I could 3D print a replica of the actual Predator cannon, I decided to modify an alien toy gun (Ray Gun Toy Black Atomic Alien Space Gun). I gutted the gun, cut off the handle, and fitted it with a laser pointer, 9 bright white LEDs at the front, a 3-color LED in the glass bulb in the middle, a PWM control board, an MPU9250 IMU, and 2 servo motors for head motion tracking. All of this is connected to the Predator "Backpack" via RJ-45 network plugs and cables.
The front LEDs are used to simulate a plasma blast. 3 color LED is used to simulate "energy pulsation" during laser tracking and plasma blast. IMU (gyroscope and accelerometer) is used to establish 3D position of the cannon and compare it with 3D position of the helmet for head motion tracking. PWM board controls the servos and turns LEDs on/off (or dims them appropriately).
THE BACKPACK:
I always thought that some bike helmets look somewhat alien-like. So I used one of them to become the plasma cannon "Backpack".
The backpack houses the main control unit, sporting a Teensy 3.5 board running at 120 Mhz and doing most of the heavy lifting of three-dimensional positioning calculation for head tracking. The choice of Teensy 3.5 is due to the fact it has a math co-processor that takes care of all the floating point calculations of the Madgwick sensor fusion algorithm.
The Backpack also contains a second sound system (2 x 4 watt - for system sounds) and communicates wirelessly with a gauntlet.
The Plasma Cannon is mounted directly on top of the Backpack using Go Pro mounts, which proved to be indispensable for the task.
THE CONTROLLER:
The costume motion, light and sound effects are controlled by the Wii Nunchuk controller, connected to the left Gauntlet. A Wii Nunchuk controller has two buttons up-front, a joystick at the top and an accelerometer.
Each of the buttons (or joystick positions) could be interpreted as a single "click", double-click or a long press. Additionally, we can detect if the controller is positioned sideways or upside-down.
This alone gives you 18 distinct control combinations (36 if you consider upside-down option), which is sufficient for our purposes.
I am holding the controller in my left hand, and although it is not super-comfortable to push buttons and move joystick in the latex glove, it is quite doable.
CONCLUSION:
This is a complex project. If you embark on it the result is not guaranteed. "Your mileage may vary" as they say... I will try to help time permitting with advice, but please do rely on your experience and skills as primary drivers for this endeavor.
I will be describing the process in the order I was building it. You are free to choose a different path!
Good luck!
Block Diagram
HELMET FUNCTIONS:
- 3D head position tracking via IMU MPU9250 (gyro and accelerometer)
- MP3 sound system (2 x 4 watt speakers)
- I2C communication with the Backpack
- Control of the 3 Laser Pointer Targeting Sights
- Control of the 2 yellow LEDs (flashing eyes effect)
BIO-MASK FUNCTION:
- 3 Laser Pointer Targeting Sights
PLASMA CANNON FUNCTIONS:
- 9 Front facing bright white LEDs
- Laser pointer for targeting
- 3 color LED for "energy" fluctuation
- PWM control of the LEDs, laser pointers and Servo Motors
- 3D cannon position tracking via IMU MPU9250 (gyro and accelerometer)
- I2C communication with the Backpack
BACKPACK FUNCTIONS:
- Main processing center (Teensy 3.5 microcontroller)
- Second MP3 sound system (2 x 4 watt speakers)
- I2C communication master
- Wireless communication with the controller (Gauntlet)
GAUNTLET FUNCTIONS:
- Read Wii Nunchuk inputs and convert them to costume commands
- Transmit commands to the Backpack wirelessly
Building a Plasma Cannon
A Plasma Cannon sits on top of the Backpack. When activated, it follows the head movements, activates a laser targeting system and "shoots" plasma blasts.
The base of the cannon is a Ray Gun Toy Black Atomic Alien Space Gun.
I cut the handle off, gutted the contents, and cut enough of the internal plastic to house all the necessary electronic components:
- 9 x 5mm white LEDs
- 1 x low power 5v laser pointer ( 5mW 650nm Copper Semiconductor Laser Head Tube)
- 1 x 3 Color single cathode LED (red, green, blue)
- 1 x L293D motor driver (example at Amazon)
- 1 x 9 AXis 10DOF MPU9250+BMP180 Gyro Acceleration Barometer Sensor Module (example at Amazon)
- 1 x Adafruit 16-Channel 12-bit PWM/Servo Driver - I2C Interface (example on Amazon)
- 1 x RJ45 8-pin Connector (8P8C) and Breakout Board Kit ( example on Amazon)
- 1 x 2 DOF Pan and Tilt with Mg995 Servos Sensor Mount Kit ( example on Amazon)
The "Pan" servo is glued in with a hot glue and cannot be removed.
The accelerometer sits right on top of the servo so that motion tracking is as close to the rotation axis as possible.
The PWM servo drive fits nicely in the back of the cannon.
L293D is used as a relay in this setup, using PWM pin as a trigger, and power lines as "motor" lines for Laser, front LEDs and Cannon's own sound speaker, which I ended up never using.
RJ45 carries enough lines to support 2 x 5v power lines, 2 x i2c lines, and 2 x ground lines. Separate power lines are meant for electronic components (IMU, PWM driver circuits) and power lines of the servo motors. A 470uF capacitor is soldered across the power lines to smooth out power surges due to servo movements.
For the 9 x LED assembly: it is recommended to have an individual 220 Ohm resistor for every LED.
Modification instructions:
- Cut off (saw off) the handle
- Remove all the built-in electronics, LEDs and motors
- Remove the FRONT plastic bulb (keep the middle one)
- Place and hot-glue the Pan Servo at the base of the where the handle was. Make sure the servo gear axis is strictly perpendicular to the cannon and is in the center of the two halves
- Place the PWM board at the back of the cannon
- Place MPU9250 assembly and attach it with double-sided tape
- Place one laser pointer in the top protruding part of the cannon (you need to drill a 6 mm hole in the plastic glass there)
- Place the 9 LED assembly in the front of the cannon. The rim of the cannon is just the right width to house a PCB board, so it fits snugly
- Place the 3-color LED at the front of the middle round plastic glass bulb. There is a hole for it there already, which is convenient
- Place the L293D board at the bottom of the cannon under the middle glass bulb. There is a little nook there which is just enough for L293D chip
- Hot-glue RJ45 plug at the back of the cannon facing backwards (at the base of where the back of the handle was)
- Connect all the wires. Run the wires around the bulb (I used hot-glue to keep some in place).
- Test Test Test
- Close the two halves and screw all the dozen little screws back tightly
3 COLOR LED
3 color LED is used to simulate energy fluctuations and transfers during cannon operations:
- When the cannon is inactive, the LED is glowing/pulsating with a green light
- When the cannon is active, the LED is glowing/pulsating with a blue light as if energy is circulating in the bulb ready to be used for the plasma blast
- When the laser is active, the LED is glowing/pulsating with a red light matching the color of the laser beam and indicating the cannon is in targeting mode
- During the plasma blast, a blue LED increases the brightness as if accumulating energy for the blast (for about 1/2 second accompanied with a sound of charging photo-flash), and then quickly dims as the front LEDs are illuminated - as if the energy is transferred from the bulb to the blast.
Building a Helmet
A Helmet serves as a skull for Predator's face mask. It also contains the sound system with 2 x 4W speakers, and the master MPU9250 gyroscope/accelerometer for the head movements tracking. The helmet also has 2 yellow LEDs above the eyes to simulate those "yellow flashing eyes" of the Predator.
The base helmet is this one: KUYOU Helmet ABS Shell for Skateboard/Ski/Skating/Roller Protective Gear Suitable Kids and Youth, Adult
I cut a number of holes in the EPS lining to house the electronic components:
- 2 x 5 mm Yellow LEDs
- 1 x Arduino Nano microcontroller (example at Amazon)
- 1 x DFRobot MP3 Player Board (example at Amazon)
- 1 x 9 AXis 10DOF MPU9250+BMP180 Gyro Acceleration Barometer Sensor Module (example at Amazon)
- 2 x Adafruit Mono 2.5W Class D Audio Amplifier - PAM8302 (example at Amazon)
- 2 x 3 Watt 4 Ohm 40mm Dia Aluminum Internal Magnet Speaker (example at Amazon)
- 4 x Neodymium Magnets (on Amazon.com)
Arduino Nano serves as an I2C slave device receiving commands from the Backpack to play sounds, turn laser sight on/off, and flash the yellow LEDs.
MPU9250 is connected to the same I2C bus but is queried directly by the Teensy board from the Backpack for speed purposes.
IMPORTANT: Both IMU boards (in the cannon and in the helmet) have default I2C address of 0x68. You need to solder A pin to the power pin to pull the lowest address bit up on one of the boards, so it becomes 0x69, and you can use both IMUs on the same I2C bus.
Another very important point is the IMU orientation. The helmet IMU is located at the very tip on top of your head. It should be placed with axes pointing into exactly the same directions as the IMU in the Plasma Cannon. (In my case, I placed them both upside-down, to Z is pointing down). In other words, when the Plasma cannon is centered and leveled pointing forward, and you wearing a helmet are looking straight ahead of you horizontally, both IMUs should be giving accelerometer readings of ~0g for X and Y axis, and ~ -1G on Z axis.
The electronics are powered via a USB cable, which conveniently has 4 lines: 2 for power and 2 for I2C communications.
Connection for the 3 laser sights is made via a metal washer, connected to a magnet. So when the Bio-mask is connected, the laser sights are connected as well, eliminating the need to deal with a USB connection while wearing latex gloves.
Building a Backpack
A Backpack is where it all comes together: communication with the control gauntlet, dispatching of sound commands, 3D head tracking processing, and servo movement requests.
The base of the backpack is a heavily modified ESSEN Adult Mountain Bike Helmet for Bicycle and Racing , which has a bit of an Alien look to it.
I cut sides of the helmet appropriately to wrap around the shoulder, and cut out foam to house the electronic components:
- 1 x Teensy 3.5 microcontroller with Floating Point co-processor (on Amazon)
- 1 x 3.3 step-down voltage regulator (on Amazon)
- 1 x RJ45 8-pin Connector (8P8C) and Breakout Board Kit (example on Amazon)
- 1 x I2C Logic Level Converter Bi-Directional Module 5V to 3.3V (example on Amazon)
- 1 x DFRobot MP3 Player Board (example at Amazon)
- 2 x Adafruit Mono 2.5W Class D Audio Amplifier - PAM8302 (example at Amazon)
- 2 x 3 Watt 4 Ohm 40mm Dia Aluminum Internal Magnet Speaker (example at Amazon)
- 1 x HC-06 Bluetooth Receiver Module (on Amazon)
- 2 x USB Type A Standard Port Female Solder Soldering Jacks Connector (on Amazon)
- 2 x 2200 uF capacitors (on Amazon)
Teensy 3.5 is the brain of the entire costume. It collects information from both accelerometers and performs complex three-dimensional sensor fusion calculations 500 times per second. It calculates resulting in servo adjustments and moves servos appropriately. It also listens to the commands from the Control Gauntlet, and dispatches appropriate commands to the Helmet, Cannon or Backpack components. It is also responsible for the coordination of physical actions with respective sound effects.
To achieve all that Teensy is running a number of concurrent tasks via TaskScheduler at 120MHz. The code is also compiled with Speed and LTO optimizations.
Since Teensy is a 3.3V based board, and most of the components and Arduino Nano are 5V, an I2C logic level converter is used to communicate with both MPU9250s, PWM Driver and Nano.
MP3 Player is controlled via Serial1 interface.
An HC-06 Bluetooth module needs just one data pin since we only receive data. (see dedicated step).
Connection with the Plasma Cannon is via RJ45 cable.
Connection with the Helmet is via modified USB cable.
Two 2200 uF capacitors are soldered across the power lines of the Teensy power supply and power supply of the Plasma Cannon to smooth out the power bursts resulting from the amplifiers firing at maximum volume and servo motors movements.
The combined power consumption of the 2 sound systems and servo motors are such that I had to power the Backpack components with a rechargeable USB battery (a 10000 mAh one) featuring dual connections capable of 2.4A output: one to power the peripheral components and servos, and another connected directly to Teensy micro-USB port. The battery also has an ON/OFF switch which is very handy.
One of the two speakers is mounted on the backpack itself facing back. The second speaker is placed in the middle of the lower servo bracket (the one connected to the backpack) facing forward. To mount the second speaker I 3d printed a special support bracket. The model is available on TicnkerCAD and STL file is included in the code/files package.
To conceal the speaker and servos, I put a grey-painted stocking on top of both.
And finally, the Plasma Cannon assembly is connected to the backpack via GoPro connectors, which are great for this purpose as they are clip-on.
Mounting Plasma Cannon on a Backpack
Plasma Cannon is attached to the Backpack by screwing on the lower servo bracket to the Backpack (the back side of the helmet has a convenient opening through).
On the other end of the Backpack, I placed the top part of the GoPro camera connector, which is in turn used to attach to the overall costume.
The beauty of the GoPro connectors is that they are clip-on and are very stable.
Mounting Backpack With Plasma Cannon on the Left Shoulder
As you know, human shoulders are slanted.
The average male shoulder is slanted about 15 or 20 degrees. Mounting a Plasma Cannon on a slanted shoulder would end up with a slanted Plasma Cannon.
To compensate for that, a 3D-printed shoulder pad was designed and produced (printed by Voodoo Manufacturing).
The base of the Shoulder Pad 3D model was borrowed from this Thingiverse author and then reworked by me for the Plasma Cannon purposes. The resulting model is on TinkerCAD.
A bottom of a GoPro connector is glued to the Shoulder Pad platform in a way that the cannon points forward when all servos are centered.
The Shoulder Pad itself is sewn onto the costume Skin through the holes (specifically made in the pad for this purpose), and then covered with the excess pieces of leather from the original costume.
Adding Better Dreadlocks to the Mask
The dreadlocks that came with the mask looked kind of cheap and pathetic, so we decided to make better ones. There are close to 40 dreadlock "roots" on the mask, but only 34 were attached originally. So 34 was the base number.
To build that many dreadlocks you will need:
- About 3 bags of 5/8" thick backer rod 20 ft long each (like this)
( depending on the length of each dreadlock - we went for 50 cm (or approx 20") - 34" of 1" thick backer rod (like this)
- 4 x 1/2 in. x 2 ft. PVC 40 Pipes (like this) to make the beads
- Black Valspar latex enamel paint (1 liter or 1/4 gallon like this) for dreads
- Bronze spray paint (like this, only bronze) for the beads
- Lots of Krazy glue (like this)
The process is like follows:
- Cut 34 x 5/8 backer rod pieces ~50 cm each
- Cut 72 PVC pipe segments approx 1" each to serve as beads (2 beads per one dread)
- Heat up the tip of each backer rod and roll it on a wooden/granite surface to create a tip (inspired by this post)
- Paint each dreadlock black using the latex paint.
NOTE: We just dipped each dreadlock into the can, let the paint run down, and then dried it on a string.
To do that we stuck a wooden skewer into each dread and used it as a handle. For drying, we used clothes wooden pegs and a string. - Paint all beads (two coats) with bronze spray paint
- Cut 34 x 1" backer rod pieces to serve as dreadlock "roots" ~ 3/4" to 1/2" long each
- Cut out a little piece from each "root" for gluing the dreadlock in later
- Attach "roots" to the mask where previous dreadlocks used to be attached with Krazy glue.
- Attach dreadlocks into the new "roots" using Krazy glue
- Attach beads to each of the dreadlocks maintaining leveled position for the two rows of beads
- Use a drop of Krazy glue to secure beads on each dreadlock
The internal diameter of the 1/2: PVC pipe is very close and slightly bigger than 5/8", which allows sliding beads on the dreadlocks snugly.
Be sure to dry the dreadlocks completely. In our case, it took almost two weeks for the paint to stop being sticky.
The resulting dreadlocks have this "swoosh" sound about them, which the original ones did not.
Building a Bio-Mask
The Bio-Mask design is borrowed from this Thingiverse author and then modified to fit the latex mask.
The original is printed in 3 distinct pieces that need to be later glued together. Even split into three pieces the Bio-Mask is too big for my 3D printer, so I combined the three components into one single part, added a placeholder for 3 lasers and ordered it from Voodoo Manufacturing. The resulting model is on TinkerCAD.
Please NOTE: if you want to add the horns from the original model, those need to be enlarged proportionately.
I wanted to be able to take the Bio-mask off and scare people with the real Predator's ugly face.
Laser sights are controlled by the Helmet's Nano microcontroller and are connected via magnets.
Building Right Hand Gauntlet
A Right-Hand Gauntlet is the one with the Blades.
The design, again, is borrowed from this Thingiverse author, and subsequently modified by me.
The original gauntlet consists of multiple parts, which are glued together. It also supports extensible blades. I did not think that wearing thick latex gloves I will be able to extend/retract the blades, so I opted for a monolithic piece.
As-is, my hand does not fit through the gauntlet, so I had to cut out a bottom part to be able to fit through. A velcro belt is attached to secure the gauntlet on the arm.
Modified models of the gauntlet and blade are on TinckerCAD.
Building Left Hand Gauntlet
Left-Hand Gauntlet is the main control unit.
Control of the costume functions is done via Wii Nunchuk buttons and joystick unit, which is connected to the gauntlet and is held in the left hand throughout the presentation.
The original gauntlet design is borrowed from this Thingiverse author, and subsequently heavily modified by me to house all the electronics:
- 1 x Arduino Nano microcontroller (on Amazon)
- 1 x Wii Controller (on Amazon)
- 1 x Wii controller plug (example on Amazon)
- 1 x USB power bank (on Amazon)
- 1 x HC-05 Bluetooth board (on Amazon)
- 1 x 1kOhm and 1x2kOhm resistors
PLEASE NOTE: that the current 3D model of the gauntlet is designed specifically for this type of USB power bank. A different power bank will require model adjustments.
As with the right-hand gantlet, the model is located on TinkerCAD.
PLEASE ALSO NOTE, that due to 3D printing tolerances, the parts will not fit together perfectly, and will require adjustments (i.e., I had to buy a very long 5 mm drill bit and drill through hinges to clear them from the excess printing materials. I also had to file and sand the axel before it fit into the hinges).
Wii Nunchuk communicates to Arduino Nano via I2C protocol. The message format is well known, and there are open source libraries written to read and decode the signals.
A bit of a challenge was to map wires since color assignments were at times counter-intuitive (white wire was ground, while black wire was not connected).
The Wii Nunchuk controller I am using happens to be 5v tolerant.
The Bluetooth Transmitter module is located outside of the Gauntlet. It is not necessary since Bluetooth communication is very reliable, but gives the gauntlet a special look.
Please see separate dedicated step describing how to pair HC-06 and HC-05 modules and make them connect every time they are powered up.
Painting
GAUNTLETS, BACKPACK, PLASMA CANNON, BIO-MASK...
... and anything requiring distressed metallic look was painted with one or two coats of the silver metallic spray paint first, followed by bursts of black spray paint from a distance of 20 to 40 cm. The bursts of black paint will have to be very short and careful, and you need to inspect the results almost after every burst to get the "stressed dark metallic" look you prefer.
BLADES...
... were painted with straight silver metallic spray paint. The resulting contrast between the distressed and blackened look of the gauntlet contrasts nicely with the shiny metallic look of the blades.
DREADLOCKS AND BEADS...
... we painted with black latex paint and bronze spray paint respectively. More about painting the dreadlocks in the step dedicated to the dreadlocks
Fluorescent Blood
To imitate Predator's glowing blood, I splashed a few parts of the costume with green glow-in-the-dark paint. You might want to buy a UV LED flashlight to be able to charge the paint throughout the evening and keep it glowing.
The paint and the flashlight could be found here:
- Fluorescent green glow paint (at artnglow.com)
- 9 LED ultraviolet flashlight (at artnglow.com)
Props
SKULL NECKLACE
To prop up the costume I added a necklace made of skulls and also hung a bigger skull at the belt as a trophy.
The props are available here:
NOTE: to make the necklace sit nice and wide on the costume I added two safety pins under each of the shoulder props and pull the necklace string through them. This keeps the string and the necklace in place.
I also sewed the original costume props onto the costume fabric thus getting rid of velcro straps and ensuring they do not detach and fall off. Basically, you put on the costume, put on the props, mark with a black sharpie where each prop is located on your body, and sew them on according to the markings.
FEET
I ordered Predator feet from Etsy here. They look great and make the costume complete. Because I am planning on walking a lot in those I glued on a rubber insole to the sole of the feet to protect them from the asphalt. The feet are rather large, and to make them "sit" on my own size 9 feet I had to insert old sneakers inside. Works great.
Modifying Gloves for a Better Fit
I found the gloves which come with the costume a bit short (nothing I could do about that), and extremely wide at the wrist. While this makes them easy to put on, they don't stay on well and don't look good (look like they are the wrong size).
To compensate for the wrist size problem, I used two velcro strips to fold the lower part of the glove and hold it in place while on.
- Those are the velcro strips I used, but I am sure other types would work as well
- As usual, the Krazy glue is a great choice of a glue to attach those kinds of materials (latex and plastic) to each other
Electronics and Schematics
Schematics of the Plasma Cannon, Helmet, Backpack, and the Gauntlet (in a Fritzing file) are provided in the files folder on Github. Pictures are attached to this step.
Please note that most of the wiring on the costume is done with breadboard wires. I did not have the time to develop PCB boards. This might be a task for next year :)
The costume uses 2 power sources:
- A 10000 mAh USB C Battery Bank (like this on Amazon.com) is powering Backpack, Helmet, and Plasma Cannon via 2 separate wires: one powering the Teensy board directly via micro-USB cable, and the second one powering backpack and helmet components (IMUs, sound systems, etc.) and plasma cannon servos separately
- A 3000 mAh Slim USB Power Bank (like this one on Amazon.com) is powering the control gauntlet
The 10000 mAh power bank is hidden in the front "pocket" of the costume. USB wires are hidden inside the Wire Loom Black 20' Feet 1/2" Split Tubing Hose (like this one on Amazon.com) painted silver metallic.
The 3000 mAh power bank is integrated in the back of the gauntlet. A special place for the power bank is part of the 3D print design
Sound Effects
One of the fun aspects of this costume is that it has 2 sound systems, which makes it not only look but sound like a real predator.
Both of the sound systems can do the following:
- Play a sound once (e.g., roar)
- Play a random sound from a set of sounds once (e.g, play one of the clicking noise sounds out of 9 available)
- Play a sound continuously (e.g., cannon firing one blast after the other)
- Play a sound once, and then play the very next sound file continuously (e.g., play a sound of laser targeting system activating, and then continuously play a sound of laser beam actively buzzing)
The sound system located in the Helmet is responsible for sounds of the Predator itself (clicking, roar, laughs, saying "over here", etc.), while the Backpack sound system is responsible for equipment sound effects (Plasma cannon activating and firing, laser targeting, etc.)
The fact that there are two systems makes it possible to produce two sound effects simultaneously (e.g., fire a cannon and roar at the same time).
STARTUP SOUNDS:
When the systems boot up, a brief self-test of connected components is performed. For each of the components, a short beep is emitted if a component is connected and responds to the control command. If a component does not respond, a series of short sharp beeps are emitted indicating an error situation. A long beep and a low voice "Let's go hunting" sound indicate that all Helmet, Cannon and Backpack systems are properly connected and are up and running.
SOUND COLLECTION AND PREPARATION
Most of the Predator sounds were found and downloaded from the internet. Diagnostic and test sounds were produced using text-to-speech online service and then edited (normalized, amplified, etc.) using Audacity open-source sound editing software.
By the requirement of the sound card, all files need to named as 3 digit numbers 000-255.mp3 and folders numbered 00-99. E.g., folder 02 contains "clicking" sounds. File names are 001.mp3 to 007.mp3
File 004.mp3 is attached to this step as an example.
All sounds and their mappings to folder and file numbers are enclosed with the software package accompanying this costume and are located on GitHub.
Downloads
Head Tracking
The idea behind three-dimensional head tracking is this:
- One IMU is mounted in the helmet at the very top
- Second IMU is mounted in the plasma cannon above the pan servo
- Both IMUs are mounted in the exactly the same position (say, Z-axis pointing down, X-axis pointing forward, and Y-axis pointing wherever it ends up pointing)
- When you stand straight and look forward, and the plasma cannon in the center position of both servos, both IMUs XY plane is strictly horizontal and XZ/YZ planes are strictly vertical
- Now, tracking the head position relative to plasma cannon is a matter of measuring the inclination of axis X relative to Earth gravity via the accelerometer, and rotation of the head around axis Z via gyroscope.
If you worked with IMUs before you know that the signals they produce are not stable. Accelerometer measurements are "noisy", and gyroscope measurements are noisy and they drift!
A similar problem is with the magnetometer, which is noisy and is affected by anything magnetic in the vicinity.
Multiple techniques exist to compensate for the noise, drift and magnetic interference. Kalman filter is one of them. I used IMU filtering algorithms developed by Sebastian O.H. Madgwick (published on April 30, 2010, here).
The report "presents a novel orientation filter applicable to IMUs consisting of tri-axis gyroscopes and accelerometers, and MARG sensor arrays that also include tri-axis magnetometers".
Because I have servos, metal parts, and strong magnets as part of the costume design, I decided to limit head tracking to IMU approach only, bypassing the magnetometer altogether. This approach, however, means I have no way to determine the initial direction of both IMUs and must rely on the costume operator to align the IMU directions prior to activating head tracking. This is achieved by briefly aligning the fully centered position of the plasma cannon with a centered and "looking forward" position of the helmet during head tracking activation.
Practically this means that every time you "activate" a plasma cannon you have to look forward and keep your head level for approximately 1 second, while Madgwick filtering library resets the quaternions to "looking straight forward" values and restarts tacking. This is something one has to remember every time the cannon is activated. It is a small inconvenience compared to the unpredictable behavior of magnetometers in the ever-changing magnetic environment of a big city, and a necessity to recalibrate compasses periodically.
High-level approach description:
- Recalculate IMU's quaternions
- Calculate Euler angles of both IMUs
- Move servos of the plasma cannon in the direction to minimize the difference between Euler angles of the helmet compared to the Euler angles of the cannon
- Rinse and repeat periodically (every 2 milliseconds or 500 times per second in my case)
To smooth out servo movements I average out angle adjustments over 10 values.
Tools:
I forked this MPU-9250 library by Karl Damkjær Hansen and modified it to include Madgwick calculations, accelerometer and gyro offsets upload, quaternion manipulation, and a few other things. The result is located here. Please note this has not been extensively tested outside of this predator project, so use at your own risk!
Accelerometer and Gyroscope Calibration
Before first use, both IMUs need to be calibrated and custom offsets for particular devices established. Custom offsets provide specific correction values and are loaded into the IMUs at the startup.
Example of offsets in the source code:
const int16_t COffsetsGun[] = {5594, 3188, 8798, 31, -11, 54};
The first three numbers are Accelerometer offsets, and the latter three are gyro offsets.
In order to calibrate the IMU, place it on the absolutely horizontal plane with z-axis pointing down and leave completely vibration free.
Calibration sketch IMU_9250_Autocalibration.ino is provided in the calibration folder of the Github package to determine custom offsets for accelerometer and gyroscope.
The rest of the calibration sketches and software allow calculation of magnetic offsets, which I decided not to use in this project due to use of strong magnets.
Connecting Gauntlet to Backpack Via Bluetooth
I really wanted to have gauntlet connected to the backpack wirelessly to avoid running long wires all over the costume. The first attempt to use 315Mhz devices proved to be too unreliable. The connection is slow (1024 bit per second) and constantly lost command codes.
I decided to use two Bluetooth devices:
- an HC-05 transmitter device (like this one on Amazon)
- an HC-06 receiver device (like this one on Amazon)
The key is to make two devices automatically connect to each other on power up and use hardware (or USB) serial interface for faster communications.
As a result, communications are faster (9600 bps) and much more reliable.
Arduino in the gauntlet is communicating with HC-05 via USB Serial (Pin 0, Tx). Because Arduino is a 5v device, and HC-05 is a 3.3v device, a voltage divider with 1kOhm/2kOhm resistors was used. Arduino is only transmitting, so we do not need an Rx wire.
Teensy 3.5 is communicating with HC-06 via Serial 5 HW interface (Pin 35, Rx). Because Teensy is a 3.3v device we can use a direct connection. Teensy is only receiving data, so we do not need a Tx wire.
LINKING HC-06 AND HC-05
An excellent guide on how to connect these two devices is located here.
I set up HC-06 (receiver) to use 9600 rate, and changed its name (to "PRDTOR") and pin (1234 or pick your own):
- AT+BAUD4
- AT+NAMEPRDTOR
- AT+PIN1234
Please note that default HC-06 rate may vary. Try 9600 or 38400 and everything else. HC-06 should enter AT mode right after power up unless it is immediately connected to another device.
Setting up HC-05 transmitter is a little more involved.
First, you need to make the device enter full AT mode, then make it look for other BT devices, then connect to PRDTR with a pre-defined pin, and then make this a default connection every power-up.
(To enter full AT mode: power up HC-05 holding the button next to EN switch, and keep holding it to the end of the process. NOTE: HC-05 always uses 38400 rate in full AT mode)
- AT+CMODE=0 (connect to any device)
- AT+INQM=0,5,9 (look for up to 5 other devices for max 9 seconds)
- AT+INIT (initialize)
- AT+INQ (inquire)
- you should see a few devices with addresses that look like this: 2015:3:191723
- AT+RNAME?2015,3,191723 (query device name. This was PRDTOR)
- AT+PSWD=1234 (use this pin for pairing)
- AT+PAIR=2015,3,191723,9 (pair)
- AT+BIND=2015,3,191723 (bind)
- AT+CMODE=1 (only connect to known devices)
- AT+LINK=2015,3,191723 (connect to PRDTOR)
- AT+BAUD4 (use 9600 rate)
Two devices will always connect upon power-up.
Wii Buttons Mapping and Commands
Wii Nunchuck is a wonderful device for controlling multi-function costumes like this one.
Wii has a joystick, two buttons (C - select, and Z - fire), and also an accelerometer.
I forked and slightly modified a button library to make every Wii button support 3 types of clicks:
- Single (regular) click
- Double-click
- Long press click
This provides for 18 distinct commands. Combine this with the ability to detect that the controller is upside-down, and you get full 36 commands! The modified library is located here.
Below is a list of commands:
WII IS UP (not upside-down)
BUTTON Z (Fire):
- If plasma cannon is not active:
- Any click - NO ACTION
- If plasma cannon is active:
- Single click - FIRE SINGLE SHOT
- Double click - no action
- Long press - RAPID FIRE until released
BUTTON C (Select):
- If plasma cannon is not active:
- Single click - Turn 3 bio mask lasers ON and OFF + make 3 laser designator sound
- Double click - Flash Yellow eyes
- Long press - N/A
- If plasma cannon is active:
- Single click - Turn cannon laser pointer ON or OFF + make targeting sound
- Double click - Flash Yellow eyes
- Long press - Enter target tracking mode (cannon keeps pointing to a single spot, not following the head) + make long targeting / following sound
JOYSTICK FORWARD:
- If plasma cannon is not active:
- Single click - N/A
- Double click - N/A
- Long press - make "blades out" sound on press and "blades in" sound on a release of a button
- If plasma cannon is active:
- Single click - deactivate the cannon
- Double click - N/A
- Long press - N/A
JOYSTICK BACK:
- If plasma cannon is not active:
- Single click - activate the cannon and set cannon and head "forward" direction immediately
- Double click - N/A
- Long click - activate the cannon but wait until the button is released to set cannon and head "forward" direction
- if plasma cannon is active:
- Single click - re-center the cannon and set cannon and head "forward" direction
- Double click - N/A
- Long click - re-center the cannon and hold it there - set cannon and head "forward" direction on button release
JOYSTICK RIGHT:
- Single click - "clicking" sound
- Double click - "Any time" sound
- Long press - "Over here, over here, over here" sound
JOYSTICK LEFT:
- Single click - roar
- Double click - laugh (that evil laugh sound right before self-detonation in the movie)
- Long press - long lasting clicking/snarl
Testing: Measure Seven Times - Cut Once
This is to make sure you breadboard and test every step of the way.
Only solder components when the exact design and schematics have been tested on a breadboard and confirmed working.
All sketches contain the
// #define _DEBUG_
statement, which, if uncommented, will print additional debug information.
COMPONENTS TESTING
Included with files on the Github is a sketch (Box_Component_Testing.ino) which could be used to test every electronic component of the costume. The test is sound-enabled with a lovely female voice going over all components and reading out their status.
I had plans to include this into the main code but ran out of time before Halloween to do so.
SOME POSSIBLE DESIGN IMPROVEMENTS:
Some things that could have been done better (which are there exactly for the lack of testing):
- On/Off switches
There are no operational ON/OFF switches: neither on the backpack, nor or the control gauntlet.
The Backpack: I provided one ON/OFF switch, but after a while of testing realized that two power lines were necessary (due to power requirements of the sound systems I suppose). I am using the power switch on the battery as a result.
The Gauntlet: I got so carried away soldering that I forgot to include power switch until everything was already put together. I have to disconnect USB power plug on the Gauntlet as a result.
- USB connector for attaching the Helmet
Although it seemed logical to place USB connector where it is now since the helmet can only be connected after it is on my head, connecting USB cable on your left shoulder while wearing the helmet is extremely inconvenient. As a result, I need help suiting up.
- Gauntlets' cut-outs
A more elegant solution would be to design two piece gauntlets with some sort of a locking mechanism. I was running out of time so opted to design a cut out on each with a velcro strap.
- No count-down display on the left gauntlet
There is no countdown counter. I was planning to use one of the 8 x 7segment red LED display assemblies, but it proved to be too big and too bulky. This is a task for next year. Meantime, Nano's red LED provided the necessary ambiance.
- Dreadlocks
Apparently, backer rod material used for dreads does not hold latex paint very well and does not hold spray paint AT ALL. If you have the time and the patience - prime the dreads and do latex as a second coat.
Sketches and Libraries
All the files required to build this costume, including 3d designs, schematics, sounds, and code are located on Github.
Arduino libraries used by this project are:
- TaskScheduler (GitHub) - developed and maintained by me.
- PWM Servo Driver (GitHub) - modified by me to work with Teensy, original is here.
- AvgFilter (GitHub) - developed and maintained by me.
- MPU9250 IMU driver (GitHub) - modified by me to work with Teensy and incorporate Madgwick filter, original is here.
- DF Player Mini driver (GitHub) - modified by me to allow asynchronous serial command transmission, original is here.
- Queue Array (available on www.arduino.cc)
- Wire (standard Arduino library)
- Avr Watchdog (standard Arduino library)
- Avr Pgmspace (standard Arduino library)
- SoftSerial (standard Arduino library)
- Nunchuck driver (available here)
- One Button (GitHub) - modified by me to work with the general notion of a button, since incorporated in the main repository here.
- i2c_t3 (standard Teensy i2c library)
COMMON INCLUDES:
There are 3 common includes used by all 3 sketches:
- predator_commands.h
- predator_head_commands.h
- predator_sounds.h
What I usually do in case of common includes is I create a folder called MySettings in the Arduino library folder and put common includes there.
I2C BUS ISSUE WITH TEENSY 3.5:
I was keen on using multiple I2C buses of Teensy 3.5 to control different I2C devices, but for whatever reason the bus controlling PWM servo board would always hang. I tried numerous servo motors, pull-up resistors, separate power sources, etc., but nothing helped. What helped was putting all the I2C devices on one bus and enabling I2C bus timeout and auto-retry (which, according to the source code comment only works on a single bus).
So if you are faced with a similar challenge, do not forget to uncomment
#define I2C_AUTORETRY
around line #102 of the Teensy i2c_t3.h file. In my case (windows 10) located at
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\i2c_t3
Storage
Having spent a year and quite a lot of money on this costume, it needed a place to be stored between Halloweens (and costume parties).
Luckily a neighbor was getting rid of a Samsonite suitcase, which was repurposed as a storage box.
Mask and dreadlocks are the most delicate parts, and electronics need to be kept dry.
So each of the components was placed in the individual plastic bag like these ones to prevent moisture from damaging paint and electronic components.
The suitcase was lined up with flexible Pick and Pack foam sheets designed to be configured according to the to shape of the object being stored.
The resulting storage system was branded with a Predator icon and an Instructables logo!
(The feet don't fit in the suitcase and will have to stored separately)
Stress-testing: Trick or Treating During 2018 Halloween
A good run with a costume in Brooklyn, New York on Oct 31, 2018. Lots of character recognition, probably thanks to the recent Predator movie.
I was out for about 3 hours, constantly using the sound systems and all electronic components.
The batteries held well. I suspect the costume can go on for 10-12 hours. The operator might not last that long :)
Acknowledgements
This little fellow was keeping me company at my desk throughout the year of building the costume.
SPECIAL THANKS TO MY FAMILY FOR PUTTING UP WITH ME AND THE MESS WHILE THIS WAS BEING BUILT, AND ESPECIALLY TO MY DEAR DAUGHTER, ALEXANDRA, FOR HELPING A LOT WITH THE DREADLOCKS,
MY SON, ALEXEY, FOR HELP WITH PAINTING
AND MY WIFE, KATYA, FOR SHOOTING THE VIDEOS AND PHOTOS.
Good luck building one if you decide to embark on this journey!!!!