Super Spooky Evil LED Eyes of Doom Using atTiny85 and Arduino IDE

 by vatosupreme
Contest WinnerFeatured
SpookySpooky2.jpg
There are a few spooky eye instructables out there. For example, there is one based on a 555 timer, one based on an on/off switch, one based on Arduino, and one based on tape.

I wanted to make a set of spooky evil eyes that met the following criteria:

1. Eyes that fade on and off (pwm)
2. Random duration of eye on and off times without using a pot or other input control to make the effect more realistic
3. Ultra low cost mcu so I can leave it in the decoration without having to re-program or re-insert the mcu.
4. Small controll/power box to make mounting easy

So here is how I did it, and I am pleased with the result. 

At any point in this instructable, you will be able to make substitutions to fit your needs or materials on hand.  If you like this, vote for it and if there are suggestions, I welcome all ideas to improve it.




 
Remove these adsRemove these ads by Signing Up

Step 1: Spooky Materials and Tools Needed

Tools.JPG
Materials:

5 sticks or pieces of wood for the base of the eyeballs
10 ping pong balls - white 
High quality masking tape
Flat black spray paint 
10 Red super-bright LED's
1 atTiny85
Solderable perf board
Screw terminals
20 or 22 Guage Wire
Heat Shrink
Black Silicone
Gel Super Glue
Super Glue Accelerant ---- this stuff is just plain useful. Now you have an excuse to buy some
Vinyl electrical tape -Black
4AA Battery Holder
4 AA Batteries - rechargable if you don't want to use a resistor



Tools:

Razor Knife
Drill & Bit
Wire Strippers
Voltmeter
Staple Gun
Soldering Iron
Arduino
Breadboard & jumper wires
Needle Nose Pliers
3rd Hand

strykeroz says: Oct 25, 2012. 7:21 AM
Thanks so much for this. I've added a 7805 5V regulator into the mix and put a 3mm power indicator LED on the outside of the enclosure as a slight modification. It's all pretty much ready to go but for the glue to hold the eyes in place on the LEDs...something to pick up tomorrow. Since I didn't have screw terminals I've used 5x 2.1mm DC jacks on the outside of the box. For a fine wire I've scavenged the cores from some phone lead I had laying about. I'm very impressed with how well the ping pong balls diffuse the red LEDs. Unfortunately my masking is far from optimal, but as you suggest at a distance, and at night it's all good. I can't thank you enough for this inspirational build.

There's going to be quite a few ATTiny85s in our front yard next week...this put yet another to good use : )
vatosupreme (author) in reply to strykerozOct 26, 2012. 5:35 PM
Cool mods, post video or photos when you get this running.
acesoft says: Oct 29, 2012. 6:44 AM
Awesome instructable! I really enjoyed this project. Completed just in time for Halloween too. I had to make lots of changes do to parts on hand but I'm pleased with the results. I cheated and used some plastic pre-painted eyeballs I found at the dollar store and I only had white led's but the effect is pretty good with the eyeball's red veins. I wanted to run off a cheap 9v wall wart that I had but didn't have any 7805's so I used an LM317 to bring the voltage down to 5.2. Wired in parallel my led's draw 20 ma with 100 ohm resistors and are nice and bright. With the added current limiting resistors and the necessary regulator parts, I decided to etch a board. The board is not a work of art, just drawn quickly with a sharpy but it really saved a lot of time. If anyone's interested, I'll post a pic of the traces, after Halloween though. My one change for next year will be to reduce the max random delay between blinks. The viewing angle for my location is narrow so you don't have a lot of time to see many blinks in passing. I could quickly reprogram but my controller is securely wrapped in a sandwich baggie. Thanks again for the cool project.
vatosupreme (author) in reply to acesoftOct 29, 2012. 7:58 AM
Thanks, I'm so glad it worked out well
Please post photos of the project and the board.
acesoft in reply to vatosupremeNov 4, 2012. 2:42 PM
The Eyes were a hit even though the remnants of hurricane Sandy lessened the number of Trick or Treaters. Here's a few picks of my project. Be kind, it was a rush job.
SpookyController1.jpgSpookyController2.JPGSpookyEyes.JPG
vatosupreme (author) in reply to acesoftNov 4, 2012. 4:33 PM
Looks great!
benfriesen says: Oct 28, 2012. 7:03 AM
Hello,

