Where are you putting the alarm pin in your USB setup?
Mitch: I meant , I powered the Arduino board from the USB rather than from an external power supply. This was actually two experiments. Let me explain
1st Experiment: Sensor alone
I connected the motion sensor to the external powersupply and found that it is bliking always(irrespective of the motion) - except in the night times.
This has two parts:
Part A: I Connected the Sensor to the Arduino board (connected the alarm pin to the digital pin 3) and powered the Arduino from the external power supply. I make use of the in built LED connected to pin 13 . I could see that the LED 13 is bliking always.
Part B: The same setup, I just removed the external power supply and connected the board to the computer USB port. And it started functioning properly. Meaning the LED 13 is blinking only when there is a motion.
Please note: If I connect my Arduino board to the external power supply in the night times(in night times the voltage will be higher than the day time ,because there is less usage by the industries around) it works perfectly fine.
As I mentioned earlier, increasing the voltage in the power supply did not fix the issue.