[Nut-upsuser] Best Ferrups (bestfcom patch)

Bo Kersey bo at vircio.com
Sat May 11 16:04:00 UTC 2013


Hello,
I have a Best Ferrups 3.1KVA and I noticed that the percent battery voltage reported from upsc never gets above 69.9%.  I believe there is a mistake in the driver.  The battery percentage is calculated based on the High Battery Alarm Setpoint (59.6V) instead of the Ideal Voltage which is about 54V (4 batteries x 13.6V).  I examined the source code and found that the variable fc.fullvolts is the result of querying parameter 67 from the UPS.  This parameter is defined per Ferrups Tip 503 as: "The battery voltage at which the UPS sound a High Battery alarm"  A better value to use in determining the percent battery voltage would be fc.idealbvolts which is calculated in the driver source...  

I propose the following patch to fix the battery.charge (% battery full) reading.

--- bestfcom.c.orig	2012-07-31 12:38:59.000000000 -0500
+++ bestfcom.c	2013-05-11 09:39:52.155279710 -0500
@@ -332,7 +332,7 @@
 
 		/* Compute battery percent left based on battery voltages. */
 		battpercent = ((vbatt - fc.emptyvolts) 
-					   / (fc.fullvolts - fc.emptyvolts) * 100.0);
+					   / (fc.idealbvolts - fc.emptyvolts) * 100.0);
 		if (battpercent < 0.0) 
 			battpercent = 0.0;
 		else if (battpercent > 100.0)

The patch is based on version 2.6.5

Thanks for your consideration.  I know this is an old UPS (1995) but it still works and I'd like to keep using it :)


-- 
Bo Kersey
VirCIO - managed network solutions
If it is free, you are the product.




More information about the Nut-upsuser mailing list