build presence detector
I'm trying to build a simple movment/presence detector. The idea is that a few of them will be mounted in a hallway, and they should light up leds according to the presence of passing objects/people. At a later point, i want to make it more reliable, as in the direction of the person going through, how many people are at the end of the hallway (counting up/down by detecting led direction) etc.
I know there are a ton of circuits out there, but i'm trying to make my own. I know guys in robotics use modulated IR light and a TV IR decoder to get when the robot is approaching something. Can this be done in reverse? A fixed PCB emitting and detecting back IR light will detect if any objects pass in front of it?
I'm thinking of two ways. One would be with the led near the receiver, this would check reflected light. The more light reflected, the closer is an object to the sensor. The problem is that, I don't see how this will be done with a modulated light, since these TSOP sensors will barely output a digital value, and not an analog one.
The other way would be of an IR (focused ?) led in one spot and an IR phototransistor in another spot. A ucontroller reads the IR phototransistor continously, and if it notices an abrupt difference, something has broken (dimmed) the light. It could light up a bunch of devices like this consecutively and check for the dimming, really quick, so that one device won't blind the other. The drawback of this one is that it will use two physical devices instead of one (emitter and receiver).
So, i'm still thinking about the first one. It should be cheap, and made with spare parts. I'm fancying ucontrollers's over bare ICs since i have a ton of PICs around, a bunch of experience with them and a good programmer.