PIR Sensor Trouble

Can you post a schematic? Pictures are hard to see what you have done.

and having a battery connected as well as USB.

You should not have to do this, the sensor will work off 5V.