Turn Around, Bright Eyes
After two years of coming in second place, it was time for The Bridesmaids to become the bride; the corpse bride, that is. With a theme decided, we needed to figure out what we actually wanted this mech to do! Ultimately, we settled on a Halloween decoration that interacts with trick-or-treaters by sensing their approach and following their motion with our corpse bride’s head. We added a few extra tricks to up the spooky-factor and fully showcase our electrical, firmware, and mechanical engineering prowess.
The prime creepy factor for our Corpse Bride came from moving her head to track the motion of the trick-or-treaters. An OpenMV Cam microcontroller board with a camera module and integrated PWM on the I/O pins allowed for the head servo motor to be directly wired to and controlled by the built-in Face Detection algorithm.
In addition to the OpenMV Cam, we yet again made use of the Adafruit Circuit Playground family of boards since they continue to be a great platform for mechanisms like this one. We chose the Circuit Playground Bluefruit so that we could take advantage of the BLE capabilities that it offers, specifically for actuating the servo motor for the creepy hand motion.
We utilized NeoPixel LEDs again this year, but in a new formfactor. The eyes used NeoPixel Jewels, which are seven tiny smart RGB LEDs on a round PCB that were super simple to wire up and install into our Corpse Bride’s head.
Eye LEDs and ultrasonic sensor installed
We also used a long flexible strip of LEDs at the base on the Corpse Bride to illuminate her skirt and add some ambiance to the setup. Thankfully, using these two forms of NeoPixel LEDs really helped minimize the amount of soldering required, as compared to last year. The NeoPixel strip suffered some bad flicker which while increasing the spooky ambiance, was not intentional and was fixed by adding a large 200uF capacitance to the power busbar to help buffer the rapid changes in current.
The LEDs are controlled through an ultrasonic sensor, mounted on the Corpse Bride’s neck. Her eyes and ground lights start out as an icy blue/white when the trick-or-treaters are far away, but as they approach, the LEDs transition to a fiery red (Victoria, our Corpse Bride, likes her personal space).
Since a lot of the components on the Corpse Bride needed to be removed during assembly and transportation, a screw terminal bus bar and plug in jumper connectors were used to allow easy debugging and head removal. A rough power budget showed that a 5V/8A plug-in DC power supply would be plenty to power the contraption, and conveniently all components would work on that same 5V rail.
Completed electronics board
The motion for our corpse bride was broken down into two distinct sub-systems: the head motion and the creepy hand motion. Both of these motions were accomplished by utilizing 180-degree servo motors. The 180-degree motors were particularly useful in this case to simplify the number of sensors that would be needed to control the motion since 180-degree servo motors have a defined zero point that a continuous rotation servo motor does not have. The defined zero-point removes the need for an encoder or another sensor to find the home position and prevent our Corpse Bride from twisting her head around too many times and pulling out her eye wires!
The head motion was very simple from a mechanical perspective, once the servo motor was specified, the skull was removed from the neck, and a mounting slot for the motor was cut into the neck bones. The motor was epoxied in place and the servo horn was attached to the bottom of the skull at the point where the neck was installed (we didn’t want her head to go on crooked).
Head motion testing during build
The creepy hand motion was a little more complicated to pull off though. Amy took inspiration from a fun intro to robotics craft that uses a cardboard cutout hand, straws, and string to create a robotic hand that closes when you pull on the strings and opens when you let go. Cardboard isn’t as fun or cool looking as a 3d printed part, so Amy designed an articulating hand that printed in a single piece with channels from the tip of each finger to the base of the hand. After the hand was printed, fishing line was threaded through each channel and tied at the fingertips. The other end of the fishing line was attached to the second servo motor after the hand was installed on the Corpse Bride and the hand was able to close when the motor rotated to pull the strings taught.
Side view of the motor and 3d printed hand mechanism
Victoria is very protective of her ring pop! The creepy hand control was achieved through the Adafruit Blufruit board. The 180° motor movement proved extremely easy to accomplish with the Adafruit Servo micropython library. Simply setting the desired angle moved the servo appropriately. A small routine was setup to clench the hand and immediately release so the fingers could be relaxed.
The Bridesmaids decided to tie the hand motion to a simple BLE command sent over the Blufruit UART characteristic. Using a BLE test app, such as nRF Connect or nRF Toolbox, allowed us to connect to the Bluefruit board and send our commands to run the simple hand motion routine. The whole routine clenches the hand and makes her eyes blink and flash red, for extra creep. Using a BLE command to trigger this spooky action allowed us to maximize the startle factor of the skeletal contraction.
Close of up hand mechanism
Eye and ground light control
When our bright-eyed Victoria is all alone the LEDs start out with the blue LED at full intensity, to shine a pure ice cold blue. As the proximity sensor notices someone approaching the red LED slowly ramps up intensity as they get closer until it peaks at a warning violet color. As the person continues approaching the blue LED slowly ramps down intensity to shine angry red where her COVID bubble is breached.
The atmospheric ground lights used the same color as the eye lights but used a random number generator to tweak the color of individual lights in the string. The effect isn’t always obvious in the video, but the atmospheric twinkling adds to the spookiness as tricker-treaters approach.
The Adafruit Blufruit board made this all simple to control with their neopixel library.
Eye colors changing as someone approaches
The face detection library available on the OpenMV camera, was the Haar Cascade algorithm. While an older algorithm, it is quite powerful and to achieve tracking of gross head movements it was sufficient in a controlled environment, i.e., the basement lair where Victoria was constructed. Changing lighting conditions played havoc on the face detection when taken outside for the ceremony, as did passing cars. Ultimately, that just increased the creepiness of her occasionally erratic head movements as she is moving between different people (or things) that capture her attention.
Mapping face location within the camera’s field of view to head movement proved to be a bit tricky. This took a little tweaking to achieve believable results. The camera and proximity sensor were statically mounted to Victoria’s rib cage to be out of the way of her veil. Ultimately, we mapped the camera view to about 80% of her possible 180° head movement. This calculation works pretty well, but she tends to overshoot a bit so appears to give people the side eye when they move toward the periphery of her vision.
Face tracking in OpenMV
Super Awesome Video
Pulling it altogether was the epic 80s classic “Total Eclipse of the Heart” written by Jim Steinman and iconically sung by Bonnie Tyler. The legendary music video can be seen as inspiration for our entry video! Our child actors are growing rapidly in mobility, height, and in opinions, but graciously made an appearance sporting their original Hell’s Angels wings.
Thank you for voting and supporting our team this year. We are so happy to take home 1st place in Simplexity’s Halloween Mechatronics Contest!
Watch the Final Masterpiece