β οΈ 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
| Relay | Switching | Control Side | Best For | Buy |
|---|
| π₯ SunFounder 4-Ch | 4 x 10A mechanical | 5V coil, opto inputs | Best Overall | Buy Here β |
| π‘οΈ Iot Relay | Enclosed mains outlets | 3 to 48VDC input | Safest for Mains | Buy Here β |
| π Teyleten 3.3V | 1 x 10A mechanical | 3.3V coil, high trigger | Best Native 3.3V | Buy Here β |
| π HiLetgo 1-Ch | 1 x 10A mechanical | 5V coil, high/low jumper | Best Selectable Trigger | Buy Here β |
| βοΈ SunFounder 2-Ch | 2 x 10A mechanical | 5V coil, opto inputs | Best for Two Loads | Buy Here β |
| ποΈ SunFounder 8-Ch | 8 x 10A mechanical | 5V coil, opto inputs | Best Multi-Zone | Buy Here β |
| π₯ Inkbird SSR-40DA | 40A rated SSR, AC load | 3 to 32VDC input | Best for Heaters and PID | Buy Here β |
| π SainSmart 8-Ch SSR | 8 x 2A SSR, AC load | Low-voltage logic input | Best Silent AC Switching | Buy Here β |
| π SainSmart 16-Ch 12V | 16 x 10A mechanical | 12V coil | Best for Big Panels | Buy 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
JD-VCC
SEPARATE COIL SUPPLY
Buy on Amazon β

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
Enclosed
NO OPEN TERMINALS
Buy on Amazon β

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/53. 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 β

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/54. HiLetgo 5V One-Channel Relay Module (2 pack)
5V coil Β· optocoupler Β· high or low trigger jumper Β· pack of 2
Buy Here β

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/55. SunFounder 2-Channel 5V Relay Module
2 channels Β· optocoupler Β· low-level trigger Β· 10A 250VAC / 30VDC Β· LED per channel
Buy Here β

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/56. SunFounder 8-Channel 5V Relay Module
8 channels Β· optocoupler Β· low-level trigger Β· 10A relays Β· LED per channel
Buy Here β

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/57. 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 β

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/58. 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 β

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/59. SainSmart 16-Channel 12V Relay Module
16 channels Β· 12V coils Β· 10A relays Β· status LEDs
Buy Here β

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?
| Project | Pick | Why |
|---|
| Garden pump or irrigation valve | SunFounder 4-Ch or 8-Ch | Mechanical contacts handle 12V or 24V DC loads |
| Lamp or plug-in appliance | Iot Relay | No exposed mains wiring |
| Single relay, no 5V rail | Teyleten 3.3V | Powered from the ESP32’s 3.3V pin |
| Garage door opener button | HiLetgo 1-Ch or SunFounder 2-Ch | Dry contact pulse across the opener’s button terminals |
| Sous vide, kiln or heater PID | Inkbird SSR-40DA | Silent fast cycling with heat sink |
| Quiet light show or bedroom lights | SainSmart 8-Ch SSR | No clicking for small AC loads |
| Large lighting or test panel | SainSmart 16-Ch 12V | 16 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:
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.
We are a team of experienced Embedded Software Developers with skills in developing Embedded Linux, RTOS, and IoT products from scratch to deployment with a demonstrated history of working in the embedded software industry. Contact us for your projects: admin@esp32tutorials.com