🎯 Project Objective
To automatically switch the load to the available power source in the following priority order:
-
Mains Power (Highest Priority)
-
Solar Inverter
-
Generator (Backup)
No manual switching required.
🧠Working Principle (Simple)
-
Arduino continuously checks voltage availability of:
-
Mains
-
Solar Inverter
-
Generator
-
-
Based on priority:
-
If Mains ON → Load connects to Mains
-
Else if Solar ON → Load connects to Solar
-
Else if Generator ON → Load connects to Generator
-
-
Switching is done using relay modules
🧩 Required Components
| Component | Quantity |
|---|---|
| Arduino UNO / Nano | 1 |
| 5V Relay Module (3-Channel) | 1 |
| AC Voltage Sensor / Optocoupler (PC817) | 3 |
| Resistors (1k, 10k) | As needed |
| Diodes (1N4007) | 3 |
| LED Indicators | 3 |
| Buzzer (Optional) | 1 |
| AC Sources (Mains, Solar, Generator) | — |
| Load (Bulb/Fan) | 1 |
🔄 System Block Diagram
⚡ Circuit Diagram (Text Representation)
⚠ Important:
Never connect AC directly to Arduino. Use Optocouplers / Voltage Sensors only.
🧑💻 Arduino Code (Working)
Example Scenario
| Mains | Solar | Generator | Output |
|---|---|---|---|
| ON | ON | ON | Mains |
| OFF | ON | ON | Solar |
| OFF | OFF | ON | Generator |
| OFF | OFF | OFF | Power OFF |
📌 Applications
-
Home UPS systems
-
Solar power systems
-
Industries & factories
-
Hospitals
-
Rural electrification






0 comments:
Post a Comment