HC-SR501 is an electronic motion sensor that uses a passive infrared light sensing to detect any movement of an object, an animals or a person. HC-SR501 only sends positive or negative results so it is mainly used in security alarms and automatic lighting systems, and it is compatible with Raspberry Pi and Arduino. HC-SR501 motion sensor has two adjustable knobs: Tx knob adjust the detection delay and Sx adujsts the range from 3 to 5 meters.