A Project Report on BLUETOOTH CONTROLLED ROBOT Submitted in partial fulfillment of the requirements For the award of the degree of Bachelor of Technology in (ELECTRONICS & COMMUNICATION ENGINEERING) Submitted by: Shivani (Roll No. : 1228231008) Aayushi (Roll No. : 1228231001) Prianka Singh (Roll No. : 1328231904) Sumit (Roll No. : 1228231016) Under the Guidance of Mr. Jitendra Sharma (Assistant Professor)
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
A Project Report on
BLUETOOTH CONTROLLED ROBOTSubmitted in partial fulfillment of the requirements
For the award of the degree of
Bachelor of Technology in(ELECTRONICS & COMMUNICATION ENGINEERING)
Department of Electronics and Communication Engineering
JP Institute of Engineering & Technology, Meerut – 250001A.K. Technical University, Lucknow (U.P.)
MAY 2016
DECLARATION
We hereby declare that the work which is presented in this report entitled “BLUETOOTH CONTROLLED ROBOT” submitted in partial fulfillment of the requirement for the award of degree of Technology degree in Electronics & communication Engineering from JP Institute of Engineering & Technology, Meerut (Affiliated to A.K. Technical University, Luck now) is our own
work carried out, under the guidance of MR. Jitendra Sharma, Assistant Professor, Department electronics & communication Engineering.
Date:
Signature:
Name: - ShivaniRoll:-1228231007
Signature:
Name: - Aayushi Roll: - 1228231001
Signature:
Name: - PriyankaRoll:-1328231907
Signature:
Name: - SumitRoll: - 1228231016
CERTIFICATE
This is to certify that Project Report entitled “Ultrasonic Blind Walking Stick” which is submitted
by “Shavian, Aayushi Singh Priyanka Singh, Sumit’ In partial fulfillment of the requirement for
the award of Bachelor of Technology degree in Electronics & Communication Engineering from
J.P. Institute of Engineering & Technology, Meerut affiliated to A.K. Technical University,
Lucknow is a record of the candidates own work carried out by them under my supervision. The
matter embodied in this report is original and has not been submitted for the award of any
other degree.
Date:
Project Guide Head of Department
(Jitandra Sharma) (Abhishek Kumar Singh)
Assistant professor Electronics and Communication Engineering
Director(Dr. Alok Agrawal)
J.P. Institute of Engineering & Technology
Mawana road, Meerut
ACKNOWLEDGEMENT
We manifest our profound gratitude and sincere thanks to our venerable guide Mr. Mr.Jitendra Sharma, Assistant Professor , Electronics & Communication Engineering Department, for his keen interest , sagacious advice , helpful guidance , and above all , for the inspiration and encouragement that we received from him throughout our work. We were greatly benefited by his relentless and unflagging ministrations at the time of dire need. His inordinate care and out of box suggestions helped us a lot. It would not have been possible to complete this project without his kind consideration to our problems.
We also take the opportunity to acknowledgement the contribution of Mr. Abhishek Kumar Singh, Head, Department of Electronics & Communication Engineering, Dr. Alok Agrawal, respected Director, J.P. Institute of Engineering & Technology, Mawana road, Meerut. For full support and assistance during the development of the project.
We are also take the opportunity to thanks all the faculty and staff of Electronics and Communication Engineering Department who have helped us to build our sound fundamentals.
Signature: Signature:
Name: Shivani Name: Aayushi Singh
Roll No. 1228231008 Roll No. 1228231002
Signature: Signature:
Name: Priyanka Singh Name: Sumit
Roll No. 1328231904 Roll No. 1228231016
Date:
(i)
ABSTRACTIn this project we are using many of the wireless-controlled robots use RF modules. But this project make use of Android mobile phone for robotic control. The control commandsAvailable are more than RF modules. For this the android mobile user has to install an application on her/his mobile. Then user needs to turn on the Bluetooth in the mobile. The wireless communication techniques used to Control the robot is Bluetooth technology. User can use various commands like move forward, reverse, move left, and move right using these commands. Which are sent from the Android mobile. Robot has a Bluetooth receiver unit. Which receives the commands and give it to the microcontroller circuit to control .The motors. The microcontroller then transmits the signal to the motor driver IC’s to operate the motors.
TABLE OF CONTENT
Page noDECLARATION iCERTIFICATE iiACKNOWLEDGMENTS iiiABSTRACT IVLIST OF TABLES viiiLLIST OF FIGURES ix
CHAPTER 1 INTRODUCION 1
1.1 LIMITATION OF THE EXISTING WIRED ROBOT 11.2 NEED OF WIRELESS CONTROLLED ROBOT 2
CHAPTER 2 PLATFORM USED2.1 SOFTWARE REQUIREMENTS 32.2 HARDWARE REQUIREMENTS 32.3 AIM OF PROJECT 32.4 BLOCK DIAGRAM 42.5 WORKING OF PROJECT 42.6 CIRCUIT DIAGRAM 5 2.6.1 Circuit Description 6 2.6.1.1 Power Supply Section 6 2.6.1.2 Microcontroller Section 62.7 PCB LAYOUT 7 2.7.1 Step for making PCB 82.8 PROGRAMMING 9
Table 3.1 Flash programming & verification 16Table 3.2 Description of Port 3 17Table 3.3 AT89S52 SFR map and reset a Value 18 Table 3.4 Timer 2 operating modes 20Table 3.5 T2 Model –Timer 2 mode controls 22Table 3.6 Interrupt Enable (IE) Register 25
LIST OF FIGUREFigure No. Title of Figure Page No.Figure 2.2 PCB Layout 9Figure 2.2 Pin diagram of microcontroller 19Figure 2.2 Architecture of microcontroller 12Figure 2.2 Timer in capture mode 13Figure 2.2 Timer 2 Auto Reload mode (DCN=0) 13Figure 2.2 Timer 2 Auto Reload mode (DCN=1) 14Figure 2.2 Timer 2 boud rate generator mode 15Figure 2.2 Timer 2 in clock out mode 17Figure 2.2 Interrupt sources 19Figure 2.2 Oscillator connections 20Figure 2.2 Relay Photographs 23Figure 2.2 Different type of capacitor 26Figure 2.2 Fixed Resistor 28
Introduction
1.1. Purpose
The main purpose of this project is to develop a remote user interface to control a
robot via a wireless technology. There is a need to communicate with the robot remotely in
order to control the robot movements and pass critical data both ways. The current IR
controls are not good enough because the robot does not have an IR transmitter but only a
receiver, meaning that the communication is one way. The IR communication works only in
line of direct sight and any objects in the way will obstruct the communication.
Bluetooth communication will enable us to control the robot up to 100 meters
without the need for direct sight which means that the robot could be located behind a wall
or some other object and the communication would not be lost.
1.2.Scope
This system will deal with the basic robot movement functions, as well as user
interface, Bluetooth communication, serial RS232 communication between the robot and the
Bluetooth module, and RS232 communication between the PC and the Bluetooth module.
Full implementation of the code both for the robot and the computer shall be
developed in this project.
1.3.Terms, Acronyms & Abbreviations
- IR - Infra Red
- RS232 - Serial Communication Standard
- ACL - Asynchronous connection link
- GFSK - Gaussian Frequency shifting
4
- DTE - Data Terminal Equipment
- DCE – Data Carrier Equipment
- CTS – Clear to Send
- DTR – Data Terminal Ready
- DCD - Data Carrier Detect
- RTS – Request To Send
- GND - Ground
- DSR – Data Set Ready
- RI – Ring Indicator
- ASYNCHRONOUS – a communications system in which data transmission may start at
any time and is indicated by a start bit
- SYNCHRONOUS – a communications system in which sending and receiving of data is
fixed by time-clock intervals
- ROBOT – IntelliBrain-Bot Robot
- BLUETOOTH MODULE – Firefly Serial Bluetooth Module Class 1
1.4. Problem Description
There is a need for a remote robot controller that will enable the two way communication
between the user and the robot. This controller must be wireless in order to give the robot its
movement freedom. The current IR controller works only one way because the robot does not have
its own transmitter. The IR communication is very limited because the transmitter has to be directly
pointed to the receiver. With the Bluetooth technology we can have a two way communication
which works on radio frequency up to 100 meters in distance. Furthermore, we want to control the
5
robot with a user interface such as a joystick and keyboard. The robot could then pass the data such
as distance, speed, battery power, etc. back to the user. The user could then decide what he wants to
do with the robot according to the data received. The navigation system shall be relatively accurate
with no deviation higher than two centimeters. No robot is perfect, and it shall most likely never be
error free. Sometimes in robotics you have to accept close enough to be perfect.
1.5. Problem Solution
The system shall be composed of 3 major components. The first one is the software that
defines the main robot movements, navigation and sensor systems. The second part is the User
Interface which will implement a joystick as the main user controller. The joystick used is an
Analog Raider Pro Joystick which will be connected via a Male 15 pin cable through a game
port. Both the serial communication between the PC and the Bluetooth and the communication
between the robot and the Bluetooth module will be implemented. From the context diagram -
1.1 we can see which communication protocols are needed for this design.
6
CHAPTER 2
SOFTWARE REQUIRMENTS: In this project there are many software used which fulfillment the need of project. There are different type of software are used which is listed below.
A. KEIL SOFTWARE:
Keil Software, world's leading developer of Embedded Systems Software, makes ANSI C compilers, macro assemblers, real-time kernels, debuggers, linkers, library managers, simulators, integrated environments, and evaluation boards for the 8051, 251, ARM7, and C16x/ST10 microcontroller families. Keil Software implemented the first C compiler designed from the ground-up specifically for the 8051 microcontroller
B.PROTEUS FOR HARDWARE SIMULATION:
The Proteus Design Suite is wholly unique in offering the ability to co-simulate both high and low-level micro-controller code in the context of a mixed-mode SPICE circuit simulation. With this Virtual System Modelling facility, you can transform your product design cycle, reaping huge rewards in terms of reduced time to market and lower costs of development.
If one person designs both the hardware and the software then that person benefits as the hardware design may be changed just as easily as the software design. In larger organisations where the two roles are separated, the software designers can begin work as soon as the schematic is completed; there is no need for them to wait until a physical prototype exists.
In short, Proteus VSM improves efficiency, quality and flexibility throughout the design process.
C.ANDROID PLATFORM:
Android helps provide a smooth platform to user which help the user to connect the controller device to robot and navigate the robot all directions
D. WINDOWS/MAC OPERATING SYSTEM:
To implement this project we need to an operating software which help to configuration the all software .we can use windows 7,8,10..
2 HARDWARE REQUIRMENTS:
To complete this project we need many hardware which are listed below .
A MICROCONTROLLER
6
Fig 1.1 Context Diagram
The spoofing of the serial cables is required to make the connection between the robot
and the computer work. Bellow we can see the colors used in a regular serial cable for
corresponding pin. The standard RS232 cable has 9 pins which we can see from the table 1.3.
Most DCE devices only use pins 2, 3, 5 which are Receive, transmit and ground, respectively.
This makes at problem for the Bluetooth because it requires an active CTS and RTS signals in
order to know if the data was requested. To solve this problem I have connected pins 7 and 9 to
7
Each other on the robot’s Bluetooth module so it always thinks data is ready to be received and
transmitted.
Fig 1.2 RS232 Serial Connections (Source: Zytrax.com)
Above we can see the solution to the problem. We can simply wire pins 1, 4 and 6
together so that the computer things it found the device looping back, DTS, DTR and DCD back
to itself. On the computer part of the connection I had to wire pins 1, 4 and 6 together because
the Bluetooth modules only use pins 2, 3, 5, 7, 9 and therefore it does not tell the computer if a
DCD device was detected on the other end. This term is known as “spoofing” the connection
and should be done very carefully.
On the robot side, I have connected the brown wire to the send pin, red to the receive
pin, yellow to the ground pin, and gray to the power pin. The corresponding pin to the colors
can be found in the coloring table below Figure 1.5.
INT 15 - BIOS - JOYSTICK SUPPORT (XT after 11/8/82, AT, XT286, PS) AH = 84hDX = subfunction
0000h read joystick switchesReturn: AL bits 7-4 =
switch settings 0001h read positions of joysticks
Return: AX = X position of joystick A BX = Y position of joystick A CX = X position of joystick B DX = Y position of joystick B
Return: CF set on error
AH = status
80h invalid command (PC,PCjr)86h function not
supported (other) CF clear if successful
Notes: if no game port is installed, subfunction 0000h returns AL=00h (all switches open) and subfunction 0001h returns AX=BX=CX=DX=0000h a 250kOhm joystick typically returns 0000h-01A0h
if (joy2.isButtonDown(2)){ boolean flag =true;// Reading data from keyboard System.out.println("Please input a command: ");
while (flag){ try{
i = System.in.read();}catch
(IOException e){} if ((char)i ==
'w')pushIt((byte)85);
if ((char)i == 's') pushIt((byte)84);
if ((char)i == 'a') pushIt((byte)83);
if ((char)i == 'd') pushIt((byte)82);
if ((char)i == 'q') pushIt((byte)89);
if (i =='\t')flag = false;
}}
try{System.out.println("input stream equals: " +inputStream.available()); if (inputStream.available() > 0) {
System.out.println("inputstream is available"); byte [] buffer = new byte[128];int length = inputStream.read(buffer); System.out.println("length of input is " + length); System.out.println("Input buffer is " + buffer.toString());