I have two systems that run on separate power supplies and turn on independently of each other.The issue here is that each system needs to be cooled by the same cooling fan. So I need to know if there is a way that I could have either system on and the cooling fan turn on for either one. Also need to be able to have both on without overvolting the fan. I also really dont want to run another power supply just for the fan and have to turn it on independently of the systems. Thank you all for any help. The fan is rated at 12V but can be ran at about 5V. One of the power supplies is 5V and the other is 7V. Also, what would I do with the negative wire in this situation? Is it fine to have it connected to only one of the power supplies or should I have it configured a different way?
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:
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.
The most general solution would be to connect a SPST relay to each system, and wire the contacts in an "OR" configuration to switch the fan on. This allows all three power supplies (the two systems and the fan) to remain galvanically isolated from each other.
The relay coils need to be rated for the system power supplies, and the contacts need to be rated for the fan. They could be mechanical relays or solid-state relays, as appropriate.