Relay Modules with Arduino: Safe 220V Switching in India

Relay Modules with Arduino: Safe 220V Switching in India

Quick answer: A 5V relay module (from Rs.45) lets an Arduino switch mains. Three rules: the coil needs its own 5V supply, never a GPIO; the trigger is active LOW, so the relay clicks on when you write LOW; and 10A/250VAC leaves little margin on Indian mains. Mains wiring is electrician work.

Written and fact-checked by Compoden's engineering team, India. Every price, pin, rating and current figure below is read from our live catalogue record for the exact part named. Where this post talks about Indian mains voltage or electrical regulation, it is labelled — that is not something our catalogue can verify. Published 18 August 2026 · Last updated 18 August 2026.

What this page covers. Everything below is the low-voltage side — how the module talks to your Arduino, how much current its coil needs, what its ratings mean, and how to choose between the modules we stock. This page deliberately contains no mains wiring instructions: no terminal-by-terminal walkthrough, no live/neutral diagram, and no step-by-step procedure for the high-voltage side. That is not an oversight. A relay module on an open breadboard with mains on its screw terminals is not a prototype, it is an accident waiting for a hand, and a blog post is the wrong place to learn that half of the job.

5V relay modules in our catalogue — records checked August 2026
Module Price (Rs.) Channels Control pins Contact rating
5V Single Channel Relay Module 45 1 VCC, GND, IN 10A @ 250VAC / 30VDC
5V Dual Channel Relay Module (opto) 106 2 VCC, GND, IN1, IN2 10A @ 250VAC
4-Channel 5V Relay Module (SRD-05VDC, opto) 400 4 VCC, GND, IN1-IN4 10A @ 250VAC / 30VDC
8 Channel 5V Relay Shield (ESP32 DEVKIT V1) 790 8 (SPDT) Shield — stacks on the board 10A @ 250VAC / 30VDC

Verdict in one line: buy one channel per thing you actually switch — the per-channel price barely moves between the 1-channel and the 2-channel board, and the coil current is what limits you, not the price.

Why does the relay turn on when you write LOW?

Because these modules are active LOW, and it is the single most common source of "my relay is inverted". Every relay module in our catalogue records this the same way: the IN pin activates the relay when it is driven LOW, not HIGH. Our records list it under known issues in almost those words — "active-low trigger (IN pin LOW activates relay) can confuse beginners expecting active-high". So digitalWrite(RELAY_PIN, LOW) closes the relay and HIGH opens it. The practical consequence is worse than a backwards line of code: at power-up, before your setup() runs, an Arduino pin sits in a floating input state, and the relay may click ON for a moment. Set the pin HIGH before you call pinMode(pin, OUTPUT) if that momentary switch-on matters — which it does for anything driving a motor, a pump or a heater.

Can you power a relay module from an Arduino pin?

No, and this is where projects burn. Our records put a relay module's peak current at 80mA, while the Arduino Uno's recommended per-pin limit is about 20mA — the coil alone wants four times what a single pin should supply. The whole-board budget is worse: the Uno is limited to roughly 200mA across all pins together, and our record for one of the two 4-channel boards we stock (the 38-pin ESP32 variant, Rs.390) states it "requires an external 5V supply (≥500mA)". That is 2.5x the Uno's entire pin budget for one relay board. The IN pin is a signal and draws almost nothing — that one connects to a GPIO. VCC and GND go to a separate 5V supply, with its ground tied to the Arduino's ground so the signal has a reference.

Relay current demand against what an Arduino Uno can supply An Arduino Uno pin should supply about 20 milliamps and the whole board about 200 milliamps across all pins. A relay module peaks at 80 milliamps, and a 4-channel board's record specifies an external 5 volt supply of at least 500 milliamps. Current: what the Uno supplies vs what relays want — drawn to scale Uno, per pin~20 mA Uno, all pins~200 mA Relay peak80 mA — 4x a single pin 4-ch board≥500 mA external supply — 2.5x the Uno's whole-board budget Bar widths proportional at 1px per mA: 500mA = 500px, 200mA = 200px, 80mA = 80px, 20mA = 20px. Green bars are what an Arduino Uno can supply; orange bars are what relay boards ask for.
A single relay coil's 80mA peak is four times what an Arduino Uno pin should supply, and the record for our 38-pin ESP32 4-channel board calls for an external 5V supply of at least 500mA — two and a half times the Uno's entire across-all-pins budget. Give relay coils their own supply, and share only the ground.

Is 10A at 250VAC enough for Indian mains?

It depends entirely on the load, and the margin is thinner than it looks. Indian mains is nominally 230V AC at 50Hz — that figure is general knowledge, not something our catalogue verifies — against a contact rated to 250VAC, so the voltage headroom is about 8%. On current, 10A at 230V is roughly 2,300 watts on paper. A ceiling light, a fan, a phone charger or a small pump sits far below that and is entirely comfortable. A geyser, an iron, a microwave or an air conditioner does not, and should not go anywhere near a hobby relay module. Treat the printed rating as an absolute ceiling reached under ideal conditions, not a working figure: derate hard, and if the load is anywhere close to the number on the relay, the relay is the wrong device.

