I have been put forth with this question many times in this blog, how do we add a changeover selector switch for automatically toggling of an inverter when AC mains is present and vice versa.
And also the system must enable automatic switching of the battery charger such that when AC mains is present the inverter battery gets charged and when AC mains fails, the battery gets connected with the inverter for supplying AC to the load.
Circuit Objective
The configuration should be such that everything takes place automatically and the appliances are never switched OFF, just reverted from inverter AC to Mains AC and vice versa during mains power failures and restorations.
So here I am with a couple of simple yet very efficient little relay assembly module which will do all the above functions without letting you know about the implementations, everything is done automatically, silently and with great fluency.
1) Inverter Battery Changeover
Looking at the diagram we can see that the unit requires two relays, however one of them is a DPDT relay while the other one is an ordinary SPDT relay.
The shown position of the relays are in the N/C directions, meaning the relays are not powered, which will obviously be in the absence of the mains AC input.
At this position if we look at the DPDT relay, we find it to be connecting the inverter AC output to the appliances through its N/C contacts.
The lower SPDT relay is also in a deactivated position and is shown to be connecting the battery with the inverter so that the inverter remains operative.
Now let's assume that AC mains is restored, this will instantly power the battery charger which now becomes operative and supplies power to the relay coil.
The relays instantly become active and switch from N/C to N/O, which initiates the following actions:
The battery charger gets connected with the battery and the battery starts charging.
The battery gets cut OFF from the inverter and therefore the inverter becomes inactive and stops functioning.
The connected appliances are instantly diverted from the inverter AC to the mains AC within a split second such that the appliances doesn't even blink, giving an impression that nothing had happened and the are kept operative continuously without any interruptions.

A comprehensive version of the above can be witnessed below:

2) 10KVA Solar-Grid Inverter Changeover Circuit with Low Battery Protection
In the second concept below I have explained how to build a 10kva solar grid inverter changeover circuit which also includes a low battery protection feature. The idea was requested by Mr. Chandan Parashar.
Circuit Objectives and Requirements
- I have a solar panel system with 24 Panels of 24V and 250W connected to generate a output of 192V, 6000W and 24A. It is connected to 10KVA, 180V inverter which delivers the output to drive my appliances during daytime. During night the appliances and inverter run on grid supply.
- I request you to kindly design a circuit which will change the inverter input from grid to solar power once panel start generating the power and should again revert the input from solar to grid once darkness falls and solar power generation falls.
- Kindly design another circuit which will sense the batter.
- I request you to kindly make a circuit which will sense that battery is getting discharged below certain threshold value say 180V (esp during rainy season) and should switch the input from solar to grid even though some amount of solar power is being generated.
Designing the Circuit
The 10kva solar/grid automatic inverter changeover circuit with low battery protection which is requested above can be built using the concept presented in the following figure:

