ESP32/ESP8266 Relay Module - Control AC Appliances (Web Server)

preview_player
Показать описание

Using a relay with the ESP32 is a great way to control AC household appliances remotely. This tutorial explains how to control a relay module with the ESP32. We'll take a look at how a relay module works, how to connect the relay to the ESP32 and build a web server to control a relay remotely (or as many relays as you want).

SAFETY WARNING: in this example, we’re dealing with mains voltage. Misuse can result in serious injuries. If you’re not familiar with mains voltage ask someone who is to help you out. While programming the ESP or wiring your circuit make sure everything is disconnected from mains voltage.

Like my page on Facebook:
Follow me on twitter:

Subscribe for more projects like this!
Рекомендации по теме
Комментарии
Автор

You can find on my blog the full step-by-step instructions for each ESP board.

RuiSantosdotme
Автор

This is the third project I'm trying. Yours was the only one who works. Thank you a lot my friend, hugs from Brazil

MrSpock-smdd
Автор

Thank you so much for sharing this wonderful video!It means alot to show and educate people who are trying to do gadgets like these.

jtrain
Автор

Clear and concise. Great video. Thanks.

Banjoba
Автор

Congratulations Rui!! Great solution, thanks so much.

edsonferraz
Автор

Congratulation Rui!! Great solution. Thanks so much.

edsonferraz
Автор

i have watched a lot of videos about home automation using esp 8266 but nothing worked . but to my surprise, this time it worked . means a lot bro

muneebbutt
Автор

Thank you my friend by your project, Im come from Vietnam.

pelouis
Автор

Your video is always so clear and also your website .all the necessary things are present in website
Keep posting ...

CreativeDesk
Автор

This is great... you are great... where the hell was this video 8 months ago when I needed you? lol. Good work!

ldt_
Автор

Wow now that is really awesome and clean code! Thank you so much:)

kaiomatico
Автор

Hi Rui, Thank you for this fantastic video.
Is there a limit to the number of Channels which can be controlled using a single 8266 NodeMCU component?

rishujain
Автор

Hey great video! I got a question, do I have to find a 3.3v relay for using in with my ESP32? or what is the model youre using in this video? Thanks, I apreciate your work!

jag_d
Автор

Very nice video. It worked perfectly when I repeated it. Could do you please improve it by making it accessible from anywhere over the internet? thx

cizainnocent
Автор

Thank you😃, i was wondering why it doesn't work, then i realize the jumper caps were removed!

walterr
Автор

Good day Mr Santos, thank you for your videos, Ive learned a lot from all of them. I was wondering if you could help me regarding relays...

So I have a simple webserver where I can turn a relay on/off and I have three LDR sensors as inputs for the three status LED of the water pump I want to control. Ive used the meta-refresh to refresh my web server every 30s, BUT once the server refreshes, my relay quickly turn off and back on again during the reset. Is this one of issues related with using meta-refresh or does this sound like bad coding?

EDIT: I fixed it within an hour of typing this message, Ive connected the relay to GPIO2 but I was so focused on my coding and other stuff that Ive failed to remember that the buildin LED is also controlled from GPIO2. Luckily this is an easy fix.
Ive used the buildin LED to give me wifi status updates as well as data coming from the client, that is why my relay went mad.
Ill leave this comment to help others.

mr
Автор

Great job if I wanted to only be able to have one really on at a time example if I have four relays and I turn on number one then I turn on number two in the code how would I have it so when you switch relays it auto shuts off pervious one

bishop
Автор

Hi Rui, The tutorial is nice. i have tried using the information provided in your tutorial. Able to control the relays only when my ESP8266 and Laptop (where i am opening the web page to control the relays) are connected to same network. If both are connected to same Wifi network, the ip address is not opening. What might be the issue? Do you have any inputs?

gurumurthykola
Автор

Thanks for your video dude. I have a question? If I need a relay that can handle a 48VDC out with 6A. Can i connect to 2 relay that give 30VDC and 10A each to control only this 1 equipment?

Eduardo-robv
Автор

I followed your tutorial and built a similar project Thank You it was a fun build! is there a way to name the relays independently in the web server? I have them performing specific functions and I'd rather them have a name other than Relay #1 - GPIO 16 etc... I'd really appreciate your help

danielwarnock
visit shbcf.ru