Skip to content

AC Over and Under Voltage Protection Device

How to Make an AC Over and Under Voltage Protection Device with Arduino

This article explains how to design and build an AC over and under voltage protection device using Arduino. The AC over and under voltage protection device helps safeguard electrical appliances from voltage fluctuations. By following this step-by-step guide, you will learn the circuit diagram, working principle, and the bill of materials needed for the AC over and under voltage protection device. The AC over and under voltage protection device uses an LM358 IC, resistors, relay, and Arduino.

You will also learn how the AC over and under voltage protection device senses voltage levels, disconnects unsafe supply, and reconnects automatically when conditions are stable. This AC over and under voltage protection device project is beginner-friendly yet practical for home and industrial applications. Build your own AC over and under voltage protection device today to protect equipment effectively.


Introduction

Voltage fluctuations are common in many areas and can lead to premature failure of appliances. An AC over and under voltage protection device is designed to automatically cut off the load when the voltage is outside a safe range. This prevents overheating, insulation damage, and malfunction of electronic systems.

Using Arduino as the control unit, this project provides flexibility, ease of calibration, and visual monitoring with an LCD.


Working Principle

The device continuously senses the input AC voltage through a resistor divider network. This reduced voltage is fed into the LM358 operational amplifier, which acts as a buffer and comparator. The processed signal is read by the Arduino’s analog input pin.

  • If the voltage is within the set safe range (e.g., 190–250V AC), the relay energizes and powers the load.
  • If the voltage goes below or above the threshold, Arduino deactivates the relay, disconnecting the load instantly.
  • The LCD shows real-time voltage readings and the relay status.
  • Push buttons allow setting upper and lower cut-off values as per requirement.

Circuit Diagram Explanation

  • Voltage Divider Network: Multiple 470kΩ resistors in series reduce the high AC voltage to a safe measurable level for Arduino (0–5V).
  • LM358 IC: Conditions the signal, ensures stability, and isolates the microcontroller.
  • Arduino Uno/Nano: Reads analog voltage, compares it with threshold limits, and controls the relay.
  • Relay Driver (BC547 Transistor + Diode): Transistor amplifies current to drive the relay coil. The diode provides flyback protection.
  • Relay: Connects/disconnects the AC line to the load.
  • LCD (I2C): Displays voltage and system status.
  • Push Buttons: Allow calibration and setting of under/over-voltage limits.

Download Circuit Diagram

AC Over and Under Voltage Protection Device Circuit Diagram
10/3/2025

 Materials for the Project

ComponentValue/ModelQuantityBuy Link
Arduino NanoATmega328P1Buy Here
LM358 ICDual Op-Amp1Buy Here
Resistors470kΩ, 10kΩ, 4.7kΩ, 2.2kΩ, 1kΩAs per circuitBuy Here
TransistorBC547 NPN1Buy Here
Relay5V SPDT1Buy Here
Diode1N41481Buy Here
Push ButtonsMomentary3Buy Here
LCD Display16×2 with I2C module1Buy Here
Terminal Blocks2-pin3Buy Here
Jumper WiresMale/FemaleAs requiredBuy Here
Power Supply5V regulated1Buy Here

Useful Tools 

ToolQuantityPurpose / NotesClick & Buy
Soldering Iron Kit1For making permanent connectionsClick & Buy
Solder Wire (60/40, 0.8mm)1Electrical solderingClick & Buy
Wire Stripper & Cutter1Stripping jumper wiresClick & Buy
Mini Screwdriver Set1For module and relay terminal screwsClick & Buy
Multimeter1Testing voltages and continuityClick & Buy
Hot Glue Gun (optional)1Securing components in placeClick & Buy
Small Pliers1Holding and bending wiresClick & Buy
Heat Shrink Tubing Set1Insulating exposed wiresClick & Buy

Step-by-Step Building Guide

Step 1: Power Connections

  • Connect a 2-pin terminal block to Arduino’s 5V and GND.
  • This supplies power to external components.

Step 2: LM358 IC Setup

  • Pin 4 → GND,
  • Pin 8 → +5V.
  • Connect 10kΩ resistor between pins 6 and 7.
  • Connect 4.7kΩ resistor from pin 6 to GND.
  • Connect 2.2kΩ resistor from pin 5 to GND.
  • Series of 470kΩ resistors form the voltage divider from AC line to pin 5.

Step 3: LCD Connection

  • VCC → 5V,
  • GND → GND,
  • SDA → A4,
  • SCL → A5.

Step 4: Push Buttons

  • First button: D3 → GND.
  • Second button: D4 → GND.
  • Third button: D5 → GND.

Step 5: Relay Driver Circuit

  • BC547 transistor: Pin 3 → GND.
  • 1kΩ resistor from Arduino D2 → base of BC547 (pin 2).
  • Relay coil: one end → +5V, other → transistor collector (pin 1).
  • Flyback diode (1N4148) across relay coil.

Step 6: Relay to Load

  • AC Line → Relay common terminal.
  • Relay NO (normally open) → Output terminal block.
  • Neutral connected directly to load.

Arduino Code Upload

Upload the Arduino sketch to read ADC values, calculate AC RMS voltage, compare with thresholds, and control the relay accordingly. The code also handles LCD display and button calibration.

Arduino Code


Testing and Operation

  1. Power up the circuit.
  2. Set under and over-voltage limits using buttons.
  3. Observe LCD showing real-time voltage.
  4. When voltage goes outside the safe range, relay clicks OFF.
  5. When voltage stabilizes, relay automatically clicks ON, reconnecting the load.

Applications

  • Protecting refrigerators, air conditioners, and washing machines.
  • Safeguarding computers, routers, and sensitive electronics.
  • Industrial motor protection against voltage fluctuations.
  • Automatic cut-off for rural areas with unstable power supply.

FAQs

Q1: Can I set custom voltage limits?
Yes, the push buttons allow you to set desired upper and lower thresholds.

Q2: What happens if the Arduino hangs?
A watchdog timer or hardware bypass can be added for extra reliability.

Q3: Can I use ESP32 instead of Arduino?
Yes, ESP32 provides extra features like Wi-Fi monitoring of voltage data.

Q4: Is the circuit safe for direct AC?
The voltage divider ensures safe scaling, but always use proper insulation and caution when working with mains AC.

Q5: What load capacity can this handle?
Depends on relay rating. A 5A or 10A relay is suitable for most home appliances.


Conclusion

The AC over and under voltage protection device is a practical DIY solution to protect electrical appliances from dangerous voltage fluctuations. Using Arduino, LM358 IC, and a simple relay driver circuit, this project is affordable and reliable for both home and small industrial use. By building this device, you gain hands-on experience with analog sensing, voltage dividers, and relay control.

Leave a Reply

Your email address will not be published. Required fields are marked *