Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Switches, Relays & Input
  4. ›Relay Modules
Step 1 of 14 in Smart home buildsPart of a learning path.
Next

Component guide · Beginner · 4 min read

Relay Modules

How to Switch Lights and Appliances Safely

By Geekobot Learning Team · Updated 24 Oct 2026

I'm using
Wiring, code and the Run it panels follow your board.
On this page
Short answerHow a relay module worksCOM, NO and NC: which terminal to useWiring a relay module to Arduino or ESP32How much can a relay module really switch?Mechanical relay vs solid-state relay (SSR)Mains safetyTry itCommon mistakesFAQsParts and next steps
Short answer

A relay module is an electrically controlled switch that lets a microcontroller turn a separate circuit on or off, such as a 12 V pump or a mains lamp. A small current energises a coil that moves the contacts: COM connects to NO (normally open) when the relay is on, and to NC (normally closed) when off. Most modules switch on when their input is pulled low.

Key specs at a glance

Coil voltage
5 V or 12 V module versions (3.3 V versions exist)
Coil current
About 70 to 90 mA per 5 V relay
Contact rating (relay body)
Commonly 10 A at 250 V AC / 30 V DC (SRD-05VDC type)
Terminals
COM, NO, NC
Input logic
Usually active-low (IN pulled to GND = on); some have an H/L jumper
Isolation
Optocoupler modules with JD-VCC jumper separate coil and logic power
!Safety: Mains voltage can kill

This part is often wired to 230 V mains. Do all wiring with the plug pulled out, keep mains wires inside a closed box with strain relief, add a fuse, and never touch the board while it is plugged in. If you are new to mains wiring, have an electrician check it before you switch on.

01

How a relay module works

A relay is a coil and a spring-loaded switch. Current through the coil creates a magnetic field that pulls the switch across with an audible click. The module adds a transistor so a microcontroller pin can drive the 70 to 90 mA coil, a flyback diode to absorb the coil's voltage spike, an LED, and screw terminals.

Because the switched circuit only touches the contacts, the relay isolates your 5 V electronics from the load, as long as the module is built and wired properly.

02

COM, NO and NC: which terminal to use

TerminalMeaningUse it when
COMCommon, the moving contactAlways used: one side of the load circuit
NONormally open: connected to COM only when the relay is onThe load should be off by default (lights, pumps)
NCNormally closed: connected to COM when the relay is offThe load should stay on if the controller fails (fail-safe fans, alarms)
COM
Meaning:
Common, the moving contact
Use it when:
Always used: one side of the load circuit
NO
Meaning:
Normally open: connected to COM only when the relay is on
Use it when:
The load should be off by default (lights, pumps)
NC
Meaning:
Normally closed: connected to COM when the relay is off
Use it when:
The load should stay on if the controller fails (fail-safe fans, alarms)
03

Wiring a relay module to Arduino or ESP32

  • ✓VCC to 5 V, GND to ground, IN to a digital pin.
  • ✓Many modules are active-low: digitalWrite(pin, LOW) turns the relay on. Set the pin HIGH in setup() before making it an OUTPUT to avoid a click at boot.
  • ✓ESP32 and Pico: many 5 V modules do not switch reliably from a 3.3 V pin, and some idle their input at 5 V. Use a module rated for 3.3 V logic, or an optocoupler module with JD-VCC (see below).

JD-VCC isolation: on optocoupler modules, remove the JD-VCC jumper, feed 5 V to JD-VCC for the coils from a separate supply, and feed the module's VCC from your board's 3.3 V or 5 V. The input side then never shares current with the coils.

Toggle a relay every 2 seconds (active-low module) · Arduino C++Verify & upload in Electrolark
const int RELAY = 7;

void setup() {
  digitalWrite(RELAY, HIGH);   // off before enabling the output
  pinMode(RELAY, OUTPUT);
}

void loop() {
  digitalWrite(RELAY, LOW);    // relay ON
  delay(2000);
  digitalWrite(RELAY, HIGH);   // relay OFF
  delay(2000);
}
04

How much can a relay module really switch?

The "10A 250VAC" printed on the blue relay is the rating of the contacts, not the whole module. PCB traces, terminals and wire size often limit cheap modules to a few amps. Motors, compressors and LED drivers draw inrush currents many times their running current.

As a rule, run module relays at no more than half their printed rating, and use a contactor or a properly rated SSR for heaters, pumps and motors above about 5 A.

05

Mechanical relay vs solid-state relay (SSR)

Mechanical relaySolid-state relay
SwitchingMoving contacts, clicksSemiconductor, silent
Speed and lifeSlow, contacts wear (about 100,000 operations)Fast, no wear
LoadsAC or DCAC SSRs switch AC only; DC SSRs for DC
Off stateFully openSmall leakage current
HeatLowNeeds a heatsink above a few amps
Switching
Mechanical relay:
Moving contacts, clicks
Solid-state relay:
Semiconductor, silent
Speed and life
Mechanical relay:
Slow, contacts wear (about 100,000 operations)
Solid-state relay:
Fast, no wear
Loads
Mechanical relay:
AC or DC
Solid-state relay:
AC SSRs switch AC only; DC SSRs for DC
Off state
Mechanical relay:
Fully open
Solid-state relay:
Small leakage current
Heat
Mechanical relay:
Low
Solid-state relay:
Needs a heatsink above a few amps
06

