Maker Pro
Maker Pro

Serial port control of an ATX power supply

P

pjhealy

Hi,

It's been 20+ years since I did any kind of circuit design, so I'm
struggling quite a bit with this. Here's what I'm trying to do:

I have a server sitting in a remote location (actually a cell block...)
that occaisionally hangs. While I'm trying to determine the reason it
hangs, I need a way to remotely toggle the power.

My thought is to run a piece of CAT 5 from the troublesome server up to
a server that is reachable via the Internet. I would connect that CAT
5 cable to a spare serial port on the good server. Using the DTR/RTS
pins I would come up with a way to raise those pins to high giving me
enough power to activate a reed relay located at the far end. The
other side of the reed relay would be connected to the power on circuit
of the ATX power supply in the circuit. The relay would be Normally
Open and when closed would be closed until my code releases it or
minimally 10 seconds.

I need help identifying the current needs and what components would
work; any help would be gratefully appreciated and I'll be happy to
share whatever circuit comes out of this.

Thanks!

Pat
 
H

Homer J Simpson

I have a server sitting in a remote location (actually a cell block...)
that occasionally hangs. While I'm trying to determine the reason it
hangs, I need a way to remotely toggle the power.

To restart it? That seems very cruel - and may trash the OS.
 
P

pjhealy

Homer said:
To restart it? That seems very cruel - and may trash the OS.

Given that the system is completely hung; there is no other option than
recycling power... Besides, I'm a heartless bastard anyway.... *:cool:
 
C

CheapscateDave

pjhealy said:
Hi,

It's been 20+ years since I did any kind of circuit design, so I'm
struggling quite a bit with this. Here's what I'm trying to do:

I have a server sitting in a remote location (actually a cell block...)
that occaisionally hangs. While I'm trying to determine the reason it
hangs, I need a way to remotely toggle the power.

My thought is to run a piece of CAT 5 from the troublesome server up to
a server that is reachable via the Internet. I would connect that CAT
5 cable to a spare serial port on the good server. Using the DTR/RTS
pins I would come up with a way to raise those pins to high giving me
enough power to activate a reed relay located at the far end. The
other side of the reed relay would be connected to the power on circuit
of the ATX power supply in the circuit. The relay would be Normally
Open and when closed would be closed until my code releases it or
minimally 10 seconds.

I need help identifying the current needs and what components would
work; any help would be gratefully appreciated and I'll be happy to
share whatever circuit comes out of this.

Thanks!

Pat
I would use a 5V wall wart at the remote location for power. Use the
DTR to drive a transistor to power the relay.
Dave
 
M

Martine Riddle

pjhealy said:
Hi,

It's been 20+ years since I did any kind of circuit design, so I'm
struggling quite a bit with this. Here's what I'm trying to do:

I have a server sitting in a remote location (actually a cell block...)
that occaisionally hangs. While I'm trying to determine the reason it
hangs, I need a way to remotely toggle the power.

My thought is to run a piece of CAT 5 from the troublesome server up to
a server that is reachable via the Internet. I would connect that CAT
5 cable to a spare serial port on the good server. Using the DTR/RTS
pins I would come up with a way to raise those pins to high giving me
enough power to activate a reed relay located at the far end. The
other side of the reed relay would be connected to the power on circuit
of the ATX power supply in the circuit. The relay would be Normally
Open and when closed would be closed until my code releases it or
minimally 10 seconds.

I need help identifying the current needs and what components would
work; any help would be gratefully appreciated and I'll be happy to
share whatever circuit comes out of this.

Thanks!

Pat

Use the POE concept? Use the spares in the CAT5 to drive a relay thats
connected to the PC RESET button.

Cheers
 
P

pjhealy

Martine said:
Use the POE concept? Use the spares in the CAT5 to drive a relay thats
connected to the PC RESET button.

Cheers



I'm thinking along these lines:




---(+)DTR--------+ +------------------------------+
8 \ |
(relay) 8 * (ATX PSON)
8 | |
---(-)TXD--------+ +------------------------------+


When DTR is pulled high, that should be enough to energize the coil on
a low
curren reed relay. When energized it should close the switch on the
otherside
of the reed relay and hold long enough for the ATX power supply to shut
down.

