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.
- 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!
The wiring for this is;
- Brown to Digipark ground
- Red to Digispark +
- Orange to p0
- Red to switch then from switch to Digispark +
- Black to Digispark –
- 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