Two voltage sources – selecting with digital signal

controllerfanpwmvoltage

I'm trying to build a fan controller based on Arduino.
It will be (at least I hope so) possible to either control with pure PWM or voltage regulator based on buck converter.
Now what I'm trying to do is:

build a circuit that will allow me to choose, if I want to power the fan with full 12V (for PWM fans) or buck converter output (for 3-pin fans).

Selection should be possible with Arduino digital output (either LOW or HIGH).
I to google some solutions and tried to simulate some circuits based on diodes or transistors, but it wouldn't work as I envisioned. I lack knowledge to fully design what I want.
I would like to get i either:

  • sample circuit (if possible simple and cheap)
  • phrases to google (I'm not native english speaker and maybe I'm
    not looking for the right thing)
  • some insight if my "vision" is achievable and makes sense
    (alternatives?)

Thank you!

EDIT.
According to "pure PWM" or "12 V".

fans

4-pin fans use 12V supply all the time with additional cable to control via PWM.
3-pin fans on the other hands should be controlled by varying input voltage.

This is conceptual image of what I'm trying to do:

concept

Input voltage to buck converter is 12V.

Thank you for tag suggest!

Best Answer

As a simple and largely unbreakable device try using a device called a relay. Pick one that has a changeover contact. In effect it is a mechanical switch controlled by an electromagnet.

The electromagnet (coil) would be activated by the microcontroller via a transistor.