Introduction: Accu Multicololred LED Lamp With Weather

Dear All

There is a project with Accu rechargable WS2812 LEDs lamp, which can be controlled by Wifi with any browser capable devices as well can be integrated into the Apple Home Kit and controlled via them

Some feathures:

1. Integrated 2xAccu 18650 provides ~12 working hours without external power on the mid brightness

2. Built-in OLED 0.96 display

3. Weather sensor BME280 to measure Temperature, Humidity and Pressure. Data can be displayed on the Web or on the integrated 0.96 OLED display

4. Micro USB port for recharging

Step 1: Make a Body

I have printed all part on my 3d printer

1. Body

2. ESP32 Dev board cover

3. Support for USB charger controller with my own design,see attached STL

Step 2: Electronic Part

To create this project you need

1. ESP32, i have used ESP32 dev board

2. OLED display , I have used 0.96 inch within SSD1306 chip

3. BME280 sensor

4. 2x 18650 Lithium Accu 3000 mAh/h

5. USB lithium charger module

6. DC-DC step UP

7. Any Switch

8. WS2812 LEDs strip 120 LEDs per meter approx 1.5 m

8. Some Wires

Step 3: Assembling and Wiring

The assembling can be done with a following step

1. Put ESP32 on the cover and solder wires to appropriate PINs, according wiring diagram

2. Put 2x18650 together and solder them as parallel

3. Put USB charger on the suppport and than to the bottom of body to be alligned with appropriate hole, fit hole if neccessay

4. Put switch into another hole

5. Solder out Accu 18650, Switch, USB charger and DC-DC step out ( do not attach ESP32 !)

6. After power switching ON, adjust output voltage of DC-DC to ~5v using built-in potentiometer

7. Insert OLED display on the wall. Adjust rectangle on the body if necessary

8. Solder out other part, ESP 32, Display , sensor and WS2812 connectors

8. Wrap WS2812 strip on the body tube. Hide wires iside of the tube

Some tricks:

  • I have uses hot glue and B7000 to fix all of the items
  • Resistor is soldered outside of the ESP box, directly between wires
  • All wires soldering covered by thermo shrink tube

Step 4: Programing ESP

For this project I have used universal software, developed by myself

Please have a look github page

This contains full instruction how to compile and setup

For this project configuration filed are attached as example.

Hovewer you can do this manually with a neccessary adjustment

What you need check and change:
1. Services.json - adjust "numleds": xxx, where xxx number of your actual LEDs, after strip cutting

2. config.json - set proper host name for your device "localhost":

3. config.json - set proper values for your mqtt connection: "mqtt_host","mqtt_port":,"mqtt_user","mqtt_pass". , if mqtt_host is empty, device will not try to connect to mqtt

Step 5: Enjoy

Now, when everything done you can enjoy with your lamp and manage via Web interface

This lamp I didn't integtared yet to Apple Home Kit, but this is quite simple, you need to small changes in configuration files. After that you will be able to control device via Apple Home kit

To do that please have a look similar project

and read wiki

Step 6: FAQ, Tricks and Troubleshootting

  1. Some manufactures of WS2812 is not working, because it's requires 5v logic, but ESP32 provides 3.3 v

This issue can be resolved by following ways

  • Try to decrease voltage of DC-DC step out to 4.7-4.8 V. Generally it helps with 80%
  • Put any diode between +5 v output and WS2812 +5v input. Diode will drop voltage by 0.6-0.8 volt and it will help

2. In given example and firmware expected that WS2812 LEDs will gave GRB sequence, hovewer i meet a lot of strips within RGB. To resolve this you can change firmware of just simple add a new setting into the the services.json for "rgb_startled":1 for RGBStripController service defintion. This is means that RGB sequence will start from the LED #1. As well if you wired two strips within different sequence. for instance firts strip is 30 Leds GRB and second 60 led RGB you can define "rgb_startled":31, and two lents will works properly together

3. Given ESP32 firmware already support another wether sensor. like DHT12, Dallas. It can be easilly installed with them as well