If you’ve been looking for inspiration or ideas for your next Halloween decoration, then consider this fun project idea. I’ve been looking for ways to make a simple and inexpensive project that highlights our Limited-Availability Parallax Animation Kit (# )[1]. Turns out that Halloween naturally provides a great setting for this type of application. So, I made a trip to the dollar store and purchased an inexpensive felt prop with movable joints. Standard servos provide a perfect means to add some movement to the prop and adding a speaker allows it to play a song (or whatever spooky sound you have in mind).
For this project each servo moves one limb and I decided to provide movement to each limb (arms and legs) so I needed 4 standard servos. The Animation Kit comes with 2 standard servos, and the code I used can easily be modified to work with just two servos for the arms or possibly the head and one arm. Ok let's have some fun!
For your protection, practice safe handling of sharp tools like box cutters. When working with hot glue and tools with moving parts, always wear safety glasses!
The type of servos I used are called Standard Servos. These are able to rotate a maximum of about 175 degrees and provide more than enough range of motion for this project.
To anchor the servos, you will need a surface stronger than the felt material that the prop is made out of. The holes you will create are for the servo spline.
For the sake of simplicity, I simply eye-balled the location for where the hole should go and started drilling. For better-looking results, you may want to do some measuring first.
This should hold the servo onto the cardboard. The servo spline may not poke all the way through the cardboard but that’s ok because the servo horn should still be able to connect to the spline.
Remember to take into account the servos angle of motion so that you get the maximum range of motion for your project. Spend some time making sure it can perform the motion you want before anchoring the servo down permanently. You will likely need to loosen or remove the horn again to apply glue.
Each servo horn is too short to move a limb on its own. You can use popsicle sticks, pipe cleaners, or other makeshift items and glue them onto the servo horn so that the servo can reach further. I didn’t have popsicle sticks unfortunately, because somebody decided to eat ALL of the popsicles in the freezer here at Parallax.
There are no hard and fast rules to the arts and crafts part of this project. I used aluminum parts from one of our crawler kits but you can also use any type of item that you think will do the job.
To add sound to your project, you’re going to need a couple of items. You will need a micro sd card and a speaker such as the one we carry in on our webstore (listed in parts section). You will also need to know how to place a .wav file onto the card.
Want to create or edit files of your own for use in this project? See our Sound Library [9] reference guide for help.
For help using these blocks, see the Propeller BlocklyProp Block Reference [10] section.
If you only want your file to play for a limited amount of time then add a 10000 millisecond pause block after the WAV play file block or whatever amount of time you choose, then add a WAV stop block right after. If you would like your file to play until the end don’t add a WAV stop block.
The PIR from the Animation Kit is a great way to motion-activate your new project. It is simple to program and effective during the day or at night.
I plugged in my long jumper wires to the 3 pins on the sensor, then glued the black part of the cable connector to the backside of my project. If you are obscuring the pin connection markings, make sure you know which pins are for ground, power, and signal on your PIR before you glue it down or cover it in some way.
Now that the components are in place, it's time to wire it up.
I used Servo Headers 14-17 for the arms and legs, and the other ends of the PIR jumper wires into PWR, GND, and P0.
Note: My code has a servo assigned for head motion, but I did not use it in my project. You will likely need to modify the code for your own purposes.I wanted to make the prop insert into the soil of someone’s front yard, so I glued a metal rod down the center of the prop so that it lends itself to insertion into the ground. You can use a stick or whatever item you see fit.
The key is not to make it too complicated. Simplicity is the best path for these kinds of projects because they are meant to be creative and fun. Use the pictures included in this project to make your project just like mine or to help make it your own.
Happy programming!
Links
[1] https://www.parallax.com/product/910-28088
[2] https://www.parallax.com/node/380
[3] https://www.parallax.com/node/71
[4] https://www.parallax.com/product/32912
[5] https://www.parallax.com/product/900-00018
[6] https://www.parallax.com/product/753-00007
[7] https://www.parallax.com/product/32328
[8] https://learn.parallax.com/tutorials/language/propeller-c/propeller-c-simple-devices/play-wav-files
[9] https://learn.parallax.com/support/reference/sound-library
[10] https://learn.parallax.com/support/reference/propeller-blocklyprop-block-reference/audio
[11] https://learn.parallax.com/support/reference/propeller-blocklyprop-block-reference/sensor/pir