ATX Switch Development

This started as a “scratch an itch” idea: I needed to control two power supplies and the existing ideas were clunky or messy. Most revolved around either using a relay to ground the PWR_ON line or just splicing the ground and PWR_ON lines of two supplies.

The Idea

If you look at any modern ATX motherboard, you'll notice there's no relay grounding the PWR_ON pin. Logic says if it's solid state there, it can be solid state here too.

A quick googling turned up no ATX motherboard schematics (no suprise), but there are quite a few ATX supply schematics, including this excellent 200W schematic with comments. From here we can see the PS-ON line (right hand side, about 2/3 down) is pulled high internally with a reasonably high impedance (10KΩ+). Simply pulling the line low with a reasonably low impedance should do the trick.

A common NPN transistor will source current from it's collector with a low impedance when current flows to it's base. We'll need a resistor to limit the base current to a reasonable value. These two ideas in play, gives us something like this:

The primary power supply is supplying power to a resistor, which allows a limited current to flow in to the transistor base, causing the transistor to pull the PWR_ON signal to ground.

The electrical implementation

In addition to turning the power supply on and off, it would be nice to know if the power supply is providing power, if it's receiving power, and if the primary power supply is running. Three LEDs can be purposed to provide this information, along with some resistors to limit their current.

A quick google turns up an excellent ATX power supply connector pin out. From which we can locate all the ground signals, the /PS_ON line (the / means active low … or it does something when pulled to ground), and the PWR_OK signal (which indicates the power supply is providing stable voltage).

To select a transistor, I did some quick math based on a 10K pull-up to 5 volts on the PWR_ON line and discovered we need to sink about 500 microamps, with negligible switching speed or current gain. Pretty much any NPN transistor will fit the bill here, but I happen to have several thousand 2N3904s on tap (a low current 2N2222).

Selecting resistors is a similar process involving discovering the voltage and current required to put the transistor into saturation mode and the required current to light the LEDs without damaging them. I get to cheat here, because 1KΩ is very common and sufficient to drive the transistor into saturation and light the LEDs.

The resulting schematic is a logical evolution of the basic idea, I also added a two-pin header to allow a NO switch to control the power supply (JP1):

Physcial Layout

Now we need to create a physical PCB and the first step is finding out out what connectors to use. Dan's Data has an excellent write-up on the various power connectors found inside a PC. Quoting right from that guide “20 pin ATX power plug … plugs into a Molex 39-29-9202” so we order a 39-29-9202 for the ATX plug end. Based on the “Molex Connector” being “Mate-N-Lock” we can peruse the catalogs and find the matching PCB mount part is Tyco part# 350211-1; this isn't necessarily obvious though and I discovered this by ordering about 4 connectors that “should fit”. Many Bothans died to bring us this information

Now we just layout the parts and add a ground plane. To make everyone's life easier, we'll add two M6 mounting holes too (M6 screws are the common 'case' or 'hard drive' screw).

This results in a very nice single-sided board:

Testing it out

After etching a test run and soldering all the bits in, everything worked as planned except the 'PWR_OK' LED never lit. A frantic investigation shows my schematic and layout should be correct, hmm. Thinking back, the 'PWR_OK' line goes high when the 5 volt line is active and stable; like most SMPSs, the supply requires a load to regulate the 5V line. Attaching a hard-drive to the secondary supply and everything is happy.

Source files

Below are the source schematic and board files used to generate the PCB.