Relay Modules Explained: How to Switch Lights, Fans and Pumps with Arduino Safely
How a 5V relay module lets an Arduino, ESP32 or Raspberry Pi switch lights, fans, pumps and other mains appliances. Channels, active low triggers, optocoupler isolation, contact ratings and safe wiring.
2 min readBy the module.pk teamاردو میں پڑھیں ↓
Browse all 1 Relay Modules
An Arduino pin gives a few milliamps at 5V. A ceiling fan, a water pump or a light runs on 220V mains. A relay module is the bridge between the two: a small signal from the microcontroller switches an electrically separate contact that can carry the appliance's current.
That makes the relay module the key part in almost every home automation, smart switch and timer project. See our range on the relay modules page.
How a relay module works
Inside each blue relay is a coil and a switch. When the coil is powered, it pulls the switch closed with a click. The module adds a transistor to drive the coil, a diode to protect it, an LED to show its state, and on most boards an optocoupler that keeps the Arduino side electrically isolated from the coil.
Each channel has three screw terminals: COM (common), NO (normally open, connected when the relay is on) and NC (normally closed, connected when it is off). For a light that should turn on with the relay, wire it through COM and NO.

What to check when choosing a relay module
- Channels: 1, 2, 4 or 8 independent switches.
- Coil voltage: 5V modules suit Arduino and most ESP32 boards with a 5V supply.
- Trigger level: many modules are active low, which means a LOW signal turns the relay on.
- Contact rating: printed on the relay, commonly 10A at 250V AC. Stay well below it for motors and heaters.
- Optocoupler isolation for extra protection of your microcontroller.
Safety when switching mains
- Switch off the mains before wiring and keep the 220V side covered in a box.
- Never touch the relay board's underside while it is powered.
- Use proper wire thickness for the load's current.
- For large motors and air conditioners, use a contactor driven by the relay.
Choose a relay with the filters on module.pk
On our relay modules page you can pick the number of channels with one tap, such as 4 channel relay modules, and filter by coil voltage, trigger level and relay type. Pair it with an HC-05 Bluetooth module to control appliances from your phone.
Frequently asked questions
Can a 5V relay switch a 220V fan?
Yes. The 5V is only for the coil. The contacts are rated for mains, commonly 10A at 250V AC.
Why does my relay turn on when the Arduino pin is LOW?
Many relay modules are active low. Write HIGH to turn them off and LOW to turn them on.
اردو میں
ریلے ماڈیول کی پوری سمجھ: Arduino سے لائٹ، پنکھے اور پمپ محفوظ طریقے سے کیسے چلائیں
Arduino کی پن 5V پر چند ملی ایمپیئر دیتی ہے۔ چھت کا پنکھا، پانی کی موٹر یا لائٹ 220V پر چلتی ہے۔ ریلے ماڈیول دونوں کے بیچ پل ہے: مائیکرو کنٹرولر کا چھوٹا سگنل ایک الگ سوئچ چلاتا ہے جو مشین کا کرنٹ اٹھا سکتا ہے۔
اسی لیے ریلے ماڈیول تقریباً ہر ہوم آٹومیشن، سمارٹ سوئچ اور ٹائمر پراجیکٹ کا اہم پارٹ ہے۔ ہمارے ریلے relay modules پیج پر دیکھیں۔
ریلے ماڈیول کیسے کام کرتا ہے
ہر نیلے ریلے کے اندر ایک کوائل اور ایک سوئچ ہوتا ہے۔ کوائل کو بجلی ملے تو وہ کلک کی آواز کے ساتھ سوئچ بند کر دیتی ہے۔ ماڈیول میں کوائل چلانے کے لیے ٹرانزسٹر، حفاظت کے لیے ڈائیوڈ، حالت دکھانے کے لیے LED، اور زیادہ تر بورڈ پر آپٹو کپلر ہوتا ہے جو Arduino کو کوائل سے بجلی کے لحاظ سے الگ رکھتا ہے۔
ہر چینل کے تین پیچ والے ٹرمینل ہیں: COM (کامن)، NO (ریلے آن ہو تو جڑا) اور NC (ریلے بند ہو تو جڑا)۔ جو لائٹ ریلے آن ہونے پر جلے، اسے COM اور NO سے جوڑیں۔

ریلے ماڈیول چنتے وقت کیا دیکھیں
- چینل: 1، 2، 4 یا 8 الگ سوئچ۔
- کوائل وولٹیج: 5V ماڈیول Arduino اور 5V سپلائی والے زیادہ تر ESP32 بورڈ کے ساتھ لگتے ہیں۔
- ٹرگر لیول: بہت سے ماڈیول active low ہوتے ہیں، یعنی LOW سگنل پر ریلے آن ہوتا ہے۔
- کانٹیکٹ ریٹنگ: ریلے پر لکھی ہوتی ہے، عام طور پر 250V AC پر 10A۔ موٹر اور ہیٹر کے لیے اس سے کافی نیچے رہیں۔
- Arduino کی مزید حفاظت کے لیے آپٹو کپلر آئسولیشن۔
بجلی کا کام کرتے وقت حفاظت
- تار جوڑنے سے پہلے مین بجلی بند کریں اور 220V والا حصہ ڈبے میں بند رکھیں۔
- بجلی ہو تو ریلے بورڈ کے نیچے کبھی ہاتھ نہ لگائیں۔
- مشین کے کرنٹ کے حساب سے صحیح موٹائی کی تار لگائیں۔
- بڑی موٹر اور AC کے لیے ریلے سے کونٹیکٹر چلائیں۔
module.pk کے فلٹرز سے ریلے چنیں
ہمارے relay modules پیج پر ایک ٹچ میں چینل چنیں، جیسے 4 چینل ریلے ماڈیول، اور کوائل وولٹیج، ٹرگر لیول اور ریلے کی قسم سے فلٹر کریں۔ فون سے مشینیں چلانے کے لیے ساتھ HC-05 بلوٹوتھ ماڈیول لگائیں۔
اکثر پوچھے جانے والے سوال
کیا 5V ریلے 220V کا پنکھا چلا سکتا ہے؟
جی ہاں۔ 5V صرف کوائل کے لیے ہے۔ کانٹیکٹ مین بجلی کے لیے بنے ہیں، عام طور پر 250V AC پر 10A۔
Arduino پن LOW ہو تو میرا ریلے آن کیوں ہوتا ہے؟
بہت سے ریلے ماڈیول active low ہیں۔ بند کرنے کے لیے HIGH اور آن کرنے کے لیے LOW لکھیں۔
