How to power one fan with two different power supplies individually
Assuming both power sources are withing the fan´s working range, and that they have enough power for the fan and all other loads when running alone:







simulate this circuit &ndash; Schematic created using CircuitLab

The maximum voltage in the fan will be the highest voltage between both power supplies. The voltage will not add to each other.

So if you have 12V on V1 and 5V on V2, then when V1 is turned on (with V2 on or off), your fan will run at 12V, and when only V2 is turned on, your fan will run at 5V

If your fan is causing interference or noise, use a big enough filter capacitor. The easiest here is to read your power signal before the diodes and check for noise when the fan turns on and off, and tweak the capacitor value accordingly.

I would also put a protection diode, so that any back EMF from the fan has a path to leave the circuit.