(WiFi) Mood Lamp

1,494

19

1

Introduction: (WiFi) Mood Lamp

In this Instructable, I will show you how to build a very easy and cheap mood lamp. The lamp can be upgraded with RGB LEDs and a WiFi-compatible microcontroller.

Supplies

  • 4 Led's: red, yellow, green and blue (alternatively: two rgb Led's)
    • The more Led's the brighter the lamp
  • USB Cable
  • 3D Printer
  • 3,5mm Acrylic (can be thicker or thinner)
  • Wemos d1 mini (not necessary if you don't need a WiFi controlled lamp)

Step 1: 3D Printed Frame

First of all, you need a frame for the acrylic squares.

For this, you can print the attached file. This frame is extremely weak but will gain stability with the next steps. This means you have to be careful.

If everything worked fine with the print you will be able to insert the acrylic squares (step 2) without problems. For the case that something breaks don't worry it also works with one leg less.

Step 2: The Acrylic Squares

Once the frame is printed you can start cutting the acrylic. In the end they need to be 50mm x 50mm therefore cut them a little larger and remove the rest with a file and a grinder. If you use a mitre fence it's easier to grind a good square.

To avoid gaps between the frame and the squares frequently try to insert them into the frame.

As soon as the squares have a perfect size take some sandpaper and make both sides mat.

Make five of them, one for each side except the bottom.

Step 3: Assemble the Frame and the Acrylic Squares

All you need for this is some glue and your previously produced parts.

Add glue on the sides and set them into the frame. Once the glue dried the frame gained a lot of rigidity.

If your frame lost one of the four legs you can easily fix this with some glue now. Mine lost one too and you can't see any difference.

Step 4: Time for a Base

The only thing you have to do is to print the attached .stl file with the tile "Base.stl" and fix the LEDs with hot glue.

Step 5: Wiring and Assembly

The power source is a 5V USB cable. This means you can put two LEDs in series. To do this you have to solder the 5V (USB) to the anode of one Led, the cathode is connected to the anode of the second Led. The second Led's cathode has to be soldered to GND (USB). Don't forget to solder a 10Ω resistor between the cathode or anode and the USB cable.

Redo this for the second Led pair and the soldering is finished.

Now it's time to add the frame with the acrylic. Stick them in the grove on the base. My suggestion is not to glue it for the case that one Led have to be replaced.

Step 6: You Want More? Use Rgb Led's and WiFi

Replace the single color LEDs with RGB LEDs. To control the LEDs I use a Wemos d1 mini with WiFi.

Use hot-glue to fix the d1 mini inside the base. Although space is limited the microcontroller fits good.

Connect digital (PWM) pins to the Anode(s) to control colors and GND to the cathode(s). The pin for blue is connected to "RX", green to "D1" and red to "D2" but with a 50Ω resistor.

An additional feature is a nearly invisible touch switch to reset the d1 mini if it disconnects from your WiFi. The switch is also used to stop the RGB rainbow mode.

The switch itself is simply one wire connected to +3.3V and a second one to the analog input pin. If a finger touches both wires the analog pin detects a higher value which can be used to restart the controller and to stop the RGB mode. Heat two wires with a soldering iron and stick them through the base (first image).

Step 7: The Code and Control System

To connect the controller with the WiFi you need to open the code and fill in your WiFi name and password. Then upload the sketch and copy the link which will show up and paste it in your browser. It's important that the device is connected to the same WiFi network.

If you plug in the controller it will automatically connect to the network. As soon as the connection is online the lamp blinks three times.

To be honest I'm not very happy with my code because the whole WiFi topic is very new to me but I really wanted to use it for this project. If you have a better code I would be very happy to improve my own one with yours.

Step 8: Code Alternativ: "Blynk"

The fact that my code is far away from perfect this is a good alternative but requires to download the Blynk app.

If you want to use Blynk than upload the given code which is freely available on the internet. Open the sketch type in your WiFi name, password, and the authentification code Blynk gives you. But first, install the Blynk library with the library manager in the Arduino IDE. Then you can configure buttons, switches, and a lot more in the app.

The pin configuration is GP4 for red, GP5 for green, and GP3 for blue.

For the case of problems, you can reread everything here.

Lighting Challenge

Participated in the
Lighting Challenge

Be the First to Share

    Recommendations

    • Metal Contest

      Metal Contest
    • Backyard Contest

      Backyard Contest
    • Fandom Contest

      Fandom Contest

    Comments

    0
    AnandM54
    AnandM54

    11 months ago

    Oh cool lightning project!!