There is a DC barrel jack that accepts 12V to 48V from an external PSU. The power may, or may not be available (cable disconnected). Depending on whether or not the power is connected, I wish to enable an IC on the PCB that accepts 1.25V...5V on its 'EN' pin.
My first thought was to simply use a voltage divider to produce the appropriate voltage. But that was a no go, since I can't seem to find appropriate values for the voltages at hand / required.
Second though was a shunt, but it will draw too much power. I don't worry about consumption (device will by mains powered) but more about thermal design.
Lastly, I though about using a transistor (kind doesn't really matter) as a switch (switch the 5V depending on 12V...48V presence) but I'm not sure whether this is even possible.