You are on page 1of 16

Bluetooth

Control
Car

Bluetooth control car.indd 1 21-05-2021 15:49:51


Index

Bluetooth Control Car


1. Theoritical Concepts .............................................................................................. 01
2. Bluetooth Control Car - Activity .................................................................... 05

Bluetooth control car.indd 2 21-05-2021 15:49:51


Bluetooth Control Car

Theoritical Concepts

Aim:
To learn about Arduino UNO board and its microcontroller, Bluetooth module,
motors & motor driver module and making of a robot and also about how we
can control the motors using Bluetooth module and make the robot car that
follows the instructions from an android mobile.

Components Required:
Sr. No Component Quantity

1. Arduino UNO 1

2. DC Motor 2

3. Motor Driver Module 1

4. Bluetooth Module 1

5. Wheels 2

6. Chassis 1

7. Jumper wires Few

8. 9V battery 2

9. Battery cap 1

10. Battery cap with power jack 1

Introduction to Arduino:
Arduino is like the brain of the ROBOT. It is a
board-based microcontroller (small computer
on a chip) with facilities for processing data and
I/O (input and output) pins for receiving and
sending signals to devices. It can be powered
and programmed using a computer or mobile phone.

Bluetooth control car.indd 1 21-05-2021 15:49:51


Let’s revise some of last year’s important topics:

Arduino consists of both a physical programmable circuit board and a piece of


software that runs on your computer. Arduino is an open-source electronics
platform based on easy-to-use hardware and software.
Arduino boards can read inputs - light on a sensor, a finger on a button, or a
Twitter message - and turn them into an output - activating a motor, turning
on an LED, publishing something online.

Arduino UNO:
Arduino UNO is a microcontroller board based on the 8-bit ATmega328P
microcontroller. It has 6 analog input pins, 14 digital input/output pins (out
of which 6 can be used as PWM outputs), a reset button, a USB connection
and a power barrel jack.

Note:
Arduino Uno board might be looks different but working and architecture is same

Pinouts of Arduino UNO:

The pinout diagram of Arduino UNO shows the connections that can be made
on the Arduino on specific pins. Let’s understand the specifications of all the
pins on Arduino UNO.
2

Bluetooth control car.indd 2 21-05-2021 15:49:52


1. Reset Button – This button is used to restart any code uploaded on the
Arduino board.
2. Digital Input/ Output (0-13 pins) – Digital input or output pins range from
0-13.
3. Analog Pins (A0-A5)– These pins convert analog signals from the analog
sensor into a digital signal.
4. ATmega Microcontroller – The brain of Arduino. It stores the programs.
5. PWM – Pulse width modulation normally functions as a digital pin but can
be used for pulse width modulation. These pins are marked with the (~)
symbol.
6. USB Connection – Used to give power to Arduino and upload codes from
the computer.
7. TX/RX(0/1 pins) – Transmitting and receiving data indication LEDs.
8. DC Power LED Indicator – This LED lights up every time the Arduino board
is plugged into a power source.
9. Power Barrel Jack – It is a port to provide a power source to the board.
10. 3.3V Pin – This pin supplies 3.3 volts of power from the board.
11. 5V Pin – This pin supplies 5 volts of power from the board.
12. Ground Pin – Ground pins are used to ground the circuit.
13. AREF – “Analog Reference” is used to set an external reference voltage.

DC Motor:
When we power the motor with batteries, its shaft starts rotating. We can
rotate it in both clockwise and anti-clockwise directions by changing the
polarity of the battery.

Bluetooth control car.indd 3 21-05-2021 15:49:52


Motor Driver Module
This is a dual bidirectional motor driver
module. This model will allow you to easily
and independently control two motors, each
in both directions. It is ideal for robotic
applications and well suited for connection
to a microcontroller requiring just a couple of
control lines per motor.

What is Bluetooth:
Bluetooth is like a tunnel or a road that our digital files use to travel from one
place to another (e.g. from one mobile to another).
The second King of Denmark, King Herald Bluetooth, was famous for uniting
Scandinavia in the 10th century. This is how we got the name for Bluetooth
just as we intend to unite PC and cellular industries with a short-range
wireless link.
Understanding Bluetooth:
There are different ways through which digital data can flow. For example, it
can flow through pen drives, the Internet, Bluetooth, and more.
H
Bluetooth is defined as being a short-range radio technology (or wireless
technology) aimed at simplifying communication among Internet devices and
between devices and the Internet. It also aims to simplify data synchronization
between Internet devices and other computers.

