Home AutomationFebruary 2026
Automated Light Switch
Build Photos
1 / 3



About This Project
Building an automated light switch using two servo motors connected to an ESP32 that can communicate with Alexa. The goal was to learn how to use different devices with the ESP32 and create a project that combines the ESP32's Bluetooth and Wi-Fi features.
Connected the ESP32, battery pack, MOSFET, and resistors onto the breadboard, then tested power delivery and ESP32 communication before attaching the servos.
Mounted the breadboard, battery pack, and rocker switch onto a painted cardboard frame and prepared loose wiring for the final servo motor connections.
Parts & Components
- ESP32 Microcontroller
- Serves as the main controller, communicating via Wi-Fi and Bluetooth, receiving signals from Alexa and triggering servo movement.
- 2x Servo Motors
- Mechanically press/flip the light switch.
- 4x AA Battery Pack
- Powers the servos separately to provide consistent voltage.
- IRLZ44N MOSFET
- Extends battery life by cutting power when the servos are idle.
- 10kΩ Resistor (Gate Pulldown)
- Ensures the MOSFET stays off during ESP32 boot and prevents random servo activations.
- 220Ω Resistor (Gate Series)
- Protects the ESP32 pin and reduces switching noise.
- Breadboard
- Base of the project, allowing for clean wiring.
- Rocker Switch
- Manual control to turn servo power on and off.