This year, I decided to take Halloween mechatronics into my own hands—and invited my five-year-old to join in! Together, we created a family-friendly electronics project that’s perfect for a spooky, batty display on the porch. This setup was fun, simple, and just the right amount of Halloween spirit.
Our goal was straightforward: make a spooky swarm of bats that hover up and down to greet (or spook!) trick-or-treaters. Here’s what we pulled together:
- Eight handmade bats hang from fishing wire, each bat rising and lowering thanks to a motor system.
- Each bat has a pom-pom body made from black yarn, felt wings and LED eyes that glow red or green.
- CircuitPython code paired with Adafruit electronic components powers the motion and brings it all together.
Little Hands, Big Help
This project was especially fun because my kindergartener got involved every step of the way:
- Pom-Pom Bat Bodies: With a pom-pom maker, they wound yarn with enthusiasm and snipped it into a fluffy bat shape.
- Felt Wings: They cut out felt wings to give our bats that classic look.
- Plugging in Electronics: With a bit of guidance, they got hands-on with the wires and screws.
- Intro to Coding: Watching code turn into real motion was a hit and sparked plenty of questions about how it all worked.
Engineering the Bats
Here’s a quick breakdown of the parts that brought the bats to life. Our materials list looked like a mini-haul from Adafruit:
- Circuit Playground Express Boards: The brains of the operation, these boards run the CircuitPython code for our hovering bats.
- Adafruit Crickit Motor Controllers: These nifty little boards are Creative Robotics & Interactive Construction Kit, perfect for kid-friendly robotics. The Crickit communicates with the Playground Express via I2C.
- Continuous Rotation Servos: Eight continuous rotation servos did all the heavy lifting (and lowering!). Attached to each motor was a 3D printed spool that would wind the fishing line, pulling the bats up and down.
- LED Eyes: Each bat had a set of 2 LED eyes, powered by a CR2032 battery holder with three LED modes: solid, slow blink, and fast blink. The eyes were creatively jammed into the body of the bat and the battery holder was covered in electrical tape to make a little backpack matching the color of the bat body. The whole thing was secured with a little extra fishing wire.
Bat Movement Control Code
Getting our bats to flap and hover was thanks to the easy-to-use CircuitPython / Crickit servo libraries. A quick download from CircuitPython.org got us the exact version we needed to utilize all the servo control libraries for the Crickit. With the CircuitPython interpreter installed, the code was straightforward to write.
One Crickit board can control four servos. This program utilizes a BatServo class to control the movement of each bat individually. This class controls the speed and duration of the movement cycle of down and up motions. Each bat’s rise and fall have slightly different timing, making it look like they were taking turns swooping in for a closer look at the trick-or-treaters.
The main loop simply calls the update function of each of the four bats in turn. If the move cycle of down and up motions is complete it will let the bat rest for a small amount of time. When the bat has rested a new move is determined. Both the speed and duration of the next move are randomly generated. The update function checks the current time and the current state to determine the next action. A little randomness in the code added that eerie, unpredictable factor—perfect for Halloween.
Complete Movement Code:
Creating this hovering bat swarm has been a fun addition to our porch and teaming up with my kindergartener to make these Batty Porch Bats was a perfect way to celebrate Halloween.
Special Thanks to:
- Amy Cheben for designing and 3D printing the spools!
- Jason Glaser for helping me find teeny tiny screws to mount the spool onto the servo horn
- My husband for helping me attach all the motors and bats to our house
- My father for also helping with the bat installation
Halloween Batty Bat Bots Components List
- 2x Adafruit Crickit motor controller boards - https://www.adafruit.com/product/3093
- 2x Adafruit Circuit Playground Express - https://www.adafruit.com/product/3333
- 8x Continuous rotation servo motors - https://www.adafruit.com/product/154
- 4x Servo extension cable - https://www.adafruit.com/product/972
- 8x Single CR2032 Battery Holder with Three Flashing Modes - https://www.adafruit.com/product/4891
- 16x LEDs (mostly red, a few green. For fun.)
- 8x 3D printed spools - Thanks Amy!
- 8x Pom poms with bat wings - made with black yarn and felt
- Fishing wire