Best Relay Modules for ESP32: 9 SunFounder, Iot Relay, Teyleten, HiLetgo, Inkbird SSR and SainSmart Picks Compared (Buying Guide)

⚠️ Affiliate Disclosure: This post contains Amazon affiliate links. If you purchase through our links, we may earn a small commission at no extra cost to you. Every product below was checked against its live Amazon listing before publishing. Prices change often, so we don’t list them here. Tap any Buy Here button to see the current price on Amazon.
ESP32 Module Buying Guide

⚑ Best Relay Modules for ESP32

Switch lamps, pumps, fans, heaters and door strikes from an ESP32. Here are 9 relay picks, from native 3.3V boards and multi-channel modules to silent solid state relays and a fully enclosed mains power relay.

βœ… 9 Relays Compared βœ… Verified Amazon ASINs βœ… 3.3V Logic Explained βœ… Honest Pros & Cons

A GPIO pin on an ESP32 can only source a few milliamps at 3.3V, so anything bigger than an LED needs help. A relay module lets that tiny signal switch a separate circuit: a 12V pump, a 24V irrigation valve, a garage door button or a mains lamp. Pair it with Wi-Fi, MQTT, ESPHome or a small ESP-IDF web server and you have a smart switch you fully control.

The catch is that most cheap relay boards were designed for 5V Arduinos. With an ESP32 they may click unreliably, never turn off, or load the 3.3V regulator. This guide compares 9 relay picks and explains which ones work directly from 3.3V logic, which need a 5V coil supply, and when a solid state relay is the better choice.

πŸ’‘ Before you buy: Check three things. Coil voltage: a 5V board needs a 5V supply for its coils even if the ESP32 drives the input. Trigger level: many boards are low-level trigger, which means the relay is ON when the pin is LOW, so it can briefly switch on at boot. Load: the contact rating printed on the relay is a best case. If you plan to switch mains voltage and are not confident wiring it, choose the enclosed Iot Relay instead of a bare board.

⚑ Quick Comparison: All 9 Relays

RelaySwitchingControl SideBest ForBuy
πŸ₯‡ SunFounder 4-Ch4 x 10A mechanical5V coil, opto inputsBest OverallBuy Here β†’
πŸ›‘οΈ Iot RelayEnclosed mains outlets3 to 48VDC inputSafest for MainsBuy Here β†’
πŸ”‹ Teyleten 3.3V1 x 10A mechanical3.3V coil, high triggerBest Native 3.3VBuy Here β†’
πŸ”€ HiLetgo 1-Ch1 x 10A mechanical5V coil, high/low jumperBest Selectable TriggerBuy Here β†’
✌️ SunFounder 2-Ch2 x 10A mechanical5V coil, opto inputsBest for Two LoadsBuy Here β†’
πŸŽ›οΈ SunFounder 8-Ch8 x 10A mechanical5V coil, opto inputsBest Multi-ZoneBuy Here β†’
πŸ”₯ Inkbird SSR-40DA40A rated SSR, AC load3 to 32VDC inputBest for Heaters and PIDBuy Here β†’
πŸ”‡ SainSmart 8-Ch SSR8 x 2A SSR, AC loadLow-voltage logic inputBest Silent AC SwitchingBuy Here β†’
🏭 SainSmart 16-Ch 12V16 x 10A mechanical12V coilBest for Big PanelsBuy Here β†’

Specs come from the manufacturers and the live Amazon listings. Star scores below are our ratings.

πŸ” What Matters in an ESP32 Relay

πŸ”Œ

Coil Voltage

5V relays need a 5V rail for the coils. 3.3V relays run from the ESP32’s own supply but add load to its regulator.

🎚️

Trigger Level

High-level trigger turns on when the pin goes HIGH. Low-level boards turn on when LOW and may click at boot unless you set the pin early.

🧱

Isolation

Optocoupler inputs and a separate JD-VCC coil supply keep relay noise and back-EMF away from the ESP32.

βš™οΈ

Mechanical vs SSR

Mechanical relays switch AC or DC and click. SSRs are silent and fast but usually switch AC only and need heat sinking.

πŸ”₯

Load and Derating

Motors, pumps and LED drivers draw big inrush currents. Run a relay well below its printed rating for a long life.

πŸ† Detailed Reviews: The Top Two

πŸ₯‡ BEST OVERALL RELAY MODULE

SunFounder 4-Channel 5V Relay Module

⭐ 4.6/5 · Our Rating · The Classic Board
4
CHANNELS
10A
250VAC / 30VDC
Opto
ISOLATED INPUTS
JD-VCC
SEPARATE COIL SUPPLY
Buy on Amazon β†’
SunFounder 4-Channel 5V Relay Module for ESP32

