YL-38 only working seldom

I have a YL-38 connected to a YL-69 sensor. The 5v and gnd pins of the YL-38 are connected to an external power supply and not to the arduino.

The Analog pin is connected to A3 on the arduino. Turning on the power supply makes the two LEDs on the YL-38 light up, one of them is the power supply one, the other is digital output one.

The moment I turn on the Arduino tho, the digital output one shuts off and the only reading i get from the module is 17 using analog read.

The arduino is powered by the same external power supply and everything has common ground and the wiring works. Any ideas?

Do add a complete schematic of your actual setup, and links to the data sheet of the specific sensors.