AC Protection Device Using Arduino and LM358 IC
In this article, we will build an AC protection device using Arduino, LM358 IC, relay, and other electronic components. The AC protection device is designed to safeguard electrical appliances from current surges, voltage fluctuations, and overloads. With an AC protection device, users can enhance the safety of household electronics. This project demonstrates step-by-step connections, circuit explanation, and working of the AC protection device in detail.
Introduction
Electrical appliances like refrigerators, fans, computers, and televisions are highly sensitive to over-voltage, under-voltage, and current overloads. Without proper safety mechanisms, these devices can get damaged permanently, leading to expensive repairs or replacements.
This is where an AC protection device comes into play. By automatically cutting off the supply when abnormal conditions occur, this system ensures the safe operation of household and industrial appliances.
In this project, we are going to design an AC protection device using:
Arduino for control logic.
LM358 IC for signal processing.
Relay module for switching AC load.
Current transformer for current sensing.
Push buttons & LCD for user interaction and monitoring.
This article covers the working principle, detailed circuit explanation, components list, step-by-step build guide, and FAQs to help you fully understand the design and implementation.
Materials for the Project
Component | Quantity | Description | Buy Link |
---|---|---|---|
Arduino Nano | 1 | Microcontroller board | Buy Here |
LM358 IC | 1 | Dual operational amplifier | Buy Here |
Current Transformer (CT) | 1 | For current sensing | Buy Here |
Resistors | 10+ | 10K, 47Ω, 4.7K, 2.2K, 470K, 1K | Buy Here |
Push Buttons | 3 | For setting/resetting functions | Buy Here |
LCD 16×2 with I2C | 1 | Display module | Buy Here |
BC547 Transistor | 1 | NPN transistor | Buy Here |
1N4148 Diode | 1 | General-purpose diode | Buy Here |
5V Relay | 1 | SPDT relay for AC switching | Buy Here |
Terminal Blocks | 3 | For AC connections | Buy Here |
Jumper Wires | As needed | For breadboard connections | Buy Here |
Breadboard / PCB | 1 | For circuit assembly | Buy Here |
Useful Tools
Tool | Quantity | Purpose / Notes | Click & Buy |
---|---|---|---|
Soldering Iron Kit | 1 | For making permanent connections | Click & Buy |
Solder Wire (60/40, 0.8mm) | 1 | Electrical soldering | Click & Buy |
Wire Stripper & Cutter | 1 | Stripping jumper wires | Click & Buy |
Mini Screwdriver Set | 1 | For module and relay terminal screws | Click & Buy |
Multimeter | 1 | Testing voltages and continuity | Click & Buy |
Hot Glue Gun (optional) | 1 | Securing components in place | Click & Buy |
Small Pliers | 1 | Holding and bending wires | Click & Buy |
Heat Shrink Tubing Set | 1 | Insulating exposed wires | Click & Buy |
Circuit Diagram Explanation
The circuit of the AC protection device can be divided into the following functional blocks:
Power Supply Section
Arduino operates at 5V.
The LM358 IC also uses 5V from the Arduino.
Current Sensing Section
A current transformer (CT) senses the AC current drawn by the load.
The CT output is fed into the LM358 for signal conditioning.
Resistors create a proper biasing and voltage divider network for stable operation.
Voltage Protection Section
Multiple 470K resistors are used to scale down the AC input voltage for safe detection.
The scaled signal is fed into LM358 for monitoring.
Control Section (Arduino)
The Arduino reads processed signals from LM358.
Push buttons are connected for user settings (trip limits, reset, manual control).
LCD displays current, voltage, and device status.
Switching Section
A BC547 transistor acts as a driver to control the relay coil.
The relay switches the AC load ON/OFF depending on Arduino’s decision.
A diode (1N4148) is placed across the relay coil for back-EMF protection.
Download Circuit Diagram

Step-by-Step Guide to Build the AC Protection Device
Step 1: Connect the Arduino
Place the Arduino Nano on the breadboard or PCB.
Provide it with a regulated 5V supply.
Step 2: LM358 IC Wiring
Pin 4 → Ground.
Pin 8 → 5V supply from Arduino.
Step 3: Resistor Network
Connect 10K resistor between pins 1 and 2 of LM358.
Connect another 10K resistor between pin 2 and ground.
Connect 47Ω resistor between pin 3 and ground.
Connect 10K resistor between pin 7 and pin 6.
Connect 4.7K resistor between pin 6 and ground.
Connect 2.2K resistor between pin 5 and ground.
Chain multiple 470K resistors in series between pin 5 and AC supply for voltage scaling.
Step 4: Current Transformer Connection
Connect CT’s secondary output across pin 3 and ground of LM358.
Step 5: LCD Display
VCC → 5V, GND → Ground.
SDA → A4 (Arduino).
SCL → A5 (Arduino).
Step 6: Push Buttons
Button 1: One pin → D3, other → Ground.
Button 2: One pin → D4, other → Ground.
Button 3: One pin → D5, other → Ground.
Step 7: Relay Driver Circuit
BC547 transistor → Pin 3 to ground.
1K resistor between transistor base and Arduino D2.
Relay coil connected between 5V and collector of transistor.
1N4148 diode across relay coil.
Step 8: AC Load Connection
Relay common → AC Line.
Relay NO (Normally Open) → Load.
Neutral directly → Load.
Step 9: Upload the code
So we have completed all the connections. Now let’s upload the code to Arduino and test the project.
Working Principle
When the AC protection device is powered ON, the current transformer monitors the AC load current.
The LM358 processes both current and voltage sensing signals and sends them to the Arduino.
Arduino compares the values with safe limits set by the user.
If the current exceeds the limit or voltage goes outside safe range, Arduino switches OFF the relay.
The relay disconnects the load, protecting the device from damage.
The LCD continuously displays current, voltage, and load status.
Push buttons allow resetting the system, setting thresholds, and manual override.
Applications of AC Protection Device
Home appliances protection (TV, refrigerator, washing machine).
Industrial motors and pumps.
Office equipment like computers and printers.
General AC power safety systems.
FAQs
Q1. What is the main function of an AC protection device?
The AC protection device automatically disconnects the load when abnormal conditions like over-current, over-voltage, or under-voltage occur.
Q2. Can I use this project for three-phase systems?
This design is for single-phase AC loads. For three-phase, additional CTs and monitoring circuitry are required.
Q3. Which microcontroller can I use other than Arduino Nano?
You can use Arduino Nano, ESP32, or even PIC/AVR microcontrollers with minor code changes.
Q4. Is it safe to directly connect AC to Arduino?
No! That’s why resistors, CT, and LM358 are used to scale and isolate signals. Direct AC connection to Arduino will destroy it.
Q5. What rating of relay should I use?
Use a relay with a current rating higher than your load, typically 5A–10A for household appliances.