I would like to design a flexible input interface for my embedded device, which will see a mixture of sensors connected. The sensors themselves (e.g. thermistors) will be two-wire, with the data/signal wire being pulled up to 5V prior to interfacing with an ADC. The issue I'm trying to address is that some sensors will interface with my device, which will then provide 5V pullup and GND, whereas some sensors will have an external 5V pullup and GND, with the single data/signal line interfacing with the device.
Example of case 1 (unpowered):
Example of case 2 (powered):
Is there a way I can design the device circuitry to account for both scenarios? I would ensure the device GND is shared with the powered sensor GND, so my focus is on the 5V pullup. Can I use an IC of some sort to enable/disable the pullup resistor, such that the line up to 5V is open-circuited for powered sensors?