Hand Gesture Controlled RC Car using Arduino Nano and HC-12

Controlling a robot with your hand gestures feels futuristic — and in this project, we’ll make it real using Arduino Nano, MPU6050, and HC-12 wireless modules. You’ll wear a glove with an MPU6050 sensor that detects hand movements and sends commands wirelessly via HC-12 to control the car.

A wireless RC car that moves:

  • Forward when your hand tilts forward
  • Backward when your hand tilts back
  • Left/Right when your hand tilts left/right
  • Stops when your hand is level

Components Require:

ComponentQty
Arduino Nano1
MPU6050 Accelerometer + Gyroscope1
HC-12 Wireless Module1
Battery (3.7V LiPo or 9V)1
Glove or hand strap1
Jumper wires

Receiver Side:

ComponentQty
Arduino Nano1
HC-12 Wireless Module1
L298N Motor Driver1
DC Motors + Wheels2 or 4
Car chassis1
Battery (9V or 12V pack)1
Jumper wires

How its Work :

MPU6050 detects the orientation of your hand.

Arduino Nano (Transmitter) reads sensor data and sends a command (F/B/L/R/S) via HC-12.

Arduino Nano (Receiver) receives the command via HC-12 and drives the motors using L298N.

MPU6050 Pinout:

MPU6050Arduino Nano
VCC5V
GNDGND
SDAA4
SCLA5

HC-12 to Nano:

HC-12Arduino Nano
VCC5V
GNDGND
TXD3 (to Nano RX)
RXD4 (to Nano TX via voltage divider)

Code——Transmitter Side:include

#include<Wire.h>

#include<MPU6050.h>#

#include<SoftwareSerial.h>

MPU6050 mpu;
SoftwareSerial HC12(3, 4); // RX, TX

char command;

void setup() {
Serial.begin(9600);
HC12.begin(9600);

Wire.begin();
mpu.initialize();

if (!mpu.testConnection()) {
Serial.println(“MPU6050 connection failed!”);
while (1);
}
Serial.println(“MPU6050 ready.”);
}

void loop() {
int16_t ax, ay, az;
mpu.getAcceleration(&ax, &ay, &az);

if (ay > 10000) {
command = ‘F’; // Forward
} else if (ay < -10000) { command = ‘B’; // Backward } else if (ax > 8000) {
command = ‘L’; // Left
} else if (ax < -8000) {
command = ‘R’; // Right
} else {
command = ‘S’; // Stop
}

HC12.write(command);
Serial.println(command); // Debug
delay(100);
}

Receiver Side Code

Receiver Side : Arduino Nano + HC-12 + L298N

HC-12Arduino Nano
VCC5V
GNDGND
TXD3 (to Nano RX)
RXD4 (to Nano TX via voltage divider)
L298NArduino NanoFunction
IN1D5Motor A1
IN2D6Motor A2
IN3D9Motor B1
IN4D10Motor B2
ENA/ENBJumper enabledMotor Enable

Receiver Coding:

#include<SoftwareSerial.h>

SoftwareSerial HC12(3, 4); // RX, TX
char command;

void setup() {
Serial.begin(9600);
HC12.begin(9600);

pinMode(5, OUTPUT); // IN1
pinMode(6, OUTPUT); // IN2
pinMode(9, OUTPUT); // IN3
pinMode(10, OUTPUT); // IN4

stopMotors();
}

void loop() {
if (HC12.available()) {
command = HC12.read();
Serial.println(command); // Debug

switch (command) {
  case 'F': moveForward(); break;
  case 'B': moveBackward(); break;
  case 'L': turnLeft(); break;
  case 'R': turnRight(); break;
  case 'S': stopMotors(); break;
}

}
}

void moveForward() {
digitalWrite(5, HIGH);
digitalWrite(6, LOW);
digitalWrite(9, HIGH);
digitalWrite(10, LOW);
}

void moveBackward() {
digitalWrite(5, LOW);
digitalWrite(6, HIGH);
digitalWrite(9, LOW);
digitalWrite(10, HIGH);
}

void turnLeft() {
digitalWrite(5, LOW);
digitalWrite(6, HIGH);
digitalWrite(9, HIGH);
digitalWrite(10, LOW);
}

void turnRight() {
digitalWrite(5, HIGH);
digitalWrite(6, LOW);
digitalWrite(9, LOW);
digitalWrite(10, HIGH);
}

void stopMotors() {
digitalWrite(5, LOW);
digitalWrite(6, LOW);
digitalWrite(9, LOW);
digitalWrite(10, LOW);
}

Power Supply

  • Transmitter (Glove): 9V battery or LiPo with 5V regulator.
  • Receiver (Car): 12V battery for motors and 5V regulator for Nano.

Testing

  1. Upload both codes.
  2. Power on both systems.
  3. Wear the glove and move your hand:
    • Tilt forward → Car moves forward
    • Tilt backward → Car reverses
    • Tilt left/right → Car turns
    • Keep hand flat → Car stops

for components Details visit

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment

Name