Mobile Controlled Car Using Arduino+Bluetooth Module
by Kitu Singh in Circuits > Wireless
23460 Views, 120 Favorites, 0 Comments
Mobile Controlled Car Using Arduino+Bluetooth Module
Hello friends,
In this project i will show you how to make a android phone controlled car using Bluetooth module and Arduino Uno Board.
In this i also show you how to make android app for the same so that you can further change/modify it acc. to your needs.
Overall this project cover everything you need to build up a mobile controlled car(Hardware+coding).
Hardware and Software Required
Hardware:
- 2 Motors(100-300rpm)
- car Chassi
- 2 Tyres
- 1 caster weel
- Breadboard
- Battery 9v
- Power Adapter(9-24v)
- Male to male wires
- L293d IC(Motor driver IC)
- Arduino Uno
- Bluetooth Module
Softwares
- Arduino
- Android Studio
Use of these all are explained in next steps...
Setup of Hardware
1.First design your car using Chassi, tyres, caster wheel and Motors.
2.Paste breadboard on car using double sided tape.
3.Now again using double sided tape fix Arduno board on breadoard.
there is no restriction on setting up hardware in same way...these are just ideas...
Connections
Do connections as shown in figure above.
- Here L293d is used because maximum output voltage of Arduino board is 5V. But we want more than 5V to run our Motors therefore we use L293D(Motor driver IC containing two H bridges) which can supply upto 32V to motors.
- -To 8th pin of L293D ,you can provide voltage upto 32v ,depend on you how much speed of car you need...
Power Supply to Arduino and Motor
- Adapter of required voltage can be used to power IC/Motors and separate 9V battery can be used to power Arduino Board
- Please don't suppy Arduino Board more than 12V, it can burn out the the Board.
- Paste any insulator(Double sided tap) below Arduino to prevent short circuiting.
Bluetooth Module
-
Connection of VCC and GND of bluetooth module must be done with arduino 5V and GND.
- connect TXD pin to RX pin of Arduino.
If any confusions feel free to write to me...
Arduino Code
Download Arduino software and write below code in it... char command;<br>String string;
void setup() { pinMode(2,OUTPUT);//MOTOR1 pinMode(3,OUTPUT);//MOTOR1 pinMode(4,OUTPUT);//MOTOR 2 pinMode(5,OUTPUT);//MOTOR 2 Serial.begin(9600); }
void loop() { if (Serial.available() > 0) {string = "";} while(Serial.available() > 0) { command = ((byte)Serial.read()); if(command == ':') { break; } else { string += command; } delay(1); } if(string == "F")//Forward { digitalWrite(2, HIGH); digitalWrite(3, LOW); digitalWrite(4, HIGH); digitalWrite(5, LOW); Serial.println(string); } if(string =="B")//Back { digitalWrite(2, LOW); digitalWrite(3, HIGH); digitalWrite(4, LOW); digitalWrite(5, HIGH); Serial.println(string); } if(string =="R")//Turn Right { digitalWrite(2, HIGH); digitalWrite(3, LOW); digitalWrite(4, LOW); digitalWrite(5, LOW); Serial.println(string); } if(string =="L")//Turn Left { digitalWrite(2, LOW); digitalWrite(3, LOW); digitalWrite(4, HIGH); digitalWrite(5, LOW); Serial.println(string); } if(string =="S")//Stop { digitalWrite(2, LOW); digitalWrite(3, LOW); digitalWrite(4, LOW); digitalWrite(5, LOW); Serial.println(string); } }
Downloads
Android App Code in Android Studio
This section for those who used Android Studio before...
New user can also use this code and modify it with help of tutorials on android studio...
Below link is given to download android files and apk file...
For Android Files(.rar):
https://drive.google.com/open?id=0B4eY-jcXDOueajhQT3BKMzYwdWM
For .apk file:
https://drive.google.com/open?id=0B4eY-jcXDOueRXU0...
Import android file(Bluetooth Control Car1) in android studio and enjoy editing...
Last
After done everything:
- uploading Arduino code in Arduino Uno Board
- Installing .apk file on mobile
- making all connections
NOTE: dont forget to pair your bluetooth module first...while pairing it will ask pin which is 1234 or 12345.
Now you can control your bot/car using your android phone..
IF ANY QUERIES PLEASE WRITE...