DIY Hacks & How To’s: Proximity Sensor

DIY Hacks & How To's: Proximity Sensor

Hi, this is Wayne again with a topic “DIY Hacks & How To’s: Proximity Sensor”.
This october, i’m doing a series of projects featuring sensors that you can use to automate a haunted house. Last week i showed you how to use a pressure plate switch to activate special effects. This week, i’m going to show you how to make a proximity sensor to make a simple proximity sensor. All you need is a light emitter and a light detector. The light emitter is constantly on and whenever the light hits a nearby object.

Some of the light is reflected back to the detector by measuring the output of the detector. You can sense when there’s an object within a few feet of the sensor. This isn’t exact, but it works well enough to use in a haunted house to make the sensor you’ll need an infrared led, an infrared photo transistor two resistors and a piece of black heat shrink tubing. Here’S how the circuit is put together.

The led is wired in series with a 33 ohm resistor, the phototransistor is wired in series with a 10k ohm resistor. An additional wire is connected to the collector of the phototransistor to act as an output for the sensor to ensure that only reflected light is detected by the phototransistor. I put a piece of black heat shrink tubing around it. This also helps to make the sensor more directional after testing it on a breadboard.

I soldered the sensor components together on a small piece of perf board. The easiest way to monitor the signal from a proximity sensor is with a microcontroller, to connect the sensor to an arduino connect, the ground wire from the sensor to the ground, pin and connect the positive wire from the sensor to the 5 volt pin. Lastly, connect the signal wire from the sensor to one of the analog input pins. Now you can use the analog read function to measure the signal coming from the proximity sensor. If you don’t have an arduino, you can also use an op-amp to monitor the signal. Just connect the signal wire from the sensor to the inverting input of the op-amp then connect the non-inverting input to the center pin of a variable resistor. This configuration acts like an adjustable comparator. When the signal drops below the reference voltage set by the variable resistor, the output will go high.

DIY Hacks & How To's: Proximity Sensor

You can use the output of this device to activate just about any kind of special effect. You can use a proximity sensor to activate a prop on a servo like my motion, tracking skull project, or you can use it to activate sound effects. But my favorite application is the automatic coffin. The coffin is normally closed, but as soon as you get close to it, the door swings open and a zombie pops out.

There’S a link in the description box to a great example by instructables user want to be mad psy. Well, that’s how to make a simple proximity sensor, thanks for watching and check back next week for more diy hacks and how to’s .