The SunFounder four-channel board is the relay module most ESP32 tutorials are written around, and for good reason. It carries four relays rated 10A at 250VAC or 30VDC, each with an optocoupler input and a status LED, and screw terminals for the common, normally open and normally closed contacts. Inputs are low-level trigger, so a LOW pin turns a relay on. For the most reliable results with an ESP32, remove the JD-VCC jumper, feed the coils from a 5V supply on JD-VCC and power the input side from 3.3V so the GPIO pins switch the optocouplers cleanly. Four channels cover most home automation builds: a light, a fan, a pump and a spare.

βœ… Pros
  • Four channels on one board
  • Optocoupler inputs
  • Separate coil supply option
  • Huge tutorial support
❌ Cons
  • Low-level trigger can click at boot
  • Needs a 5V coil supply
  • Bare mains terminals
🎯 Verdict: The best all-round relay board for ESP32 home automation projects.

πŸ‘‰ Check Price on Amazon β†’

πŸ›‘οΈ SAFEST FOR MAINS LOADS

Iot Relay Enclosed Power Relay

⭐ 4.8/5 · Our Rating · No Exposed Mains Wiring
3 to 48V
DC CONTROL INPUT
4
OUTLETS
Enclosed
NO OPEN TERMINALS
Breaker
BUILT IN
Buy on Amazon β†’
Iot Relay Enclosed Power Relay for ESP32

If you want an ESP32 to switch a plug-in appliance, the Iot Relay from Digital Loggers removes the riskiest part of the job. It is a power strip with the relay sealed inside: you plug the lamp, heater or fan into it and connect two low-voltage wires from the ESP32 to its green control terminal. The control input accepts a wide 3 to 48VDC range, so a 3.3V GPIO pin drives it directly, and its four outlets include normally off, normally on and always on sockets. A built-in breaker adds overload protection. It is bulkier than a bare module and switches all controlled outlets together, but no mains wiring is ever exposed on your bench.

βœ… Pros
  • Drives straight from 3.3V GPIO
  • No exposed mains wiring
  • Built-in breaker
  • Ideal for plug-in appliances
❌ Cons
  • One control channel
  • Bulky
  • US plug style only
🎯 Verdict: The first choice for switching mains appliances safely from an ESP32.

πŸ‘‰ Check Price on Amazon β†’

πŸ”§ Detailed Reviews: More Relay Picks

πŸ”‹ BEST NATIVE 3.3V RELAY Β· ⭐ 4.5/5

3. Teyleten Robot 3V/3.3V Relay Module (5 pack)

3V/3.3V coil Β· high-level trigger Β· optocoupler Β· 10A 250VAC / 30VDC Β· pack of 5
Buy Here β†’
Teyleten Robot 3V/3.3V Relay Module (5 pack) for ESP32

Most relay boards assume 5V. This Teyleten module uses a 3V relay coil with a high-level trigger and optocoupler isolation, so an ESP32 can power it from its 3.3V pin and switch it with a GPIO: HIGH means on, which matches how most ESP-IDF and ESPHome code is written. The relay is rated 10A at 250VAC or 30VDC per the listing, and it comes as a five-pack, handy for spreading single relays around a project. The coil current comes from your 3.3V regulator, so check its headroom if you run several at once.

βœ… Pros: Works directly from 3.3V; high trigger; five-pack value.
❌ Cons: Coil loads the 3.3V rail; one channel per board.
🎯 Verdict: The simplest relay to wire to an ESP32 with no 5V supply in sight.
πŸ”€ BEST SELECTABLE TRIGGER Β· ⭐ 4.5/5

4. HiLetgo 5V One-Channel Relay Module (2 pack)

5V coil Β· optocoupler Β· high or low trigger jumper Β· pack of 2
Buy Here β†’
HiLetgo 5V One-Channel Relay Module (2 pack) for ESP32

This HiLetgo two-pack solves the boot-click problem with a jumper that selects high or low trigger. Set it to high and the relay stays off while the ESP32 boots and its pins float. Each board has optocoupler isolation, a low trigger current and a single 5V relay with normally open and normally closed contacts. It needs 5V on VCC for the coil, which a DevKit’s 5V or VIN pin can supply when powered from USB. A good choice when you only need one or two channels in different places.

βœ… Pros: Trigger jumper; optocoupler; compact.
❌ Cons: Needs 5V; one channel per board.
🎯 Verdict: The friendliest 5V single relay for ESP32 boards.
✌️ BEST FOR TWO LOADS · ⭐ 4.6/5

5. SunFounder 2-Channel 5V Relay Module

