[Nut-upsdev] Prefered Method for UPS?

Charles Lepple clepple at gmail.com
Sat Jul 10 19:07:02 UTC 2010


On Thu, Jul 8, 2010 at 7:50 AM, Michelle Konzack
<linux4michelle at tamay-dogan.net> wrote:
> My Device is "24 V DC modular ATX PSU" which replace  the  standard  ATX
> Power Supply in PCs and use 15-43 V Input Voltage.  The  microcontroller
> is a TI LM3S5T36 Cortex M3 and I get the "UPS" infos using up to 4 Maxim
> DS1780 and some I²C current sensors.  The ATX  PSU  has  4 Module  Slots
> which can be indivdualy equiped.  Also the ATX PSU can be equiped with a
> 4-Cell LiPoly-Block (14,4V/12Ah).

For reference, here is our documentation on the interface layers that
are available in NUT (and the corresponding terminology):

http://buildbot.networkupstools.org/~buildbot/docs/latest/website/developer-guide.html#_design

So far, new equipment has not required changes in the server (upsd).
For extended information (such as all of the module voltages), certain
clients may need to be extended, but that is something to consider
later.

And you are designing the equiment, so that means that the answer to
your question lies in how much work you want to do on a custom driver,
versus reusing an existing driver. That decision drives what you will
have to do with the PSU firmware.

If you are primarily looking for NUT's original design goal of
shutting down a system when the power gets low, there are many serial
protocols that you can reuse for this. Most of the serial protocols
are limited to status* (line power good, battery level good, etc.), a
single input voltage measurement, a single output voltage measurement,
load percentage, and possibly runtime. This is probably the least
amount of work you can get by with - just pick a driver, and send back
an identification string that the driver recognizes.

* http://buildbot.networkupstools.org/~buildbot/docs/latest/website/developer-guide.html#_manipulating_the_data
(specifically "5.9.3. Status data")

If you want a more extensible system (so that users don't need to
change drivers if you decide to upgrade the firmware) I would suggest
looking at the USB HID Power Device Class specification:

* http://www.usb.org/developers/devclass_docs/pdcv10.pdf

...which is essentially an addendum to the generic USB HID document:

* http://www.usb.org/developers/hidpage/ (Device Class Definition for HID 1.11)

It is probably easier to add a set of HID mappings to NUT's usbhid-ups
than to write a completely extensible serial driver from scratch. On
the other hand, if your USB interface does not have a good HID device
class API, there might be a lot of setup work involved. I guess it
depends on your timeline, and how much you want to set up before
starting to get your users to test the driver.

> Is it possibel to SET values from NUT in the "24 V DC modular ATX PSU"?
> I mean something like Alarm, Tresholds and such?

* http://buildbot.networkupstools.org/~buildbot/docs/latest/website/developer-guide.html#_enumerated_types
and the following sections

* http://buildbot.networkupstools.org/~buildbot/docs/latest/website/developer-guide.html#new-names

-- 
- Charles Lepple



More information about the Nut-upsdev mailing list