The special effects in a haunted house need to be well timed. The best way to do this is to use sensors to detect where your guests are in the haunted house. So I am doing a series of projects that demonstrate a variety of sensors that you can use to automate your haunted house. Last week I showed how to make a simple DIY pressure plate switch.

This week, I am going to show you how to make a proximity sensor and how you can implement it to activate special effects. 

Step 1: Materials

Here are the materials and tools that you will need to make a simple proximity sensor:

Infrared LED
Infrared Phototransistor
33 ohm Resistor
10 kohm Resistor
Black Heat Shrink Tubing (the same diameter as the phototransistor)
Perf Board

Soldering Iron 

<p>If I had to use three of these sensors, how would you recommend connecting them to an arduino or a 6v battery pack(with appropriate resistors)? Should I connect each of them individually to the battery/ arduino or in series? </p>
Make three identical sensors (IR LED, receiver, and resistors. Connect them all to different input pins on the Arduino. Connect the GND pins and 5V pins to each sensor in parallel. Then connect the batter yto the power input (Vin) Arduino.
<p>Thanks for the reply! Would it be possible to run two servos as well as these sensors on the same battery?</p>
<p>That all depends on the current requirements of each component. High torque servos use a lot of current and using two at once might drain the battery pretty quick.</p>
<p>I'm so sorry I keep pestering you with questions, but I just want to be safe. Is this a schematic of what you are describing? (ignore the analog input, I couldnt find anything to replace the sensors other than an led) </p><p>p.s. im fourteen and this is the first time im trying to write a comprehensive instructable so thanks for any help</p>
<p>That looks about right. But you want to check the current rating of your servos and make sure that you aren't exceeding max current of the 5V pin.</p>
Can i use dc motor at output of ic741( when ic741 is used instead of arduino)
<p><br>You could. But you want to make sure that the current required by the motor doesn't exceed the output current limit of your chip. You may need to use a transistor to control high current motors.</p>
<p>can u say how d skull is moving ?</p><p>i mean have u kept any sensor inside in it ?</p><p>ad hw much of load is reqrid fr moving it</p><p>plzzzz reply me</p>
<p>The skull is moved with a single servo motor. To see an example of how I did this for a full project, check out this Instructable: <a href="http://www.instructables.com/id/Halloween-Props-That-Turn-to-Look-at-You-as-you-Wa/">http://www.instructables.com/id/Halloween-Props-Th...</a></p>
Hey..... I need to make a sensor for a range of about 3-6 feet or so.... Can u recommend the components... Would be a huge help.... Thanks ?
At that range, you want to use an ultrasonic range sensor. There are a lot of different models that can interface directly with an Arduino. <br />https://www.google.com/search?q=arduino+ultrasonic+range+finder&rlz=1C1CHFX_enUS492US492&oq=arduino+ultrasonic+range&aqs=chrome.0.0j69i57j0l4.7560j0j7&sourceid=chrome&es_sm=122&ie=UTF-8#q=arduino+ultrasonic+range+finder&tbm=shop<br />
Would this sensor work on a device like this?
<p>Maybe. I am not very familiar with that device. But it should work with anything that can do an analog read function.</p>
ok I was wondering cause I want to made one for our robotics team
forgot some pics :P
<p>Here's an early breadboard prototype of mine. Works like a charm indoors. Had about a maximum of 20 inches in detectable length. But the voltage response is really different outdoors. Probably it's the sun. :(</p><p>I was really hoping a &quot;simple&quot; sensor like this would work outdoors, without resorting to using modulation. Oh well.</p>
<p>Yeah. For outdoor used, you want to either use a 30kHz carrier wave like this:</p><p><a href="http://www.instructables.com/id/Reliable-and-low-cost-IR-Proximity-sensor/">http://www.instructables.com/id/Reliable-and-low-c...</a></p><p>Or you can use an ultrasonic range sensor like this:</p><p><a href="http://www.instructables.com/id/Ultrasonic-Spider-Sense/">http://www.instructables.com/id/Ultrasonic-Spider-...</a></p>
<p>Wow thanks for the links! Will definitely look at them.</p><p>Quick question: Would you know what material I can use to cover the infrared parts if I put it in an enclosure? Say I put it in a metal case, I'd make a window for the IR LED and photodiode but I want to cover it. I'm thinking of acrylic, but what factors should I consider? Thanks!</p>
<p>Any thing that lets light through can be used as a cover. If you are using the 30kHz carrier wave design, you can even use partially opaque materials.</p>
<p>Yes, then it is surely a photo diode not a photo-transistor, plus the 33R should be of 2 Watt since the IR LED consumes 100mA not 20 mA with a forward voltage drop of 1.06v. The 10K should also be replaced with a 50M to do anything practically (car parking sensor) i guess. I free to an open minded discussion. LM358 can also be used. But the overall sensitivity I need 2-3 feet. This type of circuits are not as sensitive even compared to a TV remote control like things. I just tested it on my breadboard. What is your opinion?</p>
<p>The sensitivity also depends on the amount of ambient light in the area. If there is a lot of light hitting the photodiode, you might want to add a IR light filter.</p>
<p>From your finished circuit it appears to be that you used a photo diode, but all your diagram is showing a photo-transistor. Photo-diodes and Photo-transistors are quite different in nature. What should I use, a photo-diode or else? What is the actual component you used? Please resopnd early as I am going to build you circuit and I am confused with that component. Please help.</p>
<p><a href="http://comingsoon.radioshack.com/radioshack-infrared-led-emitter-and-detector/2760142.html">http://comingsoon.radioshack.com/radioshack-infrar...</a></p><p>These are the exact components that I used. </p>
<p>hai... can the sensor work with 330 ohm resistors............</p>
<p>Yes, but it won't be as sensitive.</p>
<p>Would there be any modification on the circuit if my phototransistor has a base? Beause the phototransistor I bought have 3 pins. Thanks :)</p>
In most cases you can just ignore the base pin and leave it unconnected. It is just there in case you wanted to be able to activate the transistor with other components when the LED is not on.
Can you give more information about the potentiometer
<p>The potentiometer in step 5 is just a regular 10 kohm potentiometer. It measures 10 kohms across the two side terminals and the resistance to the middle terminal changes based on how you have the knob turned. On end is connected to the ground. The other end is connected to 5V. The center terminal is connected to the OP AMP.</p>
<p>Hi,</p><p>muss the wavelength of the IR Phototransistor and IR LED match by 100% or is it enough to consider only the range of both?</p><p>I have been using following:</p><p><a href="https://www.reichelt.de/Fotodioden-etc-/SFH-300-FA-3-4/3/index.html?&ACTION=3&LA=5000&GROUP=A54&GROUPID=3045&ARTICLE=60552&START=0&SORT=artnr&OFFSET=16" rel="nofollow">https://www.reichelt.de/Fotodioden-etc-/SFH-300-FA...</a></p><p>and </p><p><a href="https://www.reichelt.de/Fotodioden-etc-/LD-274-3/3/index.html?&ACTION=3&LA=5000&GROUP=A54&GROUPID=3045&ARTICLE=65174&START=0&SORT=artnr&OFFSET=16" rel="nofollow">https://www.reichelt.de/Fotodioden-etc-/LD-274-3/3...</a></p><p>but it is not working properly I have changed the 33 Ohm resistor too, but the LED is either on or off and sometimes it looks like having interference Im not sure whats going wrong.</p><p>Thanks</p>
<p>Most IR LEDs and phototransistors should work. Check the polarity and look for shorts.</p>
<p>Typo! Is there any set petentiometer we should use? Thanks!</p>
No. You will probably need use some trial and error
<p>Hi. Cool circuit; I am trying to make with the op amp, but having trouble getting it to work. For the potentiometer, is there are set ratings?</p>
<p>I built this circuit, but my 33 ohm resistor is getting extremely hot. (5-1.3V)/33 = 112 mA, and P = I^2 R = 0.414 W, which is much more than the 0.25 W an off-the-shelf resistor is rated for. Did you experience the same?</p>
<p>That is a good point and I need to make that more clear in the instructions. Here are some solutions.</p><p>1. Use a larger resistor value and bring down the current to below 0.25 W.</p><p>2. Use multiple IR LEDs. Using three LEDs in series will have a combined voltage of 3.9V. So the voltage across the resistor would only be 1.1V. At 150mA that is only 0.165W on the resistor.</p><p>3. Use two 68 ohm resistors in parallel. This effectively gives double the wattage capacity.</p>
<p>what is the maximum distance that can be detected by the sensor..</p><p>thank you</p>
That depends mostly on how much interference there is from the surroundings. It will work best in the dark. But a few feet is the best that you could ever expect.
<p> Is it possible to make a more advanced version of this? Instead of a light, it sends a message to another device wirelessly?</p>
It is absolutely possible but that setup would be a lot more complicated.
<p>can i use regular phototransistor?</p>
It can work but it will get some interference from other light in the room
<p>thank you for your answer!</p><p>one more question, could connect your ir proximity (op-amp) in this schematic </p>
<p>Maybe. I am not familiar with the chips used in that circuit. So I can't say for sure.</p>
<p>Thanks for sharing! I am using it for my robot!</p>
<p>Hey there...</p><p>Thanks for the share but I have a problem with my circuit...</p><p>When I turn on my circuit, my LED remains on no matter what (OP-Amp), and when I adjust the 10K resistance, it just turns off at a point, has no effect whether the IR led is On or OFF or even Absent. Means the LED is operating independently.....</p><p>I really need your help on this one....</p><p>Thanks in advance....</p>
<p>It is possible that the light in the room is saturating the receiver transistor. Try it in a darker room.</p>
<p>I did sir, I completely covered the transistor with tape and even then couldn't get it to calibrate... I even tried inverting the output from high to low as you suggested (by swapping pins of op-amp) but still no result.....</p><p>If you don't mind, I can send you my E-mail ID and then on that media post you pictures of my bread board attempt so you can figure out what's wrong with it. Because for the life of me I can't.....</p>

About This Instructable




Bio: My name is Jason Poel Smith I am a Community Manager here at Instructables. In my free time, I am an Inventor, Maker, Hacker, Tinker ... More »
More by DIY Hacks and How Tos:Bubble Bath That Never Runs Out Of BubblesMagic Wand FlashlightControlling Halloween Effects with DIY Infrared Remote Controls
Add instructable to: