In this video, I described in detail the operation and application of the RCWL0516 motion sensor based on the Doppler effect, also showed how to connect the sensor to a relay and a lamp for automatic lighting control and slightly modified it for this purpose.
Buy RCWL0516 motion sensor on aliexpress: http://ali.pub/3yy8cf
Photoresistors: http://ali.pub/3z6e4g
Relay, select "High Level Trigger": http://ali.pub/3z6g04
This motion sensor can be used to alarm system or automatically turn on the light. According to the documentation, the detection range is 9 meters. My test showed that the real detection range is about 7 meters, however, the range may depend on surrounding objects that reflect or absorb radio waves. Thanks to the Doppler effect, this sensor can detect the movement of people even behind a brick wall.
For connection, the RCWL0516 sensor has 5 contacts:
VIN and GND used to connect a power supply with a voltage of 4 to 28 volts.
OUT output, which will be 3.3V when motion is detected
3V3 is used to connect any external devices, this output will always have 3.3V, the maximum load current is 100mA.
CDS if this output is shorted to a common minus, the sensor will not detect movement.
There are also contacts on the motion sensor board for soldering a photoresistor, which limits its operation during the day.
Join the VK group: https://vk.com/buychinaproduct