Author Options:

IR (infrared) tripwire (arduino)? Answered

How can i build an infrared tripwire for my arduino bored i have a IR photo transistor and a IR led,
What i want to do with this is control a relay which turns my light on when i enter the room and off when i exit.


5 Replies

iknowvationsBest Answer (author)2012-01-02

To make your project, you will need two IR leds & two photo transistors. This is needed as the system has to decide the direction of your movement. That is to say you have entered or made an exit.

You have to set the two leds & two photo transistors parallel in such a way that when you enter one line will be interrupted first & then the other. This will be reverse when you make exit. Monitor this two lines & make the relay on & off accordingly.

I hope this will make your project work. If you need more info just let me know.

Select as Best AnswerUndo Best Answer

iknowvations (author)2012-01-07

Thanks for marking as best answer.

Select as Best AnswerUndo Best Answer

Jayefuu (author)2012-01-02

The problem with that is if someone else enters the room after you you're both left sitting in the dark.... :D

You could use 1 laser like iproberry suggested. Or a pair so you can tell whether someone's entering or exiting. It could keep track so that it turns off with the last person to enter.

OR you could put a non-touch switch in place of your regular light switch that requires you to put a shoulder or something against it to turn it on. Like they use for the touchless bathroom taps.

Select as Best AnswerUndo Best Answer

lemonie (author)2012-01-02

What's the problem with using the light-switch and a finger? Hands full of things?


Select as Best AnswerUndo Best Answer