1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PSU Wiring query

Discussion in 'Tech Support' started by ModSquid, 9 Feb 2020.

  1. ModSquid

    ModSquid Active Member

    Joined:
    16 Apr 2011
    Posts:
    614
    Likes Received:
    49
    Hey all,

    Quick question for the more electrically-minded out there - I'm trying to wire up two toggle switches in series onto the front of a case. One will be an on-off which will be used to arm the system and light up an led; the second in series will be an on-off-on momentary switch that will then be flicked to power up the system. Obviously, I need to wire these into the power supply so I'm going to interrupt the front panel wiring and patch the toggle switches in. That way the front panel power switch can also be used in the event the others cannot.

    The question is therefore this - how do I get the first arming switch to light the led? Will it have enough power to do so when flicked on, without the system powered up fully? Failing that, I do have a molex-powered led that I could wire into if necessary, but will this even be turned on if the system is powered off? By powered off, I only mean the box, not the actual PSU/wall plug.

    Thanks in advance, team!
     
  2. ModSquid

    ModSquid Active Member

    Joined:
    16 Apr 2011
    Posts:
    614
    Likes Received:
    49
    Also, a follow-up question - what voltage does that power-on lead use? I assume I'll need that to figure out the correct resistor to wire in.
     
  3. Gareth Halfacree

    Gareth Halfacree WIIGII! Staff Administrator Super Moderator Moderator

    Joined:
    4 Dec 2007
    Posts:
    13,404
    Likes Received:
    2,460
    If you want your LED on when the PC is off but has mains power supplied, you'll need to wire it in to the +5VSB pin - however, I think I'm right in saying that +5VSB is pulled to ground when the system's powered on. In other words:
    • System off, switch disarmed: LED off
    • System off, switch armed: LED on
    • System on, switch armed: LED off
    • System on, switch disarmed: LED off
    If I understand you right, you're going to want the LED on in system-off-armed and system-on-armed, which wiring the LED into the +5VSB pin won't do.

    What you could do is use two LEDs (or a multi-colour single LED), with one colour wired through the switch to +5VSB and the other colour just wired straight into a +5V rail. That'd give you, assuming a red LED to +5VSB and green to +5V:
    • System off, switch disarmed: LED off
    • System off, switch armed: LED red
    • System on, switch armed: LED green
    • System on, switch disarmed: LED green
    Beyond that, you're going to be faffing with relays or some other kind of switching circuits to make what you want to happen happen. Or, I guess, you could wire both +5VSB and +5V to one LED through some kind of isolator so current can't flow from +5V to +5VSB ('cos if it did the system would just power off, I think) or +5VSB to +5V ('cos if it did it'd try to run all the 5V devices on that rail from the 750mA +5VSB and that ain't going to end well.)
     
  4. Xlog

    Xlog Active Member

    Joined:
    16 Dec 2006
    Posts:
    615
    Likes Received:
    50
    Its not.

    Modsquid, do you intend for toggle switch to act as a "enable/disable" for momentary switch, or do you want it to be a true kill switch? In second case you'll need to wire it in series with PS_ON (green wire) signal on ATX power connector.
     
  5. Gareth Halfacree

    Gareth Halfacree WIIGII! Staff Administrator Super Moderator Moderator

    Joined:
    4 Dec 2007
    Posts:
    13,404
    Likes Received:
    2,460
    Well, that makes life easier, dunnit. Dunno why I thought you lost +5VSB on boot-up.
     
  6. ModSquid

    ModSquid Active Member

    Joined:
    16 Apr 2011
    Posts:
    614
    Likes Received:
    49
    Thanks both - much appreciated!

    The toggle is indeed meant to be an enable/disable for the momentary rather than kill switch - original idea was for it to arm the momentary, which state would be indicated by the led, then the momentary will turn the system on, but the enabling toggle could then be turned off if required, in order to get rid of the led.

    Gareth pretty much had it down pat when he said this (I've edited slightly):
    • System off, toggle disarmed: LED off
    • System off, toggle armed: LED on
    • System on via momentary, toggle still armed: LED off (this would have been ideal, but the above suggests it might not happen - is there an alternative?)
    • System on, toggle disarmed: LED off
    So I've actually deviated slightly from my original intention to have the led stay on after system start (mainly because one of the fans I dug out to use also has a bright red led in) to the above, where it would ideally turn itself off.

    Is this doable?
     
  7. Xlog

    Xlog Active Member

    Joined:
    16 Dec 2006
    Posts:
    615
    Likes Received:
    50
    First, check if your front panel connector doesn't have 5V available, some do, some dont, 5VSB should be also available on pin3 of TPM header, if your MB has one. If it doesn't, take a multimeter and measure voltage between chassis and positive of power/hdd led and speaker (then PC is off), you might get lucky and some of them might be low side controlled, if not try, placing led in parallel with poweron switch and see if it lights, you might get lucky and the pullup resistor will be low enough to light the led (dont expect full brightness), if that fails - you'll need to splice into atx power connector.
     
    ModSquid likes this.
  8. Gareth Halfacree

    Gareth Halfacree WIIGII! Staff Administrator Super Moderator Moderator

    Joined:
    4 Dec 2007
    Posts:
    13,404
    Likes Received:
    2,460
    Yarp. Bit trickier than I first thought, 'cos +5VSB is available at all times, but basically what you need is an exclusive OR - XOR.

    So, I'd go +5VSB to LED to resistor to arming switch to ground for starters: that gives you system-off-toggle-disarmed off and system-off-toggle-armed on. However, it also gives you system-on-toggle-armed on, which you don't want.

    That's where your XOR comes in. Once the above's working, go +5VSB *and* +5V to XOR to LED to resistor to arming switch to ground - with a couple of diodes in there to isolate +5VSB from +5V and vice-versa. What that'll do is set up the circuit so that the LED is only on if one of +5VSB and +5V are high - which is the case when the system is powered off, but not when it's powered on. That'll give you the truth table you're after: the LED is only on if the system is off and the toggle is armed.

    You could build your own from a box of scraps, but you could also get the same functionality in a single component with a 5V relay. (Okay, two components, 'cos you'd need a diode in there.)

    With the relay, your circuit becomes: +5VSB to LED to resistor to arming switch to relay NC; relay common to ground; relay coil to ground and +5V (not +5VSB) with a flyback diode. Unless I'm very much mistaken - and it's half-nine in the morning, it's entirely possible I'm very much mistaken - that'll give you:
    • System off, toggle disarmed: LED off (because the circuit is broken by the toggle)
    • System off, toggle armed: LED on (because the relay is in normally-closed position, completing the circuit)
    • System on via momentary, toggle still armed: LED off (because turning +5V on has activated the relay, breaking the circuit again)
    • System on, toggle disarmed: LED off (because the circuit is now broken by both the relay and the switch)
    You could also do the same with a simple transistor, but I like relays 'cos they go CLICK when they turn on/off. Also, the relay isolates +5VSB from +5V for you, which the transistor wouldn't - you'd have to isolate it yourself - and doesn't care how much current (within reason) your load is drawing.
     
    ModSquid likes this.
  9. ModSquid

    ModSquid Active Member

    Joined:
    16 Apr 2011
    Posts:
    614
    Likes Received:
    49
    Cheers fellas - Likes awarded to both for your incredibly detailed and committed responses. Will post photos when I get the build finished, along with a summary of the solution chosen.

    Good work, people!
     

Share This Page