What I'm looking for is specific suggestions on a model of reed relay
or SSR that
will do the trick. Do I need any resistors on the serial side?

Thanks!

Pat
 
J

jasen

Y-Face: ?)Aw4rXwN5u0~$nqKj`xPz>xHCwgi^q+^?Ri*+R(&uv2=E1Q0Zk(>h!~o2ID@6{uf8s;a+M[5[U[QT7xFN%^gR"=tuJw%TXXR'Fp~W;(T"1(739R%m0Yyyv*gkGoPA.$b,D.w:z+<'"=-lVT?6{T?=R^:W5g|E2#EhjKCa+nt":4b}dU7GYB*HBxn&Td$@f%.kl^:7X8rQWd[NTc"P"u6nkisze/Q;8"9Z{peQF,w)7UjV$c|RO/mQW/NMgWfr5*$-Z%u46"/00mx-,\R'fLPe.)^
User-Agent: slrn/0.9.8.1 (Debian)

My thought is to run a piece of CAT 5 from the troublesome server up to
a server that is reachable via the Internet. I would connect that CAT
5 cable to a spare serial port on the good server. Using the DTR/RTS
pins I would come up with a way to raise those pins to high giving me
enough power to activate a reed relay located at the far end. The
other side of the reed relay would be connected to the power on circuit
of the ATX power supply in the circuit. The relay would be Normally
Open and when closed would be closed until my code releases it or
minimally 10 seconds.

It doesn't need to be cat5. door-bell wire would do the task.
but if there's cat5 there already there's no point wasting it.
I need help identifying the current needs and what components would
work; any help would be gratefully appreciated and I'll be happy to
share whatever circuit comes out of this.

That's marginal. I measure about 10.5mA short-circuit current on a serial port
pin so you're going to need something like a 5V relay with a 1K resistance.

or maybe you could parallel two (or all three) of the output pins together
to drive a 500 ohm relay (you can drive the txd pin high by setting the
break bit, or almost high by writing sequence of zero bytes)

ATX switch current is only a few milliamps at about 5V. the contacts
in any reed relay will be able to handle that.

Bye.
Jasen
 
P

pjhealy

Y-Face: ?)Aw4rXwN5u0~$nqKj`xPz>xHCwgi^q+^?Ri*+R(&uv2=E1Q0Zk(>h!~o2ID@6{uf8s;a+M[5[U[QT7xFN%^gR"=tuJw%TXXR'Fp~W;(T"1(739R%m0Yyyv*gkGoPA.$b,D.w:z+<'"=-lVT?6{T?=R^:W5g|E2#EhjKCa+nt":4b}dU7GYB*HBxn&Td$@f%.kl^:7X8rQWd[NTc"P"u6nkisze/Q;8"9Z{peQF,w)7UjV$c|RO/mQW/NMgWfr5*$-Z%u46"/00mx-,\R'fLPe.)^
User-Agent: slrn/0.9.8.1 (Debian)

Hi,
My thought is to run a piece of CAT 5 from the troublesome server up to
a server that is reachable via the Internet. I would connect that CAT
5 cable to a spare serial port on the good server. Using the DTR/RTS
pins I would come up with a way to raise those pins to high giving me
enough power to activate a reed relay located at the far end. The
other side of the reed relay would be connected to the power on circuit
of the ATX power supply in the circuit. The relay would be Normally
Open and when closed would be closed until my code releases it or
minimally 10 seconds.It doesn't need to be cat5. door-bell wire would do the task.
but if there's cat5 there already there's no point wasting it.
I need help identifying the current needs and what components would
work; any help would be gratefully appreciated and I'll be happy to
share whatever circuit comes out of this.That's marginal. I measure about 10.5mA short-circuit current on a serial port
pin so you're going to need something like a 5V relay with a 1K resistance.

or maybe you could parallel two (or all three) of the output pins together
to drive a 500 ohm relay (you can drive the txd pin high by setting the
break bit, or almost high by writing sequence of zero bytes)

ATX switch current is only a few milliamps at about 5V. the contacts
in any reed relay will be able to handle that.

Bye.
Jasen

Jasen - Just what I was looking for thanks; Can you recommend an
on-line source for the parts?

Thanks!

Pat
 
pjhealy said:
I have a server sitting in a remote location (actually a cell block...)
that occaisionally hangs. While I'm trying to determine the reason it
hangs, I need a way to remotely toggle the power.

My thought is to run a piece of CAT 5 from the troublesome server up to
a server that is reachable via the Internet. I would connect that CAT
5 cable to a spare serial port


If you can run wire to the room, why not just put a power relay in the
AC input
and drop power the easy way? If you use a normally-closed relay, the
brief application of a battery to two wires will drop AC power for you.

For that matter, X-10 modules with remote control by transmitter or
computer-control plugin cards are an easily available item. Maybe you
can lose the wire.

For other folk with remote requirements, there are boxes available that
will
answer the phone and take a request to toggle power, but that seems too
elaborate.
We used the PowerKey products from Sophisticated Circuits, years ago.

You might also consider the builtin capabilities of UPS boxes, which
often have serial control.
 
P

pjhealy

If you can run wire to the room, why not just put a power relay in the
AC input
and drop power the easy way? If you use a normally-closed relay, the
brief application of a battery to two wires will drop AC power for you.

For that matter, X-10 modules with remote control by transmitter or
computer-control plugin cards are an easily available item. Maybe you
can lose the wire.

For other folk with remote requirements, there are boxes available that
will
answer the phone and take a request to toggle power, but that seems too
elaborate.
We used the PowerKey products from Sophisticated Circuits, years ago.

You might also consider the builtin capabilities of UPS boxes, which
often have serial control.

Whit3rd - thanks for the thought; I hadn't thought about the X10 stuff;
but since it's a commercial building, I suspect the 3phase power would
throw off the X10 communication (maybe not, I'm not sure...). I
thought about using some type of 120V relay but came to the conclusion
it would be cheaper to get a low voltage relay instead and not worry
about finding one that can handle the current and wattage needs of the
120 line.
 
R

Roger Hamlett

pjhealy said:
Whit3rd - thanks for the thought; I hadn't thought about the X10 stuff;
but since it's a commercial building, I suspect the 3phase power would
throw off the X10 communication (maybe not, I'm not sure...). I
thought about using some type of 120V relay but came to the conclusion
it would be cheaper to get a low voltage relay instead and not worry
about finding one that can handle the current and wattage needs of the
120 line.
One comment. One of the things that can help make a computer reliable, is
a smooth power rail. Brownouts of more than a very few mSec, can cause
computer lockups. Now a small UPS, would provide this, and most such
units, offer a serial interface, as mentioned by the poster above,
allowing shutdown control. You should also change the bootup of the OS, to
_default_ to performing a FSCK, whatever system you use.

Best Wishes
 
P

pjhealy

Roger said:
One comment. One of the things that can help make a computer reliable, is
a smooth power rail. Brownouts of more than a very few mSec, can cause
computer lockups. Now a small UPS, would provide this, and most such
units, offer a serial interface, as mentioned by the poster above,
allowing shutdown control. You should also change the bootup of the OS, to
_default_ to performing a FSCK, whatever system you use.

Best Wishes

Roger; thanks for the the thought - I agree, it's likely a power supply
issue. The system is a PC based PBX and the problem started when I
plugged in a TDM card that requires a power directly from the power
supply (similar to video SLI cards).

The system is on a UPS, but the shutdown control expects that system to
be up so that a daemon on that machine can be signalled when the UPS is
on battery and can perform a normal safe shutdown. Since the system is
hung, the daemon won't respond to anything the UPS tells it to do.
Now, if I could hook to the UPS serial port from another computer and
instruct the UPS to shutdown that power port, then I might have
something. However, my experience is that the UPS will issue commands
from the serial port but has limited ability to listen and act on
commands (ie. it will respond to status commands, but not "shutdown AC
plug 1", etc.).

The system is also Linux based, and will do an auto FSCK upon reboot if
necessary. I also plan on replacing the internal power supply sometime
tonight, but since the system is a PBX, it will need to be up all the
time. So even if the replacement power supply fixes the problem, I'd
like to have the ability to have another machine monitor its status and
be able to reboot it...

Thanks for taking the time to read these messages; I'm picking up a lot
of useful information.

I'm looking for an online retailer who'll sell the reed relays along
with components like a PC slot cover with a printed circuit board on
the back (but no PCI-like interface) and small componenents like the
connectors that would be able to connect to the motherboards PSON
jumper as well as the male that would provide connection to the UPS.
Any suggestions on a source for these would be greatly appreciated.

Thanks!

Pat
 
R

Roger Hamlett

pjhealy said:
Roger; thanks for the the thought - I agree, it's likely a power supply
issue. The system is a PC based PBX and the problem started when I
plugged in a TDM card that requires a power directly from the power
supply (similar to video SLI cards).

The system is on a UPS, but the shutdown control expects that system to
be up so that a daemon on that machine can be signalled when the UPS is
on battery and can perform a normal safe shutdown. Since the system is
hung, the daemon won't respond to anything the UPS tells it to do.
Now, if I could hook to the UPS serial port from another computer and
instruct the UPS to shutdown that power port, then I might have
something. However, my experience is that the UPS will issue commands
from the serial port but has limited ability to listen and act on
commands (ie. it will respond to status commands, but not "shutdown AC
plug 1", etc.).
Except for larger units, they do not normally have the ability to shutdown
an individual plug, but full on/off control is normally available, on
units like the APC 'smart' devices. The problem is that APC, require you
to sign a full 'non disclosure' agreement, before they will give you data
about the extended command set... However their UPS's are controllable by
the hardware interface, and this is published. On this, pin 8, is a 24v
output, that remains on, even when the unit is switched off (useful -
however only rated at 40mA). Pin 4 is the 'common', and pin 1, is
'shutdown'. Normally this pin is connected to DTR on the PC, which
switches off the unit, when shutdown has completed. A couple of diodes,
and a resistor, would allow you to operate this pin without interfering
with PC operation.
One other suggestion, why not consider adding a watchdog to the unit?. A
simple external box, connected to the reset switch, with either a PIC, or
a simple monostable multivibrator, triggered from one line off a serial
port. If the line does not have an 'edge' in it for say 30 seconds, it
resets the PC. Have a small program running a timer event, that every ten
seconds or so, sends a character out this serial port. If the program
stops, the system will be reset. Such units are available off the shelf,
and some even allow normal serial 'pass throgh' on the unit. This way, you
don't have to be fiddling around resetting the unit yourself... :)
The system is also Linux based, and will do an auto FSCK upon reboot if
necessary. I also plan on replacing the internal power supply sometime
tonight, but since the system is a PBX, it will need to be up all the
time. So even if the replacement power supply fixes the problem, I'd
like to have the ability to have another machine monitor its status and
be able to reboot it...

Thanks for taking the time to read these messages; I'm picking up a lot
of useful information.

I'm looking for an online retailer who'll sell the reed relays along
with components like a PC slot cover with a printed circuit board on
the back (but no PCI-like interface) and small componenents like the
connectors that would be able to connect to the motherboards PSON
jumper as well as the male that would provide connection to the UPS.
Any suggestions on a source for these would be greatly appreciated.

Thanks!

Pat

Best Wishes
 
P

pjhealy

Roger said:
Except for larger units, they do not normally have the ability to shutdown
an individual plug, but full on/off control is normally available, on
units like the APC 'smart' devices. The problem is that APC, require you
to sign a full 'non disclosure' agreement, before they will give you data
about the extended command set... However their UPS's are controllable by
the hardware interface, and this is published. On this, pin 8, is a 24v
output, that remains on, even when the unit is switched off (useful -
however only rated at 40mA). Pin 4 is the 'common', and pin 1, is
'shutdown'. Normally this pin is connected to DTR on the PC, which
switches off the unit, when shutdown has completed. A couple of diodes,
and a resistor, would allow you to operate this pin without interfering
with PC operation.
One other suggestion, why not consider adding a watchdog to the unit?. A
simple external box, connected to the reset switch, with either a PIC, or
a simple monostable multivibrator, triggered from one line off a serial
port. If the line does not have an 'edge' in it for say 30 seconds, it
resets the PC. Have a small program running a timer event, that every ten
seconds or so, sends a character out this serial port. If the program
stops, the system will be reset. Such units are available off the shelf,
and some even allow normal serial 'pass throgh' on the unit. This way, you
don't have to be fiddling around resetting the unit yourself... :)

Roger - that's great info; there's a non-APC model attached, but I have
the source code to their Unix scripts; so maybe I can dope that out.
I'm interested in the PIC; can you point to a source that I could look
at?

Thanks!
 
L

lemonjuice

Save yourself all the messy wiring trouble + code writing and check if
your computer supports Wake on LAN in the Bios Power management
section. WOL is an old standard that has been around since 1997 and
lets you remotely switch on or shut off your computer remotely. All
computers I've used have it so you may be lucky... if you use a
separate Network card then you'd have to check that its also compliant
otherwise for 10-20 bucks you'd get one.
Otherwise you could also check for WOM (Wake on Modem) an old standard
that powers on/off your computer by phone.
If the latter is absent you'd probably spend as much time modding your
Bios with it as writing the serial port code though excluding all
the messy wiring.

lemonjuice
 
R

Roger Hamlett

pjhealy said:
Roger - that's great info; there's a non-APC model attached, but I have
the source code to their Unix scripts; so maybe I can dope that out.
I'm interested in the PIC; can you point to a source that I could look
at?
If I was doing this on a PIC, I'd just write the code myself. I have done
similar units in the past. What these did, was simply watch the serial
port, resetting a timer whenever a particular character was received. If
the character did not arrive in a particular time, and the timer
overflows, they issue a single reset pulse. The timer then starts again,
but for a longer time (usually a couple of minutes). This allows time for
the system to start.
However there are dozens of off the shelf watchdog units now. Look at (for
example):
http://www.bitbox.co.uk/Products/USBWatchdog/index.html
This one has Linux drivers.
Or for something different (assuming your application does disk I/O):
http://www.trinity-electronics.com/pcwatch.htm

Best Wishes
 
P

pjhealy

Roger said:
If I was doing this on a PIC, I'd just write the code myself. I have done
similar units in the past. What these did, was simply watch the serial
port, resetting a timer whenever a particular character was received. If
the character did not arrive in a particular time, and the timer
overflows, they issue a single reset pulse. The timer then starts again,
but for a longer time (usually a couple of minutes). This allows time for
the system to start.
However there are dozens of off the shelf watchdog units now. Look at (for
example):
http://www.bitbox.co.uk/Products/USBWatchdog/index.html
This one has Linux drivers.
Or for something different (assuming your application does disk I/O):
http://www.trinity-electronics.com/pcwatch.htm

Best Wishes

Roger - I like the trinity-electronics device; seems to be just the
item. I'll check into the cost of that... Thanks again! Pat
 
P

pjhealy

lemonjuice said:
Save yourself all the messy wiring trouble + code writing and check if
your computer supports Wake on LAN in the Bios Power management
section. WOL is an old standard that has been around since 1997 and
lets you remotely switch on or shut off your computer remotely. All
computers I've used have it so you may be lucky... if you use a
separate Network card then you'd have to check that its also compliant
otherwise for 10-20 bucks you'd get one.
Otherwise you could also check for WOM (Wake on Modem) an old standard
that powers on/off your computer by phone.
If the latter is absent you'd probably spend as much time modding your
Bios with it as writing the serial port code though excluding all
the messy wiring.

lemonjuice

The mother board is an AM2 based system; I suspect the WOL is there.
Do you have any links to where I can read up on how to control the WOL
feature remotely?

Thanks!
 
T

Tim Auton

lemonjuice said:
Save yourself all the messy wiring trouble + code writing and check if
your computer supports Wake on LAN in the Bios Power management
section. WOL is an old standard that has been around since 1997 and
lets you remotely switch on or shut off your computer remotely.

Unless things have changed recently, Wake On LAN only lets you wake a
computer remotely, it doesn't support remote shutdowns. I'm not sure I'd
even want my machines able to be shut down by a wildly insecure protocol
like WOL. It doesn't much matter that it's insecure because all it can
do is start a machine which is off, which will usually only cost some
electricity.


Tim
 
Top