• Skip to main content
  • Skip to primary sidebar

Homemade Circuit Projects

Need circuit help? Post them in the comments! I've answered over 50,000!

Blog | Categories | About | Contact | Calculators-online
You are here: Home / Grid and 3-Phase / Grid Mains to Generator Changeover Relay Circuit

DIY Circuits | Learn Basics | Arduino Coding




Grid Mains to Generator Changeover Relay Circuit

Last Updated on December 25, 2024 by Swagatam 176 Comments

In this post I have explained a simple configuration which can be used as a automatic changeover circuit for switching AC grid mains to generator mains, during power failures or outages.

The explained circuit will effectively switch the connected appliances to the generator mains during power failure however it won't be able to switch start the generator automatically, this will need to be done manually, because most generators involve a difficult mechanical actuation procedure.

How it Works

Referring to the given diagram  we can see a simple circuit comprising of a TP relay (triple pole relay) as shown below, and a transformerless power supply circuit.

The input of the transformerless power supply circuit is connected to the mains 220V or 120V input.

When mains power is present, the connected relay activates with this power and switches ON the load or the appliances via its N/O contacts.

Conversely when mains power fails, the relay deactivates and connects with the N/C contacts which may be wired up with the generator mains.

Now as soon as the generator is pulled started, the mains finds its way through the connected N/O contacts of the relay to the appliances.

The third set of contacts is used for enabling and disabling of the CDI unit of the generator so that when mains is restored, the generator is automatically halted.

Simple yet effective.....

Circuit Diagram

Analyzing the Part Value Calculations

Voltage Divider Across the Relay (Using 474 Capacitor)

The 474 capacitor (0.47 µF, 400 V) acts as a current limiting element for the relay coil when connected to the AC mains (220 V or 120 V). The current through the capacitor can be calculated using the reactance of the capacitor:

Formula for Capacitive Reactance:

Xc = 1 / (2 * π * f * C)

Where:

  • Xc = Capacitive reactance in ohms
  • f = Frequency of AC mains (typically 50 Hz or 60 Hz)
  • C = Capacitance in farads (0.47 µF = 0.47 * 10⁻⁶ F)

For 50 Hz mains: Xc = 1 / (2 * π * 50 * 0.47 * 10⁻⁶)

Xc ≈ 6,778 ohms

Current Through the Relay:

The current is determined by Ohm’s Law:

I = V / Xc

For 220 V AC mains:

I = 220 / 6,778 ≈ 0.0324 A ≈ 32.4 mA

For 120 V AC mains:

I = 120 / 6,778 ≈ 0.0177 A ≈ 17.7 mA

This current must be sufficient to activate the relay. Check the relays required current (based on its 12 V 400-ohm coil):

