Skip to main content

UPS Relay Changeover

The following post explains a simple relay changeover circuit with zero crossing detector which may be used in inverter or UPS changeover applications, 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,


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


A1/A2 = 1/2 IC LM324



Need Help? Please leave a comment, I'll get back soon with a reply!


  1. Please sir, can i use the diode 'S4VB' in the power supply for TDA7560? In addition, can i replace the 2200uf caps in its input line with 6800uf, 50v?

  2. Hello Dear Engineer,

    Can i use this circuit for 24 Volt inverter

  3. Hello Abdul, yes you can it with a 24V inverter because since the circuit has no connection with the inverter battery so battery voltage is not relevant here.

  4. Dear Swagatam, Ive tried this circuit to the best of my ability but its not work is there anything left out in the circuit as parts of the list mentioned component like zener is not used. also what is the value of T3,R10,D1and D2. Thanks

  5. Dear Compupower, I have explained the concept on which I have designed the circuit, you may have to understand it thoroughly to be able to troubleshot the issues, because for me it would be difficult to know the faults in your circuit without checking it practically.

    the circuit is complete and there's nothing left out.

    Z1 is not there, it could be a typo.

    D1, D2 = 1N4148

    T3 = 2N2222, R10 = 10K

  6. sir.. y do u use rectifier at the 1st place?? im new in this so could u explain this to me?

  7. Dear Swagatam, very nice design. But I think zero crossing detector will not work as desired i.e. Instead of working below 0.6 and above -0.6V, the transistor t1 will start conducting as the AC input starts decreasing in any cycle. I think this T1 should be replaced with a NPN transistor?

  8. Dear Arhat, Using an NPN will also not help, I think the situation can be corrected by adding a capacitor across T2 base and ground.

    so whenever the opamps are in the triggering zone, the triggering will be initiated at the zero crossing by T1, and the condition will be sustained by the T2 base capacitor.

  9. Sorry sir
    This is ma first time am write you so this alsobam happy to be seen tremendous work u are doing online thank brother

  10. Sorry bro
    Can I hv pure sine wave in inverter control circuit that are capablecapable to fit any rate

  11. Also sir
    This change over r just true with it but I don't knw how it work bcos when I switch on the relay energies direct

  12. It's explained in the above article, please read it and do the required adjustments to make it work...

  13. Can I use Multisim (NI) to simulate this circuit?


Post a Comment