Aniket Mindhe
Published

Bluetooth Controlled Car

A small car based on Arduino platform which can be controlled using Bluetooth and a Android app.

IntermediateFull instructions provided2 hours3,525
Bluetooth Controlled Car

Things used in this project

Hardware components

Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1
Dual H-Bridge motor drivers L298
SparkFun Dual H-Bridge motor drivers L298
×1
Battery - 18650 - 7800mAh- 3.7V
×2
Battery Holder, 18650 x 2
Battery Holder, 18650 x 2
×1
9V battery (generic)
9V battery (generic)
×1
9V to Barrel Jack Connector
9V to Barrel Jack Connector
×1
BO Motor - Straight - 300rpm
×2
Jumper wires (generic)
Jumper wires (generic)
×1
Ball Caster Wheel
×1
Chasis - Eg. Plastic Box Cover, Acrylic Sheet, Metal Sheet
×1
Toggle Switch, (Off)-On
Toggle Switch, (Off)-On
×1

Software apps and online services

Remote For BT-Car
Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Tape, Double Sided
Tape, Double Sided
Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free

Story

Read more

Schematics

Bluetooth Controlled Car

Connect them and get going !

Code

Bluetooth Controlled Car

C/C++
Download/Copy-Paste and compile+upload it using Arduino IDE
char t;
const int r1=13,r2=12,l1=11,l2=10;
 
void setup() {
Serial.begin(9600);
pinMode(r1,OUTPUT);   //right motors forward
pinMode(r2,OUTPUT);   //right motors reverse
pinMode(l1,OUTPUT);   //left motors forward
pinMode(l2,OUTPUT);   //left motors reverse
}
 
void loop() {
if(Serial.available()){
  t = Serial.read();
}
 
if(t == 'F'){            //move forward(all motors rotate in forward direction)
  digitalWrite(r1,HIGH);
  digitalWrite(r2,LOW);
  digitalWrite(l1,HIGH);
  digitalWrite(l2,LOW);
}
 
else if(t == 'B'){      //move reverse (all motors rotate in reverse direction)
  digitalWrite(r1,LOW);
  digitalWrite(r2,HIGH);
  digitalWrite(l1,LOW);
  digitalWrite(l2,HIGH);
}
 
else if(t == 'L'){      //turn right (left side motors rotate in forward direction, right side motors rotate in reverse direction for 100ms & stop)
  digitalWrite(r1,HIGH);
  digitalWrite(r2,LOW);
  digitalWrite(l1,LOW);
  digitalWrite(l2,HIGH);
  delay(100);
  t = 'S';
}
 
else if(t == 'R'){      //turn left (right side motors rotate in forward direction, left side motors rotate in reverse direction for 100ms & stop)
  digitalWrite(r1,LOW);
  digitalWrite(r2,HIGH);
  digitalWrite(l1,HIGH);
  digitalWrite(l2,LOW);
  delay(100);
  t = 'S';
}
 
else if(t == 'S'){      //STOP (all motors stop)
  digitalWrite(r1,LOW);
  digitalWrite(r2,LOW);
  digitalWrite(l1,LOW);
  digitalWrite(l2,LOW);
}
delay(100);
}

Credits

Aniket Mindhe

Aniket Mindhe

7 projects • 3 followers
Undergrad Electronics Engineering Student at D.J Sanghvi C.O.E.-Mumbai

Comments