Status: This is an active project. For near-realtime progress logs, please have a look at the ProjectsBlog.
Contents
Circuit description
I use an uninterruptible power supply (UPS) named "PowerSure 600" made by Liebert to secure electricity for my home server computer. However, in case a power outage lasts longer than the UPS can provide energy (from two serially connected 12V 7Ah lead batteries), I want the system to shut down cleanly. Ideally, it would also switch to some power saving mode (e.g. clock down the CPU) as soon as the UPS kicks in.
This requires the UPS to tell the computer about its state. For this purpose, it has a DB25 connector on which two status signals can be obtained, and through which the UPS can be shut down remotely. I want to build an interface between this DB25 port and the USB of the server system.
I am using the ATtiny2313 microcontroller and a FT232 USB-to-UART interface to get one talk to the other. The interface is capable of relaying UPS state (power good, on battery, battery low) to the host computer, and can issue a shutdown command to the UPS if commanded so by the host.
Revisions
YA-B04.01
External interfaces
JP1 |
AVR ISP standard 6-pin |
JP2 |
Interface to UPS |
JP2.1 |
Low battery V+ |
JP2.2 |
UPS signal GND |
JP2.3 |
On battery V+ |
JP2.4 |
UPS signal GND |
JP2.5 |
Shutdown command V+ |
JP2.6 |
UPS signal GND |
X1 |
USB-B connector to host |
Protocol description
Communication through the USB serial interface uses 9600 baud, 8 data bits, no parity, 1 stop bit ("9600 8N1").
Host to UPSmon
The following commands are supported from host to UPSmon:
- i
- tbd
- v
- tbd
- t<nn>
- tbd
- FUSEFUSE
- tbd
- FUSECNCL
- tbd
- .
- tbd
UPSmon to Host
The following messages are sent from UPSMon to host:
- PWR_FAIL
- The UPS reported that external power is no longer present, after it was okay
- PWR_GOOD
- The UPS reported that external power is present again, after it was gone
- BATT_LOW
- The UPS has asserted a signal reporting low battery power
- BATT_OKY
The UPS reports its battery in a good state, after it was BATT_LOW
- ACK_FUSE
UPSMon acknowledgment of the FUSEFUSE command
- NAK_FUSE
UPSMon received a FUSEFUSE command but does not execute it, probably because external power is PWR_GOOD
- CNL_FUSE
UPSMon acknowledgment of the FUSECNCL command
- NAK_UNKNOWN
- UPSMon received an unknown or unsupported command through the USB serial interface
Files
- Host-side control daemon currently under development.
THIS DATA IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DATA, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
All product and brand names mentioned on there pages and in the source code are registered names and/or trademarks of the respective owner and are mentioned for identification purposes only.
For a full copyright notice, please see this link. For imprint and contact information, please see http://www.thiemo.net/.