PIR sensor ground pin connected to ground, Vcc connected to + 5 volt current and output pin connected to base of transistor by resistor R1. Transistor collector connected to one end of the relay coil and another end of relay connected to 5 volt current. The diode d1 is connected across the relay. One end of the lamp is connected to the power cord, it can be live or neutral wire, the other end of the lamp is connected to no contact of the relay. Normal contact of the relay is connected to another line of the input network. NC contact of relay will not be connected. To power the circuit, I use this old cell phone charger circuit board or you can use a 5-volt SMPS device.
When the PIR sensor senses any movement in the viewing angle, it generates high pulse on its output pin. When I connected this output pin to the transistor base, it goes into saturation, causing the lower collector-emitter voltage, about 0 volts. Thus, the transistor functions as a short circuit, which results in the current flow through the relay coil. Due to this common contact of the relay is shifted towards the NO contact, this action completes the AC circuit and releases the lamp.