The main target of this project is to design and develop a Smart Overvoltage and Undervoltage Protection System Using Arduino to protect the appliance from damage. Nowadays fluctuation in AC mains voltage is frequent in domestic houses and industries. The abnormal over and under voltages may be caused due to some reasons such as sudden interruption of heavy load, thunder lightning, switching impulses etc. It can easily damage sensitive electronic parts in these conditions. It is so preferable to have a tripping system such as MCB, or MCCB to protect the appliances. But we have built here an advanced system that can smartly control your whole house’s electric supply using the user’s choice. Yes, we can set our desired maximum and minimum voltage for our needs.
In today’s market, various types of smart Overvoltage and Undervoltage protection systems have come out. But these are a little bit costly. Our project aims at protecting the electrical equipment from over and under voltages using just an Arduino and voltage sensor at a low cost. Here we use the ZMPT101B voltage sensor which is more accurate than others also it is cost-effective. It detects any voltage greater than 230V AC and below 190V AC (predefined value). If the voltage is across the limits than the predefined values, it sends a signal to the Arduino. Then it immediately trips the circuit breaker (here the relay module). Then the circuit breaker isolates the load from the main source.
In today’s power system, voltage quality is an important factor with the growth in power electronics and the high sensitivity of electronic components. Voltage quality covers a wide range of voltage disturbances and fluctuations in voltage magnitude or waveform from the maximum values. Daily operation of the power grid may result in disruption of voltage quality. Also, voltage irregularities are the major issues in the industries and domestic users are facing and often damage sensitive electronic equipment.
What is Overvoltage?
The word “Overvoltage” has been in use since 1907. According to the IEEE standards, Overvoltage is defined as “Voltage between one phase and ground or between two phases, having a crest value exceeding the corresponding crest of maximum system voltage.” We can also define it as the voltage in a circuit being raised above its upper design limit which will lead to damage or short circuits. Also, say when the supply voltage rises above the rated voltage of the equipment. Overvoltage can be caused by poor regulation of a power source from a utility company, oversized transformers, uneven or varying circuit loading, wiring errors, and electrical insulation or isolation failures. We can separate it in three basic ways that are:
- Internal Overvoltage
- External Overvoltage
- Temporary Overvoltage
What is Undervoltage?
Undervoltage is defined as when the applied voltage drops upto 90% of the rated voltage or less. Undervoltage conditions are caused by the undersized or overloaded utility and facility transformers. During peak demand periods, the demanded power exceeds the capability of the transformer and as a result, the voltage drops.
Circuit Diagrams
Components Required
- Arduino Nano
- ZMPT101B Voltage Sensor
- 16×2 LCD Display
- I2C Module
- 5V Relay Module
- Hi-Link 5V AC-DC Converter
- Veroboard
- Wires
About Parts of Overvoltage And Undervoltage Protection System
Arduino Nano
For the compact build, I choose Arduino Nano despite Arduino UNO. Arduino Nano is a small, flexible microcontroller board using an Atmega328p chip. It can also be used as a substitute for UNO. All the functions are the same in these two boards. The size of its PCB is 18×45 mm. The clock speed is 16Mhz. Its input voltage is 5-12V. There are 30 pins including power, data, analogue, and serial pins on this board.
ZMPT101B Voltage Sensor
The 9V AC step-down transformer has been used here as a voltage sensor. But we could use ZMPT101B One-Phase Voltage Sensor for accurate sensing. It removes messy wire connections. But for reducing cost we use this method. The transformer provides insulation between high AC voltage and low AC voltage. The 9V transformer output terminal has been connected to the voltage divider circuit to bring this voltage to 0-5V. Thus voltage measurement can be made without requiring any high-voltage operation. This sensor can measure upto 270V AC supply voltage.
16×2 I2C Module for LCD Display
16×2 LCD I2C module has an inbuilt PCF8574 I2C chip that converts I2C serial data to parallel data for the LCD. These modules are currently supplied with a default I2C address of either 0x27 or 0x3F. Also, it has an inbuilt contrast adjustment potentiometer.
Flow Diagram of Overvoltage And Undervoltage Protection System
Operation of Overvoltage And Undervoltage Protection System
The usual AC supply voltage at our home is 230V. Due to the voltage fluctuations according to the appliance load, it may vary. But it should be +2% tolerance. In case of an increase of above 2% or vice versa, the attached load may get disconnected. To avoid this problem, we developed an Overvoltage and Undervoltage protector.
When the supply voltage exceeds the specified limit, the relay operates and isolates the load from the electrical circuit. After detecting the fluctuated voltage, an Analog signal of the output voltage is sent to the Arduino. This voltage is unregulated and therefore it varies as the input voltage varies.
Arduino Nano has five Analog input pins and thirteen digital pins. It has an inbuilt Analog-Digital converter. So, five different loads can be connected at the same time. The 13th pin contains an indication LED. Arduino takes an input voltage of 5 to 12 volts and gives an output upto 5V. A preset value with tolerance is given to the Arduino. The Arduino compares the preset value with the Analog read value at A0. If it lies within the limit the relay does not operate.
If it doesn’t lie within the limits, the Arduino checks if it falls into inverse characteristics or definite characteristics. The operating time for definite characteristics is given as 5 seconds, i.e. the relay operates after 5 seconds of fault occurrence. If it falls into inverse characteristics, the tripping time is to be calculated using the formula:
T= t/((V/Vs)-1)
Where T = Trip Time
t = Time Multiplier
V = Voltage at A0
Vs = Source Voltage
When the trip time is set to zero, the relay will work and the circuit will be instantly tripped. When operating in the inverse characteristics or the definite characteristics, if the voltage comes back to the rated voltage, then the relay will go again in reset mode.
Applications of Overvoltage And Undervoltage Protection System
- This system is effective in motor loads. It protects the motor from overvoltage.
- It protects home appliances from sudden voltage damage.
- In some areas where power fluctuations are too much, it is useful for protection.
Calibration Method for Voltage
First, we need to upload the below code to the Arduino. Then we need to open the Serial Plotter from the tools menu in Arduino IDE.
Calibration Code
1 2 3 4 5 6 7 8 9 10 | void setup() { Serial.begin(9600); } void loop() { Serial.println(analogRead(A0)); delay(50); } |
When you upload that code and after opening the serial plotter, you will see this type of signal where the upper part is plain.
By using the potentiometer of the ZMPT101B voltage sensor, you need to calibrate this signal into that sinusoidal signal. After adding some delay to the code to see the actual sinusoidal signal.
1 2 3 4 5 6 7 8 9 | void setup() { Serial.begin(9600); } void loop() { Serial.println(analogRead(A0)); delay(100); } |
I know some distortions still exist on this waveform. But our voltage sensor is now ready for sensing the voltage.
Arduino Code
To compile the Arduino code, we need some libraries.
“emonlib.h” library, and “LiquidCrystal_I2C“ library.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | #include <Wire.h> #include <LiquidCrystal_I2C.h> #include <EmonLib.h> // Include EmonLib // Initialize the LCD with I2C address 0x27 (adjust if needed) LiquidCrystal_I2C lcd(0x27, 20, 4); EnergyMonitor emon1; // Create an instance const int relayPin = 2; // Solid state relay connected to D8 const float overVoltageThreshold = 250.0; // Set your overvoltage threshold const float underVoltageThreshold = 180.0; // Set your undervoltage threshold void setup() { pinMode(relayPin, OUTPUT); lcd.init(); lcd.backlight(); // Display "Electro Gadget" centered on the second row lcd.setCursor(3, 1); lcd.print("Electro Gadget"); delay(2000); lcd.clear(); emon1.voltage(0, 234.26, 1.7); // Voltage: input pin, calibration, phase_shift } void loop() { emon1.calcVI(20, 2000); // Calculate voltage and current float voltage = emon1.Vrms; // Extract the Vrms value lcd.setCursor(0, 0); lcd.print("Voltage: "); lcd.print(voltage); lcd.print("V"); if (voltage > overVoltageThreshold) { lcd.setCursor(0, 1); lcd.print("Status: Overvoltage"); digitalWrite(relayPin, HIGH); // Turn off relay (cut off power) } else if (voltage < underVoltageThreshold) { lcd.setCursor(0, 1); lcd.print("Status: Undervoltage"); digitalWrite(relayPin, HIGH); // Turn off relay (cut off power) } else { lcd.setCursor(0, 1); lcd.print("Status: Normal "); digitalWrite(relayPin, LOW); // Turn on relay (normal operation) } lcd.setCursor(0, 2); lcd.print("Over Limit: "); lcd.print(overVoltageThreshold); lcd.print("V"); lcd.setCursor(0, 3); lcd.print("Under Limit: "); lcd.print(underVoltageThreshold); lcd.print("V"); delay(500); // Delay for stability } |
Liquidcrystal_i2c.h : no such library found error in main code please help
From any online e-commerce site.
Please how can I get all the components used on this project
Yes, it is safe. This is just varying the AC voltage to check whether the system is working or not. Otherwise, you can use the circuit without checking.
So AC dimmer circuit is safe or not?