Relay Voltage and Power

    The relay coil operates on 12 V DC. The current through the coil is:

    Irelay = V / R

    Where:

    • V = Voltage across the relay coil (12 V)
    • R = Relay coil resistance (400 ohms)
    • Irelay = 12 / 400 = 0.03 A = 30 mA

    This means that the capacitor-limited current (calculated above) has to be greater than or equal to the relay's required operating current of 30 mA for 220 V mains.

    Diode Rectification

      The diodes (1N4007) rectify the AC voltage into pulsating DC for the relay coil. The peak DC voltage after rectification is:

      Formula for Peak Voltage:

      Vpeak = Vrms × √2

      For 220 V AC mains:

      Vpeak = 220 * √2 ≈ 311 V

      For 120 V AC mains:

      Vpeak = 120 * √2 ≈ 170 V

      However the relay sees only the voltage dropped across the capacitor and rectified output which limits the current to safe levels.

      Filtering Using 100 µF Capacitor

        The 100 µF capacitor smooths the rectified pulsating DC into a steady voltage for the relay.

        The ripple voltage can be estimated using:

        Ripple Voltage Formula:

        Vripple = I / (f * C)

        Where:

        • I = Current through the capacitor (relay current, ≈ 30 mA)
        • f = Frequency of rectified signal (100 Hz for full-wave rectification in 50 Hz mains)
        • C = Capacitance in farads (100 µF = 100 * 10⁻⁶ F)

        Vripple = 0.03 / (100 * 100 * 10⁻⁶)

        Vripple ≈ 3 V

        3 Phase Grid to Generator Changeover Circuit

        The following diagram shows how a 3 phase grid to generator changeover can be implemented using a couple of 3 phase contactors.

        How the Circuit Works

        Let's assume mains AC is not available, and generator is switched ON by the left side relay.

        In this situation the center relay will be deactivated, and its pole will be connected with its N/C contact, so that the +12V DC from the generator passes through the N/C contact and actuates the bottom/right 3 phase generator contactor.

        The top/right grid mains contactor remains switched OFF due to the absence of a +12V DC.

        Therefore, the generator AC flows through this bottom/right contactor and operates the connected appliances or load.

        Now, suppose the mains grid AC restores.

        The left side relay activates and turns OFF the generator. Also, simultaneously the center relay switches ON through the +12V from the grid mains.

        The center relay pole now shifts from N/C to N/O, so that the +12V from the mains grid AC passes through the N/O contacts and actuates the top/right contactor. The bottom/right generator contactor is simultaneously switched OFF.

        With the top/right contactor switched ON, the grid AC now becomes available to the load.

        Again, if the mains AC fails, the left side relay deactivates, switching ON the generator procedures, the center relay connects with its N/C contacts, turning on the generator 3 phase contactors and turning OFF the grid contactors.

        If you are unable to get the above 12V electromechanical relay/contactor, you can go for a 3 phase SSR contactor instead, as shown below.

        You'll also like:

        • power2BmonitorGrid Load Power Monitor Circuit for GTI
        • simplesinglephasingpreventercircuitSingle Phase Preventor Circuit
        • ats 2Remote Controlled ATS Circuit – Wireless Grid/Generator Changeover
        • driverArduino 3 Phase Inverter Circuit with Code

        Filed Under: Grid and 3-Phase Tagged With: Changeover, Generator, Grid, Mains, Relay

        About Swagatam

        I am an electronics engineer and doing practical hands-on work from more than 15 years now. Building real circuits, testing them and also making PCB layouts by myself. I really love doing all these things like inventing something new, designing electronics and also helping other people like hobby guys who want to make their own cool circuits at home.

        And that is the main reason why I started this website homemade-circuits.com, to share different types of circuit ideas..

        If you are having any kind of doubt or question related to circuits then just write down your question in the comment box below, I am like always checking, so I guarantee I will reply you for sure!

        Previous Post: « Make this Car Air Ionizer Circuit
        Next Post: IC 555 Low Battery Indicator Circuit »

        Reader Interactions

        Comments

        Carlos says:
        December 24, 2024 at 3:06 am

        Hello good afternoon Mr. Swagatam, my name is Carlos and I am a faithful follower of the website, in this opportunity I would like to ask you if you have a circuit. I need to energize a relay for 2 to 3 seconds.
        I mean… When voltage is applied the relay is maintained 2 to 3 seconds and is released …. Even if the power supply is still present. Thank you very much.

        Reply
        Swagatam says:
        December 24, 2024 at 9:01 am

        Thank you Carlos,
        You can try the following design for your specific application:
        https://www.homemade-circuits.com/wp-content/uploads/2021/07/transistor-monostable-compressed-compressed.jpg
        You can replace the load with your relay. Make sure to connect a freewheeling diode across the relay coil.
        You can adjust the values of the 1k resistors and the 1uF capacitor for adjusting the relay delay off time.

        Reply
        Sanoj K says:
        August 4, 2024 at 8:55 pm

        Hi Swagath,
        I have an inverter with SCR as the switching element (Luminous iCruze 3000). I would like to add a relay before the input of inverter so that the relay prevents any backfeeding of supply to mains in the event of SCR failure. I opt for this circuit and prefer to to use a transformer to power up the relay mentioned in your circuit instead of capacitor. Any modifications required?

        Reply
        Swagatam says:
        August 5, 2024 at 8:28 am

        Hi Sanoj,
        That appears to be a good idea.
        You can surely replace the entire capacitive power supply with a transformer based power supply with a bridge rectifier and a filter capacitor. Just make sure the DC output from the transformer power supply matches the relay coil voltage rating, up to +20% is quite acceptable.
        You can connect the DC output from the filter capacitor directly with the relay coil.
        Also, please replace the 100uF/25V capacitor across the relay coil with a freewheeling diode 1N4007.

        Reply
        art says:
        June 21, 2024 at 7:53 am

        I built this one,, change over was exactly what I was looking for. The one problem I ran into was the relay was 120 ohms. So I did away with I 1 Meg resistor and put a transformer for the 12 volts. Thanks for your massive web site of great knowledge.

        Reply
        Swagatam says:
        June 21, 2024 at 8:31 am

        Thank you Art, glad the circuit worked for you.
        All the best to you.

        Reply
        Art says:
        June 3, 2024 at 5:38 pm

        Perfect thanks

        Reply
        Art says:
        June 3, 2024 at 3:03 am

        I am looking at your grid tie circuit. I have 120 volt coming from the main and I have a 120 volt inverter. Up to now I unplug from the main and plug into the inverter, there has to be a way so I done have to unplug anything just flip a switch from one to another and if course back. I see one if your diagrams above but not sure. I keep seeing circuits but they have added the inverter circuit. I don’t need another inverter. Just a change over from one to another. Thanks

        Reply
        Swagatam says:
        June 3, 2024 at 9:16 am

        I think you can simply do it with a DPDT switch, as shown below:
        https://www.homemade-circuits.com/wp-content/uploads/2024/06/grid-to-dpdt-changeover.jpg

        Reply
        Moses says:
        January 28, 2022 at 10:19 pm

        Good day sir, please I need a circuit that will automatically switch on a generator that has manual start facility when the mains power is off. That is just what I want

        Reply
        Swagatam says:
        January 29, 2022 at 10:19 am

        Moses, I think you should use a readymade control box which has automatic start and stop facility, building a circuit can be complex because generators cannot be started just by a push of a button

        Reply
        Dan Buchan says:
        November 30, 2021 at 9:30 am

        Hi, thanks for your informative page, just what I was looking for. In the first diagram you have a capacitor “474” – 474 what?

        Thanks, Dan

        Reply
        Swagatam says:
        November 30, 2021 at 10:38 am

        Hi, the capacitor 474 is equivalent to a 0.47uF/400C PPC capacitor

        Reply
        Dan Buchan says:
        November 30, 2021 at 12:54 pm

        Thanks!

        Reply
        Dan Buchan says:
        November 30, 2021 at 9:36 am

        I have a suggestion. How difficult would it be to add some sort of timer to the CDI switch output so the generator can run with the mains on, then be switched to when the mains goes off, and then be killed when the mains comes on again? This would allow you to test the switchover from mains to generator.

        Reply
        Swagatam says:
        November 30, 2021 at 4:06 pm

        For delaying the CDI switch in the first diagram, you will have to isolate the CDI switch with a separate relay which must be connected with the main relay. The main relay now becomes DPDT relay and the CDI relay becomes SPDT relay. The timer could be added with this SPDT relay

        Reply
        Olakunle Roleola says:
        October 6, 2021 at 1:15 am

        Yes, the wiring is very simple. But my fear is if generator is switched on already and suddenly, mains supply becomes available, if your are using AH3-3 delay relay off timer, the pole of the center relay clicks the NO to power mains contactor (while generator runs for few seconds or minutes depending on the set timing to switch off), power supply from generator will still find its way to the mains circuitry via pole to the NO contacts of the center relay which can cause a short circuit.

        Reply
        Swagatam says:
        October 6, 2021 at 8:57 am

        The operation of the center relay can never keep the two contactors ON at the same instant. When it moves to N/O, the N/C side contactor releases, and vice versa.

        Reply
        Olakunle Roleola says:
        October 18, 2021 at 4:08 pm

        Hi Swagatam, how are you doing? Having gone through the circuit thoroughly, I now realized that I have been mistaken all along. Without void of doubt, the diagram is very much ok. I didn’t do much due diligence on it that resulted to my conclusion. I’m sorry that our last conversation didn’t go well.

        Regards.

        Reply
        Swagatam says:
        October 18, 2021 at 5:38 pm

        Hi Olakunle, I am good, thank you! Not a problem at all! It is just a part of the learning process for all of us! I am glad the confusion is over now! Please keep up the good work!

        Reply
        Olakunle Roleola says:
        October 7, 2021 at 8:14 am

        Having gone through the schematic diagram diligently, I ran a simulation on Proteus CAD. These are my observations
        1. Connecting different power supply on the pole of center relay is dangerous should the relay fails.
        2. Mains power supply takes priority over generator that’s why on the center relay, NO contact is for mains, NC- generator and pole, load. It’s best to separate these contacts accordingly.
        3. If you are using a delay-relay timer, the circuit can poise an hazard in that when generator is running and mains supply is available, generator will still be running. After the time interval of the timer lapses, generator stops working. You can see why generator and mains shouldn’t be connected to the pole.

        Resolution
        1. Disconnect generator +12V power supply from pole of center relay and connect pole back to +12V mains power supply (as in your previous schematic diagram before changing it to the present one). Now, disconnect the upper generator contactor coil from NC of center relay and connect it to generator +12V power supply. Since the lower contactor coil of both generator and mains are connected to ground, that forms the interlock. This arrangement is situable if you want to use a delay-relay timer. That coil will be connected to a timer. The moment generator starts, it will be delay the supply like 20secs (depending on the setting) before powering the load. By that time, the generator would have attained its maximum speed.

        2. You can still maintain your previous schematic diagram which is ok.

        Reply
        Swagatam says:
        October 7, 2021 at 9:20 am

        The wring is very simple it can be simulated in mind to know the results, without any software.

        The pole of the relay is connected to 12V DC from the generator and the mains grid AC, and the N/O N/C contacts are connected to the coils of the contactor relay.

        There’s no AC present anywhere on the pole of the center relay.

        The center relay only controls the contactor coils.

        If the center relay fails, at the most there will be no AC to the load….and that’s all…there is absolutely no chance of any hazardous situation.

        The two contactors on the extreme right can NEVER EVER operate at the same time, and therefore there’s absolutely no chance of any electrical hazard.

        Reply
        Olakunle Roleola says:
        October 8, 2021 at 1:39 am

        Your diagram, among others is too simple for me not to understand it. Using Proteus has nothing to do with my logic abilities. I use it to simulate all my designs and to also check mate possible features or amendments where necessary. If you say what you did is ok, then no problem. We are all entitled to our opinions.

        Besides, what do you mean by strong 12VDC from generator and mains? I asked you a simple question that where lies the interlock in your connections. But you seem confused not to understand but instead you change the circuit diagram of which the previous diagram is much more better that the present one.

        Reply
        Swagatam says:
        October 8, 2021 at 9:41 am

        The center relay ensures the interlock feature.

        The center relay ensures that the two contactors can never operate at the same time.

        I think I have already explained this many times, it’s no point discussing the same thing again and again.

        Reply
        Swagatam says:
        October 8, 2021 at 8:02 am

        The previous diagram did not have a 12V from the generator, then how could the generator side contactor operate when the center relay contacts connect to the N/C points? To correct this, I added the +12V from the generator.

        If you have used some external delay/relay with my circuit then that’s your problem. I cannot suggest about it since I have not seen the schematic.

        Although not required, a delay feature can be added with the center relay and should be discretely built without depending on external circuits. In fact I have already provided the delay feature by adding a 1000uF capacitor with the center relay coil.

        Proteus is a good software, but it is good only as long as the user has good knowledge of electronics, otherwise the results can be erroneous.

        The bold 12V indicates only a DC is involved to operate the relays, and two DCs create nothing hazardous with the center relay….

        The second diagram is fail-safe, failproof, hazard proof, under all circumstances.

        Reply
        Swagatam says:
        October 7, 2021 at 9:33 am

        I have not used any delay relay timer for the contactors, that is your version, and might require a completely different circuit.

        Reply
        Olakunle Roleola says:
        October 5, 2021 at 7:08 pm

        Thank you for that response. Now, how does the relay gets energized (i.e. to supply power to the first contactor) when there is mains supply considering the fact that the pole or (com) of that relay is connected to the generator 12VDC supply?

        Reply
        Swagatam says:
        October 5, 2021 at 8:48 pm

        When mains supply is present the generator will be switched OFF, and the center 12V relay pole will connect with its N/O contacts, and that will allow the Grid mains contactor to energize. The wiring is very simple, please check the 12V path across the relay contacts and the contactor coils….

        Reply
        Mike says:
        May 14, 2021 at 3:58 am

        I take it that the control cct is fed from a mains phase ?

        Reply
        Swagatam says:
        May 14, 2021 at 8:59 am

        yes that’s correct!

        Reply
        Vasilis Caravitis says:
        December 4, 2020 at 3:08 pm

        I have noticed that all changeover (generator-grid) circuits feature two contactors, one for the generator and one for the grid. Why can’t one contactor, with an array of NO and NC contacts do the job? Possibly extra safety? What can go wrong with a single contactor?
        Thanks in advance.

        Reply
        Swagatam says:
        December 4, 2020 at 7:37 pm

        Can you show me the contactor diagram link? I’ll try to figure it out.

        Reply
        Vasilis Caravitis says:
        December 4, 2020 at 10:40 pm

        The schematic is previously on this page (near the top).

        Reply
        Swagatam says:
        December 5, 2020 at 10:16 am

        Accommodating all the mechanism inside one unit can make the system congested and cluttered which may not be recommended for high power systems.

        Reply
        Swagatam says:
        October 5, 2021 at 9:46 am

        Hi, yes the two contactors can never operate together at any instant, and therefore are 100% fail proof. I have corrected the second schematic which previously had some faults.

        Reply
        Olakunle Roleola says:
        October 5, 2021 at 2:20 am

        Hi, how are you doing? Is there any form of interlock between the utility contactor and that of generator for safety purposes?

        Reply
        Olakunle Roleola says:
        August 10, 2020 at 1:02 pm

        Hi Swagatam, how are you doing? It’s been a long time? My question is can AH3-3 delay timer be used in lieu of the capacitor 1000uf/25V to automatically stop generator?

        Reply
        Olakunle Roleola says:
        August 29, 2020 at 12:28 pm

        Yes, very useful.

        Reply
        Olakunle Roleola says:
        August 28, 2020 at 7:46 pm

        Yes, the capacitor 1000uf/25V and the left relay need to be removed. Because, this kind of timer has dual power supply (220VAC or 12VDC). The diagram above is DC powered so you can select DC from the timer.

        Connect one of the terminals of buzzer and gen stop wires to Pin 5 (NC) and the other terminals to Pin 2 (-ve). Pins 7 and 2 are the coils while Pin 8 (Common or Pole) and Pin 6 (NO). Pins 7 and 8 take positive supply as pin 2 is negative.

        Reply
        Swagatam says:
        August 29, 2020 at 11:15 am

        Yes I have roughly studied the details of the device by referring the wiring diagram of the unit online, it looks very useful.

        Reply
        Swagatam says:
        August 28, 2020 at 10:04 am

        Hi, from your explanation it seems, the AH3 relay could be powered through the N/O contacts of the 12V relay of the second circuit, for the required ON/OFF actions of the generator. In this situation the 1000uF could be removed

        Reply
        Olakunle Roleola says:
        August 28, 2020 at 1:36 am

        Hi, how are you doing? The AH-3 device is an eight pin DPDT relay delay timer. Pin 7 looped with Pin 8 or Pin 1 is the Live from mains while Pin 2 Neutral. Pins 8 and 1 are the Poles Pins 3 and 6 are NO contacts while Pins 4 and 5 NC contacts. The application of this device is to either delay ON or OFF a load. So if you want the generator to stop when mains is available is called delayed OFF. You connect generator stop wires to NC contact. If you also want generator to automatically start (delay ON) when mains is not available, you connect generator start wires to NO contact.

        Buzzer (if it is AC) too can be connected in the line with generator stop contact. The moment mains is available, buzzer sounds and after a delay, the sound stops along side the generator.

        Reply
        Olakunle Roleola says:
        August 13, 2020 at 12:06 am

        Ok, thank you.

        Reply
        Swagatam says:
        August 17, 2020 at 8:45 am

        Hi, no that won’t happen, you can clearly see the the situation in the first diagram, the N/C and N/O contacts are aloof and the two ACs can never short with each other.

        Reply
        Olakunle Roleola says:
        August 17, 2020 at 12:42 am

        Hi, thank you. If the coils are in parallel, connecting mains to NO, load to Poles and generator to NC, don’t you think that if relays are energised from mains, won’t they be activated to the same?

        Reply
        Swagatam says:
        August 10, 2020 at 3:01 pm

        Hi Olakunle, i am good, thanks, the 1000uF is associated with the relay coil as shown in the diagram , I am not sure how the AH3 device could be replaced with it. I have not yet investigated the AH3 delay timer so I can’t comment much on its integration with this circuit at this moment

        Reply
        Swagatam says:
        August 16, 2020 at 9:03 am

        If you are trying to increase the current handling capacity of the relay by adding two in parallel, then yes that’s possible. You just have to connect all the identical points of the two relays in parallel including the coil. The coil does not have any polarity, can be connected any way round, but the paralleled coils must have a common freewheeling diode to avoid reverse spike dumping from the relay into the circuit.

        Reply
        Olakunle Roleola says:
        August 15, 2020 at 8:18 pm

        Hi, if I’m to use two SPDT relays in parallel what will be the connections of the coils as Poles, NCs, and NOs contact are joined in pairs?

        Reply
        Olakunle Roleola says:
        July 14, 2020 at 9:12 am

        Can you please explain the working principle of the first circuit diagram?

        Reply
        Swagatam says:
        July 14, 2020 at 9:10 am

        Thank you! In the first diagram the AC changeover to the load is automatic but the generator will need to be started manually by pulling the chord whenever the mains fails. If you need a fully automatic design you can try the following circuit:

        2 Simple Automatic Transfer Switch (ATS) Circuits

        Reply
        View Older Comments

        Need Help? Please Leave a Comment! We value your input—Kindly keep it relevant to the above topic! Cancel reply

        Your email address will not be published. Required fields are marked *

        Primary Sidebar

        circuit simulator image



        Subscribe to get New Circuits in your Email



        Categories

        • Arduino Projects (93)
        • Audio and Amplifier Projects (133)
        • Automation Projects (17)
        • Automobile Electronics (101)
        • Battery Charger Circuits (85)
        • Datasheets and Components (109)
        • Electronics Theory (149)
        • Energy from Magnets (27)
        • Games and Sports Projects (11)
        • Grid and 3-Phase (20)
        • Health related Projects (27)
        • Home Electrical Circuits (13)
        • Indicator Circuits (16)
        • Inverter Circuits (95)
        • Lamps and Lights (159)
        • Meters and Testers (71)
        • Mini Projects (28)
        • Motor Controller (68)
        • Oscillator Circuits (28)
        • Pets and Pests (15)
        • Power Supply Circuits (91)
        • Remote Control Circuits (50)
        • Renewable Energy (12)
        • Security and Alarm (64)
        • Sensors and Detectors (106)
        • SMPS and Converters (34)
        • Solar Controller Circuits (60)
        • Temperature Controllers (43)
        • Timer and Delay Relay (49)
        • Voltage Control and Protection (42)
        • Water Controller (36)
        • Wireless Circuits (30)





        Other Links

        • Privacy Policy
        • Cookie Policy
        • Disclaimer
        • Copyright
        • Videos
        • Sitemap



        People also Search

        555 Circuits | 741 Circuits | LM324 Circuits | LM338 Circuits | 4017 Circuits | Ultrasonic Projects | SMPS Projects | Christmas Projects | MOSFETs | Radio Circuits | Laser Circuits | PIR Projects |

        Social Profiles

        • Twitter
        • YouTube
        • Instagram
        • Pinterest
        • My Facebook-Page
        • Stack Exchange
        • Linkedin



        Recent Comments

        • Swagatam on 9 Simple Solar Battery Charger Circuits
        • Karthik B S on 9 Simple Solar Battery Charger Circuits
        • Swagatam on True MPPT Solar Controller Circuit using IC 555
        • Swagatam on Arduino 2-Step Programmable Timer Circuit
        • Swagatam on How to Add a Dimmer Facility to a LED Bulb

        © 2026 · Swagatam Innovations