A question about switches...

Discussion in 'The Projects Forum' started by RayInMS, Feb 18, 2014.

  1. RayInMS

    Thread Starter Member

    Dec 12, 2012
    89
    1
    Suppose I have four circuits (X1, X2, X3, and X4) that are powered by a single 12V source. The current draw for each is minimal (< 1 amp). I only want one circuit powered at a time. I could do this with four SPST switches. However, what I would like to do is push one switch (perhaps a momentary ON switch) to select the desired circuit and turn it on (while ensuring that the other three are off).

    See attached diagram for a visual explanation.

    My questions are:

    (1) If I used a decade counter to cycle through the selections, would I need to use a transistor in place of each switch and connect the Q0, Q1, etc. outputs from the decade counter to the base of each transistor? Or would the output from the decade counter mirror the supply voltage AND be able to support currents < 1 amp? The data sheet for a typical counter (i.e., NTE 4017) didn't tell me a lot.

    (2) Should I attempt to use XOR gates to do this?

    (3) What about relays? Is there a relay setup that I'm not thinking about? For example, using four relays and four switches in some combination where when one relay is "on" the other three automatically are "off"?

    (4) Are there any other possibilities that I should consider?

    Thanks!

    Ray
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,570
    2,381
    This called a Radio type switch, there has been couple of posts on this recently, did you want to do it in IC logic or relay logic, in the previous posts, there is also a link to mechanical switch source if preferred.
    Max.
     
  3. RayInMS

    Thread Starter Member

    Dec 12, 2012
    89
    1
    Can you provide a link to those threads? I'd like to check them out. Logic type is not important - this is a project for the sake of building a project. I normally say simpler is better, but if I can learn something new I'm fine with more complicated setups.
     
  4. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,570
    2,381
  5. RayInMS

    Thread Starter Member

    Dec 12, 2012
    89
    1
  6. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,570
    2,381
    It is fairly easy in PLC ladder, with relays it could get a bit messy to duplicate this with the amount of contacts, plus one one-shot of some kind, either relay or IC.
    Should be possible to duplicate it in TTL logic, but I have not gone that far.
    Now I would tend to use a Picmicro in place of discrete logic.
    Max.
     
  7. RayInMS

    Thread Starter Member

    Dec 12, 2012
    89
    1
    Right now I'm thinking of using a 555 as a monostable vibrator to do the one-shot clock pulse (using a momentary ON switch), sent to a 4017 decade counter to cycle the circuit selection.

    There's still the question about transistors, though. Should I put them in place of the switches and run the 4017 outputs to the transistor bases? Or are the 4017 outputs going to mirror the supply voltage (12V) and be capable of handling current at levels up to 1A (thus making transistors unnecessary)?

    I've seen setups where a 4017 powers LEDs (~20mA of current), but nothing in terms of actual capability.
     
  8. crutschow

    Expert

    Mar 14, 2008
    13,056
    3,245
    The answer to your question is in the 4017 data sheet. If you look at it under STATIC ELECTRICAL CHARACTERISTICS, the Output Low Current and Output High Current is shown, which varies with the supply current, but is in the single digit mA region so obviously will not supply an ampere of current. Thus you need a transistor buffer on each output.

    For 1A of current a MOSFET would be best. Use one with at least a 4A rating.

    Do you want to switch the ground side or the high (12V) side? An N-MOSFET will switch the ground side. A P-MOSFET will switch the high side but you need to add an inverter (such as the 4049 Hex Inverter) at each of the 4017 outputs to have the output MOSFET voltage high when the 4017 output is high.
     
  9. RayInMS

    Thread Starter Member

    Dec 12, 2012
    89
    1
    Something like this maybe?
     
  10. RayInMS

    Thread Starter Member

    Dec 12, 2012
    89
    1
    That's about what I figured...I won't ever get close to 1A, but I'd rather be safe than sorry.

    Does it have to be a MOSFET or will any medium-duty transistor work? These circuits are not complicated nor are they used for anything other than tinkering around, so speed and such is not important.
     
  11. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,570
    2,381
    What does the load actually consist of that you intend switching?
    Max.
     
  12. RayInMS

    Thread Starter Member

    Dec 12, 2012
    89
    1
    A few test circuits that I built. Capacitor tester, transistor tester, a variable-voltage audio oscillator (soon to be built)...things like that. Most stuff pulls way less than 500 mA. LEDs, 555s, and stuff like that. Kiddie stuff. :)
     
  13. crutschow

    Expert

    Mar 14, 2008
    13,056
    3,245
    Well, there is a possible "and such" problem. For a BJT (MOSFETs are also transistors) the base current should be 1/10 of the collector current to fully saturate, so the base current would be 100mA for a 1A collector current. This means an additional stage of gain or the use of a Darlington transistor. But a Darlington has a saturation voltage of about 1V so the load voltage would be about 11V instead of 12V. And if you used the Darlington as a high side switch, as you show in your diagram, then it's acting as an emitter follower with the maximum output voltage being only about 10.5V. Would that be acceptable?
     
  14. RayInMS

    Thread Starter Member

    Dec 12, 2012
    89
    1
    Most likely, yes. Most of the stuff I build requires 9V. I was thinking maybe a TIP 32 would work? I don't need 1A. That's my "max" guideline that I'm working with. It's nearly double what the hungriest circuit would pull. Like said in an above post, we're talking about circuits built with LEDs and 555s.

    The easy route would be a 6 pole rotary switch. I've got one. But I want to learn something new, and this seemed like a good opportunity to do so. Do you think it would be better to put the transistor(s) on the bottom (low-side switching)? That'd eliminate the drop, wouldn't it?
     
  15. crutschow

    Expert

    Mar 14, 2008
    13,056
    3,245
    The TIP32 is a PNP so you could use it as a high side switch (emitter connected to the +12V). But the maximum output current, if you drive it directly from the 4017, would be about 100mA due to the limited base current the 4017 can supply.
     
  16. RayInMS

    Thread Starter Member

    Dec 12, 2012
    89
    1
    Meaning I would still need an additional transistor to boost the gain, or use a Darlington pair (as you said before). Hmmm. I believe at least two of the circuits I will power would do fine with 100 mA. Not sure about the other two.

    What about using a second 555 as an astable vibrator to drive the TIP 32? Would that be able to provide more base current than the 4017's output?
     
  17. crutschow

    Expert

    Mar 14, 2008
    13,056
    3,245
    Yes. The 555 data sheet will list the output current rating. But it sounds kind of kludgy. Using it as an astable will just turn that output on and off at the astable frequency.
     
  18. inwo

    Well-Known Member

    Nov 7, 2013
    2,435
    315
    Yes, yes it could.;)

    And this doesn't address double button press or contact timing issues.

    This has come up a lot lately and should serve as an explanation of "a bit messy".:D

    Again excuse the poor ladder logic. I'm still looking.
    Could have drew it faster in PLC.

    ps.
    Quickly done. I'll delete if errors.:cool:
     
  19. absf

    Senior Member

    Dec 29, 2010
    1,493
    373
    From your description, you're wanting to use logic chip and power transistors to emulate a 4-gang radio-buttons.

    I've drawn a simple circuit using 4017, inverter and TIP127 darlington PNP to emulate the 4 switches. On power-on all circuits are OFF and each push of the "STEP" button would cycle through Load #1 through Load #4.

    The LEDs were used to indicate which load was fed with the supply from Voltage source.
    A power on reset can be added to the MR of the 4017 in case it doesnt switch off all the devices during power-on.

    Allen
     
    Last edited: Feb 19, 2014
  20. RayInMS

    Thread Starter Member

    Dec 12, 2012
    89
    1
    Yep. That's about what I was looking for. Thanks!

    I don't see pin 16 (Vcc) on the 4017 connected to the power source, or pin 8 going to ground. Also, on the Schmidt trigger, pin 14 (Vdd) should go to the power source, and pin 7 should go to ground. Correct?
     
    Last edited: Feb 19, 2014
Loading...