ESP8266 Project: How to control AC bulb or load using Relay with NodeMCU and D1 Mini over WiFi

Поделиться
HTML-код
  • Опубликовано: 16 сен 2024
  • Turn ON and OFF AC load or DC Load using your mobile device over WiFi with ESP8266 NodeMCU or D1 Mini. This a great home automation project.
    The best thank you for me is to not to skip ads and Subscribe 🔔 to my channel, like 👍 the video It is greatly appreciated. 🔔 😊.
    I will reply to all Subscriber's 🔔 questions. So make sure to Subscribe and enable the bell 🔔.😊
    Jump to different section of video by clicking on the time:
    00:53 Introduction
    03:43 Wiring Explained
    08:01 Code Explained
    15:25 Demonstration with D1 Mini
    16:30 Demonstration with NodeMCU
    17:23 Demonstration with NodeMCU-Mobile
    15:41 Demonstration with D1 Mini-Mobile
    18:31 Demonstration with D1 Mini-Mobile with Shield
    Related Videos:
    1 channel relay with ESP8266: (this video)
    2 channel relay with ESP8266: • ESP8266 Project: How ...
    4 channel relay with ESP8266:
    8 channel relay with ESP8266:
    16 channel relay with ESP8266:
    Prepare your Arduino IDE for ESP8266: • Video
    How to use a breadboard : robojax.com/L/?...
    ESP8266 NodeMCU sully explained: • Introduction to NodeMC...
    Introduction to 4 chanel 5V Relay module: • How to use 4 channel R...
    Learn Arduino in 30 Minutes (video): robojax.com/L/?...
    Tutorial by Ahmad Shamshiri form Canada
    ****************************
    Get early access to my videos via Patreon and have your name mentioned at end of very videos I publish on RUclips here: robojax.com/L/?... (watch until end of this video to list of my Patrons)
    ****************************
    If you found this tutorial helpful, please support me so I can continue creating contents like this. Here is PayPal link paypal.me/robo...
    If you want to learn Arduino from proven instructor on **Udemy**: bit.ly/rj-udemy
    Follow me on Facebook robojaxTV
    Follow me on Twitter: / robojaxtv
    Follow me on Instagram: / robojax
    Tutorial by Robojax.com
    Get other projects code and learn Arduino
    robojax.com/lea...
    #robojax #robojax_nodemcu #robojax_ESP8266

