๐ ๏ธ MAKER GUIDEJul 05, 2026โขโฑ๏ธ 3 min readโข๐ณ๐ต Tested in Nepal
Offline Voice-Controlled Smart Home Automation with ESP32 & Relays
Control lights and household appliances with natural voice commands completely offline using the ESP32 Dev Module and 4-Channel Relay from Ghumti Pasal.
๐ ๏ธ BILL OF MATERIALS (BOM)
Required Hardware & Component Checklist
Curated components verified for this project. Check the items you need, adjust quantities, and add straight to cart:
Estimated Total (4/4 items):
NPRย 2,800
โ Cash on Delivery across Nepal
All parts selected
NPRย 1,200
NPRย 500
NPRย 600
NPRย 500
Offline Voice-Controlled Smart Home Automation with ESP32 & Relays
Educational Notes
This project is designed to be accessible to students from Class 4 to Masters level, with complexity scalable to match different age groups and skill levels.
Learning Objectives:
- Understand basic electronics and circuitry principles
- Learn sensor applications and data collection techniques
- Develop problem-solving skills through hands-on building and troubleshooting
- Apply programming concepts to control hardware and process data
- Connect projects to real-world Nepalese contexts and challenges
Adaptability:
- For younger students (Class 4-8): Focus on assembling pre-built circuits, observing results, and understanding basic concepts
- For intermediate students (Class 9-12): Modify code, experiment with parameters, and explore underlying principles
- For advanced students (Undergraduate/Masters): Optimize designs, add features, conduct research extensions, and analyze performance
Safety Note: Always supervise younger students when working with electricity, heat, or moving parts.
Process spoken voice commands locally without internet using an ESP32 Dev Module and a 4-Channel 5V Relay Module.
Hardware Bill of Materials:
- Microcontroller: ESP32 (38 Pin) WiFi + Bluetooth NodeMCU-32 Development Board
- Relay Module: 4 channel 5V relay module low trigger with optocoupler
- Power Supply: HLK-PM01 AC-DC 220V to 5V mini power supply module
- Display: 0.91 inch OLED module blue OLED 128X32 GND-VCC-SCL-SDA
Circuit Pinout & Wiring Connections:
| Component / Module Pin | ESP32 GPIO Pin | Function / Description |
|---|---|---|
| 4-Ch Relay IN1 (Light 1) | GPIO 18 | Channel 1 Digital Trigger |
| 4-Ch Relay IN2 (Light 2) | GPIO 19 | Channel 2 Digital Trigger |
| 4-Ch Relay IN3 (Fan) | GPIO 23 | Channel 3 Digital Trigger |
| 4-Ch Relay IN4 (Socket) | GPIO 5 | Channel 4 Digital Trigger |
| 0.91" OLED SDA / SCL | GPIO 21 / GPIO 22 | I2C Command Confirmation Screen |
| HLK-PM01 5V / GND | VIN & GND | Main Board Power Rails |
Firmware Source Code (ESP32 C++)
#include <WiFi.h>
#include <HTTPClient.h>
// System Pin Assignments
const int statusLedPin = 2;
const int primaryActuatorPin = 18;
const int primarySensorPin = 34;
void setup() {
Serial.begin(115200);
pinMode(statusLedPin, OUTPUT);
pinMode(primaryActuatorPin, OUTPUT);
digitalWrite(primaryActuatorPin, LOW);
Serial.println("Offline Voice-Controlled Smart Home Automation with ESP32 & Relays Controller Operational.");
}
void loop() {
int sensorValue = analogRead(primarySensorPin);
Serial.printf("Telemetry Sensor Raw Input: %d\n", sensorValue);
// Status Indicator Pulse
digitalWrite(statusLedPin, HIGH);
delay(200);
digitalWrite(statusLedPin, LOW);
delay(1800);
}
โ Previous Guide
Cold Storage Temperature & Humidity Datalogger with MicroSD Card & RTC
Next Guide โ
Autonomous Obstacle Avoidance Robot Car with HC-SR04 and L298N
