Introduction: SmartPhone Controlled RGB MOOD Light V2.0

About: So basically i am a crazy person, who loves to think the most odd way ever possible,who makes what he thinks and also let other also make those . Check out my crazy projects if you like do follow me :D

Mood lamps are always fascinating for me and is a very good project for starters to start with Arduino.
In this Instructables i will show how to make a wifi mood lamp , using nodemcu /esp8266 12.
This is for people who are starting in IOT or Wifi Related Project.

What is a Mood Lamp ?

Mood lamps are lighting devices that are used to establish a particular feeling or mood within a room. In some cases, this type of lamp may be a small device that is plugged into an outlet and creates points of light near the floor line of the room. Other examples of a mood lamp may be used to illuminate specific points along the walls or cast a soft light over a larger piece of furniture in the room. Mood lighting differ somewhat from other lamps in that their purpose is not so much practical as aesthetic. Reading lamps for example tend to provide bright light to a given space in order to make it possible to read a book or magazine without creating strain on the eyes. Overhead lighting is used when there is a need to illuminate the majority of the space, such as in a classroom or laboratory. By contrast, a mood lamp is used to help create a specific ambiance within the room as a means of making the space more attractive and welcoming in some manner.
Subscribe to out channel for awesome videos

BTW it got accepted for the circuit and IOT contest so if you like it do vote .

Step 1: Components

Step 2: Controlling RGB LED

To Control The RGB we need to learn how to control a Normal LED Brightness.

The Answer is PWM Pulse Width Modulation.It is digital representing Analog signal by varing the duty cycle of the pulse. In Nodemcu, we use the analogwrite function to get a PWM wave the function generates a square wave of specified duty cycle the value of which is defined by the user. In the graphic below, the green lines represent a regular time period. This duration or period is the inverse of the PWM frequency. In other words, with Nodemcu,PWM frequency at about 500Hz, the green lines would measure 2 milliseconds each. A call to analogWrite() is on a scale of 0 - 1023, such that analogWrite(1023) requests a 100% duty cycle (always on), and analogWrite(512) is a 50% duty cycle (on half the time).

Luckily the blink app does all the complicated stuff and you don't need to worry anything about it.

Step 3: Connections

At first we will connect the simple RGB 5mm LED to the Nodemcu and control it .
The connection is very simple .Bend the leg of the anode at an angle .
now connect the R , G, B Pins to the D6 , D7 ,D8 pins respectively on the breadboard.
Now we need to connect the anode to the Vcc / 5 V which is here the V in.
If it is cathode connect it to the Gnd

Step 4: Setting Up the App

Once you open the app

  • click on the plus icon to create a new project
  • Name your project
  • Select the hardware you will be working on (Nodemcu here)
  • Click on Create
  • Now you need to use a widget named ZeRGBa
  • Click on the plus icon and select ZeRGBa
  • Define the pins in our case D6,D7,D8
  • Since our is common cathode we need to define the PWM reverse
  • Change the min to 1023
  • Max to 0
    App is ready now using the authentication token we need to change the code

Step 5: Code

#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "Enter you Auth Token";

void setup()
{
  Serial.begin(9600);
  Blynk.begin(auth, "wifi router name ", "wifi router pass");
}

void loop()
{
  Blynk.run();
}

Attachments

Step 6: Connecting With RGB Strip

In case of any RGB strip I use a custom made controller interface
the connections are as follow

  • Red to Pin 3 of NodeMcu
  • Blue to Pin 5 of NodeMcu
  • Green to Pin 6 of NodeMcu
  • Gnd to Gnd Of NodeMcu

Step 7: Complete Your Mood Lamp

I rolled a paper and then Squeezed it . Then again shaped it back to the cylinder .
This gives it a crystal effect .
or you can simple connect the roll paper roll your choice.
Now connect the Nodemcu to a power source and run the app.
Once you are connected you can change the color of the Mood lamp from anywhere around the world
if you like the project than do like my Facebook page
https://www.facebook.com/makewithRex/

And subscribe to my youtube channel
https://www.youtube.com/c/PrajjwalNag


IoT Builders Contest

Participated in the
IoT Builders Contest

Circuits Contest 2016

Participated in the
Circuits Contest 2016