[Nut-upsdev] Megatec and Batteries

Arjen de Korte nut+devel at de-korte.org
Mon Oct 27 12:30:46 UTC 2008


Citeren Zeljko Baralic <zeljko.baralic at pakom.com>:

> This gets me to megatec driver and how it see battery voltage. I  
> think that this is job for someone to improve megatec driver in  
> order to look at some table to see battery charged value or to  
> create it with parameters to driver.

Thanks for this information. We know that the way the battery charge  
is calculated in the megatec driver is crude. For your information,  
there has been a lot of debate about this at the time this was added  
to the sources. The consensus was, that a crude way of determining the  
battery charge was better than nothing at all.

> Since I think I am becoming boring if you are interested how to  
> determine charge level I can continue writing... but this involves  
> real time clock inside of driver, some counters... lots of work for  
> someone.

Not at all. I have written countless times before already (maybe it is  
time to turn this into a FAQ entry)

     You can't calculate battery charge of a
     UPS by looking at the battery voltage alone

It physically just isn't possible.

Although in principle it would be possible to get a reasonably  
accurate figure if there would be no current going into or out of the  
battery (also known as the open cell voltage), this is impracticle in  
a real life UPS application. You can't just switch off the load, wait  
for a while to redistibute the chemicals inside the batteries and then  
measure the open cell voltage.

There are quite a couple of UPS'es out in the field that do indicate  
battery charge in a fairly accurate manner, but these will invariably  
calculate charge remaining in a totally different way. By periodically  
discharging the batteries, it is possible to determine the total  
charge the battery can hold. From that moment on, all you have to do  
is to do some book keeping on how much charge (Ampère x seconds) is  
going in or out and you have a very accurate figure.

The problem with the megatec protocol is, that there is no way to  
determine the battery current by the driver. Not through a direct  
method (the megatec protocol simply doesn't report this) and also not  
via an indirect method. Although the battery charge calculation in the  
megatec driver might be improved somewhat, it will never reach the  
level where it will be nearly as accurate as coulomb counting. If  
accurate battery charge figures are important to you (in some  
applications, it is), you just shouldn't by a megatec protocol UPS.

Best regards, Arjen
-- 
Please keep list traffic on the list



More information about the Nut-upsdev mailing list