In this project, we will make a remote controlled car for real time applications. This robotic car has been developed along with an Android-based device. Arduino Uno has been used as the brain of the car. You can check out our arduino project to know more. It also consists of the software component that uses a mobile application. The desired direction or mode by the mobile application can be selected by the user of the smart car to control the movement of the car. The user can control the movements from his/her own intelligent device or take the smart car in automatic mode and let the car drive its own way. Thus, the car can flee from the obstacle and also detect live objects. The purpose of this smart futuristic car is used is to alert civilian and military personnel to potential terrorist attacks, especially in military areas with live detectable sensors.
Before this, we have built RC car with different microcontorllers,
- Fastest Arduino RC Car using Coreless DC Motors and nRF24L01 RF module
- Remote Controlled Car Using Raspberry Pi and Bluetooth
- DIY Arduino Bluetooth Car Controlled by Mobile Application
- Build a Simple Arduino RC Boat that can be Controlled Wirelessly using 433 MHz RF Modules
Component Required for Remotely Controlled Car
Project Used Hardware
- ESP8266
- L298N Motor Driver Module
- Arduino UNO
- Robot Chassis 4 x 5V Geared Motors Connecting
- Wires Power supply
Project Used Software
- Arduino IDE
Circuit Diagram
The first important thing to remember is that I programmed the Arduino, configured the ESP8266, and controlled the L298N Motor Driver Module. Then, the Inputs of the L298N Motor Driver Module i.e. IN1, IN2, IN3, and IN4 are connected to Digital Pins 12, 9, 10, and 11 of Arduino UNO. Coming to the robot chassis, it has 4 geared motors. So, I have connected the right two motors in parallel and connected them to the OUT1 and OUT2 terminals of the Motor Driver. Similarly, the left two motors to OUT3 and OUT4.
#define BLYNK_PRINT Serial #include <ESP8266WiFi.h> #include <BlynkSimpleEsp8266.h> // You should get Auth Token in the Blynk App. // Go to the Project Settings (nut icon). char auth[] = "H_QMKcDYp9KBr4R9p_5UDUperDuc8SEs"; // Your WiFi credentials. // Set password to "" for open networks. char ssid[] = "Node Sibi"; char pass[] = "sibiss2007"; void setup() { // Debug console Serial.begin(9600); Blynk.begin(auth, ssid, pass); // You can also specify server: //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80); //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080); } void loop() { Blynk.run(); } /////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////// CODE FOR ARDUINO void setup() { pinMode(7,INPUT);//2MOTOR IN 1 pinMode(6,INPUT);//2MOTOR IN 2 pinMode(5,INPUT);// MOTOR IN 1 pinMode(4,INPUT);// MOTOR IN 2 // put your setup code here, to run once: pinMode(9,OUTPUT); pinMode(10,OUTPUT); pinMode(11,OUTPUT); pinMode(12,OUTPUT); } void loop() { while (digitalRead(7) == HIGH && digitalRead(6) == HIGH && digitalRead(5) == HIGH && digitalRead(4) == HIGH ) { digitalWrite(9, HIGH); digitalWrite(10, HIGH); digitalWrite(11, HIGH); digitalWrite(12, HIGH); } while (digitalRead(7) == LOW && digitalRead(6) == LOW && digitalRead(5) == LOW && digitalRead(4) == LOW ) { digitalWrite(9, HIGH); digitalWrite(10, HIGH); digitalWrite(11, HIGH); digitalWrite(12, HIGH); } while (digitalRead(7) == HIGH && digitalRead(6) == LOW && digitalRead(5) == HIGH && digitalRead(4) == LOW) //forward right { digitalWrite(9, HIGH); digitalWrite(10, LOW); digitalWrite(11, LOW); digitalWrite(12, LOW); } while (digitalRead(7) == HIGH && digitalRead(6) == LOW && digitalRead(5) == LOW && digitalRead(4) == HIGH) //forward left { digitalWrite(9, LOW); digitalWrite(10, LOW); digitalWrite(11, HIGH); digitalWrite(12, LOW); } while (digitalRead(7) == HIGH && digitalRead(6) == LOW && digitalRead(5) == LOW && digitalRead(4) == LOW) //forward { digitalWrite(9, HIGH); digitalWrite(10, LOW); digitalWrite(11, HIGH); digitalWrite(12, LOW); } while (digitalRead(7) == LOW && digitalRead(6) == HIGH && digitalRead(5) == LOW && digitalRead(4) == LOW) //reverse { digitalWrite(9, LOW); digitalWrite(10,HIGH); digitalWrite(11, LOW); digitalWrite(12, HIGH); } while (digitalRead(7) ==LOW && digitalRead(6) == HIGH && digitalRead(5) == HIGH && digitalRead(4) == LOW) //reverse right { digitalWrite(9, LOW); digitalWrite(10, HIGH); digitalWrite(11, LOW); digitalWrite(12, LOW); } while (digitalRead(7) == LOW && digitalRead(6) == HIGH && digitalRead(5) == LOW && digitalRead(4) == HIGH )//REVERSE left { digitalWrite(9, LOW); digitalWrite(10, LOW); digitalWrite(11, LOW); digitalWrite(12, HIGH); } }