Tuesday, July 7, 2020

An automatic transfer relay for UPS/Critical loads, for the ham shack, generator backup, and home

It is quite common to use a UPS (Uninterruptible Power Supply) to keep critical loads - typically computers or NAS (Network Attached Storage) devices - online when there is a power failure as even a brief power failure can be inconvenient.  Like any device, a UPS occasionally needs to be maintained - especially the occasional replacement of batteries - and doing so often necessitates that everything be shut down.

A simple transfer relay can make such work easier, allowing one to switch from the UPS to another load - typically unprotected mains, or even another UPS - without "dumping" the load or needing to shut down.

This type of device is also useful when one is using a generator to provide power:  Rather than dumping the load when refueling the generator, another generator could be connected to the "other" port, the load transferred to it, and the original generator be shut down and safely refueled - such as during amateur radio Field Day operations.
Figure 1:
Exterior view of the  "simple" transfer relay depicted in Figure 2, below.
The "Main" power source is shown as "A" on the diagram.
Click on the image for a larger version.

But first, a few weasel words:
  • The project(s) described below involve dangerous mains voltages which can be hazardous/fatal if handled improperly:  Please treat them with respect and caution.
  • Do NOT attempt a project like this unless you have the knowledge and experience to do so.
  • While this information is provided in good faith, please do your own research to make sure that it suited to your needs in terms of applicability and safety.
  • Do not presume that this circuit or its implementation is compliant with your local electrical codes/regulations - that is something that  you should do. 
  • There are no warranties expressed or implied regarding these designs:  It is up to YOU to determine the safety and suitability of the information below for your applications:  I cannot/will not take any responsibility for your actions or their results.
  • You have been warned!

The simplest transfer relay:

The simplest version of this is a DPDT relay, the relay's coil being powered from the primary power source - which we will call "A" - as depicted in the drawing below:

Figure 2:
The simplest version(s) of load transfer relays - the load transferred to "A" ("Main") upon its presence, switching to "B" (Aux) in its absence.
The version on the left uses a relay with a mains-voltage coil while that on the right uses a low-voltage transformer and relay coil - otherwise they are functionally identical.
Click on the image for a larger version.

How it works:

Operation is very simple:  When the primary power source "A" is energized, the relay will pull in, connecting the load to source "A".  Conversely, when power source "A is lost, the relay will de-energize and the load will be transferred to the back-up power source, "B".  In every case that was tried, the relay armature moved fast enough to keep the load "happy" despite the very brief "blink" as the load was transferred from one source to another.

Two versions of this circuit are depicted:  The one on the left uses a relay with a mains-voltage coil while the one on the right uses a low-voltage coil - typically 24 VAC.  These circuits are functionally identical, but because low-voltage coil relays are common - as are 24 volt signal transformers - it may be easier to source the components for the latter.
Figure 3:
The interior of the "simple" transfer relay.  Tucked behind the outlet is the
DPDT relay with the 120 volt coil, the connections made to the relay.
using spade female spade lugs. The frame of a discarded light switch
is used as a mounting point for a standard "outlet + switch" cover plat
with neon panel lights being mounted in the slot for a light switch.
The entire unit is housed in a plastic dual-gang "old work" box.
Click on the image for a larger version.

The actual transfer takes only a few 10s of milliseconds:  I have not found a power supply that wasn't able to "ride through" such a brief outage but if a UPS is the load, it will probably see the transfer as a "bump" and briefly operate from battery.

Why a DPDT relay?

One may ask why use a DPDT (Double-Pole, Double-Throw)  relay if there is a common neutral:  Could you not simply switch the "hot" side from one voltage source to another?

