In this project, we’ll design a Voice controlled home automation using Arduino and the Elechouse V3 Voice Recognition Module. The system will also integrate a WiFi smart plug for wireless appliance control and an infrared-based remote control module to command legacy IR appliances like TVs and air conditioners.
This project enables hands-free, wireless, and remote control of multiple home devices using locally processed voice commands—no internet or cloud APIs required for core operations.
🔧 Voice controlled home automation using Arduino Hardware Components
Component | Description |
---|---|
Arduino Uno R4 WiFi | Microcontroller with built-in WiFi |
Elechouse Voice Recognition Module V3 | Local voice command processing module |
WiFi Smart Plug (Tuya / ESP-based) | Wirelessly controlled plug via MQTT or HTTP |
IR Transmitter Module | For sending IR commands to home appliances |
IR Receiver Module (TSOP1838 or similar) | For capturing IR remote codes (learning function) |
Relay Module (Optional) | For controlling high-voltage appliances |
Jumper Wires, Breadboard, 5V Regulator | Standard prototyping components |
USB Cable | For Arduino programming |
System Architecture
The Arduino voice recognition project is built on three main pillars:
Voice Command Recognition using the Elechouse V3 Module
Command Execution via:
WiFi Smart Plug (HTTP/MQTT over WiFi)
IR Transmission to control remote devices
Relay for manual AC loads
Arduino Uno R4 WiFi acts as the central controller and interface
Elechouse V3 Voice Module Setup
The Elechouse V3 is a compact voice recognition module that can store and recognize up to 80 commands, but only 7 can be active and recognized at the same time. Each command can have a duration of 1500 milliseconds (1.5 seconds).
This board has 2 controlling ways: Serial Port (full function), General Input Pins (part of function). General Output Pins on the board could generate several kinds of waves while corresponding voice command was recognized.
It’s important to note that the module can be trained to recognize various types of sounds—not just human voices. For example, it can detect sounds like rainfall, a dog barking, and more. This functionality opens up a range of possibilities; for instance, automatically closing windows when it rains or triggering a mechanism to feed the dog when barking is detected.
Pin Configuration:
Module Pin | Arduino Pin |
---|---|
VCC | 5V |
GND | GND |
RX | D11 |
TX | D10 |
Use SoftwareSerial on pins 10 and 11 for communication.
Training Voice Commands
Connect the module via Arduino serial monitor or Elechouse GUI tool.
Train commands such as:
“Turn on light”
“Turn off fan”
“Activate TV”
Each command is stored in a group (Group1, Group2…) and can be activated accordingly.
🌐 Arduino Uno R4 WiFi Integration
The Arduino Uno R4 WiFi includes the RA4M1 32-bit microcontroller and ESP32-S3 coprocessor, ideal for lightweight network communication.
WiFi Smart Plug Control
Use HTTP requests or MQTT to communicate with an ESP-based plug (like Tuya converted with Tasmota or ESPHome).
Example HTTP command to turn on a smart plug:
WiFiClient client; if (client.connect(“192.168.1.150”, 80)) { client.println(“GET /cm?cmnd=Power%20On HTTP/1.1”); client.println(“Host: 192.168.1.150”); client.println(“Connection: close”); client.println(); } |
Pre-requisites:
Configure smart plug with static IP
Flash with Tasmota/ESPHome firmware if needed
IR Remote Device Control
Use an IR LED (TSAL6200 or similar) to send commands captured via an IR receiver.
IR Learning:
Use IRreceiver and IRremote library to read codes from your existing remote.
Store and assign codes to voice commands.
Send them using the IRsend class.
#include <IRremote.h> void sendTVPower() { |
Example Workflow
User says: “Turn on light”
Elechouse recognizes the phrase and sends command ID to Arduino.
Arduino:
If mapped to a relay, activates it
If mapped to smart plug, sends HTTP/MQTT command
If mapped to TV, sends IR command
To connect an Arduino Uno R4 WiFi to a smart plug, you’ll typically need to communicate with the smart plug over Wi-Fi using its API or control protocol.
1. Choose a Compatible Smart Plug
Make sure the smart plug supports local control (like HTTP or MQTT) or is Tasmota/ESPHome-flashable. Popular options:
TP-Link Kasa (local HTTP API possible with hacks)
Sonoff plugs (flashable with Tasmota for MQTT control)
Tuya plugs (can be flashed or controlled via Tuya Cloud API)
2. Connect Arduino Uno R4 WiFi to Your Network
Use the WiFiS3.h library:
#include <WiFiS3.h> const char* ssid = “Your_SSID”; void setup() { while (WiFi.status() != WL_CONNECTED) { Serial.println(“Connected to WiFi”); |
3. Control the Smart Plug
Option A: Via HTTP (Local API)
If your smart plug supports local HTTP control, send a request like:
#include <WiFiS3.h> const char* plug_ip = “192.168.1.100”; // IP of your smart plug void loop() { |
Option B: Via MQTT (for Tasmota or ESPHome)
Use an MQTT client library like PubSubClient to publish ON/OFF commands.
4. Test the Setup
Monitor the serial output.
Confirm the smart plug toggles state when expected.
Since you’re using an ESP8285-based smart plug, you have a few good integration options depending on how the device is set up.
Option 1: Flash the ESP8285 Plug with Tasmota
Recommended if you want full local control.
🔧 Steps:
Flash Tasmota Firmware to your ESP8285 plug (via serial interface).
Configure Tasmota to connect to your Wi-Fi and set up MQTT.
Install an MQTT broker like Mosquitto on a local server or use a cloud broker.
Arduino Uno R4 + MQTT Example:
Using the PubSubClient library:
#include <WiFiS3.h> const char* ssid = “Your_SSID”; WiFiClient wifiClient; void setup() { client.setServer(mqtt_server, 1883); // Turn ON plug // Or Turn OFF void loop() { |
NOTE: The topic “cmnd/plug/power” depends on your Tasmota plug configuration.
Option 2: Control via Tuya Cloud API
If your plug is Tuya-based and not flashed, you can use Tuya’s cloud API. However, Arduino doesn’t natively support HTTPS requests easily, and cloud APIs introduce latency.
You’ll likely need an intermediate device (like a Raspberry Pi) to bridge the cloud commands.
Option 3: ESP8285 Plug with Custom Firmware for example ESPHome
If you’ve flashed ESPHome, use Home Assistant or a direct REST API or MQTT call.
Final Notes:
Flashing firmware requires disassembling the smart plug and using a USB-to-Serial converter (be cautious with AC wiring!).
MQTT is the most efficient and Arduino-friendly way to control ESP8285-based smart plugs.
Arduino Sketch (Simplified):
#include <SoftwareSerial.h> SoftwareSerial voiceSerial(10, 11); // RX, TX const char* ssid = “Your_SSID”; void setup() { while (WiFi.status() != WL_CONNECTED) { void loop() { void sendSmartPlugCommand(String state) { void sendTVPowerIR() { |
Testing & Calibration the Elechouse V3 voice recognition with Arduino
Use serial monitor for debug output.
Verify each command matches the expected action.
Train multiple phrases for each device for redundancy.
✅ Pros
Advantage | Description |
---|---|
Local voice processing | Works without internet |
Expandable to multiple devices | Relay, IR, and WiFi plug supported |
Secure & customizable | No dependency on cloud voice APIs |
ESP32 co-processor support | Enables future AI or OTA features |
❌ Cons
Limitation | Mitigation Tip |
---|---|
Limited to 7 active commands | Use command grouping in Elechouse module |
Voice recognition less accurate in noise | Train in quiet environment |
Requires good WiFi setup for plugs | Use static IP and strong signal |
Infrared requires line-of-sight | Mount IR LED in clear line to target device |
home automation with voice commands Future Improvements:
Integrate Google Assistant or Alexa via IFTTT for extended voice control.
Add OLED display to show system status or recognized commands.
Use Bluetooth fallback mode in case of WiFi failure.
Watch this video for Arduino voice recognition project additional information
Conclusion
This voice-controlled home automation project demonstrates the capability of Arduino Uno R4 WiFi in combination with the Elechouse V3 Voice Recognition Module to create a reliable, offline, and expandable system. By integrating WiFi smart plugs and infrared modules, it offers a full suite of control options for both modern and legacy appliances.
FAQ:
- Can I create a voice controlled home automation system using Arduino without internet access?
Yes. home automation with voice commands using Arduino with the Elechouse V3 module works offline since the voice recognition is processed locally. - Is the Arduino Uno R4 WiFi suitable for voice controlled home automation using Arduino?
Yes. The Arduino Uno R4 WiFi is ideal for voice controlled home automation using Arduino due to its built-in WiFi capabilities and compatibility with voice modules. - Do I need programming experience to build a voice controlled home automation using Arduino?
No. Basic programming knowledge is helpful, but many voice controlled home automation using Arduino projects come with ready-to-use code and wiring guides.
See Also:
Build a Smart Pet Feeder Using Arduino Uno R4 Essential Guide