Professional Documents
Culture Documents
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
4. Bluetooth Module 1
5. Wheels 2
6. Chassis 1
8. 9V battery 2
9. Battery cap 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.
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
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
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.
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.
Specification:
∙ Model: HC-05
∙ Input Voltage: DC 5V
∙ Communication Method: Serial Communication
∙ Master and slave mode can be switched
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.
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.
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:
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.
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).
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);
}
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
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);
}
Note:
While uploading the code in the Arduino UNO, disconnect the RX and TX pin of
the Bluetooth module from the Arduino UNO.
Link:
https://play.google.com/store/
apps/details?id=braulio.calle.
bluetoothRCcontroller
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
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.
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
13
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.
© 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.