Ever get up in the middle of the night and go stumbling towards the hallway light only to trip over your cat and fall down your stairway and bash your head on the wall at the bottom? Neither have I! But if you're afraid of this happening, or you just want to make your friends jealous of your awesome electronics prowess, you can build this IR light trip sensor to light up your stairway (or any room in the house you'd like) when you walk past it so that you'll see that pesky cat waiting for you to trip on it.

The sensor uses a directional infrared LED beamed at a sensor that shoots past where you'll walk. When you interrupt the light from the LED, the LEDs turn on for a period of time that you can adjust. There are a lot of advantages to using IR LEDs over lasers; they're safer to work with since lasers can damage your retina if you stare at them, they're a lot easier to aim since you're pointing them at a small sensor usually across a hallway, they use really low power, and of course they emit no visible light which makes them stealthy and therefore cooler. The biggest drawback? Sunlight or incandescent lights generate infrared light, so if you put them in an area where they get hit by this light they won't turn on. I actually feel that this is an advantage as well, since it keeps them off during the day when you don't need them.

Please note: this project is designed to assume that you have at least a basic knowledge of electronics, electronic schematics, and know how to handle and mount static sensitive devices. You need to know how to solder, and more importantly how to solder on tiny chip leads that can only handle a brief hit of heat before they fry and turn into slingshot ammo.

Play the high def video. I'm a terrible cameraman so sorry if it's shaky!

Step 1: Tools, Parts, and Supplies

You'll need a variety of stuff to do this project. The less tools you have for working with electronics, the more you'll have to spend to make it, so either buy all the tools, or find someone that has them and buy them a nice lunch at Applebees then ask nicely if you can use their tools.

