@Vinod-Amarathunga If this solves your problem then why do you need the transistors & optocoupler? I would expect powering the PIR VIN from the separate 5V supply and tying the GND of the separate supply to the GND of the Arduino would work just as well. Did you try that?