Automatic Transfer Switch Keeps Internet Online

Living in a place where the electric service isn’t particularly reliable can be frustrating, whether that’s because of a lack of infrastructure, frequent storms, or rolling blackouts. An option for those living in these situations is a backup generator, often turned on and connected by an automatic transfer switch. These are necessary safety devices too; they keep power lines from being back-fed by the generators. But there are other reasons to use transfer switches as well as [Maarten] shows us with this automatic transfer switch meant to keep his computers and Internet powered up.

The device is fairly straightforward. A dual-pole, dual-throw relay is housed inside of an electrical junction box with two electrical plugs, each of which can be connected to a different circuit or power source in [Maarten]’s house. The relay coil is energized by the primary power supply, and when that power is lost the relay automatically changes over to the other power supply, which might be something like a battery backup system. [Maarten] was able to get a higher quality product by building it himself rather than spending a comparable amount of money on a cheap off-the-shelf product as well.

This might not seem like too big of a deal, but another person, [Stephen], came across this build and had a different use case for it. [Stephen] lives in a place currently experiencing rolling blackouts, and needed something to reliably power a piece of medical equipment through the night. Commerical offerings were too slow, and during the power transfer process the equipment would power off and need to be reset. [Maarten]’s design was fast enough that this didn’t happen, saving [Stephen] the hassle and expense of trying to find one that would work as well.

One of the perks of building your own tools and equipment like this is getting exactly the right parts for the job. In [Maarten]’s case it was a relay that had the right current ratings to switch his PC and Internet modem/router, and in [Stephen]’s case it was finding a relay that could perform the transfer fast enough, and both were able to do it for as inexpensively (or more) than anything they could find in a store. If you plan to perform the related task of connecting a generator to your home, you might not need a transfer switch at all, though. You can instead use an interlock plate which is even simpler than that.

