This article discuss how you can detect the entry of a person in a room and get this signal inside your MCU. This is NOT a complete project but just an idea that can be implemented in many different projects. The technique is to use use an IR transmitter and a receiver pair. One side of door will have an IR Transmitter and the other side of door will have an IR Receiver. The transmitter (Tx in short) will continuously send IR beam to the receiver, as long as the receiver(Rx in short) will receive this beam it will give a voltage output in range of 2.5v to 3.0 volts. But as this beam is obstructed, for example by someone entering the room, the receivers output will tend towards 4.5
The IR Transmitter can be made on a small PCB as shown below. It has four mounting holes to fix it in the wall near the door. Please use 1 Watt resistor for R2 and R3 (22ohms).
Similarly the IR receiver module is made.
Mount the IR Transmitter and Receiver as shown in the image below.
As you can see the optimal distance between the transmitter and receiver is 2.0ft. to 3.5ft. While the Rx/Tx should be mounted at the height of 3.5ft. from the ground.
Reason for NOT using TSOP Receivers.
Many people would ask why I have used photo transistors and not modulated IR receivers like TSOP1738 etc. The reason is that the TSOP series sensors were designed for data transfer, mainly from hand held remote control to devices like TV’s or DVD players. So following points were kept in mind while designing TSOP sensors.
- Maximum range (So that remote could be easily operated in big rooms), since these have long range you cannot assume that only the rays that are directly incident on the Rx are the only rays reaching it, rays bounced from walls also reach the sensor. So actually their are more than one path from the Tx to Rx. This makes door entry detection impossible because if the person entering the room cuts one path, the ray would reach from the alternate path! As you can see this situation is actually good for a TV remote (for which TSOPs were designed) but not for our application.
Reason for using two Tx
Simply to make IR beam stronger and to reach the other side of door without any problem.
Reason for using Filtered IR Rx
Their are two types of IR Photo transistor available. One is transparent white, this one is sensitive to both IR and Visible radiations. The second one is with Black case, this one is only sensitive to IR radiation.
The setup will not work in presence of sunlight due to presence of IR component in it. Nor will it work if the room is lit with incandescent bulbs (filament bulbs), so it is recommended to use this in room that is lit with florescent source like CFLs or Tube lights.
We highly recommend EasyEDA for PCB Design and low cost PCB Prototype.
Facing problem with your embedded, electronics or robotics project? We are here to help!
Post a help request.