In this design which may be slightly different to the requested one, we can see a battery being charged by a solar panel though an MPPT controller circuit.
The solar MPPT controller charges the battery and also operates a connected inverter through an SPDT relay for facilitating the user with a free electricity supply during day time.
This SPDT relay shown at the extreme right side monitors the over-discharge condition or the low voltage situation of the battery and disconnects the inverter and the load from the battery whenever it reaches the lower threshold.
The low voltage situation could mostly take place during night when there's no solar supply available, and therefore N/C of the SPDT relay is linked with a AC/DC adapter supply source so that in an event of a low battery during night the battery could be charged for the time being through the mains supply.
A DPDT relay can be also witnessed attached with the solar panel, and this relay takes care of the mains supply changeover for the appliances.
During day time when the solar supply is present, the DPDT activates and connects the appliances with the inverter supply, while at night it reverts the supply to grid supply in order to save the battery for a mains failure back up situation.
UPS Relay Changeover Circuit
The next concept makes an attempt to create a simple relay changeover circuit with zero crossing detector which may be used in inverter or UPS changeover applications.
This could be used for switching-over the output from AC mains to inverter mains during inappropriate voltage conditions. The idea was requested by Mr. Deepak.
Technical Specifications
I am looking for circuit comprising of the comparator (LM 324) to drive a relay. The objective of this circuit is to:
1. Sense AC supply and switch relay 'ON' when voltage is in between 180-250V.
2. Relay should turned 'ON' after 5 seconds
3. Relay should turned 'ON' after zero voltage detection of supplied AC (Zero voltage detector). This is to minimize arching in the relay contacts.
4. Finally and most importantly, the relay switchover time should be less than 5 ms as a normal off-line UPS does.
5. LED indicator to indicate the state of relay.
The above functionality can be found in UPS circuit which is bit complex to understanding since UPS has many other functional circuit beside this. So am looking for a separate simpler circuit which only works as mentioned above. Kindly help me to build the circuit.
Component available and other details:
AC mains = 220V
Battery = 12 V
Comparator = LM 324 or something similar
Transistor = BC 548 or BC 547
All type of Zener are available
All types of resistor are available
Thanks and Best regards,
Deepak
The Design
Referring to the simple UPS relay changeover circuit, the functioning of the various stages may be understood as follows:
T1 forms the sole zero detector component and triggers only when the AC mains half cycles are near to crossover points that's either below 0.6V or above -0.6V.
The AC half cycles are basically extracted from the bridge output and applied to the base of T1.
A1 and A2 are arranged as comparators for detecting the lower mains voltage threshold and the higher mains threshold respectively.
Under normal voltage conditions the outputs of A1 and A2 produce a low logic keeping T2 switched Off and T3 switched ON. This allows the relay to remain switched ON powering the connected appliances through mains voltage.
P1 is set such that voltage at the inverting input of A1 becomes just lower that the non-inverting input set by R2/R3, in case the mains voltage falls below the specified 180V.
When this happens, the output of A1 reverts from low to high triggering the relay driver stage and switching off the relay for the intended changeover from mains to inverter mode.
However this becomes possible only when the R2/R3 network receives the required positive potential from T1 which in turn takes place only during the zero crossings of the AC signals.
R4 makes sure that A1 does not stutter at the threshold point when the mains voltage goes below 180V or the set mark.
A2 is identically configured as A1, but it's positioned for detecting the higher cut-of limit of the mains voltage which is 250V.
Again the relay switch over implementation is executed only during the zero crossings of the mains AC with the help of T1.
Here R8 does the momentary latching job for ensuring a smooth transition of the switching.
C2 and C3 provides the required time lag before T2 can conduct fully and switch ON the relay. The values may be appropriately selected for achieving the desired delay lengths.
Circuit Diagram

Parts list for the zero crossing UPS relay changeover circuit
- R1 = 1k
- R2,R3,R4,R6,R7,R8 = 100K
- P1,P2 = 10K PRESET
- R5, R9 = 10K
- D3,D4---D10 = 1N4007
- C1,C2 = 1000uF/25V
- T1 = BC557
- T2 =BC547
- Z1= 3V ZENER
- A1/A2 = 1/2 IC LM324
- RL/1 = 12V, SPSDT RELAY
- TR/1 = 0-12V STEP DOWN TRASFORMER



