PIR Sensor Help
Hello everyone.· I apologize if this question has already been answered but I searched and couldn't find it.· I am building a device that will sense motion and play a sound when that motion is detected.· It will be mounted in a doorway so my intention is for the sound to play when somone enters or exits through the doorway.· I was planning on using the PIR sensor to detect·the entrance or exit,·but I am having trouble achieving the desired result.· In the preliminary testing I've done, the sensor does not seem to be as sensitive as I need.· I am running it off of a 5V power supply and for testing purposes·I've connected an LED to the output to see when the output is high (simple diagram attached).· The LED turns on when power is first applied· and then turns off a few seconds later as expected.· However, it seems to detect motion at random times or not at all.· For instance I can wave my hand in front of the sensor and the LED does not turn on, but it turns on when I am just sitting in front of it.· Is there a minumum range required for the sensor to function properly?· Can it detect motion 5ft, 2ft, 1ft, 6in, etc?· For it to work in this project it would have to be able to detect motion as close as 6 in.· I have played with the jumper in both the H and L positions and have obtained similar results.· Anyway, any insight into this problem would be greatly appreciated.· Thanks in advance.
Comments
Mike is correct in that the PIR detects sudden changes in the heat pattern. The documentation also explains that it is necessary to allow a kind of warm-up or settling time for the sensor to adjust to the current ambient heat patterns. As Mike suggested if you sat perfectly still in front of it the PIR should eventually adjust. But you need to give it the adjustment time or it may not function properly until left alone for awhile. Driving an LED will consume some current. I’m not sure if/how that may affect the sensor operation since we don’t really recommend driving anything from the output. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
I was unaware that the PIR sensor would not react quickly when I purchased it for this application. I need to detect a person walking at normal speed past the sensor about 6 - 18" in front of it. According to Mike's post it sounds like the PIR is not suited for a quick detection like that. Please correct me if I've misinterpreted your comments Mike. I was aware of the 10 - 60 second warm up time as stated in the data sheet and I did wait several minutes but it didn't make a difference. I hadn't considered that the LED would be drawing current and that might affect the sensor. I will scrap the LED and hook it up to a PIC to see if it makes a difference.
I've also started looking at alternatives and I'd be interested to hear your opinions on that. I was looking at the PING ultrasonic range sensor and I think I can adapt my project to use that instead of the PIR. I can have a PIC record the distance the PING is measuring shortly after power up. This distance would be the distance to the opposite side of the doorway about 2.5ft (as long as I'm not standing in front of it at power up). It would then repeatedly measure the distance (say 5 times/sec) and if the distance suddenly decreased that would indicate someone stepped in front of the PING when they were walking through the doorway.
It sounds simple to me but then again I also thought the PIR would work for this project. Please let me know if you see anything fundamentaly wrong with this idea or if you have a cheaper and/or simpler solution. Thanks again.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
I then did the following with the jumper in H position:
1. Turn on the power (the LED lights up for 2-3 sec and then turns off).
2. Allowed the PIR to "warm up" for 5 minutes. I did not walk in front of it, wave my hand in front of it, change the lighting in the
room, or do anything else that might significantly change the IR profile of the room.
3. After 5 minutes I walked back and forth in front of the PIR about 3-4 feet in front of it 5 times before the LED lit up for about 2-3 sec. After the LED went out I continued walking back and forth in front of it and the LED would not turn on.
4. I sat down in front of the PIR and waved my hand in front of it approx 4-6" away all the while the the LED is not turning on. I then moved the sensor itself and this caused the LED to turn on for 2-3 sec, but when I placed it back down I could not get the LED to consistently light up again.
I hope I have been clear in my explainations. Thanks again for your help.
The one in your diagram looks like it has a little domes with radial detection zones. The warm body to be detected has to move across those zones so that it creates a fluctuating heat pattern on the sensor elements at the focal point of the lens. There are several types of lens that can be fitted onto PIR sensors, and each type of lens provides a different pattern of sensitivity, for example, a "curtain" or a "fisheye" or a "beam" and many of the ones used for burglar alarms are "multizone". I have designed custom PIR sensors that monitor the activity of bats at cave entrances and the blip of a bat flying through can be less than 0.05 second. That used a curtain or beam lens.
Another option might be the Sharp GP2D12, which is an IR transmitter LED and receiver for distance measurement, in one package. The PING uses ultrasound. However, one nice thing about PIR sensors is that they consume quite low current, whereas the ones with active light or ultrasound are relatively power hungry.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
For Chris:·
I think I would like to send the PIR back to see if there something wrong with it.· At this point I hope·it is defective because if the PIR is working fine then that means there is something wrong with me.·Anyway,· should I contact you directly or just call the customer service number?· Thanks.·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support