Es Project Report 06
Es Project Report 06
Es Project Report 06
Semester Project
Gesture Control Car
Submitted by :
Umair Rana 2022_MC_08
Zain Ahmad 2022_MC_19
Munizah Qasim 2022_MC_36
Submitted to :
Sir Shujat Ali
22.05.2024
Contents:
1. Components.
2. Overview.
3. Gesture Recognition.
4. Wireless Communication.
5. Motor Controlling.
6. Software Implementation.
7. Diagram and PCB Formation.
8. Testing and Results.
9. Challenges and Solutions.
10. References.
11. Bill of Material.
Components:
1. TM4C123GH6PM:
The TM4C123GH6PM microcontroller, part of the Tiva C Series from Texas Instruments, is a
powerful ARM Cortex-M4-based device designed for embedded applications. With a clock speed of up to
80 MHz and a wide range of peripherals, including ADCs, PWM modules, and communication interfaces,
the TM4C123GH6PM offers versatility and performance for various projects. Its integrated memory,
GPIO pins, and onboard USB controller make it ideal for developing IoT devices, robotics, and control
systems. The microcontroller's low power consumption and high computational capabilities make it a
popular choice among developers for creating efficient and feature-rich embedded solutions.
2. ESP32-WROOM-32:
The ESP32-WROOM-32 is a popular Wi-Fi and Bluetooth module based on the ESP32 chip
from Espressif Systems. It offers dual-core processing power with a clock speed of up to 240 MHz,
making it suitable for a wide range of IoT applications. The module includes built-in Wi-Fi and Bluetooth
connectivity, allowing for seamless wireless communication. With a rich set of peripherals, such as
GPIO, ADC, SPI, I2C, and UART interfaces, the ESP32-WROOM-32 provides flexibility for various
projects. Its low power consumption and support for deep sleep modes make it an energy-efficient
choice for battery-operated devices. Developers appreciate the ESP32-WROOM-32 for its ease of use,
robust features, and cost-effectiveness in IoT projects.
Pins Used:
GPIO21: SDA of MPU6050..
GPIO22: SCL of MPU6050.
3. MPU-6050:
The MPU-6050 is a popular 6 Degree of Freedom (6DoF) accelerometer and gyroscope sensor
module commonly used in motion tracking and orientation sensing applications. It combines a 3-axis
gyroscope and a 3-axis accelerometer in a single chip, providing accurate motion tracking capabilities.
The MPU-6050 offers high precision and low noise performance, making it suitable for
applications such as gesture recognition, gaming controllers, and robotics. Its I2C interface allows for
easy integration with microcontrollers like the TM4C123GH6PM and ESP32. The MPU-6050's compact
size, low power consumption, and versatile functionality make it a go-to choice for projects requiring
motion sensing capabilities.
● Acceleration along the X axis = (Accelerometer X axis raw data/16384) g.
● Acceleration along the Y axis = (Accelerometer Y axis raw data/16384) g.
● Acceleration along the Z axis = (Accelerometer Z axis raw data/16384) g.
● Angular velocity along the X axis = (Gyroscope X axis raw data/131) °/s.
● Angular velocity along the Y axis = (Gyroscope Y axis raw data/131) °/s.
4. Gear Motors:
Gear motors combine a motor with a gearbox to provide increased torque and reduced speed
output. They are commonly used in applications requiring high torque at low speeds, such as robotics
and industrial machinery. Gear motors offer better efficiency and precision compared to standard
motors by leveraging gear reduction mechanisms. These motors come in various gear ratios to suit
different torque and speed requirements in diverse projects. By integrating a motor and gearbox, gear
motors simplify the design process and improve overall system performance in many applications.
5. HC-05:
The HC-05 is a popular Bluetooth module used for wireless communication, particularly in projects
involving Arduino and other microcontrollers. Here are some key points about the HC-05 module:
Technical Specifications: The HC-05 operates at an operating voltage of 4V to 6V (typically +5V). It
is a serial Bluetooth module that can be used as a serial (RX/TX) pipe, allowing for the transmission of
serial streams ranging from 9600 to 115200 bps.
Commercial Series: The HC-05 Bluetooth module belongs to the commercial series of Bluetooth
module boards. It features an LED indicator light and uses a 150mA and 3.3V regulation chip. It is
commonly available for purchase online.
Master or Slave Configuration: The HC-05 module can be used in either a master or slave
configuration, depending on the project requirements. It provides flexibility in establishing wireless
communication between devices.
Wireless Communication: The HC-05 module enables wireless communication between devices,
allowing for the transmission of data, commands, or control signals without the need for physical wires
or cables.
Compatibility: The HC-05 module is widely compatible with various microcontrollers and development
boards, making it a versatile choice for wireless communication projects.
7. Battery Cell:
A 3.7V battery cell is commonly used in various portable electronic devices. It is a rechargeable
lithium-ion cell known for its energy density and stable voltage output. These cells are widely used in
smartphones, tablets, drones, and other gadgets requiring a reliable power source. The 3.7V rating
signifies the nominal voltage output of the battery cell. Proper handling and charging practices are
essential to maximize the lifespan and performance of 3.7V battery cells. Multiple Cells are used in
series to increase voltage
Overview:
A hand gesture control car is a type of remote-controlled car that can be operated using hand gestures
instead of traditional remote controls. It utilizes gesture recognition technology to interpret the
movements of the user's hand and translate them into commands for the car.
Gesture Recognition: Hand gesture control cars use a sensor to detect and interpret the hand
movements of the user. These movements are then translated into specific commands for the car, such
as moving forward, backward, turning left or right, and stopping.
Intuitive Control: The use of hand gestures makes controlling the car more intuitive and interactive.
Users can simply wave their hands or make specific gestures to control the car's movements, adding a
fun and immersive experience.
Wireless Connectivity: Hand gesture control cars typically use wireless connectivity, such as
Bluetooth or Wi-Fi, to establish a connection between the car and the user's hand gestures. This allows
for greater freedom of movement and eliminates the need for physical wires or cables.
Gesture Recognition:
To recognize gestures using the MPU6050 sensor in a project like a Hand Gesture Control Car, the
accelerometer and gyroscope data from the MPU6050 are typically used. Here's how the process
generally works:
Data Acquisition: The MPU6050 sensor measures acceleration and angular velocity along three axes
using its built-in accelerometer and gyroscope. This data is collected in real-time as the sensor detects
motion and orientation changes.
Gesture Mapping: Specific gestures are mapped to patterns in the sensor data. For example, a gesture
like moving the hand up could correspond to a certain pattern of acceleration and angular velocity
values captured by the MPU6050.
Signal Processing: The raw sensor data is processed to extract relevant features that represent
different gestures. Algorithms can be applied to analyze the data and identify patterns that correspond
to specific hand movements.
Gesture Recognition: Machine learning algorithms for pattern recognition techniques are employed
to recognize the gestures based on the processed sensor data. These algorithms can classify the
gestures by comparing the extracted features to pre-defined gesture patterns.
Command Generation: Once a gesture is recognized, the system generates corresponding commands
for the Hand Gesture Control Car. These commands are then sent to the car's control system to execute
the desired movement, such as moving forward, backward, turning, or stopping.
Wireless Communication:
Bluetooth or Wi-Fi: Wireless technologies such as Bluetooth or Wi-Fi are commonly used to establish
a connection between the hand gesture input device and the car's control unit. Bluetooth Low Energy
(BLE) is often preferred for its energy efficiency and ease of implementation.
Motor Controlling:
After receiving gesture information from the sensor, motor control in a Hand Gesture Control Car
project involves translating the recognized gestures into specific commands to control the car's
movements.
Mapping Gestures to Actions: Each recognized gesture is mapped to a corresponding action or
movement command for the car, such as moving forward, backward, turning left or right, or stopping.
PWM Control: Pulse Width Modulation (PWM) signals are commonly used to control the speed of DC
motors in response to the gesture commands. By adjusting the duty cycle of the PWM signals, the
motors' speed and direction can be controlled.
H-Bridge Motor Driver: An H-Bridge motor driver, such as the L298N mentioned earlier, is often used
to interface with the motors and control their direction of rotation. By sending signals to the H-Bridge,
the motors can be driven forward or backward.
Microcontroller Integration: A microcontroller, such as TIVA or Arduino, processes the gesture
information and generates the corresponding motor control signals based on the recognized gestures.
These signals are then sent to the motor driver for execution.
Working:
We engineered a sophisticated system for wireless control of a car through gesture recognition. The
setup involved utilizing an ESP32 WROOM 32 module paired with an HC-05 Bluetooth module to
establish a reliable communication link for signal transmission. On the receiving end, another HC-05
module was interfaced with a TM4C123GH6PM microcontroller, which processed the incoming signals
The ESP32 WROOM 32 paired with HC-05 module served as the transmitter, sending signals to the
HC-05 module connected to the TM4C123GH6PM microcontroller. This microcontroller implemented an
algorithm to encode the signals received and accurately determine the intended gestures. By translating
these gestures into actionable commands, the system effectively controlled the motor of the car,
enabling precise movement based on the recognized gestures. The robust communication protocol and
efficient processing capabilities of the microcontroller ensured smooth and responsive operation of the
gesture-controlled car, showcasing the seamless integration of hardware and software components in
this innovative project.
In the project's initial phase, the gyroscope utilized the x, y, and z axes to compute pitch and roll angles,
enabling the identification of specific movements or gestures. These calculated gestures were then
transmitted to the ESP32 WROOM 32 module, which encoded them into chosen alphabets.
Subsequently, the encoded alphabet signal was sent using the HC-05 Bluetooth module. On the
receiving end, another HC-05 module captured the transmitted signal and forwarded it to the
TM4C123GH6PM microcontroller. The microcontroller decoded the signal, interpreted the
corresponding gesture, and executed the relevant operation by activating specific pins to control the
direction of the motor to control the car accordingly. This seamless process showcased the integration
of sensor data processing, wireless communication, and motor control to enable gesture-based
manipulation of the car's movement.
Adafruit_MPU6050 mpu;
HardwareSerial BTSerial(2); // Use UART2 for the HC-05 (GPIO16 RX, GPIO17 TX)
void setup() {
Serial.begin(9600); // Initialize Serial for debugging
BTSerial.begin(9600, SERIAL_8N1, 16, 17); // Initialize UART2 for HC-05 at 9600 baud rate
if (!mpu.begin()) {
Serial.println("Failed to initialize Adafruit MPU6050!");
while (1);
}
void loop() {
// Read the potentiometer value
int potValue = analogRead(POT_PIN); // Read the potentiometer value (0-4095 for 12-bit ADC)
int delayTime = map(potValue, 0, 4095, 500, 2000); // Map the potentiometer value to delay time
(500 to 2000 ms)
void setup() {
// Initialize the onboard LEDs and GPIOs
void loop() {
// Update PWM value based on potentiometer
int potValue = analogRead(potPin); // Read the potentiometer value (0-4095 for 12-bit ADC)
int pwmValue = map(potValue, 0, 4095, 0, 255); // Map the range to 0-255 for PWM
if (Serial3.available()) {
char command = Serial3.read();
processCommand(command);
}
}
Software Implementation:
ESP32 WROOM 32:
ESP32 WROOM 32 development can be done using the popular Arduino IDE, making it
accessible to a wide range of developers. Arduino IDE provides a user-friendly environment for
programming ESP32 WROOM 32 boards with its simplified coding structure. Developers can leverage
Arduino libraries and a vast community support to enhance their ESP32 projects on the WROOM 32
variant. The compatibility of Arduino IDE with ESP32 WROOM 32 simplifies the setup and coding
process for IoT and embedded projects. Arduino IDE offers a seamless integration with ESP32 WROOM
32, enabling rapid prototyping and development of diverse applications.
The ESP32 WROOM 32 initially receives sensor data from the MPU6050 accelerometer and gyroscope.
This data is used to calculate the pitch and roll angles representing the device's orientation. Based on
these angles, specific gestures such as forward, backward, left, right, or stop are determined. Once the
gestures are identified, the ESP32 WROOM 32 encodes this information into a specific alphabet or
character corresponding to each gesture. The encoded gesture data is then sent wirelessly through the
HC-05 Bluetooth module. The HC-05 module transmits the alphabet signals to the receiving end using
Bluetooth communication. On the receiving end, another HC-05 module captures the alphabet signals
and transfers them to the TM4C123GH6PM microcontroller. The TM4C123GH6PM reads the received
signals and interprets them to perform the corresponding operations. This process enables the
TM4C123GH6PM to activate specific pins controlling the direction of the motor,, translating the user's
gestures into actionable commands for motor control.
TIVA C Series:
Block Diagram:
Fig.7(Block Diagram)
PCB Formation:
PCB formation for a hand gesture car involves designing the printed circuit board (PCB) using software
like Proteus. This process requires meticulous planning, layout design, and component placement to
ensure the hand gesture car functions correctly. Designing a PCB for such a project involves a
significant amount of hard work in identifying and rectifying real-time errors that may arise during the
design phase. It includes multiple steps such as schematic design, PCB layout, routing, component
Fig.8(Schematic Diagram)
Fig.9(PCB Layout)
Solutions:
Bill of Materials
3 Motor Driver L298N (DC Motor 380 2 760 E-Pro (Shop 1-Active
Driver) No.1A, Ground 1-Not
floor, Al Khalil
Double H-Bridge Center, 16 Hall Used
Max Power(25W) road Lahore)
(04237233587)
(0-36mA)
(5-35V)
11 Jumper Wires M2M, F2M, F2F 200 1 200 E-Pro (Shop Inactive
No.1A, Ground
⌀0.5mm floor, Al Khalil
Center, 16 Hall
road Lahore)
(04237233587)