2 channels Β· optocoupler Β· low-level trigger Β· 10A 250VAC / 30VDC Β· LED per channel
Buy Here β†’
SunFounder 2-Channel 5V Relay Module for ESP32

The two-channel version of our top pick, with the same 10A relays, optocoupler inputs, LEDs and JD-VCC jumper for a separate coil supply. Two channels suit classic pairings such as a heater plus a fan, a pump plus a valve, or a garage door button plus a light. It is small enough to fit beside an ESP32 DevKit in a compact enclosure. Like the four-channel board it is low-level trigger, so set the GPIO HIGH early in your code to avoid a click at boot.

βœ… Pros: Compact; proven design; separate coil supply option.
❌ Cons: Low-level trigger; needs 5V for coils.
🎯 Verdict: The right size for most two-device ESP32 projects.
πŸŽ›οΈ BEST MULTI-ZONE BOARD Β· ⭐ 4.6/5

6. SunFounder 8-Channel 5V Relay Module

8 channels Β· optocoupler Β· low-level trigger Β· 10A relays Β· LED per channel
Buy Here β†’
SunFounder 8-Channel 5V Relay Module for ESP32

Eight 10A relays on one board with optocoupler inputs and status LEDs, listed as compatible with Arduino, ARM, AVR, STM32 and Raspberry Pi boards. With an ESP32 it suits sprinkler zones, aquarium and grow-tent controllers, and lighting panels. Plan the power supply: with several coils on at once you need a solid separate 5V feed on JD-VCC rather than the DevKit’s USB 5V. Eight GPIOs is a lot, so many builders drive it through an I2C expander such as an MCP23017 or PCF8574.

βœ… Pros: Eight channels; trusted brand; status LEDs.
❌ Cons: Needs a dedicated 5V supply; uses many pins.
🎯 Verdict: The best value way to control many loads from one ESP32.
πŸ”₯ BEST FOR HEATERS AND PID Β· ⭐ 4.5/5

7. Inkbird SSR-40DA Solid State Relay with Heat Sink

Solid state Β· 3 to 32VDC input Β· 24 to 380VAC load Β· 40A rated Β· heat sink included
Buy Here β†’
Inkbird SSR-40DA Solid State Relay with Heat Sink for ESP32

A solid state relay has no moving contacts, so it can switch an AC heater on and off every second for PID control without wearing out. The Inkbird SSR-40DA accepts a 3 to 32VDC control signal, so an ESP32 GPIO drives it directly, and switches 24 to 380VAC loads. It ships with a heat sink, which you will need. Treat the 40A figure as a maximum and derate heavily for real loads: SSRs run warm, switch AC only, and usually fail shorted, so add a fuse and a thermal cutout for heaters.

βœ… Pros: Silent; 3.3V compatible input; built for fast cycling.
❌ Cons: AC loads only; needs heat sinking and a fuse.
🎯 Verdict: The go-to relay for ESP32 sous vide, reflow and heater controllers.
πŸ”‡ BEST SILENT AC SWITCHING Β· ⭐ 4.4/5

8. SainSmart 8-Channel 5V Solid State Relay Module

8 SSR channels Β· low-voltage logic input Β· 75 to 264VAC Β· 0.1 to 2A per channel
Buy Here β†’
SainSmart 8-Channel 5V Solid State Relay Module for ESP32

Eight solid state outputs on one board, per the listing switching 75 to 264VAC at 0.1 to 2A per channel. A low-voltage control signal switches each channel, so 3.3V GPIO pins work, and with no clicking it suits bedroom lighting, holiday light shows and other places where a relay chatter would annoy. It cannot switch DC loads, and 2A per channel rules out big motors and heaters, so check your load before choosing it over a mechanical board.

βœ… Pros: Silent; logic-level inputs; eight channels.
❌ Cons: AC loads only; 2A per channel.
🎯 Verdict: Quiet multi-channel switching for small AC loads.
🏭 BEST FOR BIG PANELS · ⭐ 4.4/5

9. SainSmart 16-Channel 12V Relay Module

16 channels Β· 12V coils Β· 10A relays Β· status LEDs
Buy Here β†’
SainSmart 16-Channel 12V Relay Module for ESP32

Sixteen relays on one board with 12V coils and status LEDs. A 12V coil supply suits control panels that already have a 12V rail, and it keeps heavy coil current off your 5V and 3.3V logic. It is the board for large irrigation systems, home lighting panels and test fixtures. Sixteen inputs is more than most ESP32 boards can spare, so drive it through a 16-bit I2C expander such as an MCP23017, and confirm the input level shifting your board needs before wiring it.

βœ… Pros: 16 outputs from one board; 12V coils.
❌ Cons: Needs a 12V supply; uses many inputs.
🎯 Verdict: For ESP32 builds that need a whole panel of relays.

βž• Also Worth Considering: Ready-Made ESPHome Relays

🏠 NO WIRING ON THE BENCH

Flashable Smart Switches and Relays

If you want a finished, certified device rather than a bare module, several commercial switches and in-wall relays use an ESP32 inside and can run ESPHome. Our ESPHome-ready smart home devices guide compares the best Sonoff and Shelly options.

πŸ“‹ Which Relay for Which ESP32 Project?

ProjectPickWhy
Garden pump or irrigation valveSunFounder 4-Ch or 8-ChMechanical contacts handle 12V or 24V DC loads
Lamp or plug-in applianceIot RelayNo exposed mains wiring
Single relay, no 5V railTeyleten 3.3VPowered from the ESP32’s 3.3V pin
Garage door opener buttonHiLetgo 1-Ch or SunFounder 2-ChDry contact pulse across the opener’s button terminals
Sous vide, kiln or heater PIDInkbird SSR-40DASilent fast cycling with heat sink
Quiet light show or bedroom lightsSainSmart 8-Ch SSRNo clicking for small AC loads
Large lighting or test panelSainSmart 16-Ch 12V16 outputs via an I2C expander

πŸ›’ Which Relay Should You Buy?

🏠

Most home automation builds

The SunFounder 4-Channel with a separate 5V coil supply.

πŸ›‘οΈ

Switching mains appliances

The Iot Relay, so no mains terminals are exposed.

πŸ”‹

Battery or 3.3V-only projects

The Teyleten 3.3V relay, powered from the ESP32.

πŸ”₯

Heaters and temperature control

The Inkbird SSR-40DA with a fuse and thermal cutout.

❓ Frequently Asked Questions

Can an ESP32 drive a 5V relay module?

Usually yes, if the board has optocoupler inputs. Power the relay coils from 5V and let the GPIO drive the input. On boards with a JD-VCC jumper, remove it, put 5V on JD-VCC and 3.3V on VCC so the 3.3V pin can fully switch the optocoupler. Boards without an optocoupler or transistor driver may not switch reliably from 3.3V.

Why does my relay click when the ESP32 boots?

Low-level trigger relays turn on when the input is LOW, and GPIO pins float or go LOW briefly during reset. Avoid strapping pins such as GPIO 0, 2, 12 and 15, set the pin HIGH as early as possible in your code, or use a high-level trigger board like the Teyleten or the HiLetgo in high mode.

Do I need a flyback diode?

Not on these modules: relay boards include a diode across each coil and a transistor driver. You only need to add one if you wire a bare relay to a transistor yourself.

Mechanical relay or SSR?

Use a mechanical relay for DC loads, mixed loads and anything that switches a few times a day. Use an SSR for AC heaters that cycle often under PID control or where clicking is unacceptable, and give it a heat sink.

Is it safe to switch mains with these boards?

Bare relay modules have exposed mains terminals and limited clearance, so mount them in a closed enclosure with proper strain relief and fusing, and only if you are competent with mains wiring. Otherwise use the enclosed Iot Relay, which keeps all mains wiring sealed.

🏁 Final Verdict: Best Relay Modules for ESP32

The right relay for each job:

πŸ₯‡ Best Overall: SunFounder 4-Channel
Buy Here β†’
πŸ›‘οΈ Safest for Mains: Iot Relay
Buy Here β†’
πŸ”‹ Best Native 3.3V: Teyleten 3.3V Relay
Buy Here β†’
πŸ”₯ Best for Heaters: Inkbird SSR-40DA
Buy Here β†’
πŸŽ›οΈ Best Multi-Zone: SunFounder 8-Channel
Buy Here β†’

For most ESP32 projects, the SunFounder 4-Channel board is the one to start with: four optocoupled 10A relays and a separate coil supply option. Choose the Iot Relay for plug-in mains appliances, the Teyleten 3.3V module when you have no 5V rail, and the Inkbird SSR-40DA for heaters under PID control. Power your relays properly with our buck converters and voltage regulators guide, measure what your loads draw with the current and voltage sensors guide, and build a watering controller with our smart irrigation parts guide.

πŸ’¬ Not sure which relay fits your load? Tell us what you’re switching in the comments below, and we’ll point you to the right one.

All Amazon links above use our affiliate tag (esp32tutorials-20). Purchasing through them supports esp32tutorials.com at no extra cost to you. Prices and availability change frequently, so always confirm the current price on Amazon before buying.

Leave a Comment