A WiFi controlled desk light, essential for every 3D printing enthusiast and a great way to get into coding.
Controlled via an easy to use web interface that runs on the ESP8266.
It features a webserver running on ESP8266 that allows for easy access to the different patterns, brightness and power control. Everything was designed in Fusion360. The code was written in Visual Studio using the Visual Micro plugin.
I've used ICEFILAMENTS white & black PLA to print my parts. I recommend printing with 100% infill. All parts should be printed in black, except for the diffuser that one should be white.
The electronics & screws can be seen in the picture below:
Now that you have printed your parts, you can slide in the leds into the core.Start by sliding in the leds from the top, the arrow must point from the base to the top.Afterwards cut the strip using scissors so they do not stick out on the top or the bottom.
Next cut another strip with the same length and slide it into the next slot. Now the arrow must point from the top to the bottom.
Repeat this and swap the direction every slot until all slots are filled with the strip.
Use some 3 pin wire to connect the pieces together. When all pieces are connected, then the arrow must point in the same direction when following the wiring order.
Finally solder the starting point of the strip to the Wemos D1 mini, the arrow must face away from the microcontroller.
If you are using the microphone sensor connect it to the 5V power and the AD Pin to the A0 pin of the Wemos D1 mini.
Take 8x M3 * 8 bolts and nuts to attach the core to the connecting plate.
Make sure the cutouts for the pillars are on the bottom.
Connect all components according to the wiring diagram. Add the logic level shifter if the LEDs 'glitch'.
Position the pillars onto the holes of the connecting plate of the core. Take 4x M3 * 8 bolts to attach the plate to the pillars of the base.
The software runs on the ESP8266. The web app is stored in SPIFFS (on-board flash memory). I've forked jasoncoon's esp8266 fastled webserver and added some extra functionality, made a proper config area and created custom patterns for the lamp.
The software and detailed setup instructions can be found on GitHub.
For beginners I would recommend watching this setup tutorial below.
Step Eight: Connect to the web interfaceType the IP address of the Wemos D1 mini into any web browser on any mobile device and have fun! The IP can be found by connecting with the serial monitor or by looking at your routers client list.
Issues while compiling
- Compiling shows
typedef bool error
: You might have esp8266 2.5.x installed in combination with an old version of fastled, install esp8266 2.4.2 or upgrade FastLED to 3.2.9. - Compiling shows tons of errors: You might have FastLED 3.2.7 installed, install 3.2.6 or update to 3.2.9.
- Sketch Data Upload does not work: Try to install Arduino IDE 1.8.7 or 1.8.8Don't install hourly or beta builds of the Arduino IDE.
- The Arduino IDE doesn't show the other files and says that files weren't found: The Arduino IDE requires that the filename of the.ino file has the same name as the folder it is in, if the names do not match, then the.ino file will be moved into a new folder, to fix it move the file up to the other files and make sure the folder name is the same as the one of the file.
- Secrets.h file not found: Create the Secrets.h file according to the instructions.
Issues while uploading
- The Arduino doesn't boot when the LEDs are attached: The LEDs might be wired in the wrong direction, the arrow must point away from the ESP8266.
- The Sketch-Data-Upload outputs "esptool.exe not found:" Check if you are using Arduino IDE version 1.8.7 or 1.8.8, newer version might throw this error.
Issues with the Webinterface
- The website just shows "not found :/"Check if you have uploaded the Sketch-Data.
- Check if the Sketch-Data-Upload was successful.
- The website doesn't load Check if you have entered the correct IP address. You have to be in the same network as the device.
Issues with the LEDs
- The LEDs flicker a lot You might have bad soldering spots.Try to use a logic level shifter to shift the supplied data signal to 5V.
- Not all of my LEDs turn on Check if you have correct values for
LINE_COUNT
andLEDS_PER_LINE.
Check the wiring for errors. - My LEDs just light up white You might have FastLED 3.2.8 installed, install 3.2.6 or update to 3.2.9.
- Can I connect to the ESP8266 from outside of my local network? Yes, you can do this by creating a port forwarding rule on your router
- Can I use the NodeMCU for this project? Yes, but it is way harder to position it into the base of the lamp
- Can I use other LED-Strip types for this project? Yes, any FastLED compatible LED-Strip can be usedJust change the
LED_TYPE
Some Strips require changes to the FastLED.addLeds(...) lineA list of all compatible LED-Strips can be found here. - What power supply should I choose? 100x WS2812 LEDs draw around 3A, I would recommend 5V 3A for 60LEDs/m.
Comments