Комментарии • 43

  • @piotrzuch4592
    @piotrzuch4592 3 года назад +1

    Bardzo dziękuję za materiał gorąco pozdrawiam.

    • @robojax
      @robojax  3 года назад

      Serdecznie zapraszamy. Cieszę się, że Ci się podobało. Ahmad z Kanady

    • @piotrzuch4592
      @piotrzuch4592 3 года назад

      @@robojax Hello. I have come across your channel and it interested me a lot. I have been interested in Arduino for over a year, I did some things, but rather simple.
      Now, however, I had a crazy idea - heating control with Arduino. However, it is not that simple control.
      That is, I heat the house with an air conditioner, a gas blower furnace. Additionally, I have a photovoltaic installation installed at home.
      What I would like to do: turn on the air conditioner when the photovoltaic produces electricity. As well as at times when I have a lower electricity tariff (especially at night). Of course, in some situations, the heating is taken over by the stove.
      Technically I have already turned on the air conditioner and the stove. Theoretically, I also have an idea to check whether the photovoltaic installation produces electricity.
      But my problem is of a different nature. Am I undertake an idea that is impossible to perform? Theoretically, everything seems to be done, but as a person with no experience, I'm probably not aware of the problems that will arise during this project. I would like to ask what do you think about it? I know that the world belongs to the brave but ......
      I am also wondering whether to do it as a control centre, where data is collected and then sent to the controllers wirelessly, or using a ready-made cloud-based system? Please, help me. Peter.

  • @englishrupe01
    @englishrupe01 4 года назад

    Great job, thanks! I really enjoy the humour in the out-takes, too....lol!

    • @robojax
      @robojax  4 года назад

      You are welcome. LOL

  • @yogeshitaliya473
    @yogeshitaliya473 4 года назад

    Nice one sir

  • @arishy
    @arishy 3 года назад

    A content-rich video. Thank you.
    I have the following remark:
    Most of these relay modules come with no datasheet. And critical element is the current value for the relay to function.
    This is important since all the microcontroller's pins are very sensitive to the limit they can take.
    In your presentation, you mentioned the 5v EXTERNAL source but did not explain why.
    May I suggest a video addressing these modules that have NO datasheets and the accurate measure to perform BEFORE connecting them to the MC

    • @robojax
      @robojax  3 года назад

      Hello
      The relay module needs about 60 to 80mA and esp module can’t supply that. Yes the current value is very important factor. I have separate video on relay which you have here ruclips.net/video/58XWVDnB7Ss/видео.html

    • @arishy
      @arishy 3 года назад

      @@robojax Thank you for your reply. In that video you used the Uno. The Max current limit is 40 MA.
      The question is: Do I use External 5V or I keep using The Uno 5V as shown in the video. This is especilly critical in case I have the relay ON for a long time.

    • @robojax
      @robojax  3 года назад

      For UNO you can connect up to 300mA or higher. So uno can power up the relay module easily.

  • @bamboozler98
    @bamboozler98 4 года назад

    Thank u sir for listening to my request. Appreciate it

    • @robojax
      @robojax  4 года назад

      You are welcome. I glad it made it on time.

  • @danialm6892
    @danialm6892 Год назад

    سلام احمد جان

    • @robojax
      @robojax  Год назад

      وعلیکم السلام، امید وارم خوب باشی. چند روز میشود که یک کانال فارسی براه انداخته ام و یک دورۀ تددریس آردوینو را میخواهم به نشر برسانم. فقط چهار درس را نشر کرده ام و بقیه در حال تدوین اند. این هم کانال جدید www.youtube.com/@ilmofan

  • @klif_n
    @klif_n 4 года назад

    This was really explained well. I very much like the info being published also in your web page? Thank you.

    • @robojax
      @robojax  4 года назад

      Thank you. Yes it is on robojax.com the link to the code is in the description of this video.

  • @fannyekasaputra1711
    @fannyekasaputra1711 4 года назад

    I like this tutorial

    • @robojax
      @robojax  4 года назад

      Thank you very much.

  • @vineshgda
    @vineshgda Год назад

    Thanks for making this video

  • @goldenice9283
    @goldenice9283 3 года назад

    Hello Robojax. Great video as always.
    I have the relay that you said would strictly need 5V to work, and sure enough yeah, It doesn't work at all in this project using the 3.3V pin. I'm trying to find the relay that you said would work with even 1V ,the one with model SRD-05VDC-SL-C. I couldn't find the single relay module, only the two channel one. Just wanted to double check that It would work fine as I'm no expert and I've found that relays are really strange when it comes to 3.3V as power.
    Some videos from various channels on youtube, who are doing similar projects, are using the strict 5V relay but the Two-channel or Four-Channel ones and they appear to be working fine on these videos when the VCC is connected to the VIN on the nodeMCU. I tried that with my single-channel relay, but no luck.
    Should I go ahead and order the Two-Channel SRD-05VDC-SL-C Relay? Would it work just like the one you're using in this video?
    I love your work, and you're really one of the few channels that explain things in good detail. Thanks for the video, and I hope you reply.

    • @robojax
      @robojax  3 года назад

      Hello @Goldenlce, thanks for kind comment. Each relay needs about 70mA or max 100mA so 2 relays need 200mA maximum. Any of these 5V from the board will be able to power it up. The input can be triggered with anything about 1V. When we talk about relay I am referring to the module. But if you want to drive the relay yourself, please watch this video ruclips.net/video/N-fFk51Eb8s/видео.html and in case it should work. So test your without signal from ESP8266. just connect it to 5V of ESP8266 and GND and then connect the input of the module to 5V and GND to see if it turns ON or OFF. So you know if your relay module is working or not.

  • @hedi875
    @hedi875 3 года назад

    Hi. Thanks for the video. I'm planning to use the GPIO2 pin of an esp8266 -01. So i have to modify the sketch by replacing D1 by D4. Is this OK ?

    • @hedi875
      @hedi875 3 года назад +1

      I'm answering myself : yes it's correct. Have tried it and it worked flawlessly. Thanks again.

    • @robojax
      @robojax  3 года назад

      Please subscribe. I appreciate it and helps my channel grow. Thank you

  • @timnagy2411
    @timnagy2411 4 года назад

    as much as I try with my D1 mini, I just can't get them to activate the relay. If I switch over to a nano, it works fine. What am I missing?

    • @robojax
      @robojax  4 года назад

      This is very advanced project. You have to do it step by step. For example can you connect an LED and turn ON and OFF like blinking? Follow it here to turn it ON and OFF. Let's call it ESP8266 which is the chip. D1 Mini is misleading. Because this project work with all shape of the module with ESP8266. NodeMCU etc.

    • @timnagy2411
      @timnagy2411 4 года назад

      @@robojax I've built Alexa controlled garage door monitor/controller. I didn't think a relay would be difficult. Like I said, I can make it run just fine on an UNO, a Nano, same code. Once I move it to a D1 Mini, nothing. Lol

  • @michaelzajac5284
    @michaelzajac5284 4 года назад

    What if 12 volt, it will burn?

    • @robojax
      @robojax  4 года назад +1

      12V to connect to what? to the relay? yes it will burn.

    • @michaelzajac5284
      @michaelzajac5284 4 года назад

      @@robojax I seriously considered about that arduino with 12 volt will burn?

    • @robojax
      @robojax  4 года назад +1

      to power Arduino (not the relay), you can connect up to 20V to input jack (adapter jack). So no worries but relay works only with 5V and 6V or higher will kill it.

    • @michaelzajac5284
      @michaelzajac5284 4 года назад

      @@robojax
      Fortunately, it's DC-DC Adjustable Voltage Booster Power Supply Step Up SET Pro . Use the rotator the resistor on the voltage regulator 12 volt to 5 volt - better help 5 volt with Relay Switch.

  • @hamitavcoglu9813
    @hamitavcoglu9813 4 года назад

    Selam aleyküm how can I do project with dht11 sensor at Remotexy I have arduino uno, esp8266, dht11 please help I want read humidity and temperature from my phone thank you. I did project successfully on remotexy "led on led of with cloud server"

    • @robojax
      @robojax  4 года назад +1

      walaikum salaam, every day I hear new stuff. What is "remotexy" some kind of service with app? It seems people want to read data in far remote locations. I will start working on offering this service.

    • @hamitavcoglu9813
      @hamitavcoglu9813 4 года назад

      @@robojax Allah bless you big brother its the kind of control things from far by cloudserver and really nice quality for work and I'm waiting your new videos thank you.

    • @robojax
      @robojax  4 года назад +1

      Jazaklalah. Do you pay for the service? For long time I have wanted to launch a service for IoT management and data processing. I will look into it.

    • @hamitavcoglu9813
      @hamitavcoglu9813 4 года назад

      @@robojax for button and a few switches free and I see that if you read dht11 sensor they giving 30 seconds free trial at every refresh.

    • @hamitavcoglu9813
      @hamitavcoglu9813 4 года назад

      @@robojax I found project but it's with internet shield of course I changed codes to esp8266 but still can't reading values on cloudserver