[En-Nut-Discussion] Power Strip Program

Mark J Elkins mje at posix.co.za
Fri Mar 3 20:14:33 CET 2006


I'm going to send out my idea anyway. I'm interested as to whether
anyone has done what I'm proposing. I'm intending to make this an Open
Source project.

The Feedback I'm looking from from this list is:-

Anyone done anything similar? (share?)

Will the EtherNut be suitable - or should I look for a different
platform?

I'd like to think that ISP's and companies who house multiple machines
in multiple cabinets would be interested in such a project

Any other reactions?

=========================================================================

	    IPS - Intelligent Power Strip
	    -----------------------------

Scenario: The Dark Office at an ISP (an unmanned office)

A room full of cabinets - each cabinet holding up to twelve Internet
servers.  Each cabinet is self contained in that there is a UPS and a
Switch.  The cabinet thus has two connections to the outside world, an
UTP Ethernet connection to a central concentrator and a Power Cable
from the UPS to its own floor socket - leading to its own circuit
breaker mounted in a traditional electrical distribution box.  The
circuit breakers are rated at 20Amps.  There is no Earth Leakage (bad
idea with UPS's and Computers).  The Electrical Distribution box runs
to a 30KVA diesel generator kit and then on to Grid power.

The cabinets contain machines.  The primary requirement of any machine
is that it can fit in the 19 inch wide cabinet.  Usually these
machines are successfully managed remotely by their owners thus visits
to the dark room are few.  The Machines get their power from a power
strip running from the top to the bottom of the cabinet which is in
turn plugged into the UPS.

The primary reason for physical intervention are:-

1. The machine software goes faulty and needs to be hard rebooted
   (usually the machine is running Microsoft windows)

2. The machines power supply goes faulty - and shorts.  The UPS will
   remove its protection and the trip switch will trip.  This results
   in the whole cabinet loosing power.

3. The machines fans stop turning - things overheat and eventually the
   smoke comes out.

The reactions normally consist of:-

1. The owner first checks reachability of his machine.  He then calls
   the support desk to see if anyone else is in the dark room.
   Ultimately, there is a car journey to simply toggle the power off
   and on again.

2. Up to twelve clients jump on the phone to the Support Desk at the
   same time.  Support Staff jump into a car and drive through to the
   dark room - locate and disconnect the faulty machine, restart all
   the other machine then contact the dead machines owner..

3. Usually the smell of smoke is detected by a neighbour.  The building
   security calls the Support Desk and everyone runs (some to the
   problem - some away)



Solution (How)

Introduce the Intelligent Power Strip. (IPS)

Socket Control: The IPS can selectively remove and re-apply power to
    any one of its twelve sockets.  It can be controlled both locally
    and remotely.  Each socket has a (normally closed) relay to
    interrupt supply to that socket.  Remote control could be by a
    SNMP (Simple Network Management Protocol) command to the IPS's
    control unit, initiated via a Web Page interface.  Local control
    could be by some simple push buttons and a character based LCD
    screen.  It would be useful if the power status of each socket
    could be indicated.  This could be as simple as a Red LED across
    the coil of the relay (i.e. it would light up in a POWER OFF
    state)

Load Detection: The IPS monitors the current load on each socket.
    Each socket has a "Usual" value associated with it.  For unused
    sockets, this is set to a reasonably high default.  Once the
    equipment has settled, the "Usual" value can be automatically set.
    Consequently, if the usual value is breached by more than an
    additional 50%, the IPS can remove power to that socket.  The
    "Soft Fuse" may allow for start-up loads greater than 50% - for a
    specific time interval - i.e. when switching on a server, the
    initial spinning up of disk drives consumes more power.  Thought
    needs to be given to machines with multiple supplies from multiple
    locations - which may not be under the control of the local IPS.

UPS Management: The IPS can monitor and partially control the UPS.
    Most UPS's have Serial based (RS232) management ports.  These
    ports can provide information such as the current load status
    (Mains ON, Mains OFF), remaining battery time left, Current Load
    (Amps) and various voltages (i.e.  Mains condition, Battery
    condition).  Its possible to initiate commands - such as "Switch
    Off" - but experience shows this is a bad thing to do - except in
    an emergency (fire?).  The UPS Management system needs to
    understand multiple types of UPS and perhaps have an option of
    providing custom commands for unknown models of UPS's.  Up to two
    UPS's can be managed.

Environmental Conditions: The IPS should also monitor a few other
    conditions.
    These include:- 
        * The total current consumption from the UPS(s) (compare with
          what the UPS(s) states).  
        * The Temperature of the air in the cabinet (top & bottom).
	* Smoke (fire) Detection. 
    If either smoke is detected or the temperature rises above a
    certain value, the IPS can switch off all machines and perhaps
    also the UPS(s).


The CONTROL BOX would have a "local interface" attached to its front.
The box would be mounted on the inside of the cabinet in such a way as
to not consume usable space for servers - ie it should not be rack
mounted.  The case size should not need to be larger than about 100mm
square and 50mm deep.  Optionally - it could be a 1U, full width unit
if mounted in front of the Ethernet Switch (the switch facing the rear
of the cabinet).  Connection to the power strip would be via a
suitable multi-core cable and connector.  There will be a separate
cables for the RS232 interfaces between the Control Box and the
UPS(s).  The AVR controller has a second RS232 port - which could be
wired for a second (redundant) UPS.  There will be a standard UTP
socket for connecting the Control Box to the Ethernet switch mounted
in the cabinet.

The POWER STRIP will have at least twelve sockets with an additional
Euro Socket at the top for powering the cabinet fans.  The Sockets
will be those used in South Africa (3 round pins).  The sockets and
mains voltage could be different for different markets.  Typically,
there will be a Euro Plug at the bottom of the strip for a connection
to the UPS.  There will be a "normally closed" relay per machine
socket.  There will be a Red LED per relay showing that the relay is
now Open (the "unusual" state).  If any relay is open, the Red LED on
the front panel display should also come on.  Each Power and Euro
socket will have a current measuring device to enable the current for
all devices to be calculated (total input current from the UPS, each
machine socket and the fan socket).  This could be as simple as a very
low valued resistor in series with the supply, with a "sensor" wire
from the load side and a single common wire from the supply side -
although this would result in high voltages being present in the
control box.  **** Of everything in this document - this is the only
area in which I am personally not sure how to proceed.****

The Power strip should have a (selectable 120/240 voltage) power
supply (transformer) to provide power to the control box and for the
relay coils.  The power supply would need to be strong enough to
operate all relays at the same time.  The current consumption of the
Control Box will probably be very low.  There may be more than twelve
power sockets in order to power the Ethernet Switch and other similar
devices that do not need to be monitored and controlled.  The mains
voltage (and frequency?) should also be measured and monitored.

It is possible for other variations on the Power Strip, i.e.  to have
two separate supplies from two different UPS and to have alternate
power sockets supplied alternatively from the two power supplies.
This would allow for machines with multiple supplies to have redundant
power sources from more than one UPS.  In this case, the power supply
for the Control Box should be able to take power from either or both
sources - and report the failure of a UPS.

Temperature and Smoke detectors could either plug into the Control Box
to allow the sensors to be suitably located (near the top of the
cabinet) or be fitted to the outside of the Control Box case.  A
second Temperature sensor could be mounted near the floor of the
cabinet.  As Hot air rises - this would provide a difference between
the cooling air entering at the bottom against warm air at the top of
the cabinet.  It would be interesting to monitor the air warming
factor against the power used in the cabinet.  Local Interface

The local interface (front panel display) could consist of:
* A character based 4 rows by 20 character LCD display with back-light
  (Hitachi HD44780)
* Green "power" LED (Flashing = No network connection)
* Red "Alarm" LED (ON = user initiated, Flashing + buzzer = self
  initiated) Buzzer
* 4 button input


The Red LED and buzzer is to attract attention to a problem, the
buzzer on entry to the cabinets vicinity and the LED to the cabinet in
question (imagine a typical computer room with rows of cabinets).  The
buzzer can be silenced by acknowledging the fault.  The Green LED
gives a simple and quick status view that the unit is functioning
correctly and connected to the Internet (it has obtained a valid date
and time).  The four buttons could be used to initialise/install the
unit (i.e.  Entering an IP address for the unit) as well as general
status and control purposes.  The LCD display can provide feedback and
status information - i.e.  the current IP address of the unit, the
temperature and/or date and time.


"Remote" Interfacing

Via the Ethernet interface, numerous methods of control become possible.

Device set-up could be as simple as a fixed, non-routable IP address
(i.e.  192.168.0.1) which could be altered via a simple web interface.
A more clever approach would be for the Control Box to run DHCP and
actively fetch an IP address.  Again, a simple web interface should be
provided in order to select a final IP address.

Interrogation and control of the Control Box could be solely done by
SNMP (Simple Network Management Protocol) including fixing IP
addresses but a web interface is almost certainly easier for people to
administer with.  A web interface need not be "pretty" (images are not
desired!) but must be functional and work under any web browser (even
text based).  An alternative way of configuring the Control Box could
be by up/down-loading configuration files using TFTP.  Being able to
fetch the current date and time via SNTP makes good sense (and to be
able to display the time on the LCD display as well as for e-mail
messages).  In order to notify people when something has gone wrong,
the Control Box should be able to send out e-mail messages using the
SMTP protocol.  There is no need to receive e-mail.  Simple DNS
services may be needed.

                             -oOo-


-- 
  .  .     ___. .__      Posix Systems - Sth Africa.  e.164 VOIP ready
 /| /|       / /__       mje at posix.co.za  -  Mark J Elkins, Cisco CCIE
/ |/ |ARK \_/ /__ LKINS  Tel: +27 12 807 0590  Cell: +27 82 601 0496



More information about the En-Nut-Discussion mailing list