DIY WiFi RGB LED Soft Lamp

by IgorM92 in Circuits > Art

11611 Views, 96 Favorites, 0 Comments

DIY WiFi RGB LED Soft Lamp

Cover.JPG
Components.JPG
Magic lamp interface

This lamp is almost whole 3D printed, including the light diffuser other parts cost about 10$. It has lots of preconfigured, light animation effects and static light colors with autoplay loop feature. Lamp stores last used setting to the internal memory, so it could be configured once and used like usual lamp with power switcher. No app required, it could be controlled by using any device where browser is available. It also can operate in 2 modes, as standalone and part of home WiFi network.

Supplies

• 1 x Double Side Prototype PCB 4*6 cm

• 1 x HLK-PM01 AC-DC 220V to 5V Step-Down Power Supply Module or something similar

• 1 x Wemos D1 Mini WiFi Development Board Micro USB

• RGB I2C LED strip with 60 LEDs/m

• 4 x M3 nuts

• 2 x M3x6 screws

• 5 x M3x12 screws

• power cord with plug and switcher on it

• some jumper wires

• 3 x header pins

• soldering tools

• 3D printer with Clear and Black filament

3D Print Parts

DiffuserSettings.png

All attached STL models, except diffuser could be printed with any desirable settings.

Here is an example:

Layer Height: 0.2

Supports: NO (YES only for the base model)

Walls: 0.8 mm

To get more smooth light it's better to bring diffuser in VASE mode and over extrude plastic, to achieve this, set flow to 120%, see attached image.

I'd recommend to print LED tower first, it'll allow to faster switch to the next step.

Soldering

Wiring.jpg
LED_towerWithStripe.JPG
PCBBack.jpg
ElectronicsSoldered.JPG

First of all we have to stick the LED stripe to the LED tower. If you're using the same LED stripe, like me (60 leds/m) then cut 3 pieces, 1 with 10 LEDs, 2 other with 9 LEDs. Use attached image, as reference and stick the LED stripe to the tower and make sure that all arrows on the stripe are in the same direction and pointed from the bottom to the top. Solder the wires to the stripe as shown on wiring diagram.

Take the PCB and cut it between the AC power pins, like shown on image. Insert the AC module into PCB holes, solder it. Do the same with Wemos board. Please note that there is no need in soldering all pins for Wemos board, we need only 3 of them. Insert the pins header and solder it. Connect all of that with wires.

Configure and Upload Software

IMG_2738.JPG
2019-09-12 13-07-56.png
2019-09-12 13-08-32.png

In nowadays there is plenty of different libraries, code and other stuff, that was done by different people, this example based on Jason Coon's work.

We have to download and configure Arduino IDE, thanks to Steve Quinn, who already created a comprehensive guide of doing this in his Instructable, so there is no need in typing all of that.

Once previous step done - open the sketch in Arduino IDE.

Find the line "const bool apMode = false;" and make a decision, how you're going to use this lamp, "true" means that it'll be operated in standalone mode and device to control it have to be connected via WiFi directly to it.

Find the "#define NUM_LEDS 10" line and set the number of pixels equal to the length of the longest LED stripe.

Open the Secrets.h tab in Arduino IDE and fill the file based on your choice before.

Save and upload the sketch to the ESP board. Use "ESP 8266 Sketch Data Upload" menu and upload other files from sketch to the SPIFS. Once this done you can connect the LEDs and access the lamp by typing http://magiclamp in your browser , if you have set "const bool apMode = false;".

For the AP (standalone) mode you have to find WiFi Network called "MagicLamp + numbers" and connect to it by using password that you have set in "Secrets.h" file. After this done - connect to the lamp by typing http://192.168.4.1 in your browser. A page will be loaded with many control options.

Downloads

Assembling

ElectronicsHolder.JPG
ElectronicsAssembled.JPG
IMG_2742.JPG
IMG_2745.JPG

When you have all parts printed, finished soldering and successfully uploaded and tested software - we can assemble this lamp.

• screw the electronics holder to the base lid

• unsolder the ac wire from the PCB and thread it through the cable hole in the base

• solder the wire back to its place

• snap the PCB on its place

• fix the AC wire by cable clamp

• stick the LED towed with less to the base by using 2 sided sticky tape or glue

• connect LED wires with PCB

• close the base with the lid and use 3 screws to fix it

• put the diffuser on top of the lamp (be careful it have to be pushed tightly and gently)

That's it!

Now you can turn it on and find some light animation that you'll love.

Thank you for reading.