I have connected the PIR motion sensor HC-SR501 to an Arduino Uno and its jumper settings is set to H and GND. (This is not a physical jumper, but a small link that connects both H and GND.)
It detects motion, but sometimes does not notice or retrigger if I am still standing in front of it.
Most times I have to wave my hand to indicate that I am still in front of it.
My test case is
- After 2 or 3 seconds of being in front of it, and if I move my hands it should continue to stay in "motion detected" mode.
- Even if I don't move, and the fact that I am standing in front of it - it should detect the body heat and stay in "motion detected" mode, as this is an infrared detector.
This behavior works most times, but three out of 10 times it stops detecting my presence and when I wave my hand, it takes the "default" sleep mode of 3 more seconds and then detects the movement.
The delay potentiometer is set to minimum. The distance sensitivity potentiometer is not a problem as I have set it to 3 feet (i.e the minimum) and don't see a problem there.
My problem is that it does not sense my "continued" presence to stay in "motion sensed" mode.
I have connected the motion sensor to an Arduino Uno and doing a digitalRead(Pin5) continuously in a loop every 50ms.
Appreciate if someone could answer and tell why this could be happening.
Just to note: The pins on the motion sensor VCC is connected to 5V of Arduino, GND of the motion sensor to GND on the Arduino and the digital output of the motion sensor to pin 5 of the Arduino.
I have placed the motion sensor at 90 degrees to me standing, does it have to be positioned any other way?
I cleaned the dome assuming there was some clog/dust - this did not help.
Any inputs would be appreciated.