Description
This project comes as a result of the frequent power failure in the country (Cameroon).
Most electrical and electronic appliances require AC power supply for their operation. While AC power is made available mostly through AC supply mains, However there are circumstances when we encounter frequent AC power power failure due to the growing power demand of electricity by the population and also mismanagement.
To overcome this problem of frequent power cuts that occurs almost on a daily basis in our homes and most especially in hospitals, we usually come across many alternatives. For example we can use generators or inverters in emergency cases to get AC power when the mains supply is switched off. Similarly in case of DC power, we can use either a battery or an AC to DC power supply in alternative.
Here in this article, we presents the principle, design and operation of an automatic changeover switching system wherein an AC load like an incandescent lamb or any related AC loads are driven by a generator or any alternative (inverter) and the AC mains. This is done automatically as it detects the failure of a power source and immediately transfer the load to the alternative source.
Automatic change over switch Functioning
This automatic changeover switch reduces the stress of turning ON a generator or an alternative power supply each time there is power failure in the AC mains.
Immediately as the AC mains fails, the circuit automatically switches to the AC alternative power supply to prevent the interruption of the load.
This system is very important where there’s a need of constant power supply.
How it operates
1) The system automatically detects failure in Eneo (AC power Mains) and switches to the generator and switches back to Eneo whenever Eneo power supply is restored.
2) Eneo power has the highest priority.
3) When ENEO is ON, Green LED is ON while Red is OFF
4) When Generator is ON, Red LED is ON while Green is OFF
5) A POWER SWITCH to turn OFF Eneo manually in other to use only Generator at a given moment (in case of low voltage).
6) The system consists of a DC rechargeable battery that charges whenever Eneo is present.
Eneo is the country’s historical main electricity company which has installed generation capacity of 968MW in Cameroon.
Tools and materials needed
4 Capacitors
2 C1-C2 22p
1 C3 100N
1 C4 100u
13 Resistors
2 R1,R14 10k
4 R2-R4,R6 1k
2 R7,R9 100R
1 R8 100R
1 R10 270k
1 R11 10K
1 R12 470R
1 R15 2k7
2 Integrated Circuits
1 U1 PIC16F877A
1 U2 7805
4 Transistors
4 Q1-Q4 BC547BP
12 Diodes
3 D1-D3 1N4148
1 D4 LED-RED
1 D5 LED-GREEN
5 D6-D9,D13 1N4007
1 D10 LED-YELLOW
1 D12 1N5338BRL
11 Miscellaneous
1 BAT1 9V
2 ENEO,GEN
1 J1 Relay power
1 L1 220V
1 LS1 SOUNDER
3 RL1-RL3 5V
1 SWITCH sw1
1 X1 CRYSTAL
Breadboard and breadboard wires
Automatic change over switch Circuit Diagram
Realization
I used proteus 8 design suit to design and simulate the automatic change over switching system.
Top view
Bottom copper
Automatic change over switch Source code
The source code was written and compiled using mikroC pro for PIC compiler. Download HEX file here.
// Declare variables
// Automatic change over
// https://lrn2make.com
sbit i_led at RE1_bit;
sbit e_led at RE2_bit;
sbit SW_1 at RB7_bit;
sbit SW_2 at RB5_bit;
sbit SW_3 at RB6_bit;
sbit buzz at RB4_bit;
sbit e_sensor at RC0_bit;
int t;
double Vres;
unsigned int adc_val;
void main() {
ADCON1 = 0xFF;
TRISE1_bit = 0;
TRISE2_bit = 0;
PORTE = 0X00;
TRISC0_bit = 1;
TRISB = 0X00;
PORTB = 0X00;
SW_1 = 1;
PORTD = 0X00;
while(1){
if(e_sensor == 0){
do{
i_led = 0;
e_led = 1;
SW_1 = 1;
SW_2 = 0;
SW_3 = 0;
}while(e_sensor == 0);
}
else if(e_sensor == 1){
do{
i_led = 1;
e_led = 0;
SW_1 = 1;
SW_2 = 1;
SW_3 = 1;
//delay_ms(1000);
}while(e_sensor == 1);
}
}
}
Steps to follow
1) Download source file
2) Compile the source code
3) Burn the hex file in to the micro-controller.
4) Mount the components and test the system.
Applications
1) This circuit can be used as a emergency lighting system in critical areas like filling stations and microwave antennas as well as in hospitals.
2) It can be used to drive other AC loads like motors, and any electronic appliance or other DIY applications.
Download
Download complete project files here.