Tools you really should have:
-A soldering iron with a small point tip
-A small pair of wire cutters
-A small needle nose pliers
-Wire strippers (You'll be stripping really small gauge wire, 26 or less)
-A Dremel motor tool with a carbide cutter (for cutting the perf board and drilling holes)

Most of the electronic parts can be bought from Mouser Electronics. I'll list the supplier that I got various other supplies from for other parts. Feel free to innovate if you can find a better/cheaper place to get something, and post it here for all of us!

-Plastic Leg Tips (Home Depot, 89105)
-1/4" coaxial cable staples (home depot psw-1650)
-Solder Wire
-Pre-punched perfboard ( Radio Shack 276-1396 A)
-50 ft PS/2 extender cable ( Monoprice p/n 2540)
-White electrical tape (Frys)
-A 5 volt power supply capable of handling at least 700 mA, or more depending on the power requirements of your light LEDs. I used a power brick from an old zip 250 drive, that puts out 1 amp at 5v.

For electronic parts, you can download the excel spreadsheet of the components I used by clicking the excel spreadsheet I linked here. To make your life really easy, create a mouser account, click here, select the second and third columns of the spreadsheet and copy and paste them into the BOM importer.

2x 940nm IR LEDs: you can get these at mouser as well, but I found the best directional LEDs I could get came from Newark Electronics. If you want to sub in another LED for these, you'll need something that operates at 940nm and is fairly directional (to prevent it from dissipating over the distance to the sensor).

You'll also need a bunch of LEDs for your stairs or whatever room you want to light up. Once you choose your LEDs, you can plug in the specs for them here to calculate what resistors you'll need and how to configure them.

Overall, you should be able to do this project for about $60 as long as you don't destroy components while building it. If you're prone to soldering chips to kingdom come, make sure to buy spares.

Step 2: Cut the Perf Board

Figure out the inside dimensions of your box, and cut the perfboard to fit it using the Dremel. For my box, as listed on the order sheet, the dimensions were 3.10" by 1.96". For that box you'll also have to cut holes for the screw slots and the board mounts. I dripped some wax on my board and pushed it into the box to see where to cut.

Step 3: Step 2: Wire Your Circuit

This is the pain in the butt step: you have to wire up the circuit. If you don't have the ability to etch (as I don't) you can cut off the female end of the PS/2 cable (you won't be needing it) and strip off a few inches, then cut out the small wires inside for runs between components. Follow the schematic as pictured. Optionally, you can add a low powered indicator LED in series with R5 for troubleshooting the circuit before you put it all in, but if you're a superchamp with circuit building I'm sure you won't need this. I've set this circuit to run for 11 seconds before shutting off, but if you'd like to make it run longer you can change the time by changing the values of R1 and C1 (for the first circuit, R2 and C4 for the second). The time delay (in seconds) is R1 * C1 * 1.1 so my circuit is 100,000 * .0001 * 1.1 = 11 second delay.

Step 4: Holes in the Box

This takes some creativity and... well luck. I used paper to do a "rubbing" of the plug locations and matched it up (approximately) to the box. Note that drill bits tend to catch on the plastic and rip it apart if you don't take your time.

Step 5: Build the Cable O' LED's

I don't think this is the best way to mount LEDs, but it's the best way I could come up with. Click on each picture for the steps.

Step 6: IR Lights

Build the IR LEDs just like the light LEDs. Solder the leads of each IR LED to an extra piece of wire (excess from your LED string, or just 2 conductor wire of any sort) and wrap the leads in electrical tape. Make this wire long enough to run from your main cable to the mounting point. Connect the resistor side of the wire to ground and the positive side to +5v.

Step 7: Sensors

Cut some excess wire as needed from the end of your light string and connect up the leads of the sensor as shown, gnd to ground, VDD to +5v, and out to one of the sensor input wires. Wrap each individual leg in a small piece of electrical tape, then wrap all the legs.

Step 8: Run the LED Cable

Lay the cable down on your stairs, pushing each LED into position then using the cable staples to hold them in place.

Step 9: Mount Sensors and IR LEDs and Done!

Position your sensors directly across the hall from the IR LEDs and stick them to the wall with double sided tape or glue. Run the sensor and LED to a point nearby on the main cable, and cut out a piece of insulation. Solder the leads of the wires to the man cable leads similar to the light LED mounting by melting off some insulator. Make sure to connect the positive sides to non-switched 5v, the negative to ground, and each sensor output to a separate wire. Plug it all in, and if everything is made right you should have working trip sensor LED stairlights!
hi ... f.y.i. <br>if you're considering doing this project, beware that 7 and 14 on the HEF4071B are flipped. if you follow the schematic included in this instructable to the letter, you'll have a fried chip.
<p>True, oops! Hopefully not too many people cooked chips!</p>
<p>hello sir..just want to ask..what is the uses of cable PS2 and 555 timer? the green colour one.. how about it connection to the circuit? can you explain more how to inst</p>
Why are you using a 2.5 A relay would a 1A not work for this case?
The company I work for is about to hire a deaf person. I need to rig something up so a light goes off when the door opens. I understand your circuit up until the plug for the leds. can you explain how that green plug wires in. Or a file we can download so I can see a bigger schematic? Thanks for this great instructable.
I'm very enthusiastic about your project's success and have gone ahead and ordered the necessary materials. However, I'd greatly appreciate a comprehensive, instructional video to help me reference my progress. thanks
Why not just wire the photodiodes together and use 1 timer?
Cool project. Almost like these http://alan-parekh.vstore.ca/project-kits-stair-light-c-1_2.html<br>
lol &quot;trip&quot; wire... hmmm
Very nice. Thanks for sharing this, I think I may try something similar. Ta.<br />
you could take a putty knife and hide the wire underneath the carpet.<br />
I just orderd 2 free sample wall mounted enclosures should be here in a week or so
Sweet, post some pics when you get it set up!
mr. author what programming language did you use in this project? can i use tasm (turbo assembly language) ? if i can, can you give me the codes pls... i just want to try this one on how it works... i'm just curious and also a fan of your project hope you understand... thanks!
Would it be possible to rig this up from a motion sensor of house alarms instead of making the circuit? Thanks.
The short answer is yes, but the long answer is if you wanted the lights to stay on while you go up the stairs you'd need a timer circuit of some sort. You could substitute an Arduino, but you'd still need a relay or a transistor circuit to drive the LEDs since the Arduino outputs don't put out enough current. You'd also have to program the Arduino to trigger off whatever signal your motion sensor puts out... easy enough to code if you're familiar with it but possibly difficult for the newcomer.
Nice job ElJefeUno!
Nicely done--I had thought about stair lighting that would activate individual stairs as you walked (stepping on 1st stair triggers 2nd and so on so that the lights selectively 'lead' you up/down) but it seemed too ambitious at the time...this is pretty great.
This can be done too. You would need a small microcontroller and a counter program. Basically, once the motion sensor is tripped, the controller starts to count up to the number of steps that you have. Each count lights up a step until all steps are lit when you reach the top. This can be further modified to also have a sensor at the top of the stairs and reverse the count. Or a ON delay could be set so that as you go up the stair, the steps ahead will light up, whilst the steps behind will turn off.
True, you definitely could do it with a micro (an arduino would work fine), but I think that the idea of using a timer would be a bit disappointing... even annoying, since we found that the time it takes people to go up stairs can vary quite a bit depending on how fast they walk. I'd say a more affective, although more time consuming (and expensive) route would be to mount a sensor on each step with a corresponding led on the step above. When your foot hit each step, the light above that step could come on, and the one below would turn off after you lifted your foot. You'd need either a bunch of my circuits (one for each step), or an micro, and a really high-density cable for all the signals from the sensors. I'm a bit too lazy to take all that on though, so I was satisfied with my setup.
To avoid this, use "Milling drill" instead ordinary drill bit.

About This Instructable




More by ElJefeUno:Stairway LED lighting with IR trip sensor 
Add instructable to: