What is a Relay Module?
A relay module lets you switch AC mains (or high-current DC) using a small 5 V or 3.3 V signal from Arduino or ESP32. It contains a coil, contacts and driver transistor on a PCB — you just wire VCC, GND and a control pin.
Where to use it
- Turn lights, fans, pumps on/off from Wi-Fi (home automation)
- Switch a garden solenoid from a soil moisture sensor
- Control high-current DC motors (with a snubber diode)
Safety
AC mains can kill. Beginners should practise with 12 V DC lamps first, use insulated wire, and always work with mains disconnected.
FAQs
Active-HIGH vs active-LOW modules?
Cheap 5 V relay boards are usually active-LOW — pulling the IN pin LOW closes the relay. Read your module's silkscreen.
Can ESP32 drive a 5 V relay module?
Most 5 V relay modules accept 3.3 V logic on IN pins. Power VCC from 5 V. If the relay won't click, use a level shifter or a 3.3 V-optimised module.

