Remote-Controlled Car Using Arduino
by Ramadan-salih in Circuits > Arduino
22 Views, 1 Favorites, 0 Comments
Remote-Controlled Car Using Arduino


This project is about building a simple remote-controlled car using Arduino. It was a fun learning experience for understanding how to control motors and direction using basic electronics and Arduino code.
The car can move forward, backward, and turn left or right. I used an Arduino UNO, L298N motor driver, DC motors, and a battery pack. The connections were done using jumper wires and a breadboard.
Supplies







Arduino Uno. • L298n Motor Driver. • 2 / 4 DC Motors. • Wheels. • Chassis. • Castor Wheel. (opt) • 9v Battery for Arduino. • Motors Battery. • Battery Holder. • Jumper Wires. • Switch (opt)
This is the wiring diagram for the Arduino RC car.
### Key Components Connected:
- **DC Motors** are connected to the L298N Motor Driver (OUT1, OUT2, OUT3, OUT4).
- **L298N Motor Driver** connected to:
- Arduino pins (IN1, IN2, IN3, IN4) for direction control
- ENA and ENB for speed control (PWM)
- Power from 9V battery
- **Bluetooth Module HC-05** connected to Arduino:
- TX to RX (pin 0)
- RX to TX (pin 1) – *use voltage divider if needed*
- VCC to 5V
- GND to GND
- **Power**:
- 9V battery powers the motor driver
- AA battery pack may be used for Arduino separately (optional)





Here is a detailed explanation of how I connected each component in my Arduino RC car:
---
### 🔌 Motor Connections (L298N to Motors):
- **OUT1** → Motor A (left motor) terminal 1
- **OUT2** → Motor A terminal 2
- **OUT3** → Motor B (right motor) terminal 1
- **OUT4** → Motor B terminal 2
---
### 🔁 Control Pins (L298N to Arduino):
- **IN1** → Arduino pin **9**
- **IN2** → Arduino pin **8**
- **IN3** → Arduino pin **7**
- **IN4** → Arduino pin **6**
- **ENA (Enable A)** → Arduino pin **10**
- **ENB (Enable B)** → Arduino pin **5**
---
### 🔋 Power Connections:
- **+12V (L298N)** → 9V Battery **positive**
- **GND (L298N)** → Connected to both:
- 9V Battery **negative**
- Arduino **GND**
- **5V (L298N)** → Not used for Arduino (Arduino powered separately or via USB/AA batteries)
---
### 📶 Bluetooth Module (HC-05) Connections:
- **VCC** → Arduino **5V**
- **GND** → Arduino **GND**
- **TX** → Arduino **RX (pin 0) **
- **RX** → Arduino **TX (pin 1) **
⚠️ *Note: Use a voltage divider (2 resistors) when connecting Arduino TX to HC-05 RX to avoid damage.*
---
### 🔋 Additional Notes:
- The motors are powered directly from the 9V battery.
- Arduino can be powered using the AA battery pack or USB.
- Make sure grounds of all components are **connected together** for a common reference.
// تعريف الأرجل الخاصة بالتحكم في الموتور A
int ENA = 10;
int IN1 = 9;
int IN2 = 8;
// تعريف الأرجل الخاصة بالتحكم في الموتور B
int ENB = 5;
int IN3 = 7;
int IN4 = 6;
char command; // متغير لتخزين الأمر القادم من البلوتوث
void setup() {
// تعريف الأرجل كمخارج
pinMode(ENA, OUTPUT);
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(ENB, OUTPUT);
pinMode(IN3, OUTPUT);
pinMode(IN4, OUTPUT);
// تشغيل الاتصال التسلسلي مع البلوتوث
Serial.begin(9600);
}
void loop() {
if (Serial.available() > 0) {
command = Serial.read();
switch (command) {
case 'F': // Forward
forward();
break;
case 'B': // Backward
backward();
break;
case 'L': // Left
left();
break;
case 'R': // Right
right();
break;
case 'S': // Stop
stopMotors();
break;
}
}
}
// الدوال الخاصة بالحركة
void forward() {
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
digitalWrite(IN3, HIGH);
digitalWrite(IN4, LOW);
analogWrite(ENA, 200);
analogWrite(ENB, 200);
}
void backward() {
digitalWrite(IN1, LOW);
digitalWrite(IN2, HIGH);
digitalWrite(IN3, LOW);
digitalWrite(IN4, HIGH);
analogWrite(ENA, 200);
analogWrite(ENB, 200);
}
void left() {
digitalWrite(IN1, LOW);
digitalWrite(IN2, HIGH);
digitalWrite(IN3, HIGH);
digitalWrite(IN4, LOW);
analogWrite(ENA, 200);
analogWrite(ENB, 200);
}
void right() {
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
digitalWrite(IN3, LOW);
digitalWrite(IN4, HIGH);
analogWrite(ENA, 200);
analogWrite(ENB, 200);
}
void stopMotors() {
digitalWrite(IN1, LOW);
digitalWrite(IN2, LOW);
digitalWrite(IN3, LOW);
digitalWrite(IN4, LOW);
}
How to use the code:Upload the code to the Arduino using the Arduino IDE program.Open a Bluetooth application on your mobile (like: "Bluetooth RC Car" or "Arduino Bluetooth Controller").Connect to the HC-05 module (the default password is often 1234 or 0000).Try sending the following characters:F → forwardB → backwardL → leftR → rightS → stop
I'm proud of how this simple RC car turned out using just a few components and some code. I learned a lot through the process, and I hope this project helps others get started with Arduino too!