The reasons for completely isolating the two sources with a double-pole relay is multi-fold:
  • This unit is typically constructed with two power cords - one for each power source.  While it is unlikely, it is possible that one or more outlets may be wired incorrectly, putting the "hot" side on the neutral prong.  Having a common "neutral" by skimping on the relay would connect a hot directly to a neutral or, worse, two "hot" sides of different phases together.
  • It may be that you are using different electrical circuits for the "A" and "B" power in which case bonding the neutrals together may result in circulating currents - particularly if these circuits are from disparate locations (e.g. long cord.
    • For readers outside North America:  While typical outlets are 120 volts, almost every location with power has 240 volts available which is used to run larger appliances.  This is made available via a split phase arrangement from a center tap on the distribution transformer which yields 120 volts to the neutral.  It is because of this that different circuits will be on different phases meaning that the voltage between two "hot" terminals on outlets in different locations may be 240 (or possibly 208) volts.
  • There is no guarantee that a UPS will "play nice" if its neutral output is connected somewhere else.  In some UPSs or inverters the "neutral" side may not actually be near ground potential - as a neutral is supposed to be - so it's best to let it "do its thing."

How it might be used:

With such a device in place, one simply needs to make sure that source "B" is connected, and when  load "A" - typically the UPS, but it could be a generator -  is disconnected, everything will get switched over, allowing you to performs the needed maintenance.

UPS maintenance:

When used with a UPS, I have typically plugged "A" (Main) into the UPS and "B" (Aux) into a non-UPS outlet.  If you need to service the UPS, simply unplug "A" and the load will be transferred instantly to "B".  Having "B" as a non-UPS source is usually acceptable as it is unlikely that a power failure will occur while on that input - but if you choose not to take that risk, another UPS could be connected to the "B" port.

I have typically kept input "B" (Aux) plugged into non-protected (non-UPS) power as a failure of a UPS would not likely interrupt the power to the backed-up device(s) - but if you do this you must keep an eye on everything as unless it is monitored, the failure of a UPS may go unnoticed until there is a power failure! 

This same device has also been used in a remote site with two UPSs for redundancy, not to mention ease of maintenance.  One must, of course, weigh the risk of adding yet another device (another possible point of failure, perhaps?) if one does this.

Generator change-over:

During in-the-field events like Amateur Radio Field Day such a switch is handy when a generator is used.  It is generally not advisable to refuel a generator while it is running even though I have seen others do it.  If, while gear is running on a generator, it is necessary to refuel it - another generator can be connected to input "B" and once it is up to speed (and switched out of "Eco" mode if using an inverter generator) input "A" is un-plugged  for refueling, checking the oil, etc.

If you are of the "OCD" type, two generators can be used:  The generator on "A" would be running the gear most of the time, but if it drops out, a generator on "B" - which will have been under no load up to that point - will take over.

Disadvantages of this "simple" version of the transfer relay:

For typical applications, the above arrangement works pretty well - particularly if power outages and maintenance needs are pretty infrequent - and it works very well in the "generator scenario" where one might wish to seamlessly transfer loads from one generator to another.

It does have a major weak point in its design - and that's related to how the relay pulls in or releases.

For example, many UPSs or generators - especially the "inverter" types - do not turn instantly "on", but rather they may ramp up the voltage comparatively slowly, but by its nature the relay coil may pull in at a much lower voltage than nominal - say, 80 volts.  When a load is transferred at this lower voltage, it may momentarily cause the power source to buckle, causing the load to be dropped and/or the relay to chatter briefly or, possibly simply cause the load to drop owing to too-low battery voltage.  The typical "work around" for this is to allow the "A" source to come up fully before plugging back into it - which is fine in many applications.

A "slow" pull-in on a relay can also be hard on relay contacts - particularly a "slow" rise the voltage from power source "A" - in which the contacts may not close quickly enough to prevent extensive wear.  In severe conditions, this can even result in one or more of the contacts welding (sticking together) which is not at all a desirable condition.  For this reason it is a good idea to use a relay with a significantly higher current rating than you are planning to pull.

A slightly more complicated version:

What can help this situation would be the addition of a short delay, after power source "A" is applied  but before the load is transferred to it - and better yet, we would like this load to be transferred only if its voltage is above a minimum value:  The circuit in the diagram below does this.

Figure 4:
This version of the transfer relay offers a short delay in transferring to load "A" as well as providing a low-voltage lock-out/detect.
The relay is a Dayton 5X847N - a 40 amp (resistive load) DPDT contactor with a 120 VAC coil.  This relay is likely overkill, but it should handle about anything one can throw at it - including capacitor-input power power supplies that tend to be very hard on relay contacts due to inrush current.  Not shown on the diagram above:  It's recommended that a "snubber" circuit consisting of a 100 ohm resistor and 0.1 uF capacitor - of appropriate voltage rating - be connected across the contacts of RLY2 to suppress back-EMF that might damage its contacts when this relay opens.
Click on the image for a larger version.
How it works:

This circuit is based on the venerable TL431 - a "programmable" (via resistors) Zener diode/voltage reference - U1 in the above diagram.  A sample of the mains voltage is input via T1 which, in this case, provides 9-12 volts AC which is then half-wave rectified by D1 and then smoothed with capacitor C1.  LED D2 was included on the board mostly for testing and initial adjustment - but it also establishes a 8-12 milliamp static load to help discharge C1 when the mains voltage goes low - although the current consumption of the relay does this quite well.
Figure 5:
An exterior view of the version of the transfer relay depicted in Figure 4,
above.  The unit is mounted in a 6x6x4" electrical "J" box.
The 10 amp rating is a bit arbitrary and conservative considering that
the contactor itself is rated for 40 amps and the fact that capacitor-input
supplies are likely to be connected to it.
Click on the image for a larger version.

The DC voltage is divided down via R2 and R3 and this is further filtered with capacitor C2, with R3 being adjustable to provide a variable threshold voltage to U1.  The combination of R2 and C2 causes the voltage at their junction to rise comparatively slowly, taking a couple seconds to stabilize.

When power is first applied, C2 is at zero volts, and will take a couple seconds to charge.  When the wiper of R3 exceeds 2.5 volts, U1 will suddenly turn on (conduct), pulling the "low" side of the coil of relay RLY2 to ground, turning it on which, in turn, will apply current to the coil of RLY1.  When it does, the base of transistor Q1 is pulled toward ground via R6, turning it on and when current passes through R4 into the junction of R2 and R3, the voltage will rise slightly, resulting in some hysteresis.  For example, if R3 is adjusted so that RLY2 will be activated at 105 volts, once activated the voltage threshold for U1 will be effectively lowered to about 90 volts.

If power source "A" disappears abruptly, RLY1 will, of course, lose power to its coil and open immediately - and a similar thing will happen if the voltage goes below approximately 90 volts when RLY2 will open, disconnecting power to RLY1 - and at this point Q1 will be turned off and it will require at least 105 volts (as in our example) for RLY1 to be activated again.  Diode D4 may be considered optional as it will more-quickly discharge C2 in the even the power on "A" goes away and suddenly comes back, but it is unlikely that its presence will usefully speed response.

As noted in the caption of Figure 4, the relay used is a Dayton 5X847N which has a 120 volt coil and 40 amp (resistive load), self-wiping contacts.  While 40 amps may seem overkill for a device with an ostensible 10 amp rating as depicted in Figure 5, it is good to over-size the relay a bit, particularly since many loads these days (computer equipment, in particular) can have very high inrush currents due to capacitor-input rectifier, so a large relay is justified.

Note:  The 5X848 is the same device, but with a 240 volt AC coil while the 5X846 has a 24 volt AC coil:  All of three of these devices are suitable for both 50 and 60 Hz operation.

Circuit comments:

Figure 5:
Inside the transfer relay unit.  The large, open-frame DPDT relay is in the
foreground while the 12 volt AC transformer is tucked behind it.  Mounted
to the wall behind it (upper-left in the box) is the piece of prototype
board with the smaller relay and delay/voltage sense circuitry.
Click on the image for a larger version.
U1, the TL431, is rated to switch up to 200 milliamps, but it's probably a good idea to select a relay that will draw 125 milliamps or less.  Because the contacts of the relay are simply switching power to the main relay (RLY1), RLY2 need only be a light-duty relay.

When I built this circuit I used a 5 amp relay with a 9 volt coil because I had a bunch of them in my junk box and in checking it out, I found the coil resistance to be 150 ohms meaning that at its rated voltage, it would draw 60 milliamps.  The voltage across C1 when RLY1 was not active was measured at about 16 volts so it was presumed that with the load of the relay that this would drop by a volt or two meaning that a series resistor that would pass 60 milliamps across 6 volts (the difference between the 15 volt supply and 9 volt coil voltage) should be used - and Ohms law tells us that a 100 ohm, 0.5-1 watt resistor would do the job.


A variable AC supply (e.g. a "Variac") is essential for proper adjustment.  To start, the wiper of R3 is adjusted all of the way to the "ground" and then the applied AC voltage is set to 105 volts - a nice, minimum value for U.S. power mains.  Then, R3 is adjusted, bringing the voltage on its wiper upwards until RLY2 and RLY1 just close.  At this point one can lower the input voltage down to 80-90 volts and after capacitor C2 discharges, the relays will again open and one can then move the voltage back up, slowly, and verify the pull-in voltage.

Figure 6:
The back side of the front panel of the J box:  A large, square hole was cut
in the front and an plastic dual gang "old work" box with its back
cut away was used to facilitate mounting of the two outlets  to the front panel.
Adhesive was used around the periphery to prevent the box from sliding
around on the front panel.
Click on the image for a larger version.
If less hysteresis is desired, the value of R4 can be increased to, say, 22k.  Note that despite the operation of Q1, some of the hysteresis is cancelled out by the voltage across C1 decreasing under load when the circuit is triggered, by the current through RLY1, so a bit of hysteresis is absolutely necessary or else the relays will chatter!


As can be seen in figures 5 and 6, a 6x6x4 inch gray plastic electrical "J" box was used to house the entire unit - a common item found in U.S. home improvement stores.  A pair of "duplex" outlets were mounted in the front cover by cutting a large square hole in it and using a modified "old work" box with its back removed, giving a proper means of mounting the outlets.

A pair of front panel neon indicators indicate the current state:  The "B" indicator simply indicates the presence of mains voltage on that input while the "A" indicator is wired across the relay's mains-voltage coil and is thus indicative of the delay in the relay's closure.

The circuitry with the TL431 and RLY2 is constructed on a small piece of prototype board, mounted to the side of the box using stand-offs.  The 9-12 volt AC transformer - the smallest that I could find in my junk box (it's probably rated for 200 milliamps) is also bolted to the side of the box.  Liberal use of "zip" ties are used to tame the internal wiring with special care being taken to absolutely avoid any wire from touching the armature of the relay itself to prevent any interference with its operation!

Final comments:

Both versions work well and the "simple" version depicted in figures 1 and 2 is suitable for most applications.  For more demanding applications - particularly those where a transfer may occur frequently and/or the mains voltage may rise "slowly", the more complicated version is recommended.

Again, if you choose to construct any of these devices, please take care in doing so, being aware of the hazards of mains voltages.  As mentioned in the "Weasel Words" section, please make sure that this sort of device is appropriate to your situation.

This page stolen from ka7oei.blogspot.com


No comments:

Post a Comment


While I DO appreciate comments, those comments that are just vehicles to other web sites without substantial content in their own right WILL NOT be posted!

If you include a link in your comment that simply points to advertisements or a commercial web page, it WILL be rejected as SPAM!