Introduction: Motion Sensitive Glowing Eyes That Light Up Randomly and Wink Out Slowly
Looking for a whole army of glowing eyes that wink on and then slowly wink out as your guests walk up your driveway? Or perhaps your army of evil minions awakens when your guests reach for a treat? I'll teach you how to make both!
Parts List -- Power Supply
- A DC power supply capable of at least 12V and enough amperage to drive 16 LEDs. I used a model train power supply.
- LM7805 5V linear regulator
- 100uf electrolytic capacitor
- 10uf electrolytic capacitor
Parts List -- Activation Timer
- NE555 timer IC
- 470uf electrolytic capacitor
- 0.01 ceramic capacitor 103
- 10kΩ resistor (x2)
Parts List -- Eye Lights
- NPN transistor 2n3904 or equivalent (x8)
- 220Ω resistor (x8)
- 10kΩ resistor (x9)
- Red LEDs of your choosing. I used 3mm superbright LEDs (x16)
- 470uf electrolytic capacitor (x2)
- 100Ω resistor
- Optocoupler MOC3041
- 100+ feet of CAT3 telephone wire (or whatever convenient wire you have on hand)
Parts List -- Passive Infrared Motion Detector
- PIR sensor
- 10 kΩ resistor
- MOSFET IRF520N (or again, whatever depletion mode MOSFET you have on hand)
Parts List -- IR Proximity Sensor (Optional, instead of PIR)
- IR LED
- IR phototransistor
- 10kΩ potentiometer
- 100Ω resistor (x3)
- 741 op-amp
That's quite the shopping list, and some of these parts are overkill. This is what I had in my bin. You can adjust to taste.
Step 1: Assemble the Power Supplies
That's right. Plural. Technically, the 555 can handle 12V, but the train supply I'm using is not fully rectified and spikes above 12V. I know this because I fried two 555 timers before I figured it out. What's more, the PIR module needs 5V.
I'm building on a breadboard, and I have the right positive rail at unregulated 12V, and the left positive rail at regulated 5V. The grounds are tied together with a jumper wire.
- Connect the 12V rail to the 7805's Vin pin.
- Connect the ground to the 7805's ground pin.
- Place the 100uf capacitor across the Vin and ground pins.
- Place the 10uf capacitor across the Vout and ground pins.
The capacitors smooth out spikes in the voltage.
Step 2: Assemble the Eye Activation Circuit
- Place a transistor on the breadboard so that the collector and base are in adjacent rows, but the emitter skips a row.
- Place the second transistor in the same way, so that the base occupies the same row as the first transistor's emitter.
- Repeat for all 8.
- Connect the last transistor's emitter to ground.
- Connect 1 10kΩ resistor to the base of each transistor, and connect the free leg of each resistor together.
- Connect the two 470uf capacitors in parallel to ground and to the junction of the 8 10kΩ base resistors.
- Connect the remaining 10kΩ resistor, which is part of the RC timer, to your positive trigger voltage (see below)
Technically, this is all you really need to make. It can be triggered with anything that provides 12V to the RC timer long enough to light all the LEDs, even a switch or a push button.
Step 3: Assemble and Connect the "eyes"
If you're anything like me, you have about 100' of CAT3 phone line you've been carting around for 3 moves. It works perfectly for this project. Each wire has four conductors, which are color coordinated in pairs. Solder the positive leg of one super bright 3mm red LEDs to the negative leg of another, and solder one 220Ω resistor to one of the free legs. I chose to use the solid colored wires as positive and the solid+white colored wires as ground. Therefore, blue and blue-white controlled one set of eyes, and orange/orange-white controlled a second.
Next, connect the other end of the solid colored positive wires to the 12V rail on your breadboard, and the ground to the collector of one of the transistors. Just pick a free one. This is the "random" part. It uses the age old method of randomization known as "covering your eyes and pointing".
Step 4: Assemble the Timer
Now, you could simply activate the eyes manually and call it done. If, however, you'd like to activate the eyes based on some transient trigger, you'll need to set up a monostable timer. This is a "one-shot" timer that activates for a known amount of time, and then shuts off.
There's nothing special about this part of the circuit. It's a typical 555 monostable circuit, which is described here among many other places. I'm using the same a 470uf capacitor and a 10kΩ resistor to activate the timer for about 5 seconds.
NOTE: I realized after I took the photos, I haven't yet connected pins 2, 4, and 8 to the 5V rail. So remember to add a jumper between pin 8 and the 5V rail.
You can test the circuit at this point by connecting pin 2 of the 555 timer to ground. Remember, 555 timers trigger LOW.
Step 5: Assemble and Connect the PIR Sensor
I'm using a Parallax PIR sensor REV A which I picked up from RadioShack last Halloween. Connect the positive and negative pins to the 5V rail and the ground rail respectively.
The output pin goes high when motion is detected. HOWEVER, the REV A sensor cannot handle a load on the out pin. This is another lesson I learned the hard way. Therefore, you'll have to connect the output pin to some kind of high impedance. A MOSFET works well here, but it is by no means the only option. Another 3904 and yet another 10kΩ resistor will probably work, too.
- Connect a 10kΩ resistor between the 5V rail and the drain pin of your MOSFET.
- Connect the source pin to ground.
- Connect the PIR output pin to the MOSFET gate pin.
Step 6: Connect the Timer to the Eye Circuit
When the 555 timer activates, it sends less than the 5V connected to pin 1 to the output. If you connect this output direct to the eye RC circuit, only the first few eyes will activate. You need to supply 12V to the RC circuit. I chose an optocoupler for this connection. Again there are many other options. This keeps the dirty train supply current from contaminating the logic circuitry.
- Connect the output from pin 3 of the 555 timer to the anode pin of the MOC3041 optocoupler.
- Connect the cathode pin of the optocoupler to ground.
- Connect one of the optocoupler main terminal pins to the eye 10kΩ resistor.
- Connect the other main terminal to the 12V rail.
Step 7: Optional: Add an IR Proximity Sensor
Before I figured out how to make my PIR sensor's output handle a load, I had given up on it, and connected an IR proximity sensor instead. I'll include those instructions here, too, because it's a great way to trigger the eyes from 4-5 inches away, for example when someone reaches into a candy bowl.
These instructions come straight from this excellent Instructable. Read there for explanations.
- Connect 3 100Ω resistors in parallel to the ground rail. The original Instructable recommends a single 33Ω resistor, but the wattage exceeds the 1/4 W your standard carbon film resistor is rated for. As a result the 33Ω resistor becomes very hot. Using 3 100Ω resistors in parallel provides the same resistance, but divides the power. As a word of warning, the resistors still get rather warm.
- Connect the IR sensor negative leg to the 3 100Ω resistors. Connect the positive leg to the 5V rail.
- Connect the IR phototransistor in the same way, but substitute a 10kΩ resistor for the 3 100Ω resistors. Connect the center point of the phototransistor and the 10kΩ resistor to the NONINVERTING (+) input of the 741 op-amp.
- Connect the 10kΩ potentiometer across the 5V and ground rains, and connect the center pin of the potentiometer to the INVERTING (-) input of the 741 op-amp. This is the opposite of the diagram in step 5 of the original Instructable. That's intentional, because the 555 timer needs a LOW trigger.
- Connect the positive and negative voltage pins of the 741 to the 5V and ground rails perspective.
- Connect the output pin of the 741 to pin 2 of the 555 timer.
That's it! Should be well on your way to scaring the bejeebus out of any number of kids.