Bluetooth Control Mini Car using Bluetooth Module HC-05
Components Required
- Arduino UNO
- DC Motors
- Bluetooth module HC-05
- Motor Driver L293D Module
- Jumper wires (male to female, female to male , )
- Car wheels
- Table small wheels
- Power Bank
- Glue gun
Bluetooth-controlled mini car is controlled by mobile phone rather than the other methodology like buttons, gesture, etc. Here solely has to bit button in automaton phone to regulate the mini car in forward, backward, left and right directions. Thus here mobile phone is employed as sending device and a Bluetooth module placed in the mini car is used as a receiver. The phone can transmit command exploitation its in-built Bluetooth to the mini car so it will move within the needed direction like moving forward, reverse, turning left, turning right and stop.
Bluetooth Module HC-05
HC-05 Bluetooth module consists of 2 things one is Bluetooth serial interface module and a Bluetooth device. Bluetooth serial module is employed for changing the interface to Bluetooth.
Operating of Bluetooth module
The Bluetooth module has 2 modes one is master mode and the other is slave mode. The user will set either mode by exploiting some AT commands. Even the user will set the module’s setting by exploitation AT command.
First of all, the user ought to enter AT mode with 38400 rate information measure by pressing the reset button at the Bluetooth module
Pin Description of Bluetooth module
STATE : Open
RxD :Serial data receiving pin
TxD :Serial data sending pin
GND :Grounded
Vcc :3.3-6v DC
Enable : To enter in AT command mode
Circuit Diagram for Bluetooth control mini car
To see more about Arduino Uno
To see more about Motor drive module
https://www.electronicscuriosities.com/2019/09/motor-drive-module-description.html?m=1Working of mini car
The Bluetooth-controlled mini car moves consistent with a button touched within the automaton Bluetooth mobile app. To run this project first we want to transfer the Bluetooth app to kind Google play store. we will use Bluetooth RC car controlling app to control the car
In this project, I have used a Bluetooth module for demonstration. Here we've designated an RF mini car with a moving left-right steering feature. This automobile car has 2 DC motors at its front and rear aspect. The front aspect motor is employed for giving direction to the automobile suggests that turning left or right side (like real car steering feature). And rear aspect motor is employed for driving the automobile in the forward and backward direction. A Bluetooth module is employed to receive the command from Bluetooth connectivity through the phone and Arduino UNO.
Programming code
// Starting of Program
int m1a = 10;
int m1b = 11;
int m2a = 12;
int m2b = 13;
char val;
void setup()
{
pinMode(m1a, OUTPUT); // Digital pin 10 set as output Pin
pinMode(m1b, OUTPUT); // Digital pin 11 set as output Pin
pinMode(m2a, OUTPUT); // Digital pin 12 set as output Pin All from motor to arduino uno
pinMode(m2b, OUTPUT); // Digital pin 13 set as output Pin
pinMode(8, OUTPUT); // Enable pin 1
pinMode(9, OUTPUT); // Enable pin 2 motor to arduino uno
Serial.begin(9600);
}
void loop()
{
digitalWrite(8, HIGH);
digitalWrite(9, HIGH);
digitalWrite(7, HIGH);
while (Serial.available() > 0)
{
val = Serial.read();
Serial.println(val);
}
if( val == 'F') // Forward
{
digitalWrite(m1a, HIGH);
digitalWrite(m1b, LOW);
digitalWrite(m2a, HIGH);
digitalWrite(m2b, LOW);
}
else if(val == 'B') // Backward
{
digitalWrite(m1a, LOW);
digitalWrite(m1b, HIGH);
digitalWrite(m2a, LOW);
digitalWrite(m2b, HIGH);
}
else if(val == 'R') //Left
{
digitalWrite(m1a, LOW);
digitalWrite(m1b, LOW);
digitalWrite(m2a, HIGH);
digitalWrite(m2b, LOW);
}
else if(val == 'L') //Right
{
digitalWrite(m1a, HIGH);
digitalWrite(m1b, LOW);
digitalWrite(m2a, LOW);
digitalWrite(m2b, LOW);
}
else if(val == 'S') //Stop
{
digitalWrite(m1a, LOW);
digitalWrite(m1b, LOW);
digitalWrite(m2a, LOW);
digitalWrite(m2b, LOW);
}
}
// End of program
To see You Tube Video