I am using PIR Sensor HC-SR501 with Arduino given in below link. However I get continuously multiple false alarm.
what is the problem here? how can I fix this?
Arduino - PIR Sensor - PIR sensors allow you to sense motion. They are used to detect whether a human has moved in or out of the sensor’s range. They are commonly found in appliances and gadgets used at home or for businesses. They are often referred to as PIR, Passive Infrared, Pyroelectric, or...
The PIR sensors are not really from the best devices. Perhaps you made a mistake in the programming and set the sensor to trigger an alarm at a very small movement. This requires testing. Please check if you have followed the tutorial exactly.
Below is my code which i copied from a the above given link. what seem to be problem here. as per my understating sensitivity depends on only
potentiometer setting of the sensor (not on your code) to which i have configured for minimum sensitivity.
If I were you, and if I didn't have the resources to analyze the sensor signal (eg oscilloscope), before trying to debounce or filter the sensor signal, I would reflect it to an LED to understand how it behaves in the presence of the object motion. You are using the serial only to send the result of the algorithm, and this does not help to understand its "malfunctioning".
If I were you, and if I didn't have the resources to analyze the sensor signal (eg oscilloscope), before trying to debounce or filter the sensor signal, I would reflect it to an LED to understand how it behaves in the presence of the object motion. You are using the serial only to send the result of the algorithm, and this does not help to understand its "malfunctioning".
does it mean I have to remove my arduino and connect PIR sensor with LED and test it's behavior first ? as a beginner i have never used oscilloscope. is it necessary to use here for fault detection?
i have unit tested my pir sensor, just by using battery and led but still i see it is not working as expected. it gives false positive and false negative.
so what are the options i am left with? do i need to replace my existing pir sensor (which means i have to purchase new one) or any other electrical component such as transistor , diode need to be used for this testing? i have tried with potentiometer settings but even failed. below circuit i used for testing.
i have unit tested my pir sensor, just by using battery and led but still i see it is not working as expected. it gives false positive and false negative. so what are the options i am left with?
So, it's clear that before working with the above code you need to setup the mechanical apparatus and adjust its sensitivity accordingly, as you may have already realized, its operation is closely related to positioning, angle and distance from the target, surelly tests on breadboard will not represent the expected behavior perceived in the actual application.