Remote Controlled Bluetooth Car Using Arduino UNO

68

2

1

It will always be fascinating to start implementing what we have studied so far in Arduino. Basically, most of everyone would go with the basics.

So here I am simply going to explain this Arduino based Remote Controlled Car.

Requirements:

1.Arduino UNO (1)

2.Bluetooth Module (1)

3. Car Chassis

4. BO Motor

5. 9V Battery ( Better if it is 12V 7AH Rechargeable Battery for better performance )

6. Motor driver L293D

Everyone looks for a better explanation of building up these bots, rather most of the explanations are based on the connection od the of the circuit.

The circuit connection is as simple as possible. Here I will be explaining much about the code and the connect according to it.

Step 1: The Basic Working

All we have to do is to produce an RC Bluetooth car from nothing. We have discussed the requirements for this project. Here I will be introducing an application that works smoothly our controlling part of our vehicle. So signals will be sent from the application respective to the function we are implying with. For example, An 'F' will be sent to the Bluetooth if you press the forward button. Hence we can code the Arduino that a proper forward movement should be produced with the motors attached ( will explain later).

The initial part of the code

int m11=11 ,m12=10 ,m21=9 ,m22=6 ;

char data=0;

void setup()

{

Serial.begin(9600);

pinMode(m11,OUTPUT);

pinMode(m12,OUTPUT);

pinMode(m21,OUTPUT);

pinMode(m22,OUTPUT); }

The first line of code assigns the name for each pin of our microcontroller. Those four pins are for connecting 4 wires of Motor.

Serial.begin(0): Sets the data rate in bits per second (baud) for serial data transmission

pinMode: The pinMode() function is used to configure a specific pin to behave either as an input or an output. (Here we have connected motor as Output. Since the microcontroller gives output to the motor whenever to operate.)

Hope everyone got this very idea about the initial part of the code.

Step 2: Program : )

void loop() {

if(Serial.available() > 0) {

data = Serial.read();

Serial.print(data);

Serial.print("\n");

if(data == 'F')

forward();

else if(data == 'B')

backward();

else if(data == 'L')

left();

else if(data == 'R')

right();

else

astop(); }


Here come the major functions of our program. So far we have specified the nature of the pin and whether its output or input. Here in this [part, we are going for the proper logic. As we have connected the Bluetooth module with the Arduino.
Serial.available:Get the number of bytes (characters) available for reading from the serial port. This is data that's already arrived and stored in the serial receive buffer (which holds 64 bytes). available() inherits from the Stream utility class.

As we have connected the Bluetooth module. The serial available value would be the data corresponding to ur action given in the application. Hence as I mentioned before, We have to give forward moving code corresponding to the 'F' data from the app.

Therefore the data from the application is stored in the variable datausing serial.readoperation.

When you check the Application settings it will be written the corresponding alphabet for each function.

Therefore using if function each alphabet is specified with its agenda.

{ For more you can check the .ino file uploaded with this instructables}


Step 3: Circuit Connection

Circuit connection is as simple as possible. All you have to ensure is that pins are connected as specified to the Arduino code. The above-given Motor driver connection can change accordingly with the available ones in the market. You just search for the connections on the internet.

Here we have to ensure the connections for Bluetooth Module, Motor driver and the Arduino pins.

Motor Driver: Simply connect the motor driver connection accordingly shown in the above image. It is actually used to power the motors since the pin from the Arduino is just to give signal. It doesn't have the power to control the motors. So stepping up the motor signal is what a motor driver does. There will be FOUR control signals from the Arduino and connect them respectively. A Power Pin and Ground pin will be present.

Bluetooth Module: It has a VCC, GND, Tx, Rx Pins. What you have to take care of is that Tx and Rx pins shouldn't be connected when the Code is being uploaded. Tx and Rx of Bluetooth must connect to the Rx and Tx of Arduino respectively.

Step 4: Bluetooth App

https://play.google.com/store/apps/details?id=brau...

Check the above Application, there in the settings of the App you can find corresponding alphabet being transmitted for specific action we have performed.

The Code I have provided here is with the signals from the above Bluetooth app.

Share

    Recommendations

    • Arduino Contest 2019

      Arduino Contest 2019
    • Trash to Treasure

      Trash to Treasure
    • Tape Contest

      Tape Contest

    Discussions

    1
    None
    DIY Hacks and How Tos

    3 months ago

    Welcome to Instructables. Thanks for sharing with the community.