WiFi LED Switch IoT

Introduction: WiFi LED Switch IoT

About: An Open Source and IoT Enthusiast

The main aim of this project is to come up with a functional WiFi switch that will help us operate via the "Blynk" app from the Mobile app store.

This Instructable is successfully tested with very basic knowledge of Electronics and I would appreciate suggestions from professionals in the domain to comment for appropriate changes.

Supplies

The following components are required to successfully complete the project
  1. NodeMCU
  2. White LEDs - 10 Nos
  3. Multimeter
  4. Soldering Iron
  5. Soldering Lead
  6. Soldering Flux

Step 1: WiFi LED Switch Using NodeMCU & Blynk

The very first step is to check and lineup LEDs in accordance with their polarity (Anode & Cathode lined up for easy identification)

There may be a few LEDs that may nor be functional, hence it is always suggested to check each one of the LEDs using Multimeter.

Step 2: Identifying & Soldering Working LEDs

Continuity check using Multimeter will help us identify the functional LEDs and the faulty ones.

It is always better to tape the LEDs WRT their polarity and make them ready to be soldered.

On completion of soldering all 10 LEDs, it is once again suggested to check the continuity using a multimeter.

LED is functional only if the positive lead of the multimeter when connected to the Anode and the negative lead of the multimer to the Cathode helps the LED mildly glow.

On completion of soldering all LEDs, we can primarily check if all the LEDs are glowing with help of a 9V Battery (Connections to be made keeping Polarity in mind)

Note: If there is a failure LED, you may see something similar to one of the images uploaded where the Multimeter displays a value of 1607.

Step 3: Connecting NodeMCU & Uploading the Code Via Arduino IDE.

Packaging the prototype is important and I found a "Solid State Drive (SSD)" packaging tray to be most appropriate to package the soldered LEDs and NodeMCU.

The connections are very simple and are as follows:

1. Connect "D1" pin of NodeMCU to the Anode of soldered LEDs and

2. Connect the "GND" pin of NodeMCU to the Cathode of soldered LEDs.

Note: Please refer to the attached screenshot for the complete code. It seems some portion of code is missing, especially with the "include" statements while placing the subsequent text in between less than and greater than symbols.

Upload the following code to NodeMCU:

#define BLYNK_PRINT Serial

#include ESP8266WiFi.h

#include BlynkSimpleEsp8266.h

char auth[] = "**************************************************";

// Your WiFi credentials.

// Set password to "" for open networks.

char ssid[] = "************";

char pass[] = "*****************************";

void setup()
{

// Debug console

Serial.begin(9600);

Blynk.begin(auth, ssid, pass);
// You can also specify server:

// Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);

// Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);

}

void loop()
{

Blynk.run();

}

Step 4: Blynk - Configuration & Testing.

Finally, it is time to configure and test the prototype functionality using the mobile application "Blynk".

Please take the necessary help from the attached screenshots to complete and run the prototype successfully.

The following step by step instructions will help the reader of this article:

  1. Install and open the Blynk App on mobile.
  2. Give the project a name: "WiFi LED Switch IoT" in this case. You may choose your own terminology to name it.
  3. From the drop-down list, choose the device using which the experiment is completed.
  4. On selecting "Create", an "Authorization Token" is shared with the registered/configured Email ID.
  5. It is now time to add components to the project. We will need only one "Button" in this case.
  6. Furthermore, the button "Output" setting needs to be changed to indicate the Digital pin on which the LED in series is connected (D1 in this case).
  7. Continue to configure mode to "Switch" to complete the configuration.
  8. Choose a convenient location for the "Button" to be placed on the dashboard and select the "Play" button at the top right corner of the interface to start interacting with the board.
  9. You should now be able to control your LEDs in series from anywhere & any time.

In case of any further help, you may WhatsApp me on +91 9398472594.

Be the First to Share

    Recommendations

    • Make it Real Student Design Challenge #3

      Make it Real Student Design Challenge #3
    • Box Challenge

      Box Challenge
    • Explore Science Challenge

      Explore Science Challenge

    4 Comments

    0
    Gorgus
    Gorgus

    8 months ago on Step 4

    Nice project. What is supposed to be included in the two empty #include statements?

    0
    AmruthKumarSala
    AmruthKumarSala

    Reply 8 months ago

    Hello @Gorgus - I am shocked to see that the copied content is missing. Thanks for indicating it. I tried correcting it, but somehow the editor is able to take the text, but the moment I save it, the content is not reflecting. Both the include statements are as below:

    #include <ESP8266WiFi.h>
    #include <BlynkSimpleEsp8266.h>

    To reduce these confusions, I will now include an image of the code for better clarity.

    0
    gabylan
    gabylan

    Question 8 months ago on Introduction

    Hello! Very good project! congratulations! . How about the distance works? I made an ir emitter but i had really problems with the distance. What is yout suggestion for improve the distance?

    0
    AmruthKumarSala
    AmruthKumarSala

    Answer 8 months ago

    Thanks for all your good comments. Let me share more details with you in the form of a new circuit.

    During my earlier experiments with IR, I received decent good results. Let me see if I can share the project details with you ASAP. I think it will be better if I post it on Instructables.