47 thoughts on “Automatic Transfer Switch Keeps Internet Online

    1. He is using a UPS.

      “If wall power fails, the inline UPS takes over, but what if the UPS fails? Herman told me he had more down time caused by UPS failure than by power outages. With the addition of the automatic transfer switch, the UPS will be bypassed and the load will be transferred to direct wall power in case the UPS cuts out.”

      1. I agree UPSs fail all the time. I went with a gopower automatic transfer switch, 3000watt inverter, and some of those lf280k lifepov4 batteries. They connect to solar charge controller so doesn’t cost me anything to run it. lf560k is out in April.

  1. This is kind of bad. No timer for the primary source return so if that one keeps fluctuating it will constantly switch your load between both sources. If voltage drops under overcurrent condition it will more than likely transfer to secondary instead of tripping the circuit breaker and immediately back when voltage recovers enough to start whole process again. So many interesting modes of failure including electrical fire inside your house.

    1. Not really, you are simply assuming that his other protection devices are inadequate, and the relay will flap inadeqately under normal conditions. Most likely the L C R of the coil will keep it within sane parameters it IS clearly a premium device after all.
      My analysis says at worst it will trip other external fault protection even under fault i.e. half the poles weld close to the inverse supply. Boom breaker / GFCI or RCD pops both supplies off. Remember coil is powered from UPS side, so it really cannot oscillate like you imply.

  2. Fun fact: virtually all devices now use switching power supplies. The very first thing they do is rectify the incoming AC to DC. They will ha happily accept DC voltage input instead, and they don’t care about polarity.

    This thing could be replaced by two bridge rectifiers. No transfer glitch, no brownout issue that [Doktoreq] alludes to, no click-clacking.

    While you’re at it, a TVS and/or MOV, a line filter and a current limiting device would all be useful things to put in this location.

    1. Devices that use heaters (they work fine on DC) or motors (depends on the motor) generally don’t rectify, and many switches are built to be able to break under AC load (relying on the zero crossing to extinguish an eventual arc) but will self-destruct on breaking under DC load.

      1. True, but if it’s rectified AC without the capacitance to keep the voltage above zero volts the breaker will be fine.

        The reason breakers fail on DC is that a constant DC supply doesn’t have a moment of zero volts (zero crossing), hence the “spark” on breaking the load never stops.

      2. Side comment about breaking loads under DC vs AC. As a teen in the 80’s, I got to ride on an excursion train featuring late 1950’s passenger cars. Built to operate behind steam engines (still in use in their era) they delivered modern passenger comforts like lighting and air conditioning by using a wheel movement powered generator. They charged a large bank of batteries so that it would continue to work during station stops and delays. This was before solid state inverters so everything was entirely DC due to the batteries.

        This one was malfunctioning a bit being such antiques. The old timer in charge who I had been talking to invited me to watch while he opened a locked panel to reveal a big bank of relays and open frame contactors that controlled it. When the high current contractor points opened, despite being quite a distance across the points, they made big long hissing/whooshing tubular arcs that took a few seconds to finally extinguish.

        I was completely fascinated that the DC arcs were very different than the louder, crackly jagged arcs you see with AC.

        He eventually pointed to one contractor and said “there…that one sticks sometimes “ and fixed it by whacking it with a ruler length wooden stick he apparently kept in the cabinet for just that purpose.

        1. The device mentioned, is not a contractor but a contactor. Similar to a relay, but normlly handles large currents. It also does not have a common terminal, with a NO & NC terminals. It has a bar that completes the circuit .

          1. Brian, yes you are correct. I was attempting to write that, but every time I typed the word, it would auto-correct to contractor. I thought I had fixed them all, but I guess I didn’t.

    2. “Fun fact: virtually all devices now use switching power supplies.”
      Fun fact: Not in my house. I’m allergic against those RF jammers.

      “The very first thing they do is rectify the incoming AC to DC. They will ha happily accept DC voltage input instead, and they don’t care about polarity. ”

      Yeah, as cheap as they are they probably don’t use an effective bridge-rectifier anymore, but a single diode. It’s better for planned obsolescence, too.

      On the other hand, it’s better that way, maybe. Because your logic falls apart once a bridge-rectifier comes into play.
      Bridge-rectifiers require the load to switch multiple times per second, because that’s what they designed for. If that’s not the case, like with DC, one part of the bridge-rectifier stays unused while the other part gets overloaded (too much current). It’s being used beyond specification, thus, which might reduce lifetime depending on how heavy the load is.

      Many naive people who replace classic, transformer based AC power bricks by modern DC power supplies do that mistake. They think they’re smart by replacing the old stinky transformer by a modern switching PSU and enhance efficiency.

      But in reality, it’s not entirely true. The DC brick is a cheap switching PSU which does merely use one of the two half-waves of the AC mains. Plus, they harm the bridge-rectifier in the console/homecomputer, which was ready to make use of both half-waves.

        1. Are they perhaps referring to how electrically noisy they can be? They refer to them as RF jammer, so I took it as they do HAM and SDR stuff and shitty switching supplies raise the noise floor.

          I have found that some PSUs are particularly egregious even with a cheap $20 RTL-SDR dongle.

      1. “Many naive people who replace classic, transformer based AC power bricks by modern DC power supplies do that mistake. They think they’re smart by replacing the old stinky transformer by a modern switching PSU and enhance efficiency. ”

        Most of the time you aren’t replacing a transformer at all. What you are doing is trading a transformer designed for low frequencies 60 Hz for one used at much higher frequencies in the switched power supply (allows for smaller transformers for equivalent flux transfer). Most (maybe all) properly designed consumer power are isolated, meaning there is a transformer somewhere in the power conversion stages, a popular topology would be a flyback buck boost power supply topology. There are multiple benefits to doing this, but one of them is safety, by isolating a switched power supply you are preventing capacitance on the mains from being discharged to the output of the power supply (probably more pros, but it’s been a while since I worked with them).

        Good point on the lifetime usage of only half of a full bridge. I wonder if anyone has put a thermal camera on a full bridge rectify that only receives DC. Would be interesting to see a thermal delta.

        1. ” I wonder if anyone has put a thermal camera on a full bridge rectify that only receives DC. Would be interesting to see a thermal delta.”

          Actually, no thermal camera, but I did instrument one device with a thermistor for exactly this purpose. I found that, when fed with 165 Vdc (rectified and smoothed 120 Vac), the (single-package) bridge ran cooler than the same device fed directly from the 120 Vac line.

          The difference, of course, is the crest factor: when fed with a steady DC, the diodes see less forward drop and less overall heating than when operating at high crest factor like they do in AC operation. So even though two individual diodes in the bridge see higher average current, the total package sees less heating in DC operation than in AC operation.

          Since the device’s internal AC capacitors also saw only a steady DC input they, too, ran cooler, as they see less ESR heating.

  3. Reminds me of a repair call I got when I was a field electrician. Homeowner had a bank of 12 three-way switches and a recessed locking male 40A NEMA receptacle mounted in a j-box next to the service panel in the garage. When asked what it was, homeowner stated it was his “generator hookup”. Left that mess alone….

    1. Thank you for pointing this out. Using a simple relay does not provide sufficient hysteresis between the two power providers IMO. The device Clive discusses has a motor to toggle two switches, providing the necessary isolation. It also allows manual override which is important for testing. I suspect their may be electical code issues that the relay hack does not address.

  4. Odd that this is a dutch project, power in the Netherlands is generally rock-solid.
    Mind you I hear they are now starting to face issues from all the solar power being fed back in and the EV’s pulling power, meaning that they are working on keeping enough powrline capacity to keep up with the increased flow in the network.

    As a result of all this silliness people with solar panels and powercompany contracts in some areas currently actually get paid for using electricity in the weekends. And people are trying to use as much as possible, having AC on and doing lots of laundry and whatnot. It’s a bit bizarre, they have an inverse electricity bill.

    1. If I was paid for wasting power I’d create my own small electric arc furnace and process copper wire into ignots. Good money there but scrap dealers don’t want to buy copper wire.

  5. I have a relay setup like this for my Christmas tree so it can be energized by the room’s light switch or an in-wall timer that controls the outside lights (plus an inside outlet). Just like this, I’m using a DPDT relay to also switch the neutral, since the outside circuit has a GFCI and the inside light switch circuit does not.

  6. As a solution specific to the given requirements, well, maybe. Assuming that the downstream devices aren’t bothered by small dropouts if the primary power (and relay drive) bobbles a bit. Otherwise, it would be better to have some active circuitry that waits for the primary power to be back for X seconds before switching back to it.

    We have pretty solid power here in the Big City, but I do also have a 12v backup battery for a 12v sump pump. If I was more concerned about internet outages during power failures, I would simply power the internet devices (cable modem, routers, wifi hotspot, home automation hub) directly from the 12v battery, with DC-DC converters where necessary.

    That homemade interlock plate … [cringe]

    1. If its fused (its not) no problem right? We have plenty of cords that only are rated for 10amps and have a 0,75mm^2 conductor. Lamp cables, razors, etc etc.

      All those should realistically be fused for less, but the cords almost never are.

  7. We used something like that. I was living in a rural area, sometimes public electricity went off, so I plugged my point to point internet to a car battery with solar panel, if the power grid was on he charged the battery. solar panel -> charge protector -> battery -> Router -> charge protector -> AC battery charger. =)

      1. Is it the big black one with screw contacts? I have small blue rectangles that clicks there. Not sure that i could fit these into the board and maybe have to rebuild it from scratch.
        This device i have is named YX-850.

  8. Bad design, might endanger your life.

    It is always sad to see how people make certain claims about what it protects against and then assume none of the parts they use will ever fail…

    There is a reason why a real ATS uses multiple (at least 2) relays. Even if you want to build your own, please look up how these things work and understand why they do it like that. Otherwise, you are just creating dangerous stuff.

  9. Without a delay, I’ve seen first hand what happens when the alternate source is out of phase with the other one… and if the load(s) are more reactive, something will melt – especially if there’s a flapping moment. You need a delay for safety.

    1. Two thumbs up. If one of the contacts sticks, it blows some fuses or even worse.
      Two relais in series with propperly timed contact hysteresis an a delay between switching.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.