HC-05 Bluetooth Module:


The HC-05 Bluetooth Module is a simple-to-use Bluetooth SPP (Serial Port
Protocol) module intended for the configuration of transparent serial wireless
connections. It communicates through serial communication, making it easy
to connect with the controller or PC. The Bluetooth
module HC-05 includes the switching mode between
master and slave mode, meaning that it is unable to
use data reception or transmission.

Bluetooth control car.indd 4 21-05-2021 15:49:52


Pinouts:

Pin Description Function


VCC +5V Connect to +5V
GND Ground Connect to ground

UART_TXD, Bluetooth serial Connect with the MCU’s


TXD
signal sending pin (Microcontroller, etc) RXD PIN.

UART_RXD, Bluetooth serial Connect with the MCU’s


RXD
signal receiving pin (Microcontroller, etc) TXD PIN.

Specification:
∙ Model: HC-05
∙ Input Voltage: DC 5V
∙ Communication Method: Serial Communication
∙ Master and slave mode can be switched

Bluetooth Control Car- Activity

Hardware Assembly

Note:
Chassis might be different but it works in the similar way .

Scan the QR code given below to view the construction and working video of
the robot.

Bluetooth control car.indd 5 21-05-2021 15:49:52


Connection for base part:
Step 1: Take a chassis board and attach the castor wheel using the screw and nuts/
double side tape.

Step 2: Connect the motors both the sides using the screws and nuts.

Step 3: Take out the wheels and connect them to both the motors.

Bluetooth control car.indd 6 21-05-2021 15:49:52


Connection for top part:
Step 1: Take out the motor driver module and attach it at the top of the
chassis using the screws and nuts/ double-sided tape.

Step 2: Take out the motor driver module and attach it at the top of the
chassis using the screws and nuts/ double-sided tape.

Circuit Diagram:

Step 1: Connect the Bluetooth module to the


Arduino UNO as per the circuit diagram.

Connections:
• Connect the TX pin of the Bluetooth module to
the pin 2 of the Arduino UNO.
• Connect the RX pin of the Bluetooth module to
the pin 3 of the Arduino UNO.
• Connect the VCC and GND pin of the Bluetooth
module to the 5V and GND pin of the Arduino
UNO respectively.

Bluetooth control car.indd 7 21-05-2021 15:49:53


Note:
If the communication is not happening with blue tooth and Arduino exchange
the 2 and 3 pins jumper wires and try again.

Step 2: Connect the motors to the motor driver module.

Step 3: Connect the motor driver module to Arduino UNO as per the circuit
diagram. .

Step 4: Take 9v battery and connect to the motor driver module with the help
of battery cap (red wire to + of motor driver module and black wire
to - of motor driver module).

Bluetooth control car.indd 8 21-05-2021 15:49:53


Arduino IDE Installation: PDF Video
Scan the QR code give below to install
and setup the Arduino IDE Setup in
your laptop/system.

Code:

#include <SoftwareSerial.h>
SoftwareSerial bluetooth(2,3); // RX, TX
char t;

void setup() {
Serial.begin(9600);
bluetooth.begin(9600);
pinMode(10,OUTPUT); //left motors forward
pinMode(11,OUTPUT); //left motors reverse
pinMode(12,OUTPUT); //right motors forward
pinMode(13,OUTPUT); //right motors reverse
}

void loop() {
if(bluetooth.available()>0){
t = bluetooth.read();
Serial.println(t);
}

if(t == ‘F’){ //move forward(all motors rotate in forward direction)


digitalWrite(10,HIGH);
digitalWrite(11,LOW);
digitalWrite(12,HIGH);
digitalWrite(13,LOW);
}

else if(t == ‘B’){ //move reverse (all motors rotate in reverse direction)
digitalWrite(10,LOW);
digitalWrite(11,HIGH);
digitalWrite(12,LOW);
digitalWrite(13,HIGH);
9

Bluetooth control car.indd 9 21-05-2021 15:49:53


}

else if(t == ‘L’){ //turn right (left side motors rotate in forward direction, right side
motors doesn’t rotate)
digitalWrite(10,LOW);
digitalWrite(11,LOW);
digitalWrite(12,HIGH);
digitalWrite(13,LOW);
}

else if(t == ‘R’){ //turn left (right side motors rotate in forward direction, left side
motors doesn’t rotate)
digitalWrite(10,HIGH);
digitalWrite(11,LOW);
digitalWrite(12,LOW);
digitalWrite(13,LOW);
}