Questions & Answers
1)Inverter AC is the AC generated by the inverter.
2)appliance refers to the household load
3)Inverter battery input refers to the supply points of the inverter (+) and (-)
4)"To battery" means to battery which is being used for operating the inverter.
5)DPDT and SPDT both relays will have it's own separate coils, connect them together in parallel to the points indicated as "to relay coils"
yes that's correct.
The relay coils are not connected with the battery, it's connected with the AC/DC charger output.
so as long as AC mains is present the charger will keep the relays energized.
Here the charger should a separate DC unit and the over charge relay must be wired with the battery positive, this will enable the over charge feature to activate separately only for the battery, other solutions can also be figured out, there's plenty of options open.
I have already comprehensively explained it in the above article, you can use the above explained design for your application, it's exactly as per your needs.
hello sir,
i think i may have found a solution to this slight problem i told you about last year.
The problem was that since the battery charger supplies power to both relay coils and being that the battery charger is an automatic one this means that once the voltage is cut off because the battery has been fully charged it will automatically switch off the relays forcing them to switch back to inverter even with AC mains present.
The simple solution would be that both relays are powered from a separate divider/bridge rectifier network which the appropriate voltage so that even when the battery charger cuts off voltage to the battery both relays will still be powered on and this means that the battery still remains cut off from the inverter and the appliances are still powered from AC mains.
micheal
Thanks Michael,
But it's been already solved above as shown in the second diagram.
We can see that it's done by powering the relay coils directly from the AC/DC main power supply while the battery is being charged through a separate cut off stage.
Sir me bhanu how can i send a E-mail to you.
I have a simple mobile charging circuit I have already assembled this circuit but i am not getting the desired output so I need help from u………….plz sir give me a e mail id…Thank you
bhanu, you can send it to hitman2008(at)live.in
Dear sir! The DPDT relay coil is energized by AC or DC.
Dear Yasir,
all relay coils are connected with the AC/DC adapter power supply output, meaning with a DC acquired from mains AC.
hi bro.any harm to operate a relay with higher voltage than its rating?? i mean can i give a 13.7 v to a 12 v relay??
hi bro, a couple of volts higher won't harm the relay .. but would dissipate and waste a few tens of milliamps
good day sir, i want make a pure or modified sine wave inverter of exactly 1.2Kva that will have battery charging section with couple of only SPST relays to make it fully automatic as described in this post, please i want you to fully guide me on this. thanks
pls i am sorry for the mistake in the earlier post i want to use only SPDT relays not SPST be
Hi Muhammed you can try the following design:
https://www.homemade-circuits.com/2012/02/how-to-make-mini-homemade.html
Sir, the relay coil of the DPDT is shown clearly connected to the 12V DC charger, where is the relay coil of the SPDT connected?
The DPDT and the SPDT have singles coils…both are shown connected to the charger supply.
sir, can i use solar panel instead of AC main supply to charge the battery? another thing is that i want to use a 10W light as load for this project so can i use a 6V 4.5AH battery?
Dipto, yes that's possible, you can go ahead as per your mentioned plans.
Thank you sir for your reply.
I have another question is it possible to make a triple changeover? For example if one battery is empty then another battery would give backup by switching automatically. I am interested to add solar & hydro generator with the main supply for my project.
Dipto, it is possible to get a split battery changeover actions, you can refer to the following articles for more info:
https://www.homemade-circuits.com/2014/05/twin-or-split-battery-charger-circuit.html
https://www.homemade-circuits.com/2013/08/automatic-dual-battery-charger-with.html
Thank you sir for your reply. The 'split battery charger circuit' you mentioned is exactly what I required. I'll be using solar and hydro to charge the battery 1 & battery 2 respectively, hopefully it turns out well. I will inform you about the outcome.
Sir I have bought DPDT relay from the shop however it has two COM (common) pins what should I do with those pins? The relay has total of 8 pins.
please show me its pic I'll help you to identify the pins
The relay looks like this (the link given below).
https://drive.google.com/file/d/0ByOP1BiJWDUaWk51dDJReUtPUEE/view?usp=sharing
OK, the common terminals are the poles of the relay shown as black contacts in the above diagram, the N/C are the upper white circles, while the N/O are the lower white circles in the relay contact diagram
Hello Sir, can you tell me which software did you use to make this circuit diagram? I want to use it for my project.
Hello Dipto, I did not use any software, I designed it myself.
What I meant was which software did you use to draw them?
CorelDraw
pls i have not been able to connect my 3pole contactor? how do i make the connections cox the contactor has L1, L2, L3 in one side and at the other has T
1L1 3L2 5L3
2T1 4T2 6T3
then it has also
13 NO 21 NC A1
14 NO 22 NC A2
pls how can i make the connections on this because my main power grid is single phase and my generator also is single phase. how can i use it so as to b a changeover?
please use schematic and circuit diagram and symbol to illustrate and explain please
I am sorry I don't have much idea about the contactor's operational details so won't be able to explain the connections
Hi Swagatam,
Cool came across so many changeover ckts … This one is very interesting. I have one question though.
Can i use SPDT replacing the DPDT one? by connecting the nuteral lines of alternator and main together and only connecting the phase line to SPDT relay and toggling it. Here again, can i use 7 amps relay for switching AC mains? If not what is the suggested amps rating of the relay coil?
Thanks Sham, if the generator also has a neutral identical to the mains then you can make them common and use a SPDT switch, however if the generator neutral is not a permanent neutral and keeps alternating from live to neutral then SPDT will not do.
7 amp relay contacts will do, if the max wattage of the load is not above 1000 watts
Hi Swagatam,
Thats good. So i dont have to spend on DPDT since i have lot of SPDT ones. I am not using generator here. Its UPS( using as inverter ) so my neutral will always be constant. Inverter supports Max load of 600W so no issues with inverter. But when running on mains i think it can go beyond 1000W. So i will use 20 amps relay instead.
Will update you once its done. Thanks again.
Hi Sham,
are you your inverter has a constant neutral? confirm it first and then go for the SPDT version, otherwise you might burn the switch or the inverter fuse..
Yes Swagatam, output of UPS will have constant nuetral terminal… Otherwise phase and neutral will toggle in home AC mains
OK, then it's fine to use a SPDT switch…
Hi Swagatm,
I have rigged up the circuit. Its working fine as per my requirement. I have used single SPDT of 20 A for this purpose. Tested for 15 days.Running smoothly. But only thing is it takes a second to switch over and in the mean time lights goes OFF and ON.
Thanks for your suggestions.
Hi Sham,
A relay will never take a "second" to operate, it will operate in milliseconds I think the DC input has a capacitor which might be keeping the relay switched ON even after the mains failure….this capacitor value needs to be reduced….or a transistor driver could be introduced for making the response instant.
Pls sir, is it advisable for me to connect the coils of a 12v 10amp relay to 14v 1amp dc source and connect its two pole to load and it's two no to mains with it's two nc to inverter will it burn the relay(it's a dpdt relay)
why do you think it would burn the relay??…your wiring is correct and as per the shown diagram above so definitely it will work but only as long as the load does not exceed 5 amp or 6 amp max
you can reduce the 14V to 12V by adding 3nos of 1N4007 diodes in series with the relay coil
Swagatam:
I would like to replace the SPDT relay with 2 scr's. Would you consider a circuit to replace that relay?
I believe a relay would need to handle 60 amps to be effective for the inverter side… and a smaller SCR for the Charger side.
Many thanks for the great work you do.
Thanks Musicgirl, the concept looks useful, I'll try to design it soon and will publish it in my site as a new article.
Hello. I only have one question: the SPDT relay disconnects the inverter under load. This creates a big shock on the MOSFETs from the inverter (not to say a possible arc in the relay, depending on the load of the inverter). I cut the DC connection to my inverner under load once (I put a smaller fuse than necessary on the battery wire) and half of the MOSFETs blew up.
Wouldn't be much better if you transfer the load first and later cut the DC power to the inverter ?
you can use freewheeling diodes across the mosfet drain and source to rectify this issue….or to implement your idea you can simply add a high value capacitor across the SPDT relay coil and keep it isolated from the DPDT relay coil through a diode….but the first option looks more logical to me
Hello. I only have one question: the SPDT relay disconnects the inverter under load. This creates a big shock on the MOSFETs from the inverter (not to say a possible arc in the relay, depending on the load of the inverter). I cut the DC connection to my inverner under load once (I put a smaller fuse than necessary on the battery wire) and half of the MOSFETs blew up.
Wouldn't be much better if you transfer the load first and later cut the DC power to the inverter ?
Helo Mr swagatam! I am a fan to your skills. I want to ask; Does this design implies that the same inverter tranfo is used for charging the battery or do I need a separate transformer for that? And if so, can I get a design on how to do this? Thanks a lot sir
Thanks Odion, same trafo cannot is not used here for charging/inverting, the diagram suggests only the changeover section from mains to inverter and vice versa, the charger section utilizes a separate power supply which may be a trafo based or an SMPS based.