WiFi LED Switch IoT

by AmruthKumarSala in Circuits > Microcontrollers

2377 Views, 15 Favorites, 0 Comments

WiFi LED Switch IoT

001-Title.jpeg

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

WiFi LED Switch Using NodeMCU & Blynk

5mm-White-LED-Light-Emitting-Diode.jpg
DT830D-Multimeter.png
ST-123_1.jpg
Quickfix_Soldering_Paste_Flex_15_gms.jpg
lead-free-solder-wire-500x500.jpg
NodeMCU_V2_v2.png

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.

Identifying & Soldering Working LEDs

002.jpeg
003.jpeg
004.jpeg
005.jpeg
006.jpeg
007.jpeg
008.jpeg
009.jpeg
010.jpeg
011.jpeg
012.jpeg

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.

Connecting NodeMCU & Uploading the Code Via Arduino IDE.

014.jpeg
013.jpeg
017.jpeg
015.jpeg
nLEDGlowUsingBlynk.png
018.jpeg
019.jpeg
020.jpeg
021.jpeg
022.jpeg
024.jpeg
023.jpeg
MultiLED-NodeMCU-Bynk.png

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();

}

Blynk - Configuration & Testing.

Screenshot_2020-10-02-06-11-23-00_980d3cd05c70b8deb691e1a04aeb6aca.jpg
Screenshot_2020-10-02-06-13-11-51_980d3cd05c70b8deb691e1a04aeb6aca.jpg
Screenshot_2020-10-02-06-13-29-85_980d3cd05c70b8deb691e1a04aeb6aca.jpg
Screenshot_2020-10-02-06-13-52-73_980d3cd05c70b8deb691e1a04aeb6aca.jpg
Screenshot_2020-10-02-06-24-37-91_980d3cd05c70b8deb691e1a04aeb6aca.jpg
Screenshot_2020-10-02-06-24-46-64_980d3cd05c70b8deb691e1a04aeb6aca.jpg
Screenshot_2020-10-02-06-24-54-04_980d3cd05c70b8deb691e1a04aeb6aca.jpg
Screenshot_2020-10-02-06-25-02-07_980d3cd05c70b8deb691e1a04aeb6aca.jpg
Screenshot_2020-10-02-06-25-09-94_980d3cd05c70b8deb691e1a04aeb6aca.jpg
Screenshot_2020-10-02-06-25-22-86_980d3cd05c70b8deb691e1a04aeb6aca.jpg
Screenshot_2020-10-02-06-25-30-29_980d3cd05c70b8deb691e1a04aeb6aca.jpg
Screenshot_2020-10-02-06-25-37-85_980d3cd05c70b8deb691e1a04aeb6aca.jpg
Screenshot_2020-10-02-06-25-59-98_980d3cd05c70b8deb691e1a04aeb6aca.jpg
Screenshot_2020-10-02-06-26-12-61_980d3cd05c70b8deb691e1a04aeb6aca.jpg
Screenshot_2020-10-01-17-12-06-90_980d3cd05c70b8deb691e1a04aeb6aca.jpg
Screenshot_2020-10-01-17-12-18-57_980d3cd05c70b8deb691e1a04aeb6aca.jpg
Screenshot_2020-10-01-17-12-26-93_980d3cd05c70b8deb691e1a04aeb6aca.jpg
Screenshot_2020-10-01-17-12-40-90_980d3cd05c70b8deb691e1a04aeb6aca.jpg

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.