I am trying to get my Arduino Uno to read sensor values while they are hooked to an external power supply. My setup is as follows: I have got my Arduino hooked up to my PC via USB. My Sensor (lets just say a Photocell) is mounted onto a breadboard which is connected to an external power supply (5V). Grounds are connected. I have tried with multiple sensors now, always resulting in the same problem: my serial monitor shows only values of 0. When I connect the sensor directly to the Arduino 5V output, it shows perfectly fine values. I just don't get, what I am missing.
From what you describe, it should work fine. So the reason must be something you have not described.
Maybe post a bright, clear photo of the circuit, so that every component and wire can be clearly seen.
A common error made when using breadboards is to assume the power and ground bars at the top/bottom of the Breadboard are connected for the whole length of the breadboard. Sometimes there are breaks in these bars in the middle of the breadboard.
Have you tested your external power supply? Is it definitely outputting 5V?
Thanks for your quick response. I am a bit embarrassed: it was indeed the breadboard and its power and ground bars, that did not go all the way through. I didn't recognize that at all. Thank you so much for the help.