Community project

ESP32 Voice Home Controller

Photo of ESP32 Voice Home Controller
Generated with AI

genesis patinga

Published December 1, 2026

This project demonstrates a simple home automation controller using an ESP32 microcontroller that responds to serial commands to toggle two separate devices. The build uses an ESP32, two LEDs with current-limiting resistors, and basic wiring to create a foundation for learning microcontroller-based device control.

The guide includes a complete parts list, wiring diagram showing LED connections to GPIO pins 18 and 19, step-by-step assembly instructions, and pre-written firmware that listens for serial commands to turn each light or device on and off. This hands-on project teaches GPIO control, serial communication, and the basics of building an extensible home automation system.

Wiring diagram

Wiring diagram for ESP32 Voice Home Controller
Loading diagram…

Gather all the parts

QtyComponent
1

LED

Red

Standard 3mm/5mm through-hole LED. A current-limiting series resistor is added automatically.

1

Resistor

220 Ω

Through-hole resistor (current-limiting in series with an LED)

1

LED

Green

Standard 3mm/5mm through-hole LED. A current-limiting series resistor is added automatically.

1

Resistor

220 Ω

Through-hole resistor (current-limiting in series with an LED)

Assemble it in 1 step

1. Wire the two demo lights

With USB unplugged, put each LED on a breadboard. Connect each short leg to GND. Connect the red LED's long leg through its own resistor to GPIO18, and the green LED's long leg through its own resistor to GPIO19. Use a USB data cable for power and commands.

  • Do not connect wall wiring or appliances to these pins.

Review all connections

1. Connections between "r1" and "ESP32"

Functionr1ESP32
digitalP1GPIO 18

2. Connections between "led1" and "ESP32"

Functionled1ESP32
digitalANODE → Resistor P2EXT
groundGNDGND

3. Connections between "r2" and "ESP32"

Functionr2ESP32
digitalP1GPIO 19

4. Connections between "led2" and "ESP32"

Functionled2ESP32
digitalANODE → Resistor P2EXT
groundGNDGND

Deploy the firmware

#include <Arduino.h>
constexpr int LIGHT_PIN = 18;
constexpr int DEVICE_PIN = 19;
void setup() {
  pinMode(LIGHT_PIN, OUTPUT);
  pinMode(DEVICE_PIN, OUTPUT);
  digitalWrite(LIGHT_PIN, LOW);
  digitalWrite(DEVICE_PIN, LOW);
  Serial.begin(115200);
}
void loop() {
  switch (Serial.read()) {
    case 'A': digitalWrite(LIGHT_PIN, HIGH); Serial.println("Lights on"); break;
    case 'a': digitalWrite(LIGHT_PIN, LOW); Serial.println("Lights off"); break;
    case 'B': digitalWrite(DEVICE_PIN, HIGH); Serial.println("Device on"); break;
    case 'b': digitalWrite(DEVICE_PIN, LOW); Serial.println("Device off"); break;
  }
  delay(2);
}

Download project files

Remix this project

Make it yours in one click

Open a full copy of this project in your own Schematik workspace, diagram, code, parts, and assembly steps included. Swap the sensor, add features, or redesign the whole thing with AI. The author's original stays untouched.

Open in Schematik