/* BeejBlog */

Sizing a Battery Backup (aka UPS)

I live in the Seattle area, apparently we get a nice windy storm around every Thanksgiving… sure to form, we lost power for a nice long 24 hours starting 11/17/2015… so i finally ordered a low end generator… and then i started wondering about including a UPS for computer up-time continuity during the momentary brownouts that happen when the wind is jacking with our power grid.

Power Requirements

  • nice reference
  • Typical UPS units will be rated in VA (Volt-Amps) aka Apparent Power … and possibly in Watts aka Real Power as well
  • The difference between these two comes from concept called Power Factor… PF = Real / Apparent… quick backgrounder:
    • a “purely resistive” load like an old school incandescent light bulb will have a PF = 1 where VA and Watts are equal
    • whereas the typical implementation of AC to DC in a PC PSU represents an inductive load which causes the Amperage sine wave to lag behind the Voltage yielding a PF < 1 where some energy is “lost” - helpful physical analogy - see horse and boat - it does beg the question where this energy is actually lost to… in the physical horse/boat scenario it’s easy to think it goes to friction/kinetic but i don’t have it pinned down in the AC/DC scenario… perhaps wasted in underutilized electromagnetic field
  • Ideally your UPS will be rated for both their VA & Watts capacity but if only VA, then it is common to expect a UPS to handle Watts at 60% of it’s VA rating … i.e. 1000VA UPS should support 600Watts
  • So now you need to know your power requirements… there’s a couple ways to go about this:
    1. take your PSU at face value… but how did you size your PSU in the first place… to be honest I just threw a dart when i went shopping
    2. add up your components’ ratings
    3. buy a cheap (~$20) device to measure actuals - this option is easy, inexpensive, satisfyingly definitive and it’s a nice bonus to go measure everything else in your house …
      • turns out my admittedly very non-gamer rig never went above 335VA (304 Watts, PF = 0.91) with maxed CPU and Gfx (Corsair HX750i PSU, Haswell-E 6 Core 5820k, Nvidia GTX 750Ti , 30” & 24” displays, USB speaker, USB mini network switch)
      • 300 VA just CPU maxed, no Gfx
      • 215 VA fairly idle
      • 144 VA remove 30” display
      • 75 VA remove 24” display
  • Finally, working back from those numbers into a UPS means I not only need at least 335VA but I also need to watch out for 304 Watts… i CAN NOT simply go after a 335VA UPS since that would only support 201 Watts (335 * 0.6) … and we see this in typical UPS specs - notice the 650VA/390Watts - … to put another way, since my Active PFC (see below) PSU puts my overall PF nearer to 1 vs 0.6, my Wattage load is the critical dimension to satisfy vs VA… to work back to a UPS VA that would support 304 Watts => VA * 0.6 = 304 Watts… VA = 304/0.6 = 506… so at minimum I am looking for 560VA/304Watts

Secondary Considerations

  • I’m an Amazon junkie, I typically check off Amazon prime and then scan similar products for a high number of positive reviews… in the consumer UPS space (+/- $100 range) it’s really a matter of CyberPower vs APC… The APC BE550G is the obvious best rated at 4.5 stars 3218 reviews…
  • Generator Compatibility!
  • AVR - Automatic Voltage Regulation - like all marketing, it sounds good… smooth out your voltages in brownouts, but I couldn’t find enough concrete evidence to say whether it was significant
  • Replaceable battery - the APS and CyberPowers both appear to be readily servicable
  • Info Display - I’m kind of a sucker for the LCD
  • Software - it’s tough to find specifics on the APC & CyberPower software beyond turning off the beep and setting up automatic shutdown… i was somewhat interested in something that would actually log power consumption over time to give me some “Kill A Watt” style info… since the software does show Watts it seems feasible to think i could reverse gen the USB info and record it (like i’ll actually get around to that ;)
    • Apparently CyberPower is Mac & Linux compatible whereas APC is Windows only
  • Leaning towards CyberPower CP600LCD = $65 @ 2015-11-23

Active Power Factor Correction (APFC)

  • the PF < 1 waste drives marketing of modern PC PSUs to trend towards Active Power Factor Correction (Active PFC) which means the PSU corrects the raw electronic load back to a PF = 1… and can thereby boast higher efficiency, which sells
  • through a fun combination of physical constraints, the kind of electric equipment humans could readily produce and politics at the outset of power distribution, modern society settled on high voltage AC and the momentum of large investments required have kept it that way…
  • further, current is most readily generated by rotating mechanisms which lead to a smooth “harmonic” curve of voltage highs and lows over time, i.e. the oft referred sine wave… hence our electric grid was founded on smooth sine wave current
  • and it’s therefore understandable that cost effective electric equipment would actually depend on a smooth sine… and apparently some Active PFC PSU’s implementations are indeed sensitive to having a pure sine wave input…
  • yet it is also cost effective for UPS’s to convert their DC battery source into AC via electronic approximations that yield a “stepped” wave vs the smooth sine we see from our power grid … this stepped sine is what dominates the consumer end UPS space (Fig.1)
  • the main downside of this potential conflict is that the fail-over from wall to UPS battery during a power outage may still cause a PC power cycle…
  • Nevertheless based on my quick reading, we should generally rely on contemporary hardware to be compatible and the only way to really know for sure is to find a published test or test it yourself… the simple test is to unplug the UPS and see if you get a reboot or not :)

Fig.1

Transcode MOV to MP4

Motivation:

Digital cameras and phones typically save video to MOV (Motion JPEG) files. I share my photos & videos via a self hosted open source photo gallery (zenPhoto). MOV files must be converted to a compatible format like MP4 to stream through the readily available web video players like Flowplayer.

Script features:

  • Handles multiple files at once… even from different folders when part of an explorer search result
  • Applies rotation where necessary.
  • Touches new file datestamp to be same as original.

Leverages 3rd party tools:

  • FileMenu Tools - handy for creating a FileExplorer right mouse context menu for executing transcode on selected files
  • HandBrake - read something that suggested HandBrake is faster than ffmpeg and that appears true on my quick comparison
  • MediaInfo - pulls the EXIF metadata to determine if any rotation is necessary

Install:

  1. save transcode.ps1 below into a known location
  2. install FileMenu Tools and disable all the commands you don’t want. Configure a “transcode” command as shown in screenshot below (of course edit your ps1 file path accordingly)
  3. install HandBrake and put HandBrakeCli in your path
  4. minimally, put MediaInfo.exe and MediaInfo.dll in your path

transcode.ps1


Example UI

enter image description here

FileMenu Tools Config

enter image description here

Chrome User Script - Whack page elements based on jQuery seletors

// ==UserScript==
// @name VipLeague.se AdBlock Hack
// @match http://www.vipleague.se/*
// ==/UserScript==

function addJQuery(callback) {
  var script = document.createElement("script");
  script.setAttribute("src", "https://code.jquery.com/jquery-2.1.4.min.js");
  script.addEventListener('load', function() {
    var script = document.createElement("script");
    script.textContent = "(" + callback.toString() + ")();";
    document.body.appendChild(script);
  }, false);
  document.body.appendChild(script);
}

function main() {
  $("span:contains('Adblock is enabled')").remove();
}

// load jQuery and execute the main function
addJQuery(main);
enter image description here
enter image description here