What is inrush current and why does it weld relay contacts?

A motor, a pump or a transformer draws far more current at the instant it starts than it does while running, and that surge passes through the relay contacts as they close. Our record for the 4-channel module lists "contact welding if switching high inrush loads" among its failure symptoms — the contacts literally fuse together and the relay stops being a switch, staying permanently ON. This is the failure mode to fear most, because it fails in the dangerous direction. Two mitigations: size the relay far above the running current of an inductive load rather than just above it, and add snubbing on the load side — our records note these modules are "not suitable for inductive loads without snubber" and that the coil side needs a flyback diode, which these boards usually have built in but not always.

Does the optocoupler actually isolate your Arduino from the mains?

Only if you wire it to. This is the most important line in this post and it comes straight from our records: "optocoupler may not provide true galvanic isolation if power supply is shared". The optocoupler on these boards separates the control signal from the relay coil circuit — but if the coil's 5V comes from the same supply as the Arduino, that separation is bypassed and you have an isolated-looking board that is not isolated. Real isolation means the relay coil gets its own supply, distinct from the one powering your microcontroller, with the isolation jumper (usually marked JD-VCC) removed. If you leave the factory jumper in place and feed everything from one 5V rail, the module is a convenient relay driver, not an isolation barrier — and you should not pretend otherwise when there is 230V on the other side.

Which relay module should you buy?

One channel per thing you switch. For a single light, pump or fan, the 5V Single Channel Relay Module (Rs.45) does the job at the lowest price here. For two loads, the 5V Dual Channel Relay Module with Optocoupler (Rs.106) works out at Rs.53 a channel — barely more than the single. For a home-automation build with several circuits, the 4-Channel 5V Relay Module with Optocoupler (SRD-05VDC) (Rs.400) is designed for 3.3V logic and drops onto a 30-pin ESP32. For a larger install, the 8 Channel 5V Relay Shield (Rs.790) stacks on an ESP32 DEVKIT V1. All available cash on delivery across India — and all of them need their own 5V supply for the coils.

What should you read next?

A relay controlling a pump from a sensor reading is the classic first use — our automatic plant watering system build walks that end to end at low voltage, which is the safe place to learn this. Check the Arduino Uno pinout reference for the current limits quoted above, and the soil moisture sensor guide for the input side of a watering build.

Planning a switching project? Open Soldr, describe what you need to switch and how it is powered, and it will pick the module and the wiring.

Frequently asked questions

Relay module ko Arduino se kaise chalayein?

IN pin ko Arduino ke kisi digital pin se jodein - yeh sirf signal hai, current bahut kam leta hai. Lekin VCC aur GND ko alag 5V supply se dein, Arduino ke pin se nahi: relay coil ka peak 80mA hai jabki Uno ka per-pin limit sirf ~20mA hai. Dono grounds ko aapas mein zaroor jodein. Aur yaad rakhein - yeh module active LOW hai, yani digitalWrite(pin, LOW) karne par relay ON hota hai. 220V wiring hamesha qualified electrician se karwayein.

Why is my relay module inverted or always on?

Because these modules are active LOW: writing LOW to the IN pin turns the relay ON and HIGH turns it OFF. Our catalogue records list this under known issues for every relay module we stock. There is also a power-up effect worth knowing — before setup() runs, the pin floats, so the relay can click on briefly. If that momentary switch-on matters, write the pin HIGH before calling pinMode(pin, OUTPUT).

Can a relay module be powered from the Arduino 5V pin?

Not reliably, and not for more than one channel. Our records put a relay module's peak current at 80mA, and the record for one of our 4-channel boards specifies an external 5V supply of at least 500mA. An Arduino Uno's recommended per-pin limit is about 20mA and its whole-board budget across all pins is roughly 200mA. Give the coils their own 5V supply, connect the grounds together, and send only the IN signal from a GPIO.

Is a relay module safe for 220V appliances?

The contacts are rated 10A at 250VAC, which is above Indian mains at a nominal 230V — but the headroom is only about 8% on voltage, and 10A is an absolute ceiling rather than a working figure. Lights, fans, chargers and small pumps are comfortable; geysers, irons, microwaves and air conditioners are not. Inductive loads can weld the contacts closed through inrush current, which is a failure in the dangerous direction. Enclose the module, never work on a live circuit, and have a qualified electrician make the mains connections.

What is the price of a relay module in India?

At Compoden, the 5V Single Channel Relay Module is Rs.45, the 5V Dual Channel Relay Module with Optocoupler is Rs.106, the 4-Channel 5V Relay Module with Optocoupler (SRD-05VDC) is Rs.400 and the 8 Channel 5V Relay Shield for the ESP32 DEVKIT V1 is Rs.790. All available with cash on delivery across India. Prices checked August 2026.

Back to blog

Open this project in the Soldr app → What is Soldr.ai → parts, wiring and code for what this guide builds