Developing an Automatic Switch for Home or Industrial Power Supply Changeover

Continued development of automatic change over switch is a necessary requirement for the principle of energy mix especially in developing countries characterised by insufficient mains power supply. In this paper, we report how we were able to intuitively use basic electronic components to implement an efficient automatic change over switch. In the event of a power failure from the mains supply, this automatic changeover is designed and constructed to switch on a standby generator and transfer the installation load to it (the generator) and vice versa when power is restored. The switching time was calculated and tested to be about 0.88 ms which is sufficient to prevent any noticeable disruption in the power supply to the installation load, whether home or industrial.


INTRODUCTION
The modern approach to energy utility from global point of view is a drive from conventional to renewable energy, most especially fossil fuel. However this transformation cannot be total or immediate. It is a gradual process. In view of this, the principle of energy mix is practiced in modern energy utilization. In this regard, there is a mix of conventional and renewable energy based on availability. Today, solar energy, wind energy, and small hydro power are possible mix with conventional energy sources.
With the high dependence of home and industrial equipment on power, switching from one form of energy to the other has become a necessity either for integration in the national grid or for use in the standby home or industrial applications. Rocks and Mazur [1] describe a manual changeover in which the generator and load switching is done with physical influence. Certain mission critical appliances and installations which include hospitals, airports, high precision laboratory equipments which require a 100% up time cannot afford to depend on a manual changeover switch as described in [1]. The need for automatic electronic control which does the powering on of a standby generator and installation load switching in split seconds then cannot be overemphasized.

DESIGN
This circuit is modeled after an earlier work by our team [2]. With the aid of a voltage converter as shown in Fig. 1, we obtain a d.c voltage from mains supply. The voltage drop across resistor ܴ ଶ is compared with that in resistor ܴ ଷ , a fixed reference via the help of the sensor unit. We expect that at a maximum, the mains voltage would experience a fluctuation down to a threshold of 190V a.c. We set the voltage drop at this voltage via ܴ ଶ as reference. A D flip-flop switches the transistor OFF in reset mode from any voltage drop below the reference (A LOW signal) set by ܴ ଶ . With the transistor switched OFF, the relay (RLA) becomes de-energized causing the contacts to close and switch over to the source of alternative supply which could be solar installations, wind, thermal, generator etc. When restoration of mains supply to above the threshold voltage is detected by the voltage drop in ܴ ଶ going higher than that in ܴ ଷ , the D flip-flop receives a HIGH signal which energizes the relay by turning ON the transistor. By this, the installation (home/industrial load) is connected to the mains supply in SET mode via the normally open contact of RLA1.
The 4013-segment D-flip-flop logic device is included in the circuit to give a perfect switching and eliminate fluctuation that may occur as a result of voltage variation. This is included because voltage comparators will tend to switch the relays erratically [3]. Therefore, such effort as undertaken in this work can be a preamble to an elaborate or all-encompassing smart grid system for large energy applications or small scale industrial/domestic applications for smart and swift response among different sources of energy when deployed in energy mix bases.

Fig. 1. Power unit
The changeover switch comprises of the following parts:

Power Unit
In Fig. 1, we show how the incoming a.c voltage is stepped down for rectification according to [3]. The transformation ratio, k, for a 220/15V stepdown transformer used in our power unit is calculated from: The incoming a.c is converted to unregulated d.c by the bridge rectifier. These unregulated d.c voltage values can be obtained from:

Comparator Unit
A comparator compares two voltage signals and determines which signal is bigger and gives an output [4]. In our design the comparator unit determines when there's a disparity between the mains supply which is converted to d.c by the power supply unit and the preset reference voltage set by ܴ ଶ . In Fig. 2 is shown the connection of the LM339 serving to compare the fixed reference input to the unregulated input ܴ ଶ . The LM 339 is connected as a comparator to compare the unregulated input to the fixed reference input as shown in Fig. 2 [2].  Fig. 3, unregulated voltage is reduced to below 5V by the potential divider ܴ ଵ and ܴ ଶ . At our earlier stated mains supply threshold of 190V a.c input, we set = 1.5V.
The voltage drops across at different input a.c voltages are shown in Table 1. Potential divider ܴ ଵ and ܴ ଶ is for the fixed reference voltage. By setting the maximum adjustable reference to be 3.5V, ܴ ସ = 2.5KΩ, the voltage drop across ܴ ଷ is thus given by; The gain of the comparator unit is given by However, the usual value for open loop gain is ≥ 20,000 [2]. With this large gain, ܸ ௨௧ will drop to ܸ ା for any slight positive difference in voltage.
With a public mains supply input at above 1.5V, the D flip-flop receives a HIGH signal from the output of the comparator which makes the D flipflop to energize the relay RLA1. With RLA1 energized, the installation (home or industrial load) is connected to the public mains supply. If however, the public mains supply input voltage goes below 1.5V, relay RLA1 is de-energized by the LOW signal sent to the D flip-flop thereby connecting the installation to the alternative power supply.

