Designing an automatic room light controller

Discussion in 'The Projects Forum' started by nabihaibrahim, Oct 23, 2009.

  1. nabihaibrahim

    Thread Starter New Member

    Oct 23, 2009
    2
    0
    I am trying to build an automatic room light controller that will turn on a lamp when a person enters a room and maintains it in the on state as long as the room is occupied. once the room is empty, the lamp will switch off. I intend to use a PIC for this project, together with an infrared emitting diode and phototransistor for detecting entry and exit. But my major problem is making the circuit direction sensitive. How can I differentiate between entry and exit? I only need help with the design, as I would gladly carry out the construction on my own.
    I would really appreciate any help I can get. Thank you.
     
  2. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    If you intent to use an IR beam-break to detect entry/exit, you can use two horizontally spaced beams to differentiate between entry and exit. If the outer beam is broken first, then the inner beam, a person is entering. If the inner beam is broken first, then the outer beam, a person is exiting. Locating the outer beam with the emitter on the right and the detector on the left, and the inner beam with the emitter on the left and the detector on the right will allow narrow horizontal spacing. No system is perfect, so if two people enter and exit simultaneously it will cause a problem.

    Is this a class project?

    Ken
     
  3. nabihaibrahim

    Thread Starter New Member

    Oct 23, 2009
    2
    0
    Thanks. I will start assembling parts right away. Its a mini project im making at school. Will let you know how it turns out. Thanks again!
     
Loading...