Update! I’ve been entered in the Instructables game.life challenge contest. If you like my project please vote for it. Here’s the link to my instructable: http://www.instructables.com/id/Motion-activated-Attack-Creeper/
In January I decided that I needed to upgrade my in-home security. Unfortunately for me my building does not allow dogs so a big scary animal was not an option. Then suddenly, inspiration struck or I guess you could say exploded.
The most logical option was obviously to create a near life size Arduino powered, motion activated, audio playing, remote controllable Minecraft Creeper. Obviously.
As always this started with a fairly lengthy list of relatively inexpensive supplies. Here’s the most complete list I can compile from memory.
The electronics
- Arduino UNO (all good projects start with an Arduino)
- Ada Fruit Wave Shield (for audio playback with the Arduino)
- Electric Sumo CMoy Amp (I wanted to build one of these anyway so I picked it up for the project)
- Cheap RC Car (I picked mine up for $15 at the drug store)
- PIR Sensor
- Speaker (mine came with my Wave Shield kit)
- Various bits of wire
- Batteries, lots and lots of batteries
- Something to power the Arduino (I used a Minty Boost also from Adafruit)
And the crafty bits
- Cardboard boxes
- Paint
- Hot glue (I used the normal stuff to hold the electronics in place and some heavy duty pull-the-skin-off-your-hands industrial stuff to hold the boxes together
- Masking or painters tape
- zip ties/cable ties
OK So first lets build a cardboard creeper. I sketched out the basic idea to help me find boxes that fit the correct proportions. I wouldn’t want a disproportionate in-home “Attack Creeper” because that would be ridiculous.
My first step was cutting holes to allow me to run cables internally from box to box and opening up some access doors on the back of each box. I also cut holes in the bottom box to allow me to thread cable ties through the bottom and around the RC car and opened holes for the PIR sensor and speaker. After this was done I connected the three cardboard boxes that make up the body using some heavy duty hot glue. This stuff will pull the laminate off your desk before it pulls off, serious stuff. Everything got a coat of “Creeper Green” paint and I masked off the eyes and mouth for a coat of “Soul-less Killing Machine Black”.
- Cardboard boxes glued and ready for paint
- Access holes cut in each box to allow wiring to run internally
- First coat of acrylic paint
- Green paint completed, starting to look like a Creeper
- This actually looks scarier than the finished face!
- The completed cardboard creeper, ready for electronics
Next step electronics!
My program basically works like this
- Detect motion with the PIR sensor
- Play fuse.wav (aka Tsssssssss…) via the Wave Shield
- Trigger the “Forward” button on the RC car remote for 2 seconds
- Play explode.wave via the Wave Shield
- Wait 10 seconds and reset
Here’s a wiring diagram which explains how this monster is hooked up.
The PIR sensor was really easy to hook up using the instructions available on Adafruit’s website. I imagine any sensor that measures distance or detects motion could be used in place of this. I will say (for better or worse) using the example code for the PIR sensor made it very sensitive, maybe too sensitive.
The RC car came with a simple remote that contained four momentary micro push buttons. I just wired into one side of the “forward” button and used the Arduino to turn the button. I also removed most of the body of the RC car leaving just the wheels, motors and frame.
I copied the in game sound effects from Minecraft to the SD card in the wave shield for playback. The output volume of the Wave Shield on it’s own is pretty quiet so I ran it through the CMoy Amp to boost it’s volume to a appropriately scary level.
After I was sure I had everything working I used some standard craft hot glue to glue the speaker and PIR sensor inside of the Creeper body. I also glued the back of the body closed because as I learned it’s nearly impossible to get tape to stick to acrylic paint.
- RC car ready for surgery
- Car body removed of superfluous plastic
- Cover removed from remote for modification
- Wave shield assembled and ready to use
- Speaker and PIR sensor glued in place
- Speaker and PIR sensor installed
Here’s a montage of the little guy working. He’s just so adorable I could explode.
Now if you make your own motion activated “Attack Creeper” you’ll find the real fun is hiding in places around the house your roommates and/or significant other would not expect it.
- Time for a Tsssssshower?
- Looking for your Tsssssssuit?
- That's a nice fort you're building. It would be a shame if something happened to it.
And since someone might be interested in my terribly mashed up code here’s the code I used to run the thing. I used the example code for the PIR sensor and Wave Shield both available on adafruit.com to create this mostly functional code. Use at your own risk!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | /*
Motion activated "Attack Creeper"
Detects motion using a PIR sensor. When motion is detected plays two wave files and activates RC remote.
Code examples edited and reworked from http://wwww.ladyada.net
TheNewHobbyist 2011 <http://www.thenewhobbyist.com>
*/
#include <FatReader.h>
#include <SdReader.h>
#include <avr/pgmspace.h>
#include "WaveUtil.h"
#include "WaveHC.h"
SdReader card; // This object holds the information for the card
FatVolume vol; // This holds the information for the partition on the card
FatReader root; // This holds the information for the filesystem on the card
FatReader f; // This holds the information for the file we're play
WaveHC wave; // This is the only wave (audio) object, since we will only play one at a time
// for PIR
int ledPin = 13; // choose the pin for the LED
int inputPin = 6; // choose the input pin (for PIR sensor)
int pirState = LOW; // we start, assuming no motion detected
int val = 0; // variable for reading the pin status
#define DEBOUNCE 5 // button debouncer
// this handy function will return the number of bytes currently free in RAM, great for debugging!
int freeRam(void)
{
extern int __bss_end;
extern int *__brkval;
int free_memory;
if((int)__brkval == 0) {
free_memory = ((int)&free_memory) - ((int)&__bss_end);
}
else {
free_memory = ((int)&free_memory) - ((int)__brkval);
}
return free_memory;
}
void sdErrorCheck(void)
{
if (!card.errorCode()) return;
putstring("nrSD I/O error: ");
Serial.print(card.errorCode(), HEX);
putstring(", ");
Serial.println(card.errorData(), HEX);
while(1);
}
void setup() {
byte i;
// set up serial port
Serial.begin(9600);
putstring_nl("WaveHC with ");
putstring_nl("buttons");
putstring("Free RAM: "); // This can help with debugging, running out of RAM is bad
Serial.println(freeRam()); // if this is under 150 bytes it may spell trouble!
// Set the output pins for the DAC control. This pins are defined in the library
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, INPUT);
pinMode(8, OUTPUT);
// if (!card.init(true)) { //play with 4 MHz spi if 8MHz isn't working for you
if (!card.init()) { //play with 8 MHz spi (default faster!)
putstring_nl("Card init. failed!"); // Something went wrong, lets print out why
sdErrorCheck();
while(1); // then 'halt' - do nothing!
}
// enable optimize read - some cards may timeout. Disable if you're having problems
card.partialBlockRead(true);
// Now we will look for a FAT partition!
uint8_t part;
for (part = 0; part < 5; part++) { // we have up to 5 slots to look in
if (vol.init(card, part))
break; // we found one, lets bail
}
if (part == 5) { // if we ended up not finding one :(
putstring_nl("No valid FAT partition!");
sdErrorCheck(); // Something went wrong, lets print out why
while(1); // then 'halt' - do nothing!
}
// Lets tell the user about what we found
putstring("Using partition ");
Serial.print(part, DEC);
putstring(", type is FAT");
Serial.println(vol.fatType(),DEC); // FAT16 or FAT32?
// Try to open the root directory
if (!root.openRoot(vol)) {
putstring_nl("Can't open root dir!"); // Something went wrong,
while(1); // then 'halt' - do nothing!
}
// Whew! We got past the tough parts.
putstring_nl("Ready!");
TCCR2A = 0;
TCCR2B = 1<<CS22 | 1<<CS21 | 1<<CS20;
//Timer2 Overflow Interrupt Enable
TIMSK2 |= 1<<TOIE2;
}
SIGNAL(TIMER2_OVF_vect) {
check_switches();
}
void check_switches()
{
}
void loop(){
digitalWrite(8,HIGH);
val = digitalRead(inputPin); // read input value
if (val == HIGH) { // check if the input is HIGH
digitalWrite(ledPin, HIGH); // turn LED ON
if (pirState == LOW) {
// Oh hey movement!
Serial.println("Motion detected!");
// Make scary eyes
Serial.println("playing");
// SSSSSSSSS.... That's a nice everything you have
playcomplete("fuse.wav");
// Move forward for 1 second
digitalWrite(8, LOW);
delay(2000);
digitalWrite(8, HIGH); // MOVE
Serial.println("Move finished");
// End Movement
// Explode
Serial.println("time to explode");
playcomplete("explode.wav");
// Go back to sleep
Serial.println("resetting for next run");
delay(10000);
// We only want to print on the output change, not state
pirState = HIGH;
}
} else {
digitalWrite(ledPin, LOW); // turn LED OFF
if (pirState == HIGH){
// we have just turned of
Serial.println("Motion ended!");
// We only want to print on the output change, not state
pirState = LOW;
}
}
}
// Plays a full file from beginning to end with no pause.
void playcomplete(char *name) {
// call our helper to find and play this name
playfile(name);
while (wave.isplaying) {
// do nothing while its playing
}
// now its done playing
}
void playfile(char *name) {
// see if the wave object is currently doing something
if (wave.isplaying) {// already playing something, so stop it!
wave.stop(); // stop it
}
// look in the root directory and open the file
if (!f.open(root, name)) {
putstring("Couldn't open file "); Serial.print(name); return;
}
// OK read the file and turn it into a wave object
if (!wave.create(f)) {
putstring_nl("Not a valid WAV"); return;
}
// ok time to play! start playback
wave.play();
} |


