Mains safety

Indian mains is 230 V AC at 50 Hz and can kill. If you are not trained to wire mains, use low-voltage loads (5 to 24 V DC) or ready-made certified smart plugs. If you do switch mains: put the relay in a closed, insulated enclosure, switch the live (phase) wire, fuse the circuit, keep low-voltage and mains wiring physically apart, and never work on it while plugged in.

07

Try it: RL time constant calculator

Change the values and the diagram and results update as you type.

08

Common mistakes to avoid

  • !Driving a relay coil straight from a microcontroller pin without a transistor (modules include one; bare relays do not).
  • !Forgetting that the module is active-low and getting the opposite behaviour.
  • !Trusting the 10 A printed on the relay for the whole module.
  • !Using a 5 V relay module with a 3.3 V board without checking that it switches reliably.
  • !Switching inductive DC loads (motors, solenoids) without a flyback diode across the load.
09

Frequently asked questions

What is the difference between NO and NC on a relay?

NO (normally open) connects to COM only when the relay is energised. NC (normally closed) connects to COM when the relay is off. Use NO for loads that should be off by default.

Can I use a 5 V relay module with an ESP32?

Sometimes. Power the module from 5 V, but check that a 3.3 V input switches it reliably. Optocoupler modules with a JD-VCC jumper, or modules labelled 3.3 V compatible, are the safe choice.

Why does my relay module turn on when the pin is LOW?

Most modules are active-low: the input pulls current through an LED or optocoupler to ground. Write LOW for on and HIGH for off, or move the H/L jumper if your module has one.

Can a relay module switch a 230 V appliance?

The relay contacts are usually rated for 250 V AC, but a cheap module's tracks and terminals limit current, and safe enclosure and wiring are essential. For anything above a light bulb, use a properly rated relay or contactor.

Should I choose an SSR or a mechanical relay?

Choose an SSR for frequent, silent switching of AC loads such as heaters. Choose a mechanical relay for DC loads, rare switching or when you need a fully open contact.

Parts for this guide

  • 5V Relay Module with Optocoupler
    ₹74View
  • 12V Relay Module
    ₹160View
  • Solid State Relay Module (SSR)
    ₹129View
  • Timer Delay Relay Module
    ₹175View
Shop Relay ModulesShop Relays

Terms in this guide

RelayAn electrically operated switch: a coil moves contacts that switch a separate circuit.OptocouplerA component that passes a signal through light between an LED and a phototransistor, electrically isolating two circuits.Flyback diodeA diode placed across a coil (relay, motor, solenoid) to absorb the voltage spike when current is switched off.Active-lowA signal that is 'on' when pulled to 0 V. Many relay modules switch on when their input is LOW.SSRSolid-state relay: an electronic switch with no moving parts, controlled like a relay.

Projects that use it

Put this into practice: 161 step-by-step builds in our project library use parts from this guide.

Beginner · 1–2 hoursAutomatic plant watering systemView projectIntermediate · 2 hoursPlant waterer with moisture displayView projectBeginner · 45 minutesAutomatic dusk-to-dawn lightView project
Browse all 161 projects

Keep learning

How-toIntermediateTransistors and MOSFETs as SwitchesA transistor lets a small microcontroller signal switch a much larger current.4 min read · Semiconductors & ICsComponent guideBeginnerPIR Motion Sensor (HC-SR501)A PIR (passive infrared) sensor detects movement of warm bodies by sensing changes in infrared heat across its field of view.3 min read · SensorsComponent guideBeginnerESP32 GuideThe ESP32 is a low-cost 3.3 V microcontroller from Espressif with built-in Wi-Fi and Bluetooth, used for IoT devices, smart-home controllers and web dashboards.5 min read · Boards & MicrocontrollersHow-toIntermediate3.3 V vs 5 V LogicYou need level shifting when a 5 V device sends signals to a 3.3 V board such as an ESP32 or Raspberry Pi Pico, because 5 V on their pins can damage them.4 min read · Prototyping & Wiring

Sources

  • SRD series relay datasheet (Songle)
  • PC817 optocoupler datasheet (Sharp)
  • IS 732 wiring practice guidance (Bureau of Indian Standards) for mains installations

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerHow a relay module worksCOM, NO and NC: which terminal to useWiring a relay module to Arduino or ESP32How much can a relay module really switch?Mechanical relay vs solid-state relay (SSR)Mains safetyTry itCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide1 item · ₹129

Solid State Relay Module (SSR)

Run itChange the inputs and watch the output
Relay ON
LOWPin 7

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question