- RGB Lamp WiFi
- Supplies
- Step 1: Understand How It Works
- Step 2: 3D Designing
- Step 3: 3D Printing
- Step 4: Flashing the Board
- Step 5: Setting Up the APP
- Step 6: Quick Test
- Step 7: Circuit
- Step 8: Installing the Switch
- Step 9: Soldering the Battery
- Step 10: Soldering the TP4056
- Step 11: Installing the Led Strip
- DIY WiFi RGB LED Soft Lamp
- Supplies
- Step 1: 3D Print Parts
- Attachments
- Step 2: Soldering
- Step 3: Configure and Upload Software
- Attachments
- Step 4: Assembling
- Be the First to Share
- Recommendations
- Project-Based Learning Contest
- Make It Bridge
- Unusual Uses Contest
- 16 Comments
RGB Lamp WiFi
About: My name is Nikolas and I am 17 years old. I love making things with electronics and 3D printing in order to solve problems, to improve our lives but also to satisfy my imagination and curiosity! Email: nikolas… More About Nikolaos Babetas »
Hello friends! My name is Nikolas and I am 15 years old. Today in this Instructable I’ll show you how to make a Minimalistic RGB Lamp that you can control through WiFi from your smartphone or computer. The Lamp will also be battery powered and will feature USB Type-C charging! I hope you’ll have as much fun making this as I did! Make sure to watch the YouTube video above to see the Lamp in action and to follow the instructions from there if you prefer!
You can also see some of the Makes of this project Here!
Supplies
Here’s a list of the required components:
- Wemos D1 Mini Lite (V1) (UK)
- TP4056 USB Type C (A micro USB option exists as well if you prefer) (UK)
- Slide Switch (11mm x 6mm) (UK)
- 18650 Li-On battery (UK)
- 1m/60leds of WS2812B led strip (UK)
- 100uF Capacitor (UK)
- Some Wires (UK)
- White Filament (UK)
(Some of these links are affiliate links, which means that I earn a small commission from any purchases, at no cost for you. By using these links you can help me make more cool projects!)
Step 1: Understand How It Works
Firstly think of the Wemos board as an Arduino that also happens to have WiFi. Secondly you should know that the WS2812B led strip we are using is an «ARGB/ Addressable RGB Led strip» this means that every LED is equiped with a tiny microchip and, as a result, we can control each led respectively. A lot of people here on Instructables have made amazing projects using this kind of led strip so make sure to check them out! To control the leds from our smartphone we’ll be using the firmware from a great open-source platform called «WLED«. These parts in combination with a simple switch, a rechargable battery and a charger will be fitted inside three 3D printed parts.
Now that you get how it works let’s start making it!
Step 2: 3D Designing
I designed the parts in Fusion 360. Basically the «LampBase» is where the charger, the wemos board and the switch are. The WS2812B wraps around the «LedHolder» and secures in the two clips. Also, the cylinder is hollow and the battery fits exactly inside. There are no screws needed because I have integrated a screw and a nut in the design. Lastly the white «Diffuser» secures into the precise gap of the «LampBase».
Step 3: 3D Printing
All the parts should be printed at a 0.2mm layer height, 0.4mm walls and around 30% infill.
- The «LampBase» can be printed in any material you like. I used PLA.
- The «LedHolder» should be printed with 4 walls. I suggest using a material like PETG or ABS due to the fact that the LED strip can get hot at times. PLA will probably work well too though.
- The «Diffuser» must be printed in White with Vase/Spiralize Outer Contour mode enabled. You will also need to increase the bottom layers to 10. If you wish you can add a color change in the bottom of the part from Cura. Go to Extensions>Post Processing>Modify G-Code>Add Script then select the «Pause at height» option. Then in the top right select «Layer Number» instead of «Height» and below that write «5«. Click close and you are set to go! The printer will automatically pause when it finishes layer 5 and you’ll be able to change the color to white!
Step 4: Flashing the Board
It’s time to flash the firmware to our board.
- Connect the Wemos D1 Mini to a computer using a USB cable
- Download esphome-flasher on your computer.
- Download the latest WLED Release (we are using the Lite version of the board so we’ll be downloading the «. ESP8266_1M.bin» file, if you are using a non-lite version of the board go for the «. ESP8266.bin» file.
- Open the esphome-flasher.
- Click browse and select the WLED release you downloaded earlier.
- Click Flash (The process will take around 3 minutes)
Don’t disconnect the board from your computer yet.
Step 5: Setting Up the APP
- Go over to Play/App Store and download the WLED App by Aircookie
- Go to your WiFi settings and click on a device with the name «WLED-AP«», you may need to enter the password «wled1234
- A page will open up and you’ll need to write your Home Network’s Name and Password
- When you finish click «Save & Connect»
- Now connect your phone to your network
- Open the WLED App
- Click the Plus (+) icon on the top right
- Select «Discover lights» and once your lights are found click the tick icon.
- Now you can click on the instance you just made and a menu with dozens of colors and effects will come up!
Troubleshooting
If the «Discover lights» function didn’t work for you, don’t worry, there is another method to connect to your RGB Lamp. Simply download Angry Ip Scanner and click «Start». Scanning will take a few seconds, then look for a device with the name «wled-WLED«or something similar. You can see a number written next to it, that’s the IP Address. In my case it was 192.168.1.26 . Now go over to the WLED App and click on the plus icon again, and write down the IP address. It should be working now! You can also use the IP address to control the Lamp through Chrome, Safari etc,
Step 6: Quick Test
Before soldering and assembling the lamp we need to make sure that everything is working correctly.
Lastly, connect the battery by connecting the positive (+) to 5V and the negative (—) to GND. Open the app on your phone and check to see if everything is working as it should by trying different colors and effects. In our case everythings is working well but before you go soldering everything together go to Settings > Led Preferences and change the Led Count to 60 (it was probably defaulted to 30) and also adjust the Maximum Current as you like. I decided to put it at 1A=1000mA for a good balance between brightness, battery life and heat produced.
Step 7: Circuit
It’s finally time to start soldering and putting everything together!
EDIT: It would be better to connect the capacitor the 5V and GND of the led strip
Step 8: Installing the Switch
- Solder a, preferably red, wire on the one pin of the switch.
- Solder two more red wires on the other pin.
- Push the switch into place.
Step 9: Soldering the Battery
Soldering Li-On batteries can be really dangerous, so please be careful.
- Solder a red wire to the battery’s positive side
- Solder a black wire to the battery’s negative side
- Push the battery into place
Step 10: Soldering the TP4056
- Connect the cathode of the Capacitor (the side with the white line) to the negative output of the TP4056 and the anode to the positive. (This capacitor is used to smooth out the output current of the charger module and it is not necessary for the circuit to work)
- Connect two black wires to the negative output of the TP4056 as well.
- Connect the single wire of the switch to the positive ouput.
EDIT: It would be better to connect the capacitor the 5V and GND of the led strip
Step 11: Installing the Led Strip
- Wrap the led strip around the «LedHolder», make sure to also secure the strip into the two integrated clips of the holder.
DIY WiFi RGB LED Soft Lamp
About: I’m an IT guy, maker, hobbyist, really like to make different things with kids and play/test with them in a spare time. More About IgorM92 »
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
• power cord with plug and switcher on it
• 3D printer with Clear and Black filament
Step 1: 3D Print Parts
All attached STL models, except diffuser could be printed with any desirable settings.
Supports: NO (YES only for the base model)
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.
Attachments
Step 2: Soldering
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.
Step 3: Configure and Upload Software
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.
Attachments
Step 4: Assembling
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)
Now you can turn it on and find some light animation that you’ll love.
Be the First to Share
Did you make this project? Share it with us!
Recommendations
Project-Based Learning Contest
Make It Bridge
Unusual Uses Contest
16 Comments
Hi Igor,
I made a lamp. In wifi mode it works fine but i can’t get it to work in ap mode. I can connect with the ssid. I provided a password in the secrets.h file but when connecting to the lamp it does not ask for a password. But when i open my browser nothing happens
I hope that you can give me some pointers. By the way i’m a newbie when it comes to programming so that’s probably the problem.
Hey Igro. Very nice project! Where can i find the code of your Project?
Hello. Nice to hear that this project people likes. Not sure what has happened but zip file has disappeared and was found in the project’s library. I’ve reattached the zip file file with the code to the step #3.
Kind regards, Igor