Astable Oscillator Unit
Here, clock pulses are generated for the flip-flop which is required to for its operation in the SET and RESET modes. We use a 1KHz astable oscillator to clock the flip-flop via a 555 timer as shown in Fig. 3 [4].
The astable oscillator has two states, temporarily stable in each. The flow of digital pulses is continuous. The switching process between these states generates continuous rectangular waveforms with fast rise times [5].
The ON and OFF time of an astable oscillator is given as ‫ݐ‬ ଵ and ‫ݐ‬ ଶ and obtained from [3]: Where; ‫ܥ‬ ଵ is oscillator capacitance For this work, we give ܴ a preferred value of 15kΩ. ‫ݐ‬ ଵ and ‫ݐ‬ ଶ can be tuned to requirement either by increasing or reducing the values of R 5 and R 6 .

The Switching Unit
To implement the switching process, we have a logic control and switching transistor circuit. The flip-flop does the logic control while the transistor undertakes the switching. We show in Fig. 5 how this is setup.

Logic control circuit
Through the D flip-flop, the system is instructed on when to energize (switch ON) or de-energize (switch OFF) the relays. For further description of how this flip-flop operates in the SET and RESET modes, please see Table 2 [6]. When the D flipflop is clocked by the rising edge of the astable oscillator, a LOW signal is detected at the output of the comparator. This causes a data shift from the input (D) to output (Q) which switches off the relays. For a HIGH signal from the comparator triggered by the rising edge from the astable oscillator, the relays are energized and switched ON [7].

Switching transistor circuit
A transistor and relays RLA1 and RLA2 makes up our switching circuit which is shown in Fig. 4. The relays are controlled based on the commands which the transistors from the D-flipflop. The transistor operates in the class A mode as a switch [8]. When the D flip-flop is in SET mode, the relays are switched on. Reciprocally, the relays are switched off when the D flip-flop is in RESET mode. In order to protect the relays from back EMF which is characteristic of inductive loads, diodes D5 and D6 are required [4].
To obtain the collector and base resistors, we use [9]:

Fig. 4. Transistor and relays in circuit
While the base and collector currents are obtained from [2]: Where; Base resistor ܴ is included in this unit to allow for perfect switching of the transistor in saturation. Relays RLA1 and RLA2 are replaced in Fig. 5 by K2. This is because relays RLA1 and RLA2 are connected in parallel to form a resultant of 400Ώ forming the collector/load resistor.
The complete circuit diagram of the switch is shown in Fig. 6.

PERFORMANCE EVALUATION
The changeover switch was tested with public mains supply source and a generator source to evaluate its performance. The contacts of the relays RLA1 and RLA2 were tested for continuity to identify the normally-open and normally-closed contacts in order to avoid wrong connection of the contacts. The public supply source was connected to the normally-open contact, while the generator source was connected to its normally-close contact.
A standing fan was connected to the output of the relay RLA1. When it was powered with public supply source, the relay switched instantly and the fan worked; when the public supply source was switched off, relay RLA1 returned to its normal state. The generator was then powered on by relay RLA2 and the fan worked; while the generator was working, the public supply source was suddenly switched on and the relay RLA1 immediately changed over to supply the fan with voltage from public mains supply, while the relay RLA2 disconnected the generator's ignition to switch it off.
From equation (7), the delay time of the changeover switch which is derived from the ON time of the astable oscillator given as ‫ݐ‬ ଵ is calculated to be 0.88ms. This was tested and verified to be comparable.

Fig. 6. Complete circuit diagram of the automatic change over switch
As such, the changeover occurred in split seconds to prevent a noticeable power outage. Depending on specific design requirements, the delay time can be increased by increasing the resistances R 5 and R 6 . A test of this conformed to our expectation.
Reports consulted of previous projects [4,[10][11][12] similar to this work have not been compared with each other. However, compared to [10] and [12] which state a delay time of 1.23 seconds and 5 seconds respectively measured during evaluation, we have implemented and tested in our performance evaluation delay times approximately 10 orders of magnitude less. The implication of the split-second changeover reported in this work is the readiness for this work to be adopted in installations with an energy mix variety and not only for generator source.

CONCLUSION
The performance evaluation of the automatic changeover switch has shown that the switch is more reliable than manual change over switches. The switch was able to power up a standby generator and perform the load switching between the mains public supply and the standby generator in a split second action to eliminate noticeable outage in power. Therefore it could be employed when two different sources of electrical power are supplied to an installation in which one of them should be connected to the installation at a given time. Its ability to change over in the twinkling of an eye is also commendable, thus eliminating the delay and human error associated with manual change over switches.