V V ooo M M ooo - N N RRRR W W
V V o o MM MM o o - NN N R R W W
V V o o M M M o o - N N N RRRR W W W
V V o o M M o o - N NN R R WW WW
V ooo M M ooo - N N R R W W
VoMo Team
The VoMo Robot Project is a complete voice-controlled robot system consisting of two main components:
- ESP32 Robot Controller - Hardware control system with web interface
- AI Voice Processing API - Python FastAPI service for voice command interpretation
- Gazebo Simulation :https://github.com/kaarima/voice_to_gazebo.git
This system allows users to control a two-motor robot through voice commands, manual web controls, or automated movement sequences.
┌─────────────────┐ HTTP Requests ┌─────────────────┐
│ Voice Input │ ──────────────────► │ AI API Server │
│ (Microphone) │ │ (Python) │
└─────────────────┘ └─────────────────┘
│
│ JSON Commands
▼
┌─────────────────┐ WiFi Network ┌─────────────────┐
│ Web Browser │ ──────────────────► │ ESP32 Robot │
│ (Dashboard) │ │ Controller │
└─────────────────┘ └─────────────────┘
│
│ Motor Signals
▼
┌─────────────────┐
│ L298N Driver │
│ + Motors │
└─────────────────┘
- ESP32 Development Board
- L298N Motor Driver
- 2x DC Motors (with wheels)
- Robot Chassis
- Power Supply (12V recommended)
- Breadboard & Jumper Wires
| ESP32 Pin | Function | L298N Connection |
|---|---|---|
| GPIO 26 | IN1 | Motor A Direction 1 |
| GPIO 27 | IN2 | Motor A Direction 2 |
| GPIO 25 | ENA | Motor A Speed Control |
| GPIO 14 | IN3 | Motor B Direction 1 |
| GPIO 12 | IN4 | Motor B Direction 2 |
| GPIO 13 | ENB | Motor B Speed Control |
| GPIO 2 | LED | Onboard Status LED |
esp32_robot.ino- Main Arduino sketchconfig.h- WiFi and pin configurationMotorControl.h/.cpp- Low-level motor controlMovement.h/.cpp- High-level movement routinesCalibration.h/.cpp- Distance and rotation calibrationVoiceCommand.h/.cpp- Voice command processingWebPage.h/.cpp- Web dashboard HTML/CSS/JSWebServerHandlers.h/.cpp- HTTP endpoint handlers
- Manual Control: Forward, backward, left, right, stop
- Automated Sequences: Square pattern, circle pattern, 360° scan
- Calibration System: Distance and rotation calibration
- Web Dashboard: Mobile-friendly control interface
- Voice Integration: JSON command processing
- LED Status Indicator: Visual feedback
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | Main dashboard interface |
/forward |
GET | Move robot forward |
/backward |
GET | Move robot backward |
/left |
GET | Turn robot left |
/right |
GET | Turn robot right |
/stop |
GET | Stop all motors |
/led |
GET | Toggle status LED |
/special |
GET | Execute special sequence |
/scan |
GET | Perform 360° scan |
/voice |
GET | Process voice command JSON |
/calibrate_distance |
GET | Start distance calibration |
/calibrate_rotation |
GET | Start rotation calibration |
/calibrate_submit |
GET | Submit calibration values |
/get_calibration |
GET | Retrieve calibration data |
- FastAPI - Web framework
- Groq API - AI transcription service
- Whisper-large-v3 - Speech-to-text model
- sounddevice - Audio recording
- numpy/scipy - Audio processing
- Movement: "forward 10", "backward 5", "left 45", "right 90"
- Actions: "stop", "scan", "special"
- Units: Distance in cm, rotation in degrees
- Audio Recording: 2-second audio capture at 16kHz
- Transcription: Groq API converts speech to text
- Command Parsing: Regex extraction of commands and values
- JSON Response: Structured command data for ESP32
"Move forward 15 centimeters" → {"distance": 15.0, "rotation": 0.0, "stop": false, "scan": false, "special": false}
"Turn left 90 degrees" → {"distance": 0.0, "rotation": 90.0, "stop": false, "scan": false, "special": false}
"Stop the robot" → {"distance": 0.0, "rotation": 0.0, "stop": true, "scan": false, "special": false}
- Arduino IDE or PlatformIO
- Python 3.8+
- Microphone for voice input
- WiFi network access
-
Install Libraries:
# Arduino Library Manager - WiFi - WebServer - ArduinoJson -
Configure WiFi: Edit
config.h:constexpr char WIFI_SSID[] = "YourWiFiName"; constexpr char WIFI_PASS[] = "YourWiFiPassword";
-
Upload Code:
- Open
esp32_robot.inoin Arduino IDE - Select ESP32 board
- Upload to device
- Open
-
Install Dependencies:
pip install fastapi uvicorn groq sounddevice numpy scipy
-
Configure API Key: Edit
AI_integration/api.py:api_key = 'your_groq_api_key_here'
-
Start Server:
cd AI_integration uvicorn api:app --reload --host 0.0.0.0 --port 8000
- Connect to ESP32's IP address in web browser
- Use dashboard buttons for direct control
- Monitor robot status via LED indicator
- Start AI API server
- Send GET request to
http://localhost:8000/ - Speak command clearly during 2-second recording
- API returns JSON command for ESP32
- Use
/calibrate_distanceto measure forward movement - Use
/calibrate_rotationto measure turning accuracy - Submit actual measurements via
/calibrate_submit - Retrieve calibration data with
/get_calibration
- Square Pattern:
/specialendpoint - 360° Scan:
/scanendpoint - Custom Routines: Extend
Movement.cpp
// WiFi Settings
constexpr char WIFI_SSID[] = "YourNetwork";
constexpr char WIFI_PASS[] = "YourPassword";
// Static IP (optional)
const IPAddress local_IP(192, 168, 1, 100);
const IPAddress gateway(192, 168, 1, 1);
// Motor Pins
constexpr int IN1_PIN = 26; // Motor A Direction 1
constexpr int IN2_PIN = 27; // Motor A Direction 2
constexpr int ENA_PIN = 25; // Motor A Speed
constexpr int IN3_PIN = 14; // Motor B Direction 1
constexpr int IN4_PIN = 12; // Motor B Direction 2
constexpr int ENB_PIN = 13; // Motor B Speed# Audio Settings
duration = 2 # Recording duration (seconds)
fs = 16000 # Sample rate (Hz)
# API Configuration
api_key = 'your_groq_api_key'
model = "whisper-large-v3"- WiFi not connecting: Check SSID/password in
config.h - Static IP issues: Verify gateway and subnet settings
- Motor not responding: Check L298N wiring and power supply
- Audio not recording: Check microphone permissions
- Transcription errors: Verify Groq API key and internet connection
- Command parsing fails: Ensure clear speech and proper command format
- Voice commands not reaching ESP32: Check network connectivity
- JSON parsing errors: Verify API response format
- Timing issues: Adjust audio duration or add delays
- ESP32 Serial Monitor: 9600 baud
- AI API logs: Check console output
- Web dashboard: Browser developer tools
- ESP32: Add new endpoints in
WebServerHandlers.cpp - AI API: Extend command parsing in
api.py - Movement: Implement new routines in
Movement.cpp
- Sensors: Add ultrasonic, IR, or camera modules
- Actuators: Implement servo motors or grippers
- Displays: Add LCD or OLED screens
- Security: Add authentication to web interface
- Logging: Implement comprehensive logging system
- Mobile App: Create dedicated mobile application
- Cloud Integration: Add remote monitoring capabilities
esp32_robot/
├── esp32_robot.ino # Main Arduino sketch
├── config.h # Configuration settings
├── MotorControl.h/.cpp # Motor driver interface
├── Movement.h/.cpp # Movement routines
├── Calibration.h/.cpp # Calibration system
├── VoiceCommand.h/.cpp # Voice command processing
├── WebPage.h/.cpp # Web dashboard
├── WebServerHandlers.h/.cpp # HTTP endpoints
└── ReadMe.md # Original documentation
AI_integration/
├── api.py # FastAPI voice processing
├── README.md # AI component documentation
└── recorded.wav # Temporary audio file
VoMo Team - Advanced Robot Control Dashboard
This project demonstrates the integration of:
- ESP32 microcontroller programming
- Motor control and robotics
- Web development and APIs
- AI-powered voice recognition
- Real-time audio processing
For questions or contributions, please refer to the individual component documentation files.