Connect with us

Two analog inputs to 1 output (+logic)

Discussion in 'General Electronics Discussion' started by dbIsMe, Mar 17, 2017.

Scroll to continue with content
  1. dbIsMe


    Mar 17, 2017
    Sorry in advance, I'm not familiar with a lot of the electronics terminlogy. I haven't even known what to search for...

    I have 2 analog inputs (0-5v). Lets call one gopedal and the other killswitch. The analog output is going to a motor controller. So what I want is for the gopedal value to go through to the motor controller *unless* the killswitch is pressed. If the killswitch is pressed, I want it to send 0v to tell the controller to stop spinning the motor.

    Sadly the motor controller doesn't have inputs/logic to do this itself. I'm lost in the electronics world. Can you help me with what is required?

  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    Jan 21, 2010
    The kill switch can control an analog multiplexer which either allows the analog "go" voltage through or selects 0V.

    A simple version might be a series resistor to limit the current from your "go" voltage and a MOSFET which shorts output when the kill signal is asserted.
  3. dbIsMe


    Mar 17, 2017
    Thanks, I think that's helped set me on the right path. I've been off reading about multiplexers (yep, i'm that noob).

    So, if I had, say a 4 to 1 multiplexer, i could set the logic so that if something is detected on the killswitch input, then select say input 3 which is empty and would be 0v?
  4. Harald Kapp

    Harald Kapp Moderator Moderator

    Nov 17, 2011
    It could be as easy as this:
    Provided the input impedance (resistance) of the motorcontroller is high (a few kΩ) and the series resistor shown above is small in comparison (e.g. < 1/20 of the controller's input resistance).
    When the killswitch is open, the input voltage is fed to the controller, onlöy slightly attenuated as teh input resistance of the controller and the series resistance above form a voltage divider.
    When the killswitch is closed, the input to the motorcontroller is 0 V. The current from the GoPedal is limited by the series resistor to an uncritical value.

    The value for the resistor depends on both the input impedance of teh controller and the max. output current of theGoPedal. For a maximum output value Imax of the GoPedal calculate R as R= 5V/Imax. Then check the result against the input resistance of the controller. To avoid unnecessary atennuation the input resistance of teh controller should be at least 20*R (an estimation). If it is lower, check the bavior of the setup at max. GoPedal position.
  5. Harald Kapp

    Harald Kapp Moderator Moderator

    Nov 17, 2011
    An even better solution, without the potentially problematic series resistor:


    Use a SPDT (Singe Pole Double Throw) kill switch. In the upper position (kill switch inactive as shown) the output from the pedal goes directly to the controller.
    In the lower position (kill switch active, position not shown) the input of the motor controller is connected to common (0 V).
    The resistor here serves a purpose only during switching when the upper contact has opened and the lower contact has not yet closed. During that brief period (typically a few milliseconds) the input to the motor controller is floating as it is connected neither to the pedal nor to common. The resistor forces a defined low potential in that case.
  6. AnalogKid


    Jun 10, 2015
    Is "killswitch" a signal coming from a circuit, or a physical switch? If it is a switch, how many pins does it have?

    Is "gopedal" a signal that can be any voltage between 0 V and 5 V, or is it more like a logic signal with only high and low values?

Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day