What isPIR Sensor?
A passive infrared sensor (PIR sensor) is an electronicsensor that measures infrared (IR) light radiating from objects,or living being .It is generally used to detect the motions of human or animal.
All live objects whose body temperature is more than 0°C emits the heat in form of infrared radiation through their body. This Radiated signals are invisible to human eye. These Signals can be detected by using electronics devices specially designed for such a purpose.
Internally there are many components like comparator,amplifier,lens,etc .When object is detected or objects IR is compared with certain threshold the output pin send 3.5 volt and if not detected it is always zero . So we have two condition here 0 and 3.5volt using this concept we can calculate the motion detection.