DIY automatic transfer switch

project , published by Maarten Tromp, last updated , 1134 words

My friend Herman was looking for an automated transfer switch (ATS) so his pc and modem do not power off when the circuit breaker trips. An automatic transfer switch will immediately connect your devices to a different power circuit when this happens. Instead of buying a cheap one of dubious quality or spending a lot of money on a professional unit, let's see what we can DIY.

Self made automatic transfer switch
Self made automatic transfer switch

In this article:


What an automatic transfer switch does is quite simple. When power to the primary power input fails, it switches the load over to the backup power input.

Since both power inputs might be connected to entirely different electrical systems or mains phases, you need galvanic isolation between both input circuits. It is important to disconnect one power input before connecting the other. This also makes it impossible to back-feed the interrupted power circuit, which is never a good idea.

This ATS will be used for a couple of computers and connected devices, so it should be able to handle a current of at least a couple of amps.

As last but not least the KISS principle. The simpler the better, complexity is the enemy of security.

There are also many things this ATS will not be, such as power distribution unit (PDU), power filter, power monitoring device or generator switch. Those features will be left to professional models for now.


The electronics are as minimal as it gets. The entire automatic transfer switch consists of a single electronic part, a relay. Choosing the right relay is not trivial though.

The relay needs to switch mains voltage and a couple of amps, preferably with a bit of headroom. In my case that's 230 V, 50 Hz and around 5 A. The coil will be powered by the same voltage.

To get full galvanic isolation between both input circuits you need to switch both live (L) and neutral (N) wires, so the relay should be a 2 pole changeover (CO) or double pole double throw (DPDT) type. The mains ground connections should be connected at all times.

Most power relays have considerably higher current handling on the normally open (NO) contacts than on the normally closed (NC) ones, sometimes up to an order of magnitude. For an automatic transfer switch you obviously need both NO and NC contacts to handle the same high(ish) current.

While you could use 2 relays that can handle high-enough current on the NO contacts and use them as a single CO relay, this soon becomes tricky. First you need to activate the backup relay when the primary power input has lost its power. You could do this by routing backup power through the NC contacts on a third relay that is powered by the primary power, but now you have 3 relays to deal with. And second, you need to make sure that both relays are under no circumstances activated at the same time. With different relay operate and release times you will need to add some form of delay to get timings right. Failing to do this correctly will lead to either back-feeding the interrupted input circuit or tripping residual current devices (RCD) upstream and certainly leave all your critical devices without power.

The only relay I could find that does all this, is available and affordable is the Finder It can switch 250 V, 30 A (NO) / 10 A (NC), operates at 230 V, and costs 10-20 Euro.


The automatic transfer switch should not become the weakest link in the (power) chain, so I prefer a robust mechanical design as well.

Using C13 / C14 sockets ("computer power socket"), or C19 / C20 sockets would be nice and would make the switch more compact. A lot of professional equipment use these sockets too, but in my experience plugs sometime just drop out of the sockets all too easily. Blue CEE 2P+E sockets are more secure, but take up a lot of space and seem overkill for a home situation. Schuco sockets are also quite big and only come in female. My personal favourite is Neutrik Powercon, which is commonly used in professional audio, but is quite unknown in IT. So the best I could come up with is normal schuko male and female plugs.

The plugs are Kopp outdoor models. They're splash-proof and mostly dustproof (IP44) and quite sturdy. The plugs can handle 16 A. I removed the splash cap and child-proof thingie from the female plug, so it's easier to use. It will always be plugged in anyway.

Power cabling is made from neoprene rubber. This is tough material and water and heat resistant. With 3x1.5 mm² (16 AWG) it can also handle 16 A.

The enclosure is a Kopp waterproof and dustproof (IP66) outdoor junction box. It is made from tough polypropylene (PP) plastic and comes with 3 good quality fittings.

Wiring to the relay is done with isolated Faston 250 crimp connectors.

All mains earth wires are kept longer than the other wiring, so if somehow a cable is pulled out of the fitting, the earth wire is last to disconnect. All earth wires are connected in a splicing connector.

Mounting the relay in the enclosure turned out to be harder than I expected. While PP is a nice material, it is not easy to glue. Since I didn't have proper solvents or primer at hand, I considered friction welding, but ended up using mechanical fastening (i.e. nuts and bolts).


So how does this automatic transfer switch compare to the cheap one and the professional one mentioned earlier?

The cheap no-name switch and the self-built one both cost around 50 Euro. The self-made one can handle 10 A while the no-name one can handle an order of magnitude more. However, the self-made one is made from good quality brand-name parts and well constructed, while I cannot vouch for the no-name one. Sometimes many corners are cut in order to keep the price as low as possible, not meeting specifications and compromising safety. I'd rather not have one of those devices connected to mains anywhere near me or any of my equipment. But YMMV, they might work just fine.

Compared to the professional switch the self-made one only wins on price. Both can handle 10 A, but the professional one has all the bells and whistles. It is most likely better designed and built that the self-made one, and that's what you're paying the premium for.

For my specific application this self-built automatic transfer switch works just fine. It gets the job done with a minimum of fuss. Now that it's working, I packed it up and shipped it as a gift to Herman, where I'm sure it will be put to good use.

Datasheets can be found in the downloads directory of this article.



The automatic transfer switch was received and put to good use indeed.