I have just started with arduino and I used the given code and I'm getting 2 errors. They are: sketch_oct28a.cpp: In function 'void loop()': and
sketch_oct28a:53: error: expected `}' at end of input.

Any suggestions? Thanks
vatosupreme (author) in reply to benfriesenOct 28, 2012. 9:02 AM
I'm guessing you missed the last '}' at the end of the void loop.

Try to add one at the very end of the sketch or try downloading the txt file and do a ctrl a and pasting it into the Arduio IDE.

Hope that works
rwohleb says: Oct 23, 2012. 2:39 PM
Some microcontrollers can sink more current than they can source. In this case, it looks like the ATtiny85 has a symmetric driver so it's not an issue.

If you are worried about current on the microcontroller it would be really simple to add a few cheap transistors to your output pins. A darlington array (ie. ULN2803) will work, and they have them at SparkFun.

If you want to take advantage of the two hardware PWM pins (according to spec sheet) you'll need to multiplex the connections to the multiple LEDs. There are various mux chips (ie 74HC4052) available, and they have some at SparkFun.

I don't work for SparkFun. I'm just a fan :)
HP_II says: Oct 21, 2012. 12:21 PM
Very Cool, I want to try this!
vatosupreme (author) in reply to HP_IIOct 23, 2012. 12:51 PM
Awesome, If you do, post a video.
calenso says: Oct 21, 2012. 1:46 PM
Hi I like your project. If you want to run from regular AA's and still meet the max voltage, you can insert some regular silicon rectifier diodes (1N4000 series) in the power supply line. Each will drop the voltage 0.6 volts, so, with new AAs at 1.6X4 or 6.4 volts, two diodes would leave your project running at about 5.2 volts.
masynmachien in reply to calensoOct 23, 2012. 7:59 AM
yes, very nice project; Got my vote.
You can also replace one of the AA batteries with some conducting part. I mostly use a bolt of the right length.
vatosupreme (author) in reply to calensoOct 22, 2012. 3:16 PM
Thanks for the suggestion, I will add it in !

kshowell says: Oct 21, 2012. 12:54 PM
Nice project. I wanted to try the Attiny on something thank you for the work.
SashaDensikoff says: Oct 21, 2012. 8:39 AM
What if instead of just glowing shaped eye sockets, you just blocked out the pupil part, so the rest of the "iris" part would be glowing. Might want to block the back part of the eye though.
This would make the eyes appear larger, (ping pong balls are small) as while the eyes you made there are cool, their shape doesn't seem to stand out well at a distance (like in the vid) and just look like fairy lights.
If you mean them for close up decoration, then they'll be fine!
Also, when people/animals/er....monsters blink, it's usually faster, not fading in and out.
Otherwise, I'm totally loving this idea, even though the means to make it is totally beyond me, lol!
They're pretty freaky, I'll grant ya!
vatosupreme (author) in reply to SashaDensikoffOct 21, 2012. 10:46 AM
Yeah, one of the things I love about this site is you find out that there are lots of mods to your project you haden't thought of. This size of eye works up to about 18-20 ft. of distance from the viewer in terms of being able to discern the different eye shapes. It took me 2 hours of trying to get the video clearer but the video doesn't do it justice.

With the blinking, I wanted the stylized version of the eyes. If you wanted them to just blink on and off you can adapt the code. This is why I love using a micro controller versus just a 555 timer. You can change the code daily if you wanted without having to re-wire.

If you make one, post it, I am excited to see what people come up with!
scotth61 says: Oct 21, 2012. 8:22 AM
Very cool. Could it be made to have multiple sets of eyes show at the same time?
vatosupreme (author) in reply to scotth61Oct 21, 2012. 8:45 AM
from what I have learned, the atTiny85 can handle 40mA per pin but a max of 200mA for the whole chip so with this setup you should be able to have 2 sets of eyes on at the same time and not burn it up.

I am not sure how to modify the pwm code to allow 2 sets of lights to fade on at once but it is worth a try.

You can easily change the code to just turn multiple pins on HIGH at the same time.

antennas says: Oct 20, 2012. 5:07 PM
Very neat idea. Can you add a schematic to the instructable? It's not really required but may help. I initially thought I needed an ATiny for each pair of eyes but I see it ran all 5 sets. Cool. I will make this to go with my flaming pumpkin.
vatosupreme (author) in reply to antennasOct 21, 2012. 8:37 AM
Thanks,

I just posted a schematic on step 8 that should make this more clear.
paulpaulpaulpaul says: Oct 19, 2012. 11:15 AM
Cool idea :) How is the spray paint adhering to the ping pong balls?

Could you use that vinyl dye paint thats made for plastics?
vatosupreme (author) in reply to paulpaulpaulpaulOct 20, 2012. 4:27 PM
I haven't tried that vinyl dye paint, so I can't say for sure, but it's worth a shot! The regular matte black spray paint is working well so far.
Best_kg_Market says: Oct 19, 2012. 3:32 AM
mmm.... INTERESTING!!!!!!!!!!!
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!