Passing greater of 2 voltages using 5V signal
Perhaps I'm missing something in your requirements, but something as simple as this would work for DC voltages depending on the current levels needed:







simulate this circuit &ndash; Schematic created using CircuitLab

Granted there would be a small voltage drop across the diode, but if you used a power Schottky diode that would only be ~500mV for high current loads, but could be as low as ~100mV for low current signals.

Basically if \$V_1 &gt; V_2\$, then \$D2\$ will be reverse biased and \$D1\$ will conduct making \$V_{out} \approx V_1\$. The opposite will be true if \$V_2 &gt; V_1\$ which would make \$V_{out} \approx V_2\$.



It is worth being aware that you need to pay attention to the reverse leakage current of the diodes you are using. Diodes are not ideal, and will conduct a small current under reverse bias. If the source driving your input is very high impedance compared to the reverse leakage of the diode, you will find that a voltage will appear at the input as the current is driven back through the diode.

You can work out how much this voltage will be by treating the reverse biased diode as a current source based on the reverse current specification from the diode datasheet.