# Sensor to track people sitting still in the room

I'm currently using a PIR sensor to turn on the light when it detect my hand's motion inside the box. But when my hand stop moving, the light turn off immediately.

Is there any sensor I can add to keep the light on after my hand stop moving?

• You don't need a sensor for that, you need some timer that keeps the light on for a certain time after no movement has been detected anymore. Nov 26, 2015 at 7:08
• the title and the question do not match. Or at least, you haven't articulated the question correctly. You want the behaviour of the sensor to keep the sensor output going for longer periods of time? Configurable? Microcontroller or descrete circuit-based solutions? Nov 26, 2015 at 7:09
• I want to make it so it would turn off the light immediately after I pull my hand out. But keep the light on when my hand is inside. Nov 26, 2015 at 7:11
• If I make the timer too low, the light might turn off before I move again. If I put it too high, the light will take too long to turn off. So I wonder if there any other sensor to check a none moving hand. Nov 26, 2015 at 7:16
• @Corsad Use multiple PIR sensors for 'people in room detection' (detects heat of radiation). Adjust PIR threshold values for your needs. Nov 26, 2015 at 7:54

How about a thermal IR sensor?

The description says "the D6T sensor is ideal for human detection; even for stationary objects a normal PIR structure would struggle to detect."

It is implicit in the design of a PIR sensor that there must be motion, because the electrical signal inside the sensor is AC-coupled.

Therefore, if the thing you're trying to sense is not moving, you need to move the sensor. Scanning it back and forth through an angle that's at least as large as the angle between the Fresnel zones in its lens assembly should provide a continuous signal for any stationary target.

Provided the computational resources are there, you could use a cheap web camera and object detection algorithm. For example, OpenCV's human detection algorithms are quite good and completely free (as in beer as well as in speech).

• Oups, just now I am noticing the question is tagged arduino. This answer is applicable if you have a PC or at least a 32-bit arm in the signal flow. Nov 26, 2015 at 18:00

Assuming you are sticking your hand in a box, that your arm is blocking the way, you can use a simple IR LED/Photo Diode Pair. It goes by many names, an IR obstacle sensor, a IR Proximity Detector, an IR Line Sensor or Line Follower circuit, IR Breakbeam sensor, or even an IR Distance Sensor.

The IR LED is used to illuminate the IR Photo Diode. This makes it conduct. This can be read in a digital or analog manner. For your purposes, in either a make, or break, manner, someone sticking their hand in the path of the IR LED's light, will be sensed. The Basic Circuit:

The Make version would have both diodes side by side, with one shielded from the other. Anything in front of it will reflect the light and turn the sensor on.

The Break version would have the diodes facing each other, and anything that comes in between would turn the sensor off. Just inverted logic.

You can get raw diodes, or complete modules. The rest is handled by your microcontroller.

Compared to a PIR sensor, this will keep the light on as long as the object is in the way, even if it is not moving.