Thursday, January 03, 2019

Wifi based DIY 5V switcher for led-lights

There are so called "USB Fairy Lights" or "USB String Lights" can be purchased from china for less than 3$ for a 10m/100Led set.

These are 5V USB powered and weather-proof(except the USB connector part). I was curious to know more about these lights, and had a detailed look, this is what i found,

and a closup of the LED,

5V powered 100LED circuit was consuming around ~1.8Watts(though 5.1Ohm series resistor was really hot) and the brightness of the LED's were not bad, especially difference between first led and last led brightness didnt bother me it was hardly noticeable when seen from distance. So I decided to use them as a christmas decoration for my garden.

I wanted to use them with battery-bank as there was no power-outlet readily available(for the safety of my children, i would avoid any 230v circuit in my garden especially in wet weather).
Also I wanted them to be switchable remotely to avoid going out in the freezing cold. Hence this is what i came up with.. an "ESP-12F based USB-5V switcher"

Although It works as intended, but with tasmota firmware, due to missing deep-sleep feature, i need frequent battery charging(every few days). Larger battery bank and ESP-8266 deepsleep would make this setup work for weeks before battery needs recharge.

Incase if you want to build this 5v switcher, here are some details,

Note: Before starting the assembly, ensure that the ESP-12F module is pre-programmed with tasmota or any other firmware that supports OTA. For the first time programming of ESP-12F module, here is my blog explaining the details of ESP-12F module programming.

Items Needed:

Assembly Step-1:

Assembly Step-2:

Assembly Step-3:

Assembly Step-4:

Assembly Step-5:

Assembly Step-6:

Assembly Step-7:

Assembly Step-8:

Assembly Step-9:

Final Assembly: 

Let me know in comments sections if you have suggestions or improvements. Hope you find this low-cost DIY project useful.


Unknown said...

Hi, I really like your project and will try it out myself.
And I have one question:
is there a specific reason why you use two diodes instead of a 3.3v regulator?
I don't have diodes lying around but loads of those regulators ^^.

ADAV said...

Jan Ryklikas: 3.3v regulator is even better, i just used 2 diodes to bring down the 5v to 3.6v

ed said...

Pretty compact. I have used an esp8266-01 for something similar but hardly as compact

Ener-jblog said...

Amazing post. Thanks for sharing.
ENERJ WIFI Smart Plug Socket