I am designing a simple controller for an automotive application. As you can in the schematic below, they system is consisted of a sensor, a gauge and a controller. This particular sensor shorts its own power line (SIGNAL in the schematic) to ground, creating a PWM signal which represents the measured quantity. The gauge works by balancing a needle between the magnetic fields produced by two coils.
When the gauge is present, the controller's only job is to sense SIGNAL (which switches between 0 and ~6.5V). However, I also need to support the configuration where the gauge is removed from the circuit and the sensor is directly connected to the controller. In this case, I need to provide power to the SIGNAL wire (perhaps using a current limited regulator) AND sense it at the same time.
I am looking for a decent way to support both of these configurations (gauge present and not present). One solution I can think of is to use the controller MCU to monitor SIGNAL at power up and if a PWM voltage is not detected (say after 1 second), turn on a MOSFET which will provide power to SIGNAL. But I feel like there should be an easier way. Any ideas?