I'm sure that many of the few readers of this blog use uninterruptible power supplies (UPS) to keep their computers or Internet connectivity equipment running at the very least when the lights go out. If you're at all like me, maybe you use them to keep all sorts of things running through times of power loss. Used units that frequently only need a new set of batteries to work like new again are plentiful and cheap. Sometimes they're even free for the asking.
Many times, I have no need of whatever communication capabilities a particular model may offer. (In this same vein, I turn off or physically remove the warning beepers from most of the UPSes I have.)
This particular post involves a UPS that I set up for use with a security camera system. There, communication to tell the computer that it's time to shut down seemed like a very good idea. Now, the right way to do this would probably be to use a halfway modern UPS whose communication capabilities are somewhat decent. Of course I didn't do that. I pulled an old APC Back-UPS 300 (maybe a 350) out of storage that just so happened to have the optional serial port on the back panel. If you've been doing IT stuff for a while, you probably know the exact thing I'm talking about. If not, here's a picture of several models from this product family.
American Power Conversion really got their money's worth out of this design. They sold these from sometime in the late 1980s clear up into the early 2000s with few changes. The internal design may be slightly older than that, as the cases went through some revision over the years. (Changes I've noticed include differences in battery compartments, the types of batteries used, and in some rare cases, a red filtered neon indicator lamp in the power switch as opposed to the more common green LED.)Fancier models had a serial port at the back to signal a computer and UPS monitoring software of the day of a few different conditions. There's very little to it. Calling this any kind of a communication protocol is a very generous description. Various serial lines are used by the UPS to indicate when it's online, when it's on battery and when the battery is low. That's it. There's no battery percentage, temperature or battery failure indication information to be found. Still, it's better than nothing and in the environment where I wanted to use said UPS, anything fancier might be too heavy.
The inverter is nothing to write home about in these either. It's only a touch nicer than a plain old squarewave. Most computers won't care (though those with more advanced active power factor correction hardware in their power supplies may shut off when the incoming waveform changes). Purely resistive loads won't care. Motors will oftentimes sound strange, labor, run at an incorrect speed or overheat. Things with resistive or capacitive dropper power supplies will usually burn up almost instantly.
What I will say for these particular UPSes is that they're dead simple and pretty much unfailingly reliable even after decades of use. However, all these can do in the face of a power problem is switch to their battery and inverter. Still, that's more than good enough for a lot of applications.
I'm getting a bit far away from the subject. Let's try to get back to that. I hooked this UPS up to the computer in question and configured the long-slumbering apcupsd software to talk with it. I believe the cable intended for use with these is the APC 940-0020 (and any of its various A, B, C or whatever letter revisions), which I do have but would need to find. Rather than raise my blood pressure and engage in excursions of profanity, I used a rescued 940-0095 "simple signaling" cable because I knew right where it was, in my kitchen junk cabinet. (Doesn't everyone keep UPS signaling cables in their kitchen junk cabinet?)
I pulled the plug to test things, saw apcupsd successfully report that the UPS was on battery, and that it returned to an on-line status when the plug was reconnected. Satisfied, I called this project completed and figured it was all good.
In recent times (relative to the date of this post, here in June 2026), major storms came through this area and played havoc with the power lines. My power was out for several hours, far beyond the runtime of almost any UPS you'd care to name. After the lights came back on, I was quite surprised to find out that the computer protected by this UPS had not been shut down successfully. At first I thought that maybe the battery wasn't strong enough to keep things going, or that the UPS' low battery warning came along with too little runtime remaining for the computer to complete all of its shutdown related tasks. By default, the low battery warning comes along with two minutes of estimated runtime are believed to be left.
This can be increased. There's a bank of DIP switches at the back of these UPSes and one of them (sometimes unlabeled, and having no effect on those without serial ports) changes the low battery warning from two to five minutes. I toggled this switch and then I did what I should have done. I tested the UPS to the point of low battery.
What I found was that when the UPS sang the song of the dying battery, apcupsd was none the wiser about what was going on! To make a long story a little shorter, after looking into this further, it seems that the 940-0095 cable has no way to tell monitoring software of a low battery condition! (Before I swear to that, I do want to test the 940-0095 cable with a UPS model it would have originally shipped with. Watch this blog for updates on that exciting subject in future.) All it can do is tell the computer and monitoring software that the UPS is running on battery. Or, at least that it's all it did when attached to the Back-UPS in question.
So I went looking for a replacement 940-0020 cable, since it is often the case whenever I go looking for something I know I have, I won't ever find it. Usually, I'll find whatever I couldn't find the last time I went looking for something. This makes me mad, raises my blood pressure and probably shortens my lifetime just a little bit more each time it happens. I've learned that it's oftentimes the smart thing to go and buy another of whatever it is I'm looking for if it isn't expensive.
Trouble is, Schneider Electric has thrown pretty much everything about APC's older products down the memory hole and I didn't know exactly what cable I needed. (They've also joined in the craptacular practice of software by subscription. That's a rant for another day.) What few things have somehow escaped are pretty disjointed. When I finally found a manual, it gave no details on what kind of cable to use. Fortunately, after several web searches that weren't helped by how many products APC has reused model numbers for, I did find the right information on the APC/Schneider web site. A 940-0020 was indeed what I'd want, and (again as of this writing), some were available for sale. I decided to try looking for mine anyway. I figured it couldn't be too far from the last place I'd used it, even if that was ten years ago. (Note to those in the viewing audience: don't ever lose that optimism.)
To my complete amazement, I was actually able to find the 940-0020B cable that I have. I didn't even raise my blood pressure or invent any new swear words along the way. I did end up shoveling through assorted trash vortexes without success, and just as I was about to admit defeat, I cast a glance toward a table in the next room.
There it was. My 940-0020 cable.
Cable in hand, I hurtled back to the computer and quickly swapped it out. Imagine my surprise when the UPS suddenly powered down upon connecting it to the USB serial port adapter! Apparently that's another place where the 940-0095 and '20 differ. apcupsd had been configured for use with the '95 cable and seemingly that will cause a sudden powerdown if you switch it out for the '20.
I'd already given the UPS battery rather more exercise than I really wanted to, but at this point, what's one more cycle? I pulled the plug and waited. Sure enough, just as the low battery beep started, this time the computer shut down like it was supposed to.
Almost.
Yes, it almost worked. The computer was properly shut down. Just before the operating system turns power off to the computer via ACPI, apcupsd is supposed to command the UPS to turn off. As we already know from the adventure above, the simple signaling protocol can handle doing this.
For some as yet unexplored reason, that doesn't happen. I don't know if the computer is shutting down too quickly, if apcupsd never gets a chance to assert the shutdown line or if it can even do so. There are apparently limits on what apcupsd can do with the serial port under a Windows operating system. I'll have to do some research on that. That can happen another time.
For now, I'll leave you with the morals of this story. First, test your UPS configuration to the point of shutdown (or simulate such if you can, to save wear on the batteries) so you can be sure it will do what you need it to do. Second, just because APC bills two cables with different part numbers as "simple signaling" cables doesn't mean they implement said signaling in the same way. I'm not actually sure why the '95 cable omits the low battery warning line, unless it's handled in another way by the UPS it came with. If the '95 cable truly cannot communicate that low battery shutdown time has arrived, it seems kind of useless.
To that end, the '95 cable I have was rescued from and seemingly bundled with a Back-UPS Pro. The Back-UPS Pro is a curious thing. I'm not sure why APC shipped it with a "simple signaling" cable. The Pro actually communicates using a subset of the APC "smart" protocol and therefore works perfectly well with the 940-0024 "smart signaling" cable. There's actually a proper microcontroller within, along with capabilities the Back-UPS lacks, such as voltage regulation without having to use the battery and inverter. You don't get everything the Smart-UPS can do, of course. All but the largest Back-UPS Pro units have the modified sinewave inverter of the basic Back-UPS line. (The larger models in metal cases have a note on the back panel saying their output is nonsinusoidal, but that's not true! I've had an oscilloscope hooked up to several of the metal cased 1000 VA+ models with 24 volt battery systems and they are all true sinewave inverters.)
Finally, I have read in a few places that the common 940-0024 cable is both of a smart and simple signaling cable in one. Based on experimentation, I don't believe this is true.
