Introduction: Practical Arduino ESP32 Wireless Wall Outlet LED Strip Controller

This is a very practical DIY Wireless Wall Outlet controller for low cost LED strips.

It replaces the cheap wifi controllers sold on EBay. They work well with RGB Led strips. The EBay Wifi controller is not constructed well, and breaks easily. Also, I seem to unable to find it whenever I want to use it, and they are not that appealing. There is another option by using an free App with either Android or IOS. The downside of that is I don't always carry the phone around the house. Even if I do, I have to start the App before using it. Not straight forward for my other family members, old and young. The wall switch concept is more intuitive and socially accepted. Most importantly, if I use the phone to control multiple lights in the house, I need to register with the app with all my house Wifi information (SSID, password, etc). with a server sitting in Asia, which I don't feel very comfortable with.

Some other folks seem to be able to crack and re-program the cheap controller and run IFTTT, which could be challenging for some. With this project, I can use my lighting the traditional way, more conveniently, and most people know how to use it. Since there is no modification to the controller, you can still use it with AWS echo or Google Home. I subsequently laid out a PC board for it to increase reliability and eliminated soldering wires. There is no wire to pull, and the range covered is pretty good, I tested out to 50'. Most switches will be installed close to the light anyway. I can build as many as I want for about $20 each, easily. Oh, plus a $5 power brick to power it.

Cost:

Less than $20 project, + $5 for a power brick.

Tools:

Soldering iron

screw driver

A PC for software Arduino IDE development

Supplies

1 x Arduino ESP32 controller from EBay

1 x 2.4" TFT color LCD display with touch pad input

1 x 0.1" grid 2" x 3" prototype board

Electronic wire-wrap wire

Soldering lead

2 x 2"x 1" Flex plastic

2 x electrical wall outlet screws

4 x #4, or #6 machine screws and nuts

A bunch of single-in-line IC socket headers, from our local electronic surplus store

Step 1: Solder Headers Onto Prototype Board

I used a ESP-32 module from EBay for under $6, and a 2.4" TFT LCD with touchpad for $7

Solder single-in-line socket headers cut to fit for the ESP-32 onto the prototype board. It depends on your switch application to tailor the prototype board size. I simply match the prototype board as the same size as the LCD module. The latter I have no control over it, but it is a popular one on EBay or AliExpress.

The LCD module size just fit right behind a regular rocket switch front plate. If you line up properly,and solder two single-in-line socket headers on the underside of the prototype board, you can use the headers to mate the two boards together without using any screws. They hold up pretty well, and can be easily detached for debugging.

Step 2: Solder Wires to Connect Headers for Both ESP32 and LCD Module

Follow the schematic, solder wire-wrap wires from the ESP32 module header to the underside header pins. It looks complicate in the beginning, but there are actually 14 wires only , plus 3 jump overs. It took me about an hour to do it.

There is no soldering needed on the LCD module. For the board to mate to the prototype board, you need to solder a 4-pin header to it at the other end though. Most LCD modules do not come with it.

Step 3: Making a Mounting Bracket

Cut the two plastic pieces into same width as the LCD module, and use a regular rocket switch as a template to drill holes on the plastic for making a mounting bracket. This takes some patience to line them up. Use some #4, or #6 machine screws and nuts, and spacers, to bold the plastic plate to the LCD module as in the picture above. I experimented one with plastic and one with zinc metal plate. The plastic is definitely easier to handle and tooled, and is strong enough to support the whole switch. I got away with spacers with the plastic one, as I can just tap the screws into it.


The whole thing should be fit inside a regular electrical wall outlet box. Depending the box is plastic or metal, and brand, you may have to trim that a little bit. The normal blue plastic outlet box has screw holds that may need to be trimmed back a little bit. I use a Oscillating Multi-Tool to trim that in a snap.

Step 4: Develop the Controller Software

This is the assumption that you need to be familiar with the Arduino Sketch IDE environment. I can provide a binary that should work if you follow the schematic to build the prototype board. Since there are so many webpages discuss about Arduino Sketch IDE tutorial, and as such, it will not be covered here.

Step 5: Download the Control Firmware

Similar to the previous section, there are so many web tutorial about how to program Arduino module. such as pytool. I can provide the binary file for your testing. The software is still evolving, and is provided as is, without any warranty or any assumption of liability. User can use it freely without modification, at their own risk.

Step 6: System Testing

The controller started up in the light switch UI page, as this is a light controller. It works with popular WiFi RGB Led strip controller. The main menu has 6 Icons, and I hope everything is graphically self explanatory.

One thing needs to point out is that you need to go to the main page by pressing the Google like 9 squares button, then the top left setting Icon to choose WiFi button. It then will automatic scan all wifi AP, and you should select the WiFi controller based on their MAC address. The information will be saved for subsequent sessions.

The embedded video demonstrate:

1. A handheld prototype version powered by battery controlling a RGB light strip located in ceiling molding. This allows me to shot the video for both at the same time.

2. A installed version inside a regular wall switch box.

Arduino Contest 2020

Participated in the
Arduino Contest 2020