Automatic Light Switch
This project will make it so you can control your light switch from anywhere as long as you're connected to the same wifi network!
Created by
Andrew Kxu
Tier 4
2 views
0 followers
Timeline
alexren ⚡🚀
approved Automatic Light Switch ago
Tier approved: 4
Grant approved: $28.00
nice job on this project! i think its a really cool practical print and you should definitely post in #blueprint once you're done!
Andrew Kxu
submitted Automatic Light Switch for review ago
Andrew Kxu
added to the journal ago
Progress Update
Hey guys! It's been a while, but I've tried to work on it as much as possible. I probably should be studying for finals instead of doing this, but whatever.
Updated BOM (hopefully final???)
White PLA
SG90 Servo
Custom PCB
ESP32 C3 Plus Mini
M3 Screws
USB-C Power Supply
MAX9814
GY-302
0.96in OLED
I removed the pin headers and replaced the Seeed Studio ESP32-C3 with an ESP32-C3 Super Mini Plus. Although the Plus version is slightly more expensive than the regular one, the onboard U.FL port lets me mount an antenna to it, which is essential since my room is in the corner of my house, far away from the AP. The pin headers were just an extra cost since I could just SMD solder to the PCB.
CAD and Assembly
I've designed the case for the PCB in SolidWorks. The lid has a hex design not only for looks, but also for it to connect to wifi better and for the ambient light sensor to detect light. I might tweak the design a little bit after I get the PCB.

Final Thoughts
I'll now work on the repository and code the device. I should be able to submit it in a few days and get the PCB right after Prototype. Happy holidays!
Andrew Kxu
added to the journal ago
Designed the PCB
What's up guys, today I went onto KiCad and designed the PCB. I thought just a regular light switch was boring, so I added some customization.
Updated BOM
- White PLA
- SG90 Servo
- Custom PCB
- SEEED Studio ESP32C3
- M3 Screws
- USB-C Power Supply
- Pin Headers
- MAX9814
- GY-302
- 0.96in OLED
I added the MAX9814 so I could control the light switch with a sound like a clap or keyword. The GY-302 and OLED work together. When the sensor detects low ambient light, it dims the OLED. The OLED is there to add a bit of life to the switch. I plan to add faces to it.

When selecting the microcontroller, I ran into a problem where there weren't any with footprints except for the XIAO. I ended up choosing the XIAO for this reason. I also learned that you can share the SDA and SCL pins with several sensors because each sensor has a different address. Next, I will design a case for it, and it should be ready for submission!
Andrew Kxu
added to the journal ago
Planning the build...
Hey guys! Back with another project. Today, I wanted to build an automatic light switch. I find it hard to wake up, especially in the winter. When I wake up, it feels like it's still the middle of the night, so I just fall back asleep.
Criteria!!!
- Can be online via an app or website
- In order to be online it needs to have wifi
- Needs to switch the light switch somehow
- Needs to be aesthetically pleasing
Solution
For the first and second criteria, I can fulfill those with a WiFi-capable microcontroller. A cost-effective one would be the ESP32. For the third criterion, I could either use a servo or a relay. This leads me to my fourth criterion. Obviously, a relay inside the wall would be the most aesthetically pleasing solution. However, I don't think tampering with the wiring in my house is a good idea, so I'll create an enclosure to house the electronics.
BOM(probably incomplete):
White PLA
SG90 Servo
Custom PCB
SEEED Studio ESP32C3
M3 Screws
USB C Power Supply
Pin Headers

Andrew Kxu
started Automatic Light Switch ago