Electronic – How to switch between two digital signals

digital-logicmultiplexersignal processingswitchesswitching

How can I switch between two PWM signals? I would like to control a servo motor by two different PWN source. these two PWN signals are coming from two PID controllers.

I want to switch between these two signals by an Arduino. here is a schema of what I want to do, but the problem is that I can't find the right switch.
what do you suggest?
enter image description here

Best Answer

You can use...

  • MUX (multiplexer). The selection inputs control which one of the inputs gets sent to the output. Simple.
  • Tri-state buffers. Connect the outputs together, and enable only one buffer at a time.
  • Analog switches... Well, they are switches, they will let the signal through when closed, quite self-explanatory
  • Junk parts solution with bipolar transistor used as common base switch


simulate this circuit – Schematic created using CircuitLab