Hey friends welcome back today in this tutorial I will show you how to Make Esp8266 Mood Light control with smartphone.
In this project, I’ll show you how you can build your own mood light. You’ll use an ESP8266 to remotely control the color of your light using your smartphone. This project is called $7 DIY WiFi RGB LED Mood Light.
Before going to the details let me explain the basic features of my Mood Light.
1. The lamp can be controlled from Android phone using Wi-Fi connection.
2. It can be used as true white lamp as well as color lamp and can produce 16 million colors.
3. Brightness and color can be controlled from smart phone.
4. It operates directly from AC mains.
Thank You NextPCB This project is successfully completed because of the help and support from NextPCB. Guys if you have a PCB project, please visit their website and get exciting discounts and coupons.
Only 0$ for 10pcs 1-4 layer PCBse:https://www.nextpcb.com/pcb-quote?act
Step 1: You Will Need the Following Required Components and Tools:Componets
- NodeMCU
- Ordinary Bulb
- RGB Led (ws2812b)
- Power adaptor
- Wires
- Old or Broken Led Light Bulb.
Tools
- Soldering Iron
- Knife
- Hot glue gun
Here you can find the schematic of the circuit
Step 3: Connecting the RGB LED to the Wemos D1The circuit design is very easy
I provided a image with all pins tagged to make things easier for you.
As for the powering WS2812b work on 5V and each Red, Green and Blue LED draws around 20mA, or that’s total of 60mA for each LED at full brightness.
when the Wemos d1 is powered via the USB, the 5V pin can handle only around 400 mA, and when powered using the barrel power connector, the 5V pin can handle around 900 mA.
Step 4: Prepare Power SupplyHere I'm using a 5V mobile charger circuit board as a power supply.
First remove circuit board in charger then Connect two wires to the positive and negative output pin of the charger board.
Now connect input AC supply wires to charger input pins as shown in the in above pictures.
Step 5: Bulb HackFirst open the bulb and remove circuit board and leds then attach the charger circuit board and RGB LED using hot glue.
Connect the output positive and negative wires of the charger board to the main circuit board.
Step 6: Setup the BLYNK AppOpen the BLYNK app then Create a New Project in BLYNK app.Write Project Name and Select wemos d1 or NodeMCU from dropdown.
An AUTH token will be sent to your registered email, note this.
From widget list pic zebra widget and then click on it then in zebra app click on "merge" and select virtual pin "v2"
Go to for full setup:- Esp8266 IOT based Mood Light Project
Note: This will change colors only over WIFI not over internet.
Step 7: Upload the Code!Here you can find the code that I created as circuit.
Download the code from the given link :-
- Make sure to upload it to the wemos d1.
- You will also need to include this URL in your Arduino preferences: http://arduino.esp8266.com/stable/package
- This way you can install the ESP8266 boards.
- then make sure to download the Blynk library through the library manager.
#include <Adafruit_NeoPixel.h>
#include <SPI.h>
#include <BlynkSimpleEsp8266.h>
#include <ESP8266WiFi.h>
#define PIN D4
#define NUMPIXELS 12
#define BLYNK_PRINT Serial
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
void setup()
{
Serial.begin(9600);
Blynk.begin("uBUTHEDUYUAMVbe3vNeqHhoIi5gqvRBc", "ZTE_2.4G_C7u3c4", "Diyprojectslab");
pixels.begin();
}
BLYNK_WRITE(V4)
{
int R = param[0].asInt();
int G = param[1].asInt();
int B = param[2].asInt();
Serial.println(R);
Serial.println(G);
Serial.println(B);
for(int i=0;i<NUMPIXELS;i++){
pixels.setPixelColor(i, pixels.Color(R,G,B));
pixels.show();
}
}
void loop()
{
Blynk.run();
}
Step 8: SuccessYou did it! You just built your own Make Esp8266 Mood Light !
Feel free to check out my website for more awesome projects:
https://www.diyprojectslab.com/
You can also follow me on Facebook
WebsiteOnly 0$ for 10pcs 1-4 layer PCBsOnly 0$ for 10pcs 1-4 layer PCBs
Comments