My name is Chris. I'm a Chicago area maker and 3D printing enthusiast. This blog is a home for my DIY projects, 3D designs and other miscellany.







Joel
March 28, 2011 at 11:51 am
I absolutely love th-BOOM!
Make Your Own Creeper, Lose Friends | GAMINGtruth.com
March 28, 2011 at 8:57 pm
[...] intrepid madman over at The New Hobbyist has crafted his own Creeper out of an RC car, some cardboard, an Arudino chipset, and some [...]
Motion Sensing Minecraft Creeper Will Scare the Pickaxe Offa’ya | House of Mods
March 28, 2011 at 9:29 pm
[...] Writes in to tell us about his motion sensing, Arduino powered Creeper. As if these buggers were not frightening enough in game, [Chris] had to go and make the closest [...]
Real-Life Radio Controlled Minecraft Creeper to Scare Intruders
March 29, 2011 at 12:32 am
[...] by Chris of The New Hobbyist, this radio-controlled Creeper on wheels was made out of cardboard boxes for its shell and [...]
Ger
March 29, 2011 at 6:59 am
This is EPIC
Nibby
March 29, 2011 at 4:27 pm
This rulesssssssssssssssssss.
Motion Activated Creepers… — Thumb Culture
March 29, 2011 at 10:01 pm
[...] If you are interested in making your own, click this link right here. If you cannot make your own, feel free to donate some explosives (Thermite is nice, and you can get it on eBay) to people who are willing to make one. We can send them to Libya and fight for freedom! No, I’m seriously. This can be used by the rebels as a low-tech form of IEDs. Yes, I’m implying Minecraft is inspiring motion-based mobile IEDs. [...]
Guard That Nice Everything You Have With This ‘Attack Creeper’ | Kotaku Australia
April 10, 2011 at 5:26 pm
[...] Motion-Activated Attack Creeper [The New Hobbyist] Tagged:creeperdiyfunnyinstructablesminecraftmodspcrcsssssssssssvideo [...]
David Galindo
April 20, 2011 at 5:27 pm
This is such an awesome project! You have totally inspired me with ideas for digging deeper into my Arduino!
Excellent work and thanks for sharing!
P.K.
April 22, 2012 at 12:56 am
This is awesome!!!!!
would have used the default skin and printed ti out but that’s because I’m lazy
soooo building a +6ft version!!!!!!!!
I’ll post a pic when I’m done!