Need some help on a ultrasonic sensor problem

Thank you for your response.
My setup simply declares some pinmodes, opens a Serial and set's the initial state for my relay.

pinMode(relay_1, OUTPUT);
pinMode(relay_2, OUTPUT);
pinMode(PESensorPin, INPUT);
pinMode(led, OUTPUT);
Serial.begin(9600);
digitalWrite(relay_1, HIGH);
digitalWrite(relay_2, HIGH);

The circuit works with and without USB connected as long as I use a different power source than the one from my voltage regulator. Part of my circuit is powered by the 5V from the arduino and the 24V parts are directly powered by the 24V power supply.

Yes it is a real problem because supressing sensor input for a short while won't work, the arduino reads a continues sensor input so it is really stuck in the blink loop as the sensor is always registering an object.
Could there be something wrong with the regulator. A thing I noticed is that as soon as I use the regulator there is an unexplained voltage on the echo pin (even with the sensor disconnected) and when I use a different supply and disconnect the sensor there is just no voltage as it is supposed to be, could there be something wrong with the regulator that makes the arduino fail to register the pin as input or something?