Control Your Home With Just a Wave and a Word
by rohanbarnwal in Circuits > Arduino
106 Views, 4 Favorites, 0 Comments
Control Your Home With Just a Wave and a Word

Imagine walking into a room and turning on the lights with just a wave of your hand-or commanding your fan to start with a simple voice prompt. No switches, no remotes-just effortless control. Sounds futuristic, right? Well, that future is now!
This project brings gesture and voice-controlled home automation to life using DFRobot's Gravity: GR10-30 Gesture Sensor and Gravity: Offline Language Learning Voice Recognition Sensor. With a simple swipe or voice command, you can control your appliances, making your home not just smart but truly intuitive and touch free!
How It All Started
I got my hands on these amazing DFRobot sensors and immediately started wondering: What cool project can I build with them? After exploring different possibilities, I realized they would be perfect for home automation!
Of course, the journey wasn't smooth. Integrating multiple sensors and ensuring real-time responsiveness was a challenge. But thanks to the I2C and UART communication options on these sensors, I figured it out and brought this futuristic system to life!
Now, let's dive in and build a gesture-and voice-controlled smart home that feels like it's straight out of a sci-fi movie!
How It Works
Gesture Control:
- Swipe Right: Change the relay position from 1→2→3→4
- Swipe Left: Change the relay position from 4→3→2→1
- Swipe Up: Turn ON the selected relay
- Swipe Down: Turn OFF the selected relay
Voice Recognition:
- Pre-programmed & custom commands for precise control
- Offline functionality for better privacy
- Self-learning capabilities to add unique wake words & commands
With these features, you can effortlessly control lights, fans, or any appliance using just you hand movements or voice commands!
Final Thoughts
With this gesture and voice-controlled home automation system, we've taken a step towards a truly futuristic and intuitive smart home. No more searching for switches-just a wave of your hand or a simple voice command can control your appliances effortlessly.
This project not only showcases the power of DFRobot's sensors but also opens the door to endless possibilities. You can expand this system by adding more appliances, integrating IoT, or even using AI for advanced automation.
So, what's next? Try it out, customize it, and make it your own! I'd love to see how you enhance and innovate with this system. Share your versions and let's build the future of smart homes together!
Supplies
.png)
Gesture Sensor (DFRobot Gravity GR10-30):
- Recognizes 12 different hand gestures
- Adjustable recognition distance up to 30cm
- Supports I2C and UART communication
- Documentation for further information
Voice Recognition Module (DFRobot Gravity Offline Learning Sensor)
- Works offline (No internet required)
- Comes with 121 pre-programmed commands
- Allows custom wake words & command training
- Documentation for further information
Arduino Mega 2560
- Handles multiple sensors and real-time operations
- Provides multiple input/output pins for seamless integration
- Documentation for further information
4-Channel Relay Module
- Control high power appliances like lights, fans, or smart devices
- Works with low-power microcontrollers like Arduino
Jumper Wires: To connect all components with each other
Wiring the Circuit
.png)
So the connection is as follows
Gesture Sensor Connection to Arduino Mega 2560:
- Gesture Sensor's SCL is connected to SCL
- Gesture Sensor's SDA is connected to SDA
- Gesture Sensor's GND is connected to GND
- Gesture Sensor's VCC is connected to VCC
Offline Voice Recognition Module to Arduino Mega 2560
- Offline Voice Recognition Module's TX to Arduino Mega 2560 19(RX)
- Offline Voice Recognition Module's RX to Arduino Mega 2560 18(TX)
- Offline Voice Recognition Module's GND to Arduino Mega 2560 GND
- Offline Voice Recognition Module's VCC to Arduino Mega 2560 VCC,
Training Custom Voice Commands
.png)
To create your own voice commands:
- Say "Learning Command Word"
- Follow the prompts and repeat the command three times
- Assign a unique Command ID
- Use the ID in the code to control appliances
To create you own wake word:
- use the default wake up word to initiate setup
- Say "Learning wake word" and follow the prompts
- Speak your desired wake word (e.g. "Hello buddy") three times.
- Once learning is completed, the module respond to your own wake word
Uploading the Code
.png)
Required Libraries:
Before uploading the code, install the following libraries in Arduino IDE:
- GR10-30 Gesture Sensor Library: https://github.com/DFRobot/DFRobot_GR10_30
- DFRobot_DF2301Q Voice Recognition Library: https://github.com/DFRobot/DFRobot_DF2301Q
- RTU Library: https://github.com/DFRobot/DFRobot_RTU
Code: Gesture & Voice-Controlled Home Automation
Upload the following code to your Arduino Mega 2560:
Watch Demo Video

Now, it's time to see the project in action! Check out the video demonstration If you love this project, don't forget to Like, Share and Subscribe to my YouTube channel it would mean a lot and be a great support!