Introduction: Smartphone Controlled Bluetooth Car

Hello guys, I made this project for my school's maker faire. This is a smartphone controlled Bluetooth car. It's a really fun and simple project. i recommend you guys to make one at home. PLEASE VOTE FOR ME!!!

you can even see my other videos on my youtube channel.

https://www.youtube.com/channel/UCKpfEcbQ2y-adF-ZGOixIzA

Step 1: Components Needed...

Hello mates, to make this project is really simple and the materials are quite cheap. So hear are the parts that you'll be needing:

1) Arduino Uno

2) L298N Motor Driver

3) Bluetooth Module (HC 05)

4) Chassis

5) Male to Female Jumper Wires

6) Male to Male Jumper Wires

7) Mini Breadboard

8) 2x DC Gear Motors

9) 2x Wheels

10) 9v Battery

11) 6x AA battery

12) Battery Holder

Step 2: Fixing the Main Components

In my case i had planned a lot of how to make this chassis, and at last i came up with this design and i realized that it worked perfectly alright. You guys can copy my chassis or make your own design.

I fixed the mini breadboard, the arduino, the L298N motor driver, and the two motors on the chassis with the help of double side tape. it's easy to take out once you're done with your project.

Step 3: How to Connect the Bluetooth Module

Gently push the Bluetooth module into the mini breadboard like in the picture. It's not necessary to use a mini breadboard, you can simply use male to female jumper wires and connect the Bluetooth module. but to make life easier i used a mini breadboard :-)

Step 4: The Schematic of the Hardware

Guys, just be careful while following this schema. that's the reason why i've put this message in bold letters. Instead of connecting the ENA of the Bluetooth module to the Pin 12 of the Arduino, connect it in the Pin 6 of the Arduino. Copy the rest as the schema is showing.

Step 5: Connecting the Batteries

Now connect the batteries. One battery is to power up the motor driver and the other battery is to power up the Arduino. If you want, you could put a switch so that it's easier to power up the car.

Step 6: Final Looks of the Car

Once it's over it's suppose to look like this or the way you guys designed. Try to make is as neat and clean as possible because if in the future, i wire got disconnected then it will be a lot easier to solve the problem than to find for the problem in the wiring mess.

Step 7: Let's Make the App!

Go to your browser and search "remotexy.com". A page will open as the image shows. Then on the top right corner, there will be a button "created account or sign up". I would recommend you to make an account. once you've made an account a page will open up as the second image is showing.

On the left side, you've got a bunch of buttons. You can simply drag them inside the phone screen. but in our case we will just need to drag the joystick and the on/off button like the third image.

Step 8: Download the Code of the App

Once you're done with the buttons and how you want the app to look you need to download the code.

So on the right side of the screen there is a button named "Get Source Code". Click on that and you'll be opened on another page like the image shown above.

Just download the Library of "remotexy" and download the code of the application you just created. you will get a page like the second image.

Step 9: Arduino Software

Open your Arduino software. Make sure that you installed the remotexy library. now open up the code you just downloaded (it will look like the image i've posted). Connect your Arduino board to our PC and upload the code.

now open a new sketch in the Arduino software as the second image shows. Copy the code I've written below. Once copied and pasted, upload this code too(the third image is the code below). Now your hardwork is over and enjoy your new born smart phone controlled bluetooth control car!!!! :-)

#define REMOTEXY_MODE__SOFTWARESERIAL
#include
//Including the software serial library #include //Including the remotexy library

/* RemoteXY connection settings */ #define REMOTEXY_SERIAL_RX 2 //defining the pin 2 as RX pin #define REMOTEXY_SERIAL_TX 3 //defining the pin 3 as TX pin #define REMOTEXY_SERIAL_SPEED 9600 //setting baudrate at 9600

unsigned char RemoteXY_CONF[] = //remotexy configuration { 3,0,23,0,1,5,5,15,41,11 ,43,43,1,2,0,6,5,27,11,5 ,79,78,0,79,70,70,0 }; struct { //Function for declaring the variables signed char joystick_1_x; //joystick x-axis signed char joystick_1_y; //joystick y-axis unsigned char switch_1; //variables for switch unsigned char connect_flag;

} RemoteXY;

//defining the pins for first motor #define IN1 10 #define IN2 9 #define ENA 6

//defining the pins for second motor #define IN3 8 #define IN4 7 #define ENB 11

//defining the LED pin #define ledpin 13

unsigned char first_motor[3] = {IN1, IN2, ENA}; unsigned char second_motor[3] = {IN3, IN4, ENB};

void Speed (unsigned char * pointer, int motor_speed) { if (motor_speed>100) motor_speed=100; if (motor_speed<-100) motor_speed=-100; if (motor_speed>0) { digitalWrite(pointer[0], HIGH); digitalWrite(pointer[1], LOW); analogWrite(pointer[2], motor_speed*2.55); } else if (motor_speed<0) { digitalWrite(pointer[0], LOW); digitalWrite(pointer[1], HIGH); analogWrite(pointer[2], (-motor_speed)*2.55); } else { digitalWrite(pointer[0], LOW); digitalWrite(pointer[1], LOW); analogWrite(pointer[2], 0); } }

void setup() { //defining the motor pins as the output pins pinMode (IN1, OUTPUT); pinMode (IN2, OUTPUT); pinMode (IN3, OUTPUT); pinMode (IN4, OUTPUT); pinMode (ledpin, OUTPUT); RemoteXY_Init (); }

void loop() { RemoteXY_Handler (); digitalWrite (ledpin, (RemoteXY.switch_1==0)?LOW:HIGH); Speed (first_motor, RemoteXY.joystick_1_y - RemoteXY.joystick_1_x); Speed (second_motor, RemoteXY.joystick_1_y + RemoteXY.joystick_1_x); }

Step 10: Give Life to Your New Mate! :-)

hope you guys enjoyed the project I made. Please vote for me in the contest and if you guys have any question, please feel free to ask me. I reply to your question as quickly as possible. See my video on you-tube of how i made my project. please subscribe to my channel and i'll make more videos.

BYE BYE!

Comments

author
26thgenius (author)2017-08-11

wow, I'm amazed seeing your project. Really well done

author
BhaswarG (author)26thgenius2017-08-13

Thanks! do vote for me in the Bluetooth challenge! :-)

author
Oxfordmathan29 (author)2017-08-13

Code sent me for mail

Oxfordmathan@gmail. Com

author
BhaswarG (author)Oxfordmathan292017-08-13

you can copy the code i've posted here :-)

About This Instructable

801views

40favorites

License:

Bio: hello guys, my name is Bhaswar and i am 16 years old.i love to make projects with the arduino. hope you guys enjoy my ... More »
More by BhaswarG: Arduino Smartphone Controlled Bluetooth CarTop 10 Life Hacks
Add instructable to: