Mobile Controlled Car

by msr048 in Circuits > Arduino

274 Views, 1 Favorites, 0 Comments

Mobile Controlled Car

Mobile car.jpg

I made a Mobile Phone Controlled Car.
I have designed the Android Mobile Application. This car can be controlled by mobile application. It is a project which can be used by Engineering students or school going students to show it to their teachers.

Gather Components

Arduino Uno

L293D motor driver module

DC motors with wheels x 4

Bluetooth module

18650 batteries x 2

Switch

Jumper wires

Acrylic sheet

Red leds x 2

White leds x 2

Cardboard

Make Car

Place all 4 dc motors on the car and stick wheels to it.

Place Arduino and L293D Motor Driver

Place arduino and L293d motor driver on the car

Stick Led Lights

Stick red led lights to back

Stick white led lights to the front

Download Arduino Ide and Upload Code

Upload the Arduino code shown below....

-------------------------------------------------------------------------------

// https://www.youtube.com/channel/UCaXI2PcsTlH5g0et67kdD6g //
// Smartphone controlled Robot // // By MOHD SOHAIL //

#include

AF_DCMotor motor1(1, MOTOR12_1KHZ); AF_DCMotor motor2(2, MOTOR12_1KHZ); AF_DCMotor motor3(3, MOTOR34_1KHZ); AF_DCMotor motor4(4, MOTOR34_1KHZ);

int whiteled = A5; int redled = A4;

char command;

void setup() { Serial.begin(9600); pinMode(whiteled, OUTPUT); pinMode(redled, OUTPUT); }

void loop(){ if(Serial.available() > 0){ command = Serial.read(); Stop();

switch(command){ case 'F': forward(); break; case 'B': back(); break; case 'L': left(); break; case 'R': right(); break; case 'S': Stop(); break; case 'a': on(); break; case 'b': off(); break; } } }

void forward() { motor1.setSpeed(150); //Define maximum velocity motor1.run(FORWARD); //rotate the motor clockwise motor2.setSpeed(150); //Define maximum velocity motor2.run(FORWARD); //rotate the motor clockwise motor3.setSpeed(150);//Define maximum velocity motor3.run(FORWARD); //rotate the motor clockwise motor4.setSpeed(150);//Define maximum velocity motor4.run(FORWARD); digitalWrite(redled , LOW);//rotate the motor clockwise }

void back() { motor1.setSpeed(150); //Define maximum velocity motor1.run(BACKWARD); //rotate the motor anti-clockwise motor2.setSpeed(150); //Define maximum velocity motor2.run(BACKWARD); //rotate the motor anti-clockwise motor3.setSpeed(150); //Define maximum velocity motor3.run(BACKWARD); //rotate the motor anti-clockwise motor4.setSpeed(150); //Define maximum velocity motor4.run(BACKWARD); //rotate the motor anti-clockwise digitalWrite(redled , HIGH); }

void left() { motor1.setSpeed(150); //Define maximum velocity motor1.run(BACKWARD); //rotate the motor anti-clockwise motor2.setSpeed(150); //Define maximum velocity motor2.run(BACKWARD); //rotate the motor anti-clockwise motor3.setSpeed(150); //Define maximum velocity motor3.run(FORWARD); //rotate the motor clockwise motor4.setSpeed(150); //Define maximum velocity motor4.run(FORWARD); //rotate the motor clockwise digitalWrite(redled , LOW); }

void right() { motor1.setSpeed(150); //Define maximum velocity motor1.run(FORWARD); //rotate the motor clockwise motor2.setSpeed(150); //Define maximum velocity motor2.run(FORWARD); //rotate the motor clockwise motor3.setSpeed(150); //Define maximum velocity motor3.run(BACKWARD); //rotate the motor anti-clockwise motor4.setSpeed(150); //Define maximum velocity motor4.run(BACKWARD); //rotate the motor anti-clockwise digitalWrite(redled , LOW); }

void Stop() { motor1.setSpeed(0); //Define minimum velocity motor1.run(RELEASE); //stop the motor when release the button motor2.setSpeed(0); //Define minimum velocity motor2.run(RELEASE); //rotate the motor clockwise motor3.setSpeed(0); //Define minimum velocity motor3.run(RELEASE); //stop the motor when release the button motor4.setSpeed(0); //Define minimum velocity motor4.run(RELEASE); //stop the motor when release the button digitalWrite(redled , LOW); }

void on() { digitalWrite(whiteled , HIGH); }

void off() { digitalWrite(whiteled , LOW); }

Do Connections From Circuit Diagram

bluetooth car circuit.jpg

Circuit Diagram

Install Mobile App From Link

Screenshot_20210216_140051_appinventor.ai_mohdsohail0008.Bluetooth_Controlled_Robot.jpg

Mobile application download code...

https://drive.google.com/file/d/1733wgAgGncZI_EUYwARYVEgmNIOC_0EB/view?usp=sharing

Connect HC05 From Mobile

Open Bluetooth of mobile and connect to HC 05.

Password must be 0000 or 1234

Now open the application and connect to HC05 and run the car..

Final Subscribe the Channel :-)

If your project is done

Do subscribe the channel

https://www.youtube.com/channel/UCaXI2PcsTlH5g0et67kdD6g