Bluetooth Car using Arduino + HC05 +Android APP by Manmohan Pal
Hello Friends, In this video i am going to show you how to make a DIY Arduino Bluetooth controlled car,
Here's the parts list:
1) Arduino Uno - https://www.amazon.in/Uno-ATmega328P-Compatible-ATMEGA16U2-Arduino/dp/B015C7SC5U/ref=sr_1_1?keywords=arduino+uno&qid=1564108527&s=gateway&sr=8-1
2) Motor Driver Shield -https://www.amazon.in/Electrobot-Driver-Shield-Expansion-Arduino/dp/B017TZ9Q3K/ref=sr_1_1?keywords=motor+driver+shield&qid=1564108554&s=gateway&sr=8-1
3)Gear Moters with Wheels (4x) -https://www.amazon.in/Techleads-Dual-shaft-motor-wheel/dp/B07N65WV3Y/ref=sr_1_2?keywords=motor+with+wheels&qid=1564108574&s=gateway&sr=8-2
4) HC-05 Bluetooth Module -https://www.amazon.in/REES52-Bluetooth-Transceiver-Module-Outputs/dp/B00R95Y0AK/ref=sr_1_2?keywords=hc05&qid=1564108621&s=gateway&sr=8-2
5) 18650 Li-on Battery (2x) - https://www.amazon.in/a2zmobi-Battery-Rechargeable-Lithium-Ion-Hookah/dp/B07MV3GT5X/ref=sr_1_13?crid=3W4MJP18SUJW1&keywords=lithium+ion+battery&qid=1564108639&s=gateway&sprefix=lithium%2Caps%2C278&sr=8-13
6) 18650 Battery Holder - https://www.amazon.in/M-Enterprises-18650-Battery-3-7-7-4V/dp/B01NBDIA6E/ref=sr_1_4?keywords=lithium+ion+battery+holder&qid=1564108689&s=gateway&sr=8-4
7) Male and Female Jumper wire - https://www.amazon.in/Robodo-OTH1-Female-Jumper-Pieces/dp/B073Q335BW/ref=sr_1_5?keywords=male+female+jumper&qid=1564108723&s=gateway&sr=8-5
------------------------------------------------------------
Here's the Circuit Diagram - https://electronics4ubymanmohanpal.blogspot.com/p/bluetooth-car.html
Here's the Code Link - https://electronics4ubymanmohanpal.blogspot.com/p/bluetooth-car.html
Here's is the BT app link - https://electronics4ubymanmohanpal.blogspot.com/p/bluetooth-car.html
-----------------------------------------------------
AF Motor Library: https://learn.adafruit.com/adafruit-m...
Note: You have to install the AF Motor Library before uploading the code.
-----------------------------------------------------------
Thanks for watching this Video. If you like this video then hit the LIKE button, share it and also make sure you don't forget to subscribe my channel for more upcoming awesome projects.
If you have any question related to this project then let me know in this comment section below
-------------------------------
//Arduino Bluetooth Controlled Car//
//// Before uploading the code you have to install the necessary library//
//AFMotor Library https://learn.adafruit.com/adafruit-motor-shield/library-install //
#include <AFMotor.h>
//initial motors pin
AF_DCMotor motor1(1);
AF_DCMotor motor2(2);
AF_DCMotor motor3(3);
AF_DCMotor motor4(4);
char command;
void setup()
{
Serial.begin(9600); //Set the baud rate to your Bluetooth module.
}
void loop(){
if(Serial.available() > 0){
command = Serial.read();
Stop(); //initialize with motors stoped
//Change pin mode only if new command is different from previous.
//Serial.println(command);
switch(command){
case 'F':
forward();
break;
case 'B':
back();
break;
case 'L':
left();
break;
case 'R':
right();
break;
}
}
}
void forward()
{
motor1.setSpeed(255); //Define maximum velocity
motor1.run(FORWARD); //rotate the motor clockwise
motor2.setSpeed(255); //Define maximum velocity
motor2.run(FORWARD); //rotate the motor clockwise
motor3.setSpeed(255);//Define maximum velocity
motor3.run(FORWARD); //rotate the motor clockwise
motor4.setSpeed(255);//Define maximum velocity
motor4.run(FORWARD); //rotate the motor clockwise
}
void back()
{
motor1.setSpeed(255); //Define maximum velocity
motor1.run(BACKWARD); //rotate the motor anti-clockwise
motor2.setSpeed(255); //Define maximum velocity
motor2.run(BACKWARD); //rotate the motor anti-clockwise
motor3.setSpeed(255); //Define maximum velocity
motor3.run(BACKWARD); //rotate the motor anti-clockwise
motor4.setSpeed(255); //Define maximum velocity
motor4.run(BACKWARD); //rotate the motor anti-clockwise
}
void left()
{
motor1.setSpeed(255); //Define maximum velocity
motor1.run(BACKWARD); //rotate the motor anti-clockwise
motor2.setSpeed(255); //Define maximum velocity
motor2.run(BACKWARD); //rotate the motor anti-clockwise
motor3.setSpeed(255); //Define maximum velocity
motor3.run(FORWARD); //rotate the motor clockwise
motor4.setSpeed(255); //Define maximum velocity
motor4.run(FORWARD); //rotate the motor clockwise
}
void right()
{
motor1.setSpeed(255); //Define maximum velocity
motor1.run(FORWARD); //rotate the motor clockwise
motor2.setSpeed(255); //Define maximum velocity
motor2.run(FORWARD); //rotate the motor clockwise
motor3.setSpeed(255); //Define maximum velocity
motor3.run(BACKWARD); //rotate the motor anti-clockwise
motor4.setSpeed(255); //Define maximum velocity
motor4.run(BACKWARD); //rotate the motor anti-clockwise
}
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
}
--------------------------------------------
End of Code
-------------------------------------------
Manmohan Pal
Mob. 8989811397
Email- mannmohanpal@gmail.com
Blog: http://electronics4ubymanmohanpal.blogspot.in/p/blog-page_5.html
Youtube Channel: https://www.youtube.com/channel/UCDnhARnHOEIPuNIEp5vPdGQ
RF Remote Control Car Using 433 Mhz RF transmitter and Receiver Kit by Manmohan Pal
https://www.youtube.com/watch?v=rcaQluS7Gzw
RF Remote Control Circuit Using 433 Mhz Module and HT12E Encoder and HT12D Decoder IC by Manmohan
https://www.youtube.com/watch?v=51TNQiaXm3U
IC L293 Moter Driver H Bridge IC by Manmohan Pal
https://www.youtube.com/watch?v=1Gh-aVm5rDg
RF Remote Control Circuit Using 433 Mhz Module and HT12E Encoder and HT12D Decoder IC by Manmohan
https://www.youtube.com/watch?v=51TNQiaXm3U
Wireless 4 Channel 433 Mhz RF Remote Control Transmitter and Receiver Unboxing by Manmohan Pal
https://www.youtube.com/watch?v=ZFjDGuFBMnI
433 Mhz RF Module Tx and Rx with Arduino Nano, RF Remote Control Circuit by Manmohan Pal
https://www.youtube.com/watch?v=JHN7kgguCG8
Wireless 4 Channel 433 Mhz RF Remote Control Transmitter and Receiver Unboxing by Manmohan Pal
https://www.youtube.com/watch?v=ZFjDGuFBMnI
RF 4 Channel Remote Control Relay Module using 433 Mhz RF Transmitter and Reciever bu Manmohan Pal
https://www.youtube.com/watch?v=1bgBXruwxfE&t=58s
https://www.youtube.com/watch?v=C1qGVaGgGOo
Touch Switch using NAND gate IC 4011 by Manmohan Pal
https://www.youtube.com/watch?v=jIEKWVs8d40
Touch Switch || Toggle aswitch || Touch ON Touch Off Switch using IC 4017
https://www.youtube.com/watch?v=9iA0AtnrL7A
433 Mhz RF Module Tx and Rx with Arduino Nano, RF Remote Control Circuit by Manmohan Pal
https://www.youtube.com/watch?v=JHN7kgguCG8&t=607s
Remote Control Relay Module 4 Channel 5 volt by Manmohan Pal
https://www.youtube.com/watch?v=67_CzDsuyfw
Remote control for every home appliance
https://www.youtube.com/watch?v=mUuSYWyD7Ic
Remote operated light- by Manmohan Pal
https://www.youtube.com/watch?v=5oP1SCkVJm8
Remote control Fan- IR remote control Circuit using IC 555 Timer by Manmohan Pal
https://www.youtube.com/watch?v=GvAZadfdIAE
Arduino Nano Unboxing| Uploading First Program on Arduino Nano- By Manmohan Pal
https://www.youtube.com/watch?v=OxQcPwc8Wl0
Hello Friends, In this video i am going to show you how to make a DIY Arduino Bluetooth controlled car,
Here's the parts list:
1) Arduino Uno - https://www.amazon.in/Uno-ATmega328P-Compatible-ATMEGA16U2-Arduino/dp/B015C7SC5U/ref=sr_1_1?keywords=arduino+uno&qid=1564108527&s=gateway&sr=8-1
2) Motor Driver Shield -https://www.amazon.in/Electrobot-Driver-Shield-Expansion-Arduino/dp/B017TZ9Q3K/ref=sr_1_1?keywords=motor+driver+shield&qid=1564108554&s=gateway&sr=8-1
3)Gear Moters with Wheels (4x) -https://www.amazon.in/Techleads-Dual-shaft-motor-wheel/dp/B07N65WV3Y/ref=sr_1_2?keywords=motor+with+wheels&qid=1564108574&s=gateway&sr=8-2
4) HC-05 Bluetooth Module -https://www.amazon.in/REES52-Bluetooth-Transceiver-Module-Outputs/dp/B00R95Y0AK/ref=sr_1_2?keywords=hc05&qid=1564108621&s=gateway&sr=8-2
5) 18650 Li-on Battery (2x) - https://www.amazon.in/a2zmobi-Battery-Rechargeable-Lithium-Ion-Hookah/dp/B07MV3GT5X/ref=sr_1_13?crid=3W4MJP18SUJW1&keywords=lithium+ion+battery&qid=1564108639&s=gateway&sprefix=lithium%2Caps%2C278&sr=8-13
6) 18650 Battery Holder - https://www.amazon.in/M-Enterprises-18650-Battery-3-7-7-4V/dp/B01NBDIA6E/ref=sr_1_4?keywords=lithium+ion+battery+holder&qid=1564108689&s=gateway&sr=8-4
7) Male and Female Jumper wire - https://www.amazon.in/Robodo-OTH1-Female-Jumper-Pieces/dp/B073Q335BW/ref=sr_1_5?keywords=male+female+jumper&qid=1564108723&s=gateway&sr=8-5
------------------------------------------------------------
Here's the Circuit Diagram - https://electronics4ubymanmohanpal.blogspot.com/p/bluetooth-car.html
Here's the Code Link - https://electronics4ubymanmohanpal.blogspot.com/p/bluetooth-car.html
Here's is the BT app link - https://electronics4ubymanmohanpal.blogspot.com/p/bluetooth-car.html
-----------------------------------------------------
AF Motor Library: https://learn.adafruit.com/adafruit-m...
Note: You have to install the AF Motor Library before uploading the code.
-----------------------------------------------------------
Thanks for watching this Video. If you like this video then hit the LIKE button, share it and also make sure you don't forget to subscribe my channel for more upcoming awesome projects.
If you have any question related to this project then let me know in this comment section below
-------------------------------
CODE
-------------------------------//Arduino Bluetooth Controlled Car//
//// Before uploading the code you have to install the necessary library//
//AFMotor Library https://learn.adafruit.com/adafruit-motor-shield/library-install //
#include <AFMotor.h>
//initial motors pin
AF_DCMotor motor1(1);
AF_DCMotor motor2(2);
AF_DCMotor motor3(3);
AF_DCMotor motor4(4);
char command;
void setup()
{
Serial.begin(9600); //Set the baud rate to your Bluetooth module.
}
void loop(){
if(Serial.available() > 0){
command = Serial.read();
Stop(); //initialize with motors stoped
//Change pin mode only if new command is different from previous.
//Serial.println(command);
switch(command){
case 'F':
forward();
break;
case 'B':
back();
break;
case 'L':
left();
break;
case 'R':
right();
break;
}
}
}
void forward()
{
motor1.setSpeed(255); //Define maximum velocity
motor1.run(FORWARD); //rotate the motor clockwise
motor2.setSpeed(255); //Define maximum velocity
motor2.run(FORWARD); //rotate the motor clockwise
motor3.setSpeed(255);//Define maximum velocity
motor3.run(FORWARD); //rotate the motor clockwise
motor4.setSpeed(255);//Define maximum velocity
motor4.run(FORWARD); //rotate the motor clockwise
}
void back()
{
motor1.setSpeed(255); //Define maximum velocity
motor1.run(BACKWARD); //rotate the motor anti-clockwise
motor2.setSpeed(255); //Define maximum velocity
motor2.run(BACKWARD); //rotate the motor anti-clockwise
motor3.setSpeed(255); //Define maximum velocity
motor3.run(BACKWARD); //rotate the motor anti-clockwise
motor4.setSpeed(255); //Define maximum velocity
motor4.run(BACKWARD); //rotate the motor anti-clockwise
}
void left()
{
motor1.setSpeed(255); //Define maximum velocity
motor1.run(BACKWARD); //rotate the motor anti-clockwise
motor2.setSpeed(255); //Define maximum velocity
motor2.run(BACKWARD); //rotate the motor anti-clockwise
motor3.setSpeed(255); //Define maximum velocity
motor3.run(FORWARD); //rotate the motor clockwise
motor4.setSpeed(255); //Define maximum velocity
motor4.run(FORWARD); //rotate the motor clockwise
}
void right()
{
motor1.setSpeed(255); //Define maximum velocity
motor1.run(FORWARD); //rotate the motor clockwise
motor2.setSpeed(255); //Define maximum velocity
motor2.run(FORWARD); //rotate the motor clockwise
motor3.setSpeed(255); //Define maximum velocity
motor3.run(BACKWARD); //rotate the motor anti-clockwise
motor4.setSpeed(255); //Define maximum velocity
motor4.run(BACKWARD); //rotate the motor anti-clockwise
}
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
}
--------------------------------------------
End of Code
-------------------------------------------
Manmohan Pal
Mob. 8989811397
Email- mannmohanpal@gmail.com
Blog: http://electronics4ubymanmohanpal.blogspot.in/p/blog-page_5.html
Youtube Channel: https://www.youtube.com/channel/UCDnhARnHOEIPuNIEp5vPdGQ
RF Remote Control Car Using 433 Mhz RF transmitter and Receiver Kit by Manmohan Pal
https://www.youtube.com/watch?v=rcaQluS7Gzw
RF Remote Control Circuit Using 433 Mhz Module and HT12E Encoder and HT12D Decoder IC by Manmohan
https://www.youtube.com/watch?v=51TNQiaXm3U
IC L293 Moter Driver H Bridge IC by Manmohan Pal
https://www.youtube.com/watch?v=1Gh-aVm5rDg
RF Remote Control Circuit Using 433 Mhz Module and HT12E Encoder and HT12D Decoder IC by Manmohan
https://www.youtube.com/watch?v=51TNQiaXm3U
Wireless 4 Channel 433 Mhz RF Remote Control Transmitter and Receiver Unboxing by Manmohan Pal
https://www.youtube.com/watch?v=ZFjDGuFBMnI
433 Mhz RF Module Tx and Rx with Arduino Nano, RF Remote Control Circuit by Manmohan Pal
https://www.youtube.com/watch?v=JHN7kgguCG8
Wireless 4 Channel 433 Mhz RF Remote Control Transmitter and Receiver Unboxing by Manmohan Pal
https://www.youtube.com/watch?v=ZFjDGuFBMnI
RF 4 Channel Remote Control Relay Module using 433 Mhz RF Transmitter and Reciever bu Manmohan Pal
https://www.youtube.com/watch?v=1bgBXruwxfE&t=58s
https://www.youtube.com/watch?v=C1qGVaGgGOo
Touch Switch using NAND gate IC 4011 by Manmohan Pal
https://www.youtube.com/watch?v=jIEKWVs8d40
Touch Switch || Toggle aswitch || Touch ON Touch Off Switch using IC 4017
https://www.youtube.com/watch?v=9iA0AtnrL7A
433 Mhz RF Module Tx and Rx with Arduino Nano, RF Remote Control Circuit by Manmohan Pal
https://www.youtube.com/watch?v=JHN7kgguCG8&t=607s
Remote Control Relay Module 4 Channel 5 volt by Manmohan Pal
https://www.youtube.com/watch?v=67_CzDsuyfw
Remote control for every home appliance
https://www.youtube.com/watch?v=mUuSYWyD7Ic
Remote operated light- by Manmohan Pal
https://www.youtube.com/watch?v=5oP1SCkVJm8
Remote control Fan- IR remote control Circuit using IC 555 Timer by Manmohan Pal
https://www.youtube.com/watch?v=GvAZadfdIAE
Arduino Nano Unboxing| Uploading First Program on Arduino Nano- By Manmohan Pal
https://www.youtube.com/watch?v=OxQcPwc8Wl0
Thanks sir
ReplyDeleteThe left and right side motors are not clear.Not working properly
ReplyDeletecan we give the bluetooth module rx and tx to the pin 0 and 4
ReplyDeleteNo because rx and tx pins are pre defined and it must be 0 and 1 of digital pins.
Deleteno
Delete