Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

ESP32-Controlled Robotic Vehicle with Voice Recognition and Ultrasonic Sensing

View and Edit Project In Cirkit DesignerImage of ESP32-Controlled Robotic Vehicle with Voice Recognition and Ultrasonic Sensing

Circuit Documentation

Summary

The circuit in question appears to be designed for a mobile robotic platform, featuring motor control, servo actuation, and distance sensing capabilities. The central processing unit is an ESP32 microcontroller, which interfaces with an L298N DC motor driver to control the motion of the robot's wheels. Additionally, the circuit includes a servo motor for actuation purposes and an HC-SR04 ultrasonic sensor for distance measurement. Power is supplied by a 4 x AAA battery mount.

Component List

L298N DC Motor Driver

Gearmotor DC Wheels (Left and Right)

4 x AAA Battery Mount

ESP32 (30 pin)

Servo

HC-SR04 Ultrasonic Sensor

Wiring Details

L298N DC Motor Driver

Gearmotor DC Wheels (Left and Right)

4 x AAA Battery Mount

ESP32 (30 pin)

Servo

HC-SR04 Ultrasonic Sensor

Documented Code

ESP32 Microcontroller Code (sketch.ino)

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

Additional Code Documentation (documentation.txt)

VAIO Code logic

## Setup
- Motor Wheels Setup task
- Ultrasonic Setup task (For automatic)
- Bluetooth Setup task (for DS4)
- ESP Now Setup (For hand gesture & Voice Recognition)

## Operational
- Master Controller Task (Handles the state of communication) (Priority 2)
- Voice Recognition Task (Probably uses Interrupt i.e has the highest priority) (Priority 1)
- Automatic Task (uses ultrasonic) (Priority 3)
- DS4 Task (uses bluetooth) (Priority 3)
- Hand Gesture Task (uses ESP-NOW) (Priority 3)

### Voice Recognition Task (Called when interrupted by the voice module from the hand gesture ESP32)
- ESP-NOW communication has to be always active for voice communication

### Master Controller Task (Called everytime by Voice Recognition Task)
- This task will be execute by Voice Recognition Task
- Implement enums for the state
- Calls either the Automatic Task, DS4 Task, or Hand Gesture Task depending on the state

### Automatic Task (Task is looping)
- This task will be execute by Master Controller Task

### DS4 Task (Task is looping)
- This task will be execute by Master Controller Task

### Hand Gesture Task (Task is looping)
- This task will be execute by Master Controller Task

## Some logic ideas
ESP32 has 2 cores. Core 1 execute Master Controller Task. Core 2 execute Voice Recognition Task

Voice Recognition Task in Core 2 will always be ready to listen for ESP-NOW communication for the voice command. If communication has been heard, 
it will process the command and interrupt task in Core 1 by calling the Master Controller Task to change the state of the controls.

Note: Keep in mind of accidentally resetting the watchdog timer

This documentation provides an overview of the circuit, including the components used, their wiring, and the code that will be running on the ESP32 microcontroller. The code snippets and additional documentation outline the intended logic and operational tasks for the robotic platform.