else if(t == ‘S’){ //STOP (all motors stop)


digitalWrite(10,LOW);
digitalWrite(11,LOW);
digitalWrite(12,LOW);
digitalWrite(13,LOW);
}
delay(100);
}

Scan the below QR code to download the program:

Note:
While uploading the code in the Arduino UNO, disconnect the RX and TX pin of
the Bluetooth module from the Arduino UNO.

Interfacing between hardware and Android Bluetooth App.


Step 1: Connect the Bluetooth Module to the Arduino UNO and program your
Arduino UNO accordingly, so that you will be able to control Arduino
UNO using your Android device.
10

Bluetooth control car.indd 10 21-05-2021 15:49:53


Step 2: Download and install the “Arduino Bluetooth RC Car” app from the play
store or app store.

Link:
https://play.google.com/store/
apps/details?id=braulio.calle.
bluetoothRCcontroller

Step 3: Program your Arduino UNO(which


has already been connected to the
Bluetooth module) with the
“Gesture controlled Car” program.
Once the program is uploaded, you are ready to pair the Bluetooth
module with your Android or IoS device.

Step 4: Open Bluetooth settings in your Android/IoS device and search for a new
Bluetooth device (make sure your Bluetooth module is connected to
Arduino UNO and the LED inside the Bluetooth module is blinking before
pairing it with your Android/ios device).
Your Bluetooth module will be either having the name “HC-05 Or JDY-
0031”, please click on the Bluetooth device and proceed typing the pairing
code “1234”, to pair it accordingly.

Note:
Make sure you have made the Bluetooth module and Arduino UNO connections
properly, before starting the pairing process.

Step 5: Once the pairing is done, head back to the app that you have downloaded
earlier and select the Bluetooth module which you have paired already.

Note:
If you have multiple Bluetooth Modules paired with the same name in your
Android/IOS device, you can identify the modules using their chip or mac id.
Each Bluetooth module is equipped with a different Chip ID.

11

Bluetooth control car.indd 11 21-05-2021 15:49:54


Click on “Connect to the car” and select the Bluetooth module which you had
paired earlier.

Note:
Red LED that blinks on the corner of the home screen turns to Green after a
successful connection between the Android device and Arduino UNO.

Step 6: With the help of control buttons present on the home screen,you will
be able to control the robot and make it move accordingly.

Conclusion/Learning Outcome

We learned how to make a Bluetooth control car with a Bluetooth module and
motors by sending the robot instructions using simple Arduino syntax coding.

Children will be able to understand the fundamentals of robotics, algorithms,


and other concepts after finishing the Bluetooth control car.

This robot e-book/manual would also assist them in developing essential skills
such as problem-solving, attention to detail, patience, and debugging, in
addition to the above learning outcomes.

12

Bluetooth control car.indd 12 21-05-2021 15:49:54


Paste your invention here.
Click the picture of your final robot and paste it here.

13

Bluetooth control car.indd 13 21-05-2021 15:49:54


EdRoboVate is a robotics kit with various

Bluetooth
Robotics & STEM-related proj ects and
activities for the children to ignite their young

Control
minds. This kit helps children to improve their
critical and logical thinking ability and also
Robotics is beneficial to cognitive development

Car
as it improves the health of the brain and
prevents neural deterioration, with the help
this a child can learn Robotics easily and thus
helps them to pave their future.

K12 Techno Services Pvt. Ltd.


Bengaluru: 41 Trinetra Building, New Bel Road, Mayuri Signal, Behind Punjab National Bank,
AG's Layout, Mathikere, Bengaluru, Karnataka - 560 054.
Mumbai: Prince House 51/3, 2nd floor, Marol Co-op. Industrial Estate, M.V. Road,
Andheri East, Mumbai, Maharashtra - 400 059.

www.letseduvate.com info@letseduvate.com 080 6001 7100

© All rights are reserved. No part of this book shall be copied, adapted, abridged,
translated and/or stored in any retrieval system, computer system, and/or any other
system either in the form of photography or otherwise and/or transmitted in any
form, by any means without the prior written consent of the copyright holder, M/s.
K12 Techno Services Pvt. Ltd. Any breach of the copyright shall be subject to legal
action against the offender without any notice.

Published by K12 Techno Services Private Limited, Bengaluru, Karnataka.


Printed by Meghart Colour Crafters, Mumbai, Maharashtra.

Bluetooth control car.indd 14 21-05-2021 15:49:54

You might also like