"Master" I shutdown switch.

djBon2112

Supreme [H]ardness
Joined
Jul 29, 2006
Messages
5,279
I had an awesome (I think) idea for my server rack's power bar...

A two-way button that will either shut down all running computers (top flick) or turn on all shut down computers (bottom flick). Leads will run from the power bar to each computer's power button, and I will have to build the little power modules inside the power bar.

Now, my problem is how to wire the modules to make them know if the computer is on and off. I think the IF <ON> TURN OFF module should be simple, with a 5V lead coming from each of the computers, and a simple transistor like this:



...though exactly what type of transistor I'd need I don't know. The IF <OFF> TURN ON one though, I have no clue. I would imagine it would simply be an inversion of the turn off one, but I've never figured out how to "invert" transistors. Anyone have any ideas? (I will have a constant 5V line in the thing for various reasons, which I can use for this if needed.)

EDIT: I also realized a straight switch for all of them wouldn't work, but I've got a solution to that which I'm sure would work (involving more transistors)... let's just imagine for now though that the switch is one-per-module.
 

agent420

[H]ard|Gawd
Joined
Sep 6, 2001
Messages
1,388
While I'm sure you could come up with something like that, have you considered a Lan based remote power utility that uses Shutdown and WOL nettwork messages?
 

Mohonri

Supreme [H]ardness
Joined
Jul 29, 2005
Messages
5,752
agent420's suggestion isn't a bad one, although it's a bit more expensive.

What you're probably looking for is more along the lines of gates, rather than transistors. Basically, you want the line pulled low if a) the computer is on AND the switch goes to position A, OR b) the computer is off AND the switch goes to position B.

Roughly speaking, you'll need a NOR gate, an inverter, an OR gate, and an AND gate for each machine, plus a transistor and a couple pull-up resistors. I'm sure someone can come up with a simpler circuit than this, but this is one that would work:
Code:
         |
       P.U.R.
         |
Switch----->o--+----+
side A         |AND |
               |GATE|----
5V from--------+----+    |
computer                 |
                         +-+-------+
                           |OR GATE|-----transistor
         |               +-+-------+
       P.U.R.            |
         |               |
Switch---------+----+    |
side B         |NOR |----
               |GATE|
5V from--------+----+
computer
You'll want to tie the middle pole of the switch to ground, so that it grounds either one pin or the other.
 

djBon2112

Supreme [H]ardness
Joined
Jul 29, 2006
Messages
5,279
Code:
         |
       P.U.R.
         |
Switch----->o--+----+
side A         |AND |
               |GATE|----
5V from--------+----+    |
computer                 |
                         +-+-------+
                           |OR GATE|-----transistor
         |               +-+-------+
       P.U.R.            |
         |               |
Switch---------+----+    |
side B         |NOR |----
               |GATE|
5V from--------+----+
computer
I'm just slightly confused, forgive me. When you say "transistor" there, you mean my transistor base connection with the shutdown leads on it? And what's "P.U.R."? Finally, where would one find gates like that?
 

remmeh

Limp Gawd
Joined
Jun 2, 2008
Messages
339
I'm just slightly confused, forgive me. When you say "transistor" there, you mean my transistor base connection with the shutdown leads on it? And what's "P.U.R."? Finally, where would one find gates like that?

Pull-up resistor... just a ~10k to Vcc.

You should be able to find gates like that... at www.digikey.com for example. Or Radioshack.
 

Mohonri

Supreme [H]ardness
Joined
Jul 29, 2005
Messages
5,752
I'm just slightly confused, forgive me. When you say "transistor" there, you mean my transistor base connection with the shutdown leads on it? And what's "P.U.R."? Finally, where would one find gates like that?
Whoops. Yeah, I should have included a bit more explanation. remmeh got it right.

You can get chips with four gates built into a single IC, which will reduce your parts count significantly (a quad AND, quad OR and quad NOR would handle four machines).

And yes, I meant the transistor base, exactly as you had it sketched earlier.
 

Michael Daly

[H]ard|Gawd
Joined
Jan 6, 2007
Messages
1,212
To implement a chip-based solution, you'll need to learn some basic IC electronics. It's pretty straightforward. You could use low-powered CMOS chips, but older 74LSxxx chips are pretty robust and easy to use. Everything is 5V.

Get a breadboard to build the prototype. That will allow you to mess around with wiring changes without soldering etc. When you want to build it, use a wire-wrap circuit board and tool. A simple wire-wrap hand tool is a lot cheaper than a power wire-wrapper.

Consider using a relay to actually switch the power. The IC output is not powerful enough to drive the relay so the IC logic output drives a transistor and the transistor drives a relay.

I built something like this to use a serial (RS232) port to control the reboot of a device in another room.
 

Mohonri

Supreme [H]ardness
Joined
Jul 29, 2005
Messages
5,752
Since we're using the transistor to simply take the place of the power button on the case (am I right?), it doesn't need to handle that much current--just a few milliamps. A relay would be overkill.
 

djBon2112

Supreme [H]ardness
Joined
Jul 29, 2006
Messages
5,279
Since we're using the transistor to simply take the place of the power button on the case (am I right?), it doesn't need to handle that much current--just a few milliamps. A relay would be overkill.

You're exactly right, but it's the stuff before it that sorts out the current state of the computer (is it ON or OFF, and switches accordingly) that's posing the problem... I could use a 3.3v lead but that too is lots of current, since I assume (with my limited knowledge of hard electronics) that the base on a transistor dumps its current out to the emitter.

I'm wondering though if simply using PoE would be easier, especially since I just dumped my idea of a rack-mounted gaming PC + watercooling, which means this rack will only have ~2 computers in it...
 

Mohonri

Supreme [H]ardness
Joined
Jul 29, 2005
Messages
5,752
The current capacity of the 5V rail isn't an issue--the logic chips will only use as much as they need, no more.
 
Top