Animate a cheap Walmart Halloween decoration with Arduino

Creepier Door Knocker

 

I picked up this scary face door knocker last year at Walmart for $5, they probably still sell them but I haven’t checked. I am not actually using an ardunio, but a similair thing called a Digispark made by Digistump (hard not to mix these names around) but I friggin love these things. They are not as full featured as an Arduino, but for what I’m about to do they are overkill and super easy to use and pretty cheap. They also use the same software (the software made by Ardunio). Most hobbists will probably tell you that you could make the thing for even cheaper yourself, I am lazy and I defend that trait for two reasons, conservation of enegry and the fact that I do not need to reinvent the wheel. Ten bucks is cheap enough in my opinion (I am not mass producing anything using these).

I have some plans for what to do to it next year, I always break things up into multiple revisions. I definitely want to add a motion sensor, currently it just repeats this loop until I turn it off or until the battery dies. I also want to add sound. However instead of installing a speaker inside the knocker,  I want to try to use bluetooth and have the sound play on an external speaker hidden in the bushes or next to the porch. Maybe I can have it ping my phone so that I know someone is there before they even ring the door bell.

Parts List

  • 1 Plastic scary old man door knocker from Walmart (here is a similar one on Amazon)
  • 2 RGB LEDs (I purchased form SparkFun)
  • 1 Digispark or any arduino (not much code here so even an Uno would be overkill)
  • 1 servo (I purchased the ‘Medium Servo’ from SparkFun)
  • ! pack of 100 Ohm resistors (1/2 watt radio shack 2711108)
  • 1 AA battery pack (Sparkfun, again)
  • 1 switch (I had it left over in the parts bin)
  • Misc: Hot glue, epoxy putty, wire, solder, USB Hub (highly recommended), some think aluminum from home depot

So, I present to you my build log, happy Halloween!

 

original door knocker

The is the door knocker after I had removed the two cheezy red LEDs I put in it last year

digispark

Digispark, for those not in the know

a guy with epoxy putty goes mad

Beginning of the servo mount, don’t worry, it gets sloppier!

LEDs and servo installed

Jump ahead to where I have the eyes cut out, RGB LEDs installed, and used hot glue to shape the eyes and fill in the gaps. I also have a battery pack Velcro-ed to a metal plate that I used epoxy putty (JB Weld) to hold the plate in with 4 AA batteries. The servo is mounted and fully secured using, you guessed it, HOT GLUE. Oh, and also, I burnt out the green and blue LEDs after I had hot glued them in, so the defective ones are staying there this year. I fashion an L shape key out of some aluminum sheet metal I got from Home Depot that I had lying around. I also used this to make a bracket for the top of the servo and I epoxied it down. I coated everything in liquid electrical tape and hot glue. I would still probably take it down and bring it inside if we had any rain just to be safe.

switch install

Here I am dremeling out a space for the switch

 

The wiring for this is;

Servo

  • Brown to Digipark ground
  • Red to Digispark +
  • Orange to p0

Battery pack

  • Red to switch then from switch to Digispark +
  • Black to Digispark -

LEDs

  • Red to 100 Ohm resistor then to p4
  • Return (ground) to Digispark ground
  • Green to 100 Ohm resistor then to p5
  • Blue to 100 Ohm resistor then to p0

 

For the source code I used analogWrite to set the brightness of the LEDs. I would have probably went with a progressive green fade-in fade-out but I did something wrong and burnt out the green and blue components so I only had red left.

I did not use any servo libraries, I just used digitalWrite() and delayMicroseconds() to get the servo to the desired position. This is a really basic build up. Nothing complicated here.

Source code can be found here

 

 

 

 

 

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>