Controlling Of Robot Using Voice

Controlling Of Robot Using Voice
Controlling Of Robot Using Voice
MINISTRY OF EDUCATION AND TRAINING
FPT UNIVERSITY
CAPSTONE PROJECT
CONTROLLING OF ROBOT USING VOICE
Authors:
Hồ Công Anh
-
SE90139
Nguyễn Tuấn Anh
-
SE02815
Đỗ Đắc Hải
-
SE02714
Phan Thành Hưng
-
SE02617
Huỳnh Học
-
SE02873
Supervisor:
Hoàng Xuân Sơn
-
Instructor/Supervisor
Hoa Lac, 13th August 2015
1
Controlling Of Robot Using Voice
TABLE OF CONTENT
1. INTRODUCTION ...................................................................................................... 6
1.1 INITIAL IDEAL ......................................................................................................... 6
1.2 SCOPE...................................................................................................................... 6
1.3 LIMITATION OF EXITS PROJECT ............................................................................... 7
2. PROJECT MANAGEMENT PLAN ........................................................................ 8
2.1 PROBLEM DEFINITION............................................................................................. 8
2.1.1 Name of this capstone project ......................................................................... 8
2.1.2 Problem abstraction ........................................................................................ 8
2.1.3 Project overview.............................................................................................. 8
2.2 PROJECT ORGANIZATION ...................................................................................... 10
2.2.1 Development process .................................................................................... 10
2.2.2 Tools, technique, design and manage the project ......................................... 11
2.3 PROJECT MANAGEMENT PLAN ............................................................................. 14
2.3.1 Task ............................................................................................................... 14
2.3.2 Task Sheet: Assignment and timetable .......................................................... 20
2.3.3 Meeting minutes .......................................................................................... 22
3. SYSTEM REQUIREMENT SPECIFICATIONS................................................. 29
3.1 USER REQUIREMENT SPECIFICATION ................................................................... 29
3.1.1 User requirement .......................................................................................... 29
3.1.2 Robot requirement ......................................................................................... 29
3.1.3 Android application requirement .................................................................. 29
3.2 SYSTEM REQUIREMENT SPECIFICATION ............................................................... 30
3.2.1 Interface requirement .................................................................................... 30
3.2.2 Functional Requirements .............................................................................. 33
2
Controlling Of Robot Using Voice
3.2.3 Non-Functional Requirement ........................................................................ 44
3.3 INFRASTRUCTURE AND TOOLS.............................................................................. 45
3.3.1 Hardware ...................................................................................................... 45
3.3.2 Software and tool .......................................................................................... 45
4. SYSTEM DESIGN DESCRIPTION (SDD) .......................................................... 46
4.1 DESIGN OVERVIEW................................................................................................ 46
4.2 SYSTEM ARCHITECTURAL DESIGN ....................................................................... 47
4.2.1 Choice of System Architecture ...................................................................... 47
4.2.2 Description of System Interface .................................................................... 48
4.3 SYSTEM FLOWCHART ........................................................................................... 50
4.3.1 Training robot ............................................................................................... 50
4.3.2 Controller robot ............................................................................................ 51
4.3.3 Erase robot memory ...................................................................................... 52
4.3.4 Connect Bluetooth ......................................................................................... 53
4.3.5 Change the robot speed. ................................................................................ 54
4.3.6 Control robot using Android application...................................................... 55
4.4 SEQUENCE DIAGRAM ............................................................................................ 56
4.4.1 Training robot ............................................................................................... 56
4.4.2 Controller robot ............................................................................................ 57
4.4.3 Erase robot memory ...................................................................................... 58
4.4.4 Connect Bluetooth ......................................................................................... 59
4.4.5 Change the robot speed ................................................................................. 60
4.4.6 Control robot using Android application...................................................... 61
4.5 USER INTERFACE DESIGN/HARDWARE INTERFACE DESIGN................................. 62
4.5.1 User interface design .................................................................................... 62
4.5.2 Hardware interface design ............................................................................ 63
4.6 THEORYS AND ALGORITHMS ................................................................................ 70
3
Controlling Of Robot Using Voice
4.6.1 Theories of speech processors ...................................................................... 70
4.6.2 IC HM2007.................................................................................................... 73
4.6.3 Radio frequency ............................................................................................ 82
4.6.4 IC L298N ....................................................................................................... 83
5. IMPLEMENTATION & TESTING ...................................................................... 86
5.1 IMPLEMENTATION ................................................................................................. 86
5.1.1 Voice processing circuit ................................................................................ 87
5.1.2 Signal transmission ....................................................................................... 90
5.1.3 Module Bluetooth .......................................................................................... 92
5.1.4 Driver motor.................................................................................................. 95
5.1.5 Supply power for Adruino ........................................................................... 102
5.1.6 Android application .................................................................................... 103
5.2 TEST .................................................................................................................... 104
5.2.1 Test plan ...................................................................................................... 104
5.2.2 Testing tool .................................................................................................. 105
5.2.3 Test environment ......................................................................................... 105
5.2.4 Testing Risks................................................................................................ 106
5.2.5 Test case ...................................................................................................... 106
6. SYSTEM USER’S MASUAL ................................................................................ 117
6.1 CONTROLLING ROBOT USING VOICE ................................................................... 117
6.1.1 Installation Guide........................................................................................ 117
6.1.2 Test installation ........................................................................................... 118
6.1.3 Delete the entire memory ............................................................................ 118
6.1.4 Preservation ................................................................................................ 119
6.2 CONTROLLING ROBOT USING ANDROID APPLICATION ........................................ 119
6.2.1 Installation Guide........................................................................................ 119
4
Controlling Of Robot Using Voice
6.2.2 User’s Guide ............................................................................................... 120
6.2.3 Setup ............................................................................................................ 120
7. RESULT AND CONCLUSION ............................................................................ 123
7.1 LIMITATION IN SYSTEM ...................................................................................... 123
7.2 SOLUTION FOR REDUCE LIMITATIONS ................................................................ 123
7.3 SUMMARY AND CONCLUSION ............................................................................. 123
7.3.1 Difficulty ...................................................................................................... 123
7.3.2 Skill learned ................................................................................................ 124
7.3.3 Conclusion................................................................................................... 125
8. LIST OF REFERENCES ...................................................................................... 126
5
Controlling Of Robot Using Voice
1. INTRODUCTION
1.1 Initial Ideal
Speech is the most used way of communication for people. By the developments
of communication technologies in the last area, speech starts to be an important
interface for many systems. Instead of using complex different interfaces, speech is
easier to communicate with computers.
In this project, it is aimed to control a robot with speech commands. The robot is
able to recognize spoken commands to move correctly. To give a direction to robot,
first the voice command is send to the computer using a microphone. The computer
recognizes the command by speech recognition system. And then computer converts
the voice command to direction command that predefined and recognizable by robot.
When the robot gets the direction command, it moves according to spoken command.
1.2 Scope
The goal of this project is to create a robot, which can listen and recognize
human voice and be control remotely by a smartphone. Following features need to be
implemented to build the final functional robot:
 Chassis to mount robot component
 Motors and wheel system to move robot around.
 Controller board to handle communication with other devices.
 Using IC HM2007.
 Using Radio frequency communications.
 Using Bluetooth communication.
6
Controlling Of Robot Using Voice
1.3 Limitation of exits project
Currently, in our country, there are some projects about controlling devices using
voice. One of which, a discovering topography robot which is controlled via the voice
of Lac Hong University and used to attend the Robocon Contest in 2011.
Figure 1.1: Robot of Lac Hong University
 The identifying part of this robot is not correct
 The moving part is not flexible
 There is no other ways to control the robot beyond using either handed
controllers over radio signal or by smartphone over bluetooth.
 The quality of product is limited by research only, and its commercial is
still low.
7
Controlling Of Robot Using Voice
2. PROJECT MANAGEMENT PLAN
2.1 Problem Definition
2.1.1 Name of this capstone project
The name of this project is Controlling of Robot Using Voice. The main
purpose of this project is developing a robot using micro to recongnize voice and
controlled by any type of voice. In anddition, we develop more features controlled by
Android smartphone via Bluetooth.
2.1.2 Problem abstraction
The automation industries currently have been developed diversely and
popularly. In Vietnam, robot applications have been applied for fields. We develop
robots for helping people's working faster and safer. For instance, in archaeology,
robots can be replaced to work in high radiation places such as shrines... We can
control robots doing our cleaning, cooking or laundry. The project has two main parts:
Creating an auto-bot which recognize voice command to do an action, and is controlled
by Android smartphone.
2.1.3 Project overview
2.1.3.1 The current system
Currently there are also a few the project that it can control devices using voice,
but it is not popular and cannot put into commercialization. The voice recognition
products not accurate and not have a lot of control mode. So, the project is only in
experiment, should be improved and developed.
8
Controlling Of Robot Using Voice
2.1.3.2 The proposed system
The main proposed include two main components:
 Hardware :
-
HM2007 , Bluetooth module: HC06,
-
Motor driver:L298, Motor, Arduino Uno , Arduino Mega ,
-
nRF24L01, Micro, Keypad, Android device.
 Software :
-
Android application, Arduino code.
These hardware are connected to each other, to build a robot can hear the voice
and do commands right as you ordered by the commander. Beside, we also allow this
bot which is controlled by Android app on smartphone via Bluetooth.
2.1.3.3 Boundaries of the system
The boundaries of the system include:
 Do task after recognize voice successfully.
 Using IC HM2007 to recognize voice.
 Using Arduino code.
 Using nRF24L01 to communicate with robot.
 Creat Android Application.
 Using Bluetooth to communicate with robot.
 Receiving the voice controlled command in the radius of 100 meters.
 Receiving data from Bluetooth in the radius of 10-100 meters.
 Theme on mobile phone is simple and easy using.
9
Controlling Of Robot Using Voice
2.2 Project Organization
2.2.1 Development process
We decide to choose Iterative and incremental model to implement this project
because of following reasons:
 This model is suitable for small and medium projects like our project.
 In Iterative life cycle model does not attempt to start with a full specification
of requirements Instead, development begins by specifying and
implementing just part of the software and hardware, which can then be
reviewed in order to identify further requirements. Our project doesn’t have
clear requirements at the beginning. Therefore we choose this process
model, in order to help project team run this project easier and get the best
quality.
 In this model we are building and improving the product step by step. Hence
we can track the defects at early stages. This avoids the downward flow of
the defects.
 In this model less time is spent on documenting and more time is given for
designing.
10
Controlling Of Robot Using Voice
Figure 2.1: Interactive and incremental development
2.2.2 Tools, technique, design and manage the project
Tool
Description
Version
Microsoft
Mainly using Microsoft Office Excel Worksheet
Microsoft Office
Office
and Word Document to record meeting minute‘s
2013
reports, design the structure of project process
and observe member tasks.
Altium
Altium Limited is an Australian owned public
Designer 9
software company that provides PC-based
11
Controlling Of Robot Using Voice
electronics design software for engineers.
Founded in Tasmania, Australia 1985, Altium
now has headquarters in Shanghai, China, with
sales offices in Australia, United States, Europe,
Japan, China, and resellers in all other major
markets. The company was known as "Protel"
until 2001.
Proteus 8.0
Proteus Virtual System Modeling (VSM)
Build 15852
(DEV) SP2
combines mixed mode SPICE circuit simulation,
Professional with
animated components and microprocessor
Advanced
models to facilitate co-simulation of complete
Simulation
microcontroller based designs. For the first time
ever, it is possible to develop and test such
designs before a physical prototype is
constructed.
Android Studio
Android Studio is an integrated development
Built #AL-
environment (IDE) for developing on the
141.1980579
Android platform. It was announced on May 16,
2013 at the Google I/O conference by Google's
Product Manager, Katherine Chou. Android
Studio is freely available under the Apache
License 2.0.Android Studio was in early access
preview stage starting from version 0.1 in May
2013, then entered beta stage starting from
version 0.8 which was released in June 2014.The
12
Controlling Of Robot Using Voice
first stable build was released in December 2014,
starting from version 1.0.Based on JetBrains'
IntelliJ IDEA software, Android Studio is
designed specifically for Android development.It
is available for download on Windows, Mac OS
X and Linux, and replaced Eclipse Android
Development Tools (ADT) as Google's primary
IDE for native Android application development.
Arduino
The open-source Arduino Software (IDE) makes
Arduino 1.6.5
it easy to write code and upload it to the board. It
runs on Windows, Mac OS X, and Linux. The
environment is written in Java and based on
processing and other open-source software. This
software can be used with any Arduino
board.Refer to the Getting Started page for
Installation instructions.
Microsoft Visio Microsoft Visio 2013 is a diagramming and
Microsoft Visio
2013
2013
vector graphics application and is part of the
Microsoft Office family. The product was first
introduced in 1992, made by the Shapeware
corporation. It was acquired by Microsoft in
2000.
Communication Facebook, gmail, …
13
Controlling Of Robot Using Voice
Enterpise
Sparx Systems Enterprise Architect is a visual
architecture
modeling and design tool based on the OMG
v9.0.0.908
UML. The platform supports: the design and
construction of software systems; modeling
business processes; and modeling industry based
domains. It is used by businesses and
organizations to not only model the architecture
of their systems, but to process the
implementation of these models across the full
application development life-cycle.
2.3 Project Management Plan
2.3.1 Task
The following people are stakeholders in this project and included in the project
planning.
Executive Sponsors: Commit resources and advocate for project:
 FPT University.
Project Supervisor: Ensure adequate resources are available and track project status:
 Mr Hoàng Xuân Sơn.
14
Controlling Of Robot Using Voice
Software Technological team: Research about technical and code:
 Hồ Công Anh.
 Nguyễn Tuấn Anh.
Hardware and Mechanical team: Design and craft mechanical parts:
 Hồ Công Anh.
 Nguyễn Tuấn Anh.
 Huỳnh Học.
 Đỗ Đắc Hải.
 Phan Thành Hưng.
Test team:
 Hồ Công Anh.
 Nguyễn Tuấn Anh.
 Huỳnh Học.
 Đỗ Đắc Hải.
 Phan Thành Hưng.
Document team:
 Huỳnh Học.
 Đỗ Đắc Hải.
 Phan Thành Hưng.
15
Controlling Of Robot Using Voice
Student
Full Name
Role
Email
Responsibilities
1
Hồ Công
Leader
anhhcse90139@fpt.edu.vn
Software/hardwa
re mechanical,
Anh
design, tester,
Editor.
2
Nguyễn
Member
anhntse02815@fpt.edu.vn
Software/hardwa
re developer,
Tuấn Anh
technical
research.
3
Huỳnh Học
Member
hochse02873@fpt.edu.vn
Hardware
developer,
document, tester
4
Đỗ Đắc Hải
Member
haiddse02714@fpt.edu.vn
Software
developer,
document, tester.
5
Phan Thành
Hưng
Member
hungptse02617@fpt.edu.vn Hardware
developer,
document, tester.
16
Controlling Of Robot Using Voice
2.3.1.1 Create Hardware Requirements Specification
Description
Create Hardware Requirements Specification.
Output
Hardware Requirement Specification document.
Deliverables
Deliver Hardware Requirement Specification document before
11/5/2015.
Dependencies
5 people for 1 week.
and Constraints
Risks and
We were having hard time to figure out suitable accessories
Solution
because they were very rare. Therefore, we were making many
efforts to create our own kit to fulfill every single chip and on IC.
2.3.1.2 Design Robots
Description
Manufacturing the whole body of the car and maintaining good
performance in mechanical assemble
Output
Having a perfectly robot performing well in any conditions
Deliverables
Deliver Hardware Requirement Specification document before
30/5/2015
Dependencies
5 people for 3 week
and Constraints
Risks and
In order to have a rigid frame and a guaranteed controller, we
Solution
have to come up many solutions. We decide to give the robot 4
wheels, not 3 wheels as the beginning.
17
Controlling Of Robot Using Voice
2.3.1.3 Create Software Requirements Specification
Description
Create Software Requirements Specification
Output
Software Requirement Specification document
Deliverables
Deliver SRS document before 11/5/2015
Dependencies
2 people for 1 week
and Constraints
Risks and
We find difficult writing stimulation only, and the result doesn't
Solution
come out as expected. Therefore, we decide on investing more in
accessory to perform well in reality as expected.
2.3.1.4 Coding
Description
Coding all function and GUI through requirement
Output
Software and hardware design document.
Deliverables
Software and hardware design document.
Dependencies
5 people for 4 week
and Constraints
Risks and
Hardware design and software design may be conflict
Solution
We send two experienced people in our group to check the
equivalent between hardware and software. Consequently, we can
fix many errors during the complete procedure.
18
Controlling Of Robot Using Voice
2.3.1.5 System Test
Description
Perform system test for the system
Output
System test report
Deliverables
Software Test Documentation
Dependencies
5 people for 4 week
and Constraints
Risks and
Lack of professional testers in team.
Solution
Developers are also responsible for system testing, this may lead
to compromise
2.3.1.6 Closing Project
Description
Closing Project Officially
Output
Running Robot
Deliverables
Project Document
Dependencies
5 people
and Constraints
Risks and
None
Solution
19
Controlling Of Robot Using Voice
2.3.2 Task Sheet: Assignment and timetable
20
Controlling Of Robot Using Voice
21
Controlling Of Robot Using Voice
2.3.3 Meeting minutes
2.3.3.1 Meeting minutes 1
Meeting/Project
Controlling Of Robot Using Voice
Name:
Date of Meeting:
16/05/2015
Time:
Meeting Facilitator:
Mr. Hoàng Xuân Sơn
Location:
14:00
FPT University
1. Meeting Objective
First meeting about project. Introduce all members of team to supervisor and dicussion
about first steps of project
2. Attendees
Name
Role
E-mail
Phone
Hồ Công Anh
Leader
anhhcse90139@fpt.edu.vn
01644860773
Nguyễn Tuấn Anh
Member
anhntse02815@fpt.edu.vn
01687388725
Huỳnh Học
Member
hochse02873@fpt.edu.vn
01654778998
Đỗ Đắc Hải
Member
haiddse02714@fpt.edu.vn
01675504171
Phan Thành Hưng
Member
hungptse02617@fpt.edu.vn 01636169698
22
Controlling Of Robot Using Voice
3. Meeting Agenda
Topic
Owner
Time
Team member introduction
Supervisor
25 minutes
Project introduction
Supervisor
30 minutes
Work of project: Report 1 and Report 2
Supervisor
10 minutes
Mechanical parts discussion
Supervisor
10 minutes
2.3.3.2 Meeting minutes 2
Meeting/Project
Controlling Of Robot Using Voice
Name:
Date of Meeting:
Meeting Facilitator:
Time:
Mr. Hoàng Xuân Sơn
Location:
FPT University
1. Meeting Objective
Talking about project and show requirement
23
Controlling Of Robot Using Voice
2. Attendees
Name
Role
E-mail
Phone
Hồ Công Anh
Leader
anhhcse90139@fpt.edu.vn
01644860773
Nguyễn Tuấn Anh
Member
anhntse02815@fpt.edu.vn
01687388725
Huỳnh Học
Member
hochse02873@fpt.edu.vn
01654778998
Đỗ Đắc Hải
Member
haiddse02714@fpt.edu.vn
01675504171
Phan Thành Hưng
Member
hungptse02617@fpt.edu.vn 01636169698
3. Meeting Agenda
Topic
Owner
Time
Discuss about component
Supervisor
30 minutes
Fix requirement
Supervisor
60 minutes
Supervisor
Supervisor
2.3.3.3 Meeting minutes 3
Meeting/Project
Controlling Of Robot Using Voice
Name:
Date of Meeting:
13/06/2015
Time:
13:00
Meeting Facilitator:
Mr. Hoàng Xuân Sơn
Location:
FPT University
24
Controlling Of Robot Using Voice
1. Meeting Objective
Dicusstion about schematic design, source code and mechanical parts.
2. Attendees
Name
Role
E-mail
Phone
Hồ Công Anh
Leader
anhhcse90139@fpt.edu.vn
01644860773
Nguyễn Tuấn Anh
Member
anhntse02815@fpt.edu.vn
01687388725
Huỳnh Học
Member
hochse02873@fpt.edu.vn
01654778998
Đỗ Đắc Hải
Member
haiddse02714@fpt.edu.vn
01675504171
Phan Thành Hưng
Member
hungptse02617@fpt.edu.vn 01636169698
3. Meeting Agenda
Topic
Owner
Time
Dicussion about Schematic design
Supervisor
25 minutes
Function of Robot and Source code
Supervisor
30 minutes
HM2007 and Kit
Supervisor
10 minutes
25
Controlling Of Robot Using Voice
2.3.3.4 Meeting minutes 4
Meeting/Project
Controlling Of Robot Using Voice
Name:
Date of Meeting:
25/07/2015
Time:
9:00
Meeting Facilitator:
Mr. Hoàng Xuân Sơn
Location:
FPT University
1. Meeting Objective
Osvercoming the conflict between hardware and software
2. Attendees
Name
Role
E-mail
Phone
Hồ Công Anh
Leader
anhhcse90139@fpt.edu.vn
01644860773
Nguyễn Tuấn Anh
Member
anhntse02815@fpt.edu.vn
01687388725
Huỳnh Học
Member
hochse02873@fpt.edu.vn
01654778998
Đỗ Đắc Hải
Member
haiddse02714@fpt.edu.vn
01675504171
Phan Thành Hưng
Member
hungptse02617@fpt.edu.vn 01636169698
3. Meeting Agenda
Topic
Owner
Time
Discuss about motor and RF
Supervisor
30 minutes
26
Controlling Of Robot Using Voice
Searching micro suitable
Supervisor
20 minutes
2.3.3.5 Meeting minutes 5
Meeting/Project
Controlling Of Robot Using Voice
Name:
Date of Meeting:
01/08/2015
Time:
14:00
Meeting Facilitator:
Mr. Hoàng Xuân Sơn
Location:
FPT University
1. Meeting Objective
Running robot and Finish project
2. Attendees
Name
Role
E-mail
Phone
Hồ Công Anh
Leader
anhhcse90139@fpt.edu.vn
01644860773
Nguyễn Tuấn Anh
Member
anhntse02815@fpt.edu.vn
01687388725
Huỳnh Học
Member
hochse02873@fpt.edu.vn
01654778998
Đỗ Đắc Hải
Member
haiddse02714@fpt.edu.vn
01675504171
Phan Thành Hưng
Member
hungptse02617@fpt.edu.vn 01636169698
27
Controlling Of Robot Using Voice
3. Meeting Agenda
Topic
Owner
Time
Showing robot
Supervisor
minutes
Finish project
Supervisor
minutes
Supervisor
minutes
Supervisor
minutes
28
Controlling Of Robot Using Voice
3. SYSTEM REQUIREMENT SPECIFICATIONS
3.1 User Requirement Specification
3.1.1 User requirement
 User use their voice to control the movement of the robot.
 User use nRF24L01 to transfer signal (command).
 User use smartphone connect to robot‘s Bluetooth module.
 User can use the smartphone to control the movement of the robot.
3.1.2 Robot requirement
 Right direction under the control of the user in manual mode.
 Operation of the robot must be stable and safe.
 Easy to receive signal from user.
 Voice recognition exactly.
 Perform exactly the commands that have been learned.
3.1.3 Android application requirement
 The simplest design for users.
 Simple Installation.
29
Controlling Of Robot Using Voice
3.2 System Requirement Specification
3.2.1 Interface requirement
3.2.1.1 User interfaces
 Android user interface:
o Simple interface for users, with symbols for users easily recognize.
o All error occurring and exception handling will be catch and display
for user with friendly messages.
 Voice kit interface:
o Friendly for users, with five hardware device interface (led blinking,
led 7 segment, keypad, mic, and motor)
o Easy to identify errors (by signal from led blinking and led 7
segments).
3.2.1.2 Hardware interfaces
 IC HM2007: processing voice data
 IC 74LS247: decoder data for led 7 segments
 Arduino Mega: Receive data from nRF24L01 then handling and transfer
data to L298 to drive motor
 Arduino Uno: Receive data from hm2007 then handling and transfer data to
receiver block via nRF24L01
 L298: control motor
 LM7805: voltage regulator(5V)
 nRF24L01: In transmission block: get data from Arduino uno and transfer to
nRF24L01 in receiver block. In receiver block: get data from nRF24L01 in
transmission block and transfer to Arduino mega
30
Controlling Of Robot Using Voice
 Motor: help robot move follow data reveived from L298
 Pin: supply power for robot
 Led 7 segments: Display number
 74LS373: Latch Ic
 SRAM 6264: storage data
 Quartz: adjust pulses for delay time
 Capacitor: filter noise
 Resistor: obstructing currents
 Bluetooth Module: Get data from mobile and transfer to central controller.
 Smartphone device: This component helps user control robot. It runs with
Android OS 2.2 to 5.1.
Figure 3.1: Hardware Interface (voice kit Controller)
31
Controlling Of Robot Using Voice
Figure 3.2: Hardware Interface (Android Controller)
3.2.1.3 Software interfaces
 Software has the buttons to change speeds.
 Software has buttons to control the direction of movement of the robot.
Figure 3.3: Software Interface.
32
Controlling Of Robot Using Voice
3.2.1.4 Communications Protocol.
 I/O pins: One of the most important features of the microcontroller is a number
of input/output pins used for connection with peripherals.
 Radio frequency (RF) protocol: used to transmit and/or receive radio signals
between two devices. In an embedded system it is often desirable to communicate
with another device wirelessly.
 Serial Peripheral Interface (SPI) protocol: This is type of communication MasterSlave, in which Master coordinating the communication process and the Slaves
are controlled by the Master. So that communication occurs only between Master
and Slave. SPI is a full duplex communication (full duplex), that means at the
same time the process of transmission and reception can occur simultaneously.
 Bluetooth protocol: exchanging data over short distances from fixed and mobile
devices, and building personal area networks.
3.2.2 Functional Requirements
3.2.2.1 Overall
 Use case diagram represent user's interaction with the system that shows the
relationship between the user and the different use cases in which the user is
involved. A use case diagram can identify the different types of users of a
system and the different use cases and will often be accompanied by other types
of diagrams as well.
33
Controlling Of Robot Using Voice
3.2.2.2 Use Case Diagram and Specification
Figure 3.4: Use case diagram.
No
V1
Use Case Name
Training robot
Summary
User use their voice to assign command
for robot
V2
Control robot
User use their voice to control the
movement of the robot
V3
Erase robot memory
User use button on keypad to clear data
34
Controlling Of Robot Using Voice
A1
Connect bluetooth
User use smartphone connect Bluetooth
to Robot.
A2
Change the robot speed
User use smartphone to changing robot
speed.
A3
Control robot using android
User use smartphone to control the
application
movement of the robot.
a> Training robot
USE CASE 1 SPECIFICATION
Use-case no.
1
Use-case name
Trainning robot
Author
Anhnt
Date
Use-case version
1.0
Priority
High
Actor:
User
Summary:
User use their voice to assign command for robot
Goal:
Assign command for robot to control it
Triggers:
Tap train button
35
Controlling Of Robot Using Voice
Command
Command again to check. Have robot have trainer or not?
Preconditions:
Robot have receiver successful command
nRF24L01 communicate each other
Power have supply enough for robot
Post Conditions:
Main Success Scenario:
No
Actor
Action
1
User
Tap train button and trainer for robot
2
Robot
Receive exactly command
Alternative Scenario:
None
Exceptions:
N/A
Relationships:
Use-case 2
Business Rules:
N/A
b> Control robot
USE CASE 2 SPECIFICATION
Use-case no.
2
Use-case version
1.0
36
Controlling Of Robot Using Voice
Use-case name
Control robot
Author
Anhnt
Date
Priority
High
Actor:
User
Summary:
User use their voice to control the movement of the robot
Goal:
Robot moved by user command
Triggers:
Command to control robot
Preconditions:
Robot have receiver successful command
nRF24L01 communicate each other
Power have supply enough for robot
Post Conditions:
N/A
Main Success Scenario:
No
Actor
Action
1
User
Command
2
Robot
Movement follow use command
Alternative Scenario:
None
Exceptions:
37
Controlling Of Robot Using Voice
N/A
Relationships:
Use-case 2
Business Rules:
N/A
c> Erase robot memory
USE CASE 3 SPECIFICATION
Use-case no.
3
Use-case name
Erase robot memory
Author
Anhnt
Date
Use-case version
1.0
Priority
High
Actor:
User
Summary:
User use button on keypad to clear data
Goal:
Clear data in RAM
Triggers:
Tap 99 and clear button to clear all data. Click on code have been assigned
and clear button to clear this command.
Preconditions:
Clear button are able to use
Keypad connect with kit HM2007
Power have supply enough for keypad
38
Controlling Of Robot Using Voice
Post Conditions:
N/A
Main Success Scenario:
No
Actor
Action
1
User
Tap on clear button
2
Ram
Clear data
Alternative Scenario:
None
Exceptions:
N/A
Relationships:
Use-case 2
Business Rules:
N/A
d> Connect Bluetooth
USE CASE 4 SPECIFICATION
Use-case no.
4
Use-case name
Connect Bluetooth
Author
Anhhc
Date
Use-case version
1.0
Priority
High
Actor:
User
Summary:
39
Controlling Of Robot Using Voice
User use smartphone connect Bluetooth to Robot.
Goal:
Successfully connected to the Bluetooth of robot
Triggers:
-
Start Andoid application.
-
Application will auto connect module Bluetooth of robot.
Preconditions:
Access bluetooth of robot, and enter password “1234”.
-
Post Conditions:
-
Android application is started successful.
-
Bluetooth of robot have turned on.
Main Success Scenario:
No
Actor
Action
1
User
Turn on bluetoothin smartphone.
2
User
Connect device name “HC-05”.
3
User
Press password “1234”.
4
User
Start android application.
5
System
Ask you permission turn on Bluetooth.
6
System
If reject, try again.
If accept, Connect successful. Continue…
Alternative Scenario:
None
Exceptions:
N/A
40
Controlling Of Robot Using Voice
Relationships:
None
Business Rules:
N/A
e> Change Speed
USE CASE 5 SPECIFICATION
Use-case no.
5
Use-case version
Use-case name
Change the robot speed
Author
Anhhc
Date
Priority
1.0
Normal
Actor:
User
Summary:
User use smartphone to changing robot speed.
Goal:
Successfully changing robot speed.
Triggers:
-
Open Android application.
-
Tap “speed” button to changing robot speed.
Preconditions:
-
Android application is connect successful with Bluetooth of robot.
-
Arduino has change speed if user want to change speed of robot.
Main Success Scenario:
No
Actor
Action
41
Controlling Of Robot Using Voice
1
Press “1/2/3/4/5” button to chang speed (maximum
User
mode 5).
2
System
Show status messages auto, manual of the robot.
Alternative Scenario:
None
Exceptions:
N/A
Relationships:
None
Business Rules:
N/A
f> Control robot using Android application
USE CASE 6 SPECIFICATION
Use-case no.
6
Use-case version
Use-case name
Control robot using Android application
Author
Anhhc
Date
Priority
1.0
High
Actor:
User
Summary:
User use smartphone to control the movement of the robot.
Goal:
42
Controlling Of Robot Using Voice
Control the movement of the robot.
Triggers:
-
Open Android application.
-
Click the arrow button that user want the robot to move in that direction.
Click Speed mode buttons to change the movement speed of robot.
Preconditions:
N/A
Main Success Scenario:
No
Actor
Action
1
User
Click the arrow button that user want the robot to
move in that direction. Click Speed mode buttons to
change the movement speed of robot.
2
System
Send a signal to Bluetooth robot to control the
movement of the robot.
Alternative Scenario:
None
Exceptions:
N/A
Relationships:
None
Business Rules:
N/A
43
Controlling Of Robot Using Voice
3.2.3 Non-Functional Requirement
3.2.3.1 Reliability
 Product is make sure to run stable and decreased minimum facility error.
 Product action depend on user command.
 Immediately responses error message if system has error.
3.2.3.2 Availability
 The response time of the system when a request arrives should be prompt and
precise in an ideal support environment.
3.2.3.3 Security
 Module bluetooth must have requires authentication.
 Android software must have strong security
 Communication of information must be encrypted.
3.2.3.4 Maintainability
 Easy to Repair.
 Easy to configure.
3.2.3.5 Portability
 Control toolkit and Robot relatively small and succinct, so it easy to movement.
3.2.3.6 Performance
 Robot should respond to any user command that the user would expect to be
instantaneous (i.e. 90% of responses should be within 2 seconds).
 Robot be able handle 2 users and up to 20 requests per second.
44
Controlling Of Robot Using Voice
3.3 Infrastructure and Tools
3.3.1 Hardware
No
Item
Why do we use it?
1.
IC HM2007
IC dedicated for audio processing.
2.
Kit Arduino
Popular and approach to new products.
3.
IC L298
This IC is popular positive and cheaper.
4.
nRF24L01
Suitable for this project.
5.
Motor DC
Easy to use.
6.
IC 74LS247
Popular and cheaper.
7.
IC LM 7805
This IC is popular positive-voltage regulator.
8.
IC 74LS373
Popular and cheaper.
9.
SRAM 6264
Suitable for this project.
10.
HC-06
New module communicate using Bluetooth.
3.3.2 Software and tool
 Arduino software.
 Altium Designer 9.
 ISIS Proteus.
 Enterprise Architect.
 Microsoft visio 2013.
45
Controlling Of Robot Using Voice
4. SYSTEM DESIGN DESCRIPTION (SDD)
The System Design Document (SDD) describes the system requirements,
system and subsystem architecture, input format, human machine interfaces, detailed
design, processing logic, and external interfaces. It helps the manager to understand
how the software create and help the coder how to execute and make the product.
4.1 Design overview
This document describes the technical, user interface (UI) and hardware interface
design of system. It includes the architectural design and the detailed design. The
architectural design describes the overall architecture of the system, and the architecture
of each main component and subsystem. It will describe the patterns being used, the role
of each component and the role of the system in the working environment. The detailed
design describes static and dynamic structure for each component and function. It
includes class diagrams, class explanations, and sequence diagrams of the main use
cases. The user interface design describes the layout of the system, and some screen
design. Topic is covered include the following:
-
System Architecture
-
Component Diagram
-
Sequence Diagram
-
Hardware Interface Design
-
Theories and Algorithms
46
Controlling Of Robot Using Voice
4.2 System Architectural Design
4.2.1 Choice of System Architecture
This document contains the complete design of the Controlling of robot Using
voicesystem. It includes the architectural features of the system and system
components.
Controlling of robot Using voicesystem is a system using electric energy. This
product can help people have better life.
Figure 4.1 depicts the system architecture. The system will be constructed from
multiple distinct components:
Figure 4.1: System architecture (Voice Kit Controller).
47
Controlling Of Robot Using Voice
Figure 4.2: System architecture (Android Controller).
4.2.2 Description of System Interface
-
Power: This component is used to supply energy power for circuit.
-
Arduino Uno: receive signal from IC HM2007 and forward this signal to
NRF24L01 by using SPI protocol.
-
Kit HM2007: when button train in keypad have clicked, IC HM2007 are going
to receive signal from user. Signal will be forward to Arduino Uno.
-
Mic: This component is used toreceive user voice.
-
NRF24L01: In transmission block, this device have received signal from
Arduino Uno by SPI protocol, and transmit this signal to nRF24L01 from
receiver block. In receive block, this device have receive signal from nRF24L01
in transmission block and forward this signal to Arduino Mega.
-
Arduino Mega: receive signal from nRF24L01 then transmit signal to L298.
48
Controlling Of Robot Using Voice
-
L298: receive signal from Arduino mega then control motor.
-
LM7805: voltage regulator(5V)
-
Motor: move follow L298 command.
-
Keypad: This device is used to user enter the number. User assigned command
by tap on button in keypad.
-
HC-06: This device is used for transmit and receive data with the android
device.
49
Controlling Of Robot Using Voice
4.3 System Flowchart
4.3.1 Training robot
Figure 4.3: Training robot flowchart.
50
Controlling Of Robot Using Voice
4.3.2 Controller robot
Figure 4.4: Controller robot.
51
Controlling Of Robot Using Voice
4.3.3 Erase robot memory
Figure 4.5: Erase robot memory.
52
Controlling Of Robot Using Voice
4.3.4 Connect Bluetooth
Figure 4.6: Connect Bluetooth Flowchart.
53
Controlling Of Robot Using Voice
4.3.5 Change the robot speed.
Figure 4.7: Change Speed Flowchart
54
Controlling Of Robot Using Voice
4.3.6 Control robot using Android application
Figure 4.8: Control Robot Using Android Application Flowchart.
55
Controlling Of Robot Using Voice
4.4 Sequence Diagram
4.4.1 Training robot
 User tap on train button then command. Time command limited by 1.92
seconds. After that, assign signal for a code (include 2 characters). If IC
HM2007 accept this voice, led will be blinking else do this process again.
 Errors population:
55: words too long
66: words too shot
77: inappropriate
Figure 4.9: Training robot sequence diagram.
56
Controlling Of Robot Using Voice
4.4.2 Controller robot
 User command robot. If this command have trained, robot will movement
follow user command, else please do again or back to assign command step.
Figure 4.10: Controller robot sequence diagram.
57
Controlling Of Robot Using Voice
4.4.3 Erase robot memory
 User tap 99 and click on clear button to clear all data. If you want to delete only
a command, click this command code and clear.
Figure 4.11: Erase Robot Memory.
58
Controlling Of Robot Using Voice
4.4.4 Connect Bluetooth
Figure 4.12: Connect Bluetooth With Arduino Sequence Diagram.
59
Controlling Of Robot Using Voice
4.4.5 Change the robot speed
Figure 4.13: Change The Robot Speed Sequence Diagram.
60
Controlling Of Robot Using Voice
4.4.6 Control robot using Android application
Figure 4.14: Control robot using Android application Sequence Diagram.
61
Controlling Of Robot Using Voice
4.5 User Interface Design/Hardware Interface Design
4.5.1 User interface design
 We have five components that interact with user. There are mic, keypad, led
blinking and motor.
Figure 4.15: User interface design.
62
Controlling Of Robot Using Voice
4.5.2 Hardware interface design
4.5.2.1 Physical design illustration
Figure 4.16: Physical design illustration.
63
Controlling Of Robot Using Voice
4.5.2.2 Circuit design
4.5.2.2.1 Overview circuit
This is circuit schematic design of Overview, it include all of components we
are using and details about the wire between the components. It has been split to many
Parts.
Figure 4.17: Circuit design.
64
Controlling Of Robot Using Voice
4.5.2.2.2 IC HM2007 block
 This is circuit schematic design of micro controller, IC HM2007 and its ports.
Figure 4.18: IC HM2007 block.
65
Controlling Of Robot Using Voice
4.5.2.2.3 SRam 6264 and IC 74LS373
Figure 4.19: SRam 6264 and IC 74LS373 block.
66
Controlling Of Robot Using Voice
4.5.2.2.4 Microphone
Figure 4.20: Microphone block.
67
Controlling Of Robot Using Voice
4.5.2.2.5 Led 7 segment
Figure 4.21: Leg 7 segments block.
68
Controlling Of Robot Using Voice
4.5.2.2.6 IC 74LS247
Figure 4.22: IC 74LS247 block.
4.5.2.2.7 Module Bluetooth HC-06 (Slave)
Figure 4.23: Module HC-06 Connect with Arduino Mega
69
Controlling Of Robot Using Voice
4.6 Theorys and Algorithms
4.6.1 Theories of speech processors
a. principle
The basic principle of voice recognition involves the fact that speech or
words spoken by any human being cause vibrations in air, known as sound
waves. These continuous or analog waves are digitized and processed and
then decoded to appropriate words and then appropriate sentences.
b. Components of a Speech Recognition System
-
A basic Speech Recognition System consists:
Figure 4.24: Basic speech recognition system.
 A speech capturing Device: It consists of a microphone, which
converts the sound wave signals to electrical signals and an Analog to
Digital Converter which samples and digitizes the analog signals to
obtain the discrete data that the computer can understand.
 A Digital Signal Module or a Processor (DSP module): It performs
processing on the raw speech signal like frequency domain
conversion, restoring only the required information etc.
70
Controlling Of Robot Using Voice
 Preprocessed signal storage: The preprocessed speech is stored in
the memory to carry out further task of speech recognition.
 Reference Speech patterns: The computer or the system consists of
predefined speech patterns or templates already stored in the memory,
to be used as the reference for matching.
 Pattern matching algorithm: The unknown speech signal is
compared with the reference speech pattern to determine the actual
words or the pattern of words.
c. Classification
Speech recognition is classified into two categories: speaker dependent
and speaker independent.
 Speaker dependent systems are trained by the individual who will be
using the system. These systems are capable of achieving a high
command count and better than 95% accuracy for word recognition.
The drawback to this approach is the system only responds accurately
only to the individual who trained the system. This is the most
common approach employed in software for personal computers.
 Speaker independent is a system trained to respond to a word
regardless of who speaks. Therefore the system must respond to a
large variety of speech patterns, inflections and enunciation's of the
target word. The command word count is usually lower than the
speaker dependent however high accuracy can still be maintained
within processing limits.
71
Controlling Of Robot Using Voice
d. Factors on which Speech Recognition System depends
The speech recognition system depends on the following factors:
 Isolated Words: There needs to be a pause between the consecutive
words spoken because continuous words can overlap making it
difficult for the system to understand when a word starts or ends.
Thus there needs to be a silence between consecutive words.
 Single Speaker: Many speakers trying to give speech input at the
same time can cause overlapping of the signals and interruptions.
Most of the speech recognition systems used are speaker dependent
systems.
 Vocabulary size: Languages with large vocabulary are difficult to be
considered for pattern matching than those with small vocabulary as
chances of having ambiguous words are lesser in the latter.
e. Introduce Some Speech Processing ICs
-
The Magnevation Speakjet is a 20-pin IC designed to add speech and
audio to embedded microcontroller applications.
-
IC TTS256 is a text-to-speech processor chip in a single 28-pin package.
-
IC TTS-03 is a text-to-speech processor module with serial ASCII input
and direct speaker interface.
-
IC SP03 is a text-to-speech synthesizer chip which also includes an
audio amplifier, voltage converter and a PIC microcontroller.
-
IC S1V30120 is another text-to-speech chip aimed for embedded
applications, such as home appliances and office/industrial equipment.
-
IC SSG01 is a sound coprocessor chip in an 18-pin DIP package.
-
IC HM2007 is a speech recognition chip where up to 40 words can be
recognized by the chip and a multiple chip configuration is possible in
72
Controlling Of Robot Using Voice
complex applications. The chip is operated from a single +5V supply and
a microphone can be connected directly to the chip.
-
IC ISD17120PY is a sound record and playback chip that can be used to
record and then play sound for 120 seconds.
4.6.2 IC HM2007
HM2007 is a single chip CMOS voice recognition LSI circuit with the onchip analog front-end, voice analysis, recognition process and system control
functions. A 40 isolated-word voice recognition system can be composed of
external microphone, keyboard, 64K SRAM and some other components.
Combining it with microcontroller we build an intelligent recognition system
can be built.
a. Features
-
Single chip voice recognition CMOS LSI.
-
Speaker-dependent isolated word recognition system.
-
External 64k SRAM can be connected directly.
-
Maximum 40 words can be recognized for one chip.
-
Maximum 1.92 sec of word can be recognized.
-
Multiple chip configuration is possible.
-
A microphone can be connected directly.
-
Two control mode is supported: Manual mode and CPU mode.
-
Response time is less than 300ns.
-
5v single power supply.
-
IC has PDIP 48 pin, PLCC 52 pin..
73
Controlling Of Robot Using Voice
b. Pinout types
Figure 4.25: Pinout Hm2007P and Hm2007L.
74
Controlling Of Robot Using Voice
c. Pin Description
Symbol
VREF
Pin
I/O
PDIP
PLCC
48L
52L
44
48
I
Function
The voltage reference input or internal ADC.
Supply the reference voltage of the internal A/D
converter.
LINE
45
49
O
For testing only.
MICIN
46
50
I
Microphone connect pin. A microphone should
be connected via a coupling capacitor and
resistor.
VDD
47
51
Positive power supply.
AGND
48
52
Analog ground.
GND
1
1
Negative power supply.
X1,X2
2, 3
2, 3
I
Crystal connect pin. A 3.58 MHZ crystal is
connected to these pin.
S1,S2
4, 5
4, 5
I/O
Keypad scanning pin for manual mode and the
read/write control Pins in the CPU mode.
S3
6
6
RDY
7
8
Control Pins in the CPU mode.
O
Voice input ready indicator. Active low output.
When HM2007 is ready for the voice input in
training or recognition mode, a low signal is
sent. If the chip is busy, a high signal is sent.
75
Controlling Of Robot Using Voice
K1,K2,K3,K4
8-11
9-12
I/O
The keypad input pin in the manual mode and
the bidirectional data bus (K-bus) in the CPU
mode.
In the manual mode, the four pins combined
with S1 to S3 form the keypad scanning circuit.
Maximum 12 keys can be scanned. In the CPU
mode, the data bus direction is determined by
the S2 and S3. A high level signal that appears
in the pin S2 will place the content of internal
register onto to the data bus.(K-bus)
The data maybe come from the status register or
the output buffer which is selected by the pin
S1. If S1 is high, output buffer is selected by the
S1. If S1 is high, output buffer is selected.
Otherwise, the status register is selected. A high
level signal that appears in the pin S3 will place
the content of K-bus into the input register.
Note that user cannot place high level signal on
S2 and S3 simultaneously.
TEST
12
13
I
“H”: test mode. “L”: Normal mode.
WLEN
13
14
I
Word length select pin.
Selecting the voice length to be recognized.
When et to high, 1.92 sec is selected. Internally
pull low for 0.9 sec is selected. Note that when
76
Controlling Of Robot Using Voice
1.92 sec is selected, only 20 words maximum
can be recognized if 8K-byte memory is used.
CPUM
14
15
I
CPU mode select pin.
Internally pull low for manual mode.
When set to high, CPU mode is selected.
WAIT
15
16
I
Waiting control input. Active low input.
When this pin is set to “L” and manual mode is
selected, HM2007 will enter waiting state and
do not accept voice input until this pin back to
“H”. For CPU mode, When HM2007 is ready to
get voice input, if this pin is set to “L”.
HM2007 will skip the voice input process and
enter the get-command process.
DEN
16
17
O
Data enable signal.
When the recognition or training process is
complete, the chip will place its response on the
data bus D0-D7 and which can be latched onto
external devices by this pin.
SA0,SA1
17-24
SA2-SA7
SA8-SA11
27-31
SA12
18,19
O
External memory address bus.
21-26
The bus is used as an external memory address
29-32
when ME Pin is active.
34
VDD
25
27
Positive power supply.
GND
26
28
Negative power supply.
NC
32,33
35,36
None connect.
77
Controlling Of Robot Using Voice
7,20
33,46
ME
34
37
O
Memory enable pin. Active low output.
This pin will send the memory enable signal to
the external SRAM. This pin can be connected
directly to the CE pin 6264 SRAM.
MR/MW
35
38
O
Memory read/write select pin.
Read/Write control signal of the external
SRAM. This pin can be connected directly to
the R/W pin of 6264-SRAM.
D0-D6
36-42
D7
43
39-45
47
I/O
External memory data bus (D-bus).
The bus is used as an external memory I/O bus
when ME Pin is active and used as output
response bus when DEN pin active.
d. Voice Processing In IC Hm2007
The HM 2007 has an inbuilt hardwired Artificial Neural Network system.
For each time the user says the word, the HM2007 integrates this word into a
neural network. Later, in recognition mode, the HM2007 tries to match the
spoken word against other words in its neural net. If a match is made, the
index of that word in the vocabulary is returned. If no match is found, or if
the user spoke too quickly or too slowly, an appropriate error code is
returned.
There are other techniques also use for system – Artificial Neural
Network (ANN), Back Propagation Algorithm (BPA), Fast Fourier
78
Controlling Of Robot Using Voice
Transform (FFT), Learn Vector Quantization (LVQ), Neural Network (NN).
However, the specific algorithmic part is not published by manufacturer.
e. Function Description
i.
-
ii.

CPU mode
This mode is not used in the project.
Manual mode (In Project)
In this operation mode, a keypad, a SRAM and other components may
be connected to HM2007 to build a simple recognition system (See
application circuit). The type of SRAM can be used is 8K-byte memory.

Power On.
-
When the power is on HM2007 will start its initialization
process. If WAIT pin is “L”. HM2007 will do the memory
check to see whether the external 8K byte SRAM is perfect or
not.
-
If WAIT pin is “H” HM2007 will skip the memory check
process.
-
After the initial process is done, HM2007 will then move into
recognition mode.

Recognition Mode.
-
WAIT pin “H”
+ In this mode, the RDY is set to low and HM2007 is ready to
accept the voice input to be recognized.
79
Controlling Of Robot Using Voice
+ When the voice input selected, the RDY will return to high
and HM2007 begins its recognition process. It is recommended
that user train the word pattern before the beginning of the
recognition operation, otherwise the result will be unpredictable.
+ After recognition process is completely, the result will appear
on the D-bus with the pin DEN active.
+ Table how the list of the output content.
+ The data on the data bus is a decimal code in binary format.
D7 D6 D5 D4
D3 D2
D1 D0
Description
0
0
0
Power On
0
0
0
0
A
0
B
Word AB
0
1
0
1
0
1
0
1
Voice too long
0
1
1
0
0
1
1
0
Voice too short
0
1
1
1
0
1
1
1
Not Match
Table 1: Content of the D-bus output.
+ Note 1: A is the binary code in the range 0 to 4, and B is the
binary code in the range 0 to 9.
+ Note 2: If WLEN is high, the maximum word length is 1.92
sec.
-
WAIT pin “L”
+ In this mode, no voice input is accepted until WAIT pin back
to “H” state.

Training Words for Recognition.
80
Controlling Of Robot Using Voice
Press “1” (display will show “01” and the LED will turn off) on
the keypad, then press the TRAIN key (the LED will turn on) to place
circuit in training mode, for word 'left'. Say the target word into the on
microphone clearly. The circuit signals acceptance of the voice input by
blinking the LED off then on. The word (or utterance) is now identified
as the “01” word. If the LED did not flash, start over by pressing “1”
and then “TRAIN” key. You may continue training new words in the
circuit. Press “2” then TRAIN to train the second word and so on. The
circuit will accept and recognize up to 20 words (numbers 1 through
20).

Testing Recognition
Repeat a trained word into the microphone. The number of
the word should be displayed on the digital display. For instance,
if the word “left” was trained as word number 20, saying the word
“left” into the microphone will cause the number 20 to be
displayed.
The chip provides the following error codes.

-
55 = word to long.
-
66 = word to short.
-
77 = no match.
Clear all pattern.
If the number key 99 is entered and the CLR is pressed, all the
patterns in the memory will be cleared by HM2007.
81
Controlling Of Robot Using Voice
4.6.3 Radio frequency
 RF is any frequency within the electromagnetic spectrum associated with radio
wave propagation. When an RF current is supplied to an antenna, an
electromagnetic field is created that then is able to propagate through space.
Many wireless technologies are based on RF field propagation.
 Radio frequency (RF) is a rate of oscillation in the range of around 3 kHz to 300
GHz, which corresponds to the frequency of radio waves. RF is wireless
communication.
 Radio frequency allows a device to read the information in the chip at far
distance, without direct contact, and without physical communication between
the two devices.
 These frequencies make up part of the electromagnetic radiation spectrum:
o Ultra-low frequency (ULF) -- 0-3 Hz
o Extremely low frequency (ELF) -- 3 Hz - 3 kHz
o Very low frequency (VLF) -- 3kHz - 30 kHz
o Low frequency (LF) -- 30 kHz - 300 kHz
o Medium frequency (MF) -- 300 kHz - 3 MHz
o High frequency (HF) -- 3MHz - 30 MHz
o Very high frequency (VHF) -- 30 MHz - 300 MHz
o Ultra-high frequency (UHF)-- 300MHz - 3 GHz
o Super high frequency (SHF) -- 3GHz - 30 GHz
o Extremely high frequency (EHF) -- 30GHz - 300 GHz
82
Controlling Of Robot Using Voice
4.6.4 IC L298N
 IC L298 is a monolithic IC with 2 integrated H-bridge circuit inside.
Figure 4.27: IC L298N
 4 pins INPUT: IN1, IN2, IN3, IN4 are connected in turn with the pins 5, 7, 10,
12 in L298. This is the control signal pins.
 4 pins OUTPUT: OUT1, OUT2, OUT3, OUT4 is connected to the pins 2, 3, 13,
14 in L298. These pins are connected to the motor.
 ENA and ENB pins used to control the L298 H-bridge circuit. If at logic "1"
(powered with 5V) for operating permits H-bridge circuit, if at logic "0", the Hbridge circuit inactive.
 For the front wheel (with ENA=1):
o INT1 = 1; INT2 = 0: forward rotation motors.
o INT1 = 0; INT2 = 1: reverse running motors.
o INT1 = INT2: motors stops immediately.
 For the rear wheel (with ENB=1) :
o INT3 = 1; INT4 = 0: forward rotation motors.
o INT3 = 0; INT4 = 1: reverse running motors.
o INT3 = INT4: motors stops immediately
83
Controlling Of Robot Using Voice
Figure 4.28 Move Forward
Figure 4.29: Move reverse
84
Controlling Of Robot Using Voice
Figure 4.30: Turn right
Figure 4.31: Turn left.
85
Controlling Of Robot Using Voice
5. IMPLEMENTATION & TESTING
5.1 Implementation
Figure 5.1: Block diagram
86
Controlling Of Robot Using Voice
5.1.1 Voice processing circuit
5.1.1.1 Principle diagram
Figure 5.2: Circuit design kit HM2007
87
Controlling Of Robot Using Voice
5.1.1.2 Circuit design and construction
Figure 5.3.: Overview kit HM2007
88
Controlling Of Robot Using Voice
Kit HM2007 signal transmission via Arduino uno:
Figure 5.4.: Kit HM2007 connect with Arduino uno.
89
Controlling Of Robot Using Voice
5.1.2 Signal transmission
5.1.2.1 Principle diagram
Figure 5.5: Circuit design connect nR24L01 to arduino uno and arduino mega
90
Controlling Of Robot Using Voice
5.1.2.2 Circuit design and construction
nRF24L01 receives signal from kit HM2007 through Arduino uno and
nRF24L01 transmits signal to L298 through Arduino Mega.
Figure 5.6: Arduino uno
Figure 5.7: nRF24L01
Figure 5.8: Arduino mega
Figure 5.9: Overview signal transmission
91
Controlling Of Robot Using Voice
5.1.3 Module Bluetooth
5.1.3.1 Principle diagram
Figure 5.10: System implement of module bluetooth.
92
Controlling Of Robot Using Voice
5.1.3.2 Circuit design and construction
Figure 5.11: Arduino Mega connect with module Bluetooth HC-06.
Figure 5.12: Arduino Mega connect with module Bluetooth HC-06.
93
Controlling Of Robot Using Voice
Figure 5.13: The Process of Arduino when it receives data from the module
Bluetooth.
94
Controlling Of Robot Using Voice
5.1.4 Driver motor
5.1.4.1 Principle diagram
Figure 5.14: Circuit design motor system
95
Controlling Of Robot Using Voice
5.1.4.2 Circuit design and construction
We used motor combined with two L298 module to control robot, with
each module will independently control 1 motor with customize speed.
Figure 5.15: L298
Figure 5.16: Motor
96
Controlling Of Robot Using Voice
Figure 5.17: Overview Driver motor
97
Controlling Of Robot Using Voice
When the robot go straight or backward, two motor will turn the same direction
and speed
Figure 5.18: Go straight
98
Controlling Of Robot Using Voice
When the robot turn, 1 motor will be turned and 1 motor will be stoped.
Figure 5.19: Turn right, left
99
Controlling Of Robot Using Voice
L298 receives signal from nRF24L01 or from bluetooth through Arduino
mega:
Figure 5.20: L298 connect with Arduino mega
100
Controlling Of Robot Using Voice
The processing of the arduino mega when it receives data from the module:
Figure 5.21: The Process of Arduino when it receives data from the module
HM2007.
101
Controlling Of Robot Using Voice
5.1.5 Supply power for Adruino
Module LM2596s convert voltage 12V, suitable L298.
Figure 5.22: Overview supply power.
102
Controlling Of Robot Using Voice
5.1.6 Android application
Figure 5.23: Interface of android application.
103
Controlling Of Robot Using Voice
5.2 Test
5.2.1 Test plan
For testing project, we use V-model. In V- model, testing activities are carried
out in parallel with development so we can have a closely view about project. From
this, the project can tested more carefully and effectively with high coverage.
Figure 5.24: Test plan model
Follow V model, we have three main test phases: Unit test, Function test
(Integration test) and System test.
104
Controlling Of Robot Using Voice
In Unit test, we create test case for each unit in main source code to check that
its working is right.
For Integration test, we use the functional test. This kind of test shows us the
working of each function is right or wrong.
The system test checks all the activities of system: collection information,
receive and send, controll robot.
5.2.1.1 Feature to be tested
-
Tracking object.
-
Calculatingmovement.
-
Executing command.
5.2.1.2 Feature not to be tested
-
Age of product.
-
The environment condition.
-
Unexpected situation like crash, falling.
5.2.2 Testing tool
Terminal is used to receive all information from sensor and command. It also used
to send command to Arduino to perform action.
5.2.3 Test environment
-
Laptop with windowsn Version 7, 8.
-
Robot.
-
Smartphone.
105
Controlling Of Robot Using Voice
5.2.4 Testing Risks
-
Conflict between hardware and software.
-
Sound wave interference, noise.
5.2.5 Test case
This is the test case list for unit test, integration test and system test.
Project Name
Controlling Of Robot Using Voice
Project Code
CROUV
Test environment setup description
1. Kit HM2007, nRF24L01, Motor.
2. Control Robot.
3. Android Software.
106
Controlling Of Robot Using Voice
5.2.5.1 HM2007, RF, R4WD
Controlling Of Robot Using Voice
Author
Anhhc
Date
10/08/2015
Hoch
No
ID
Test Case
Test Case Procedure
Expected Output
Description
Inter-Test
Case
Dependence
1
M1
Check motor1
Pass
Connect Motor1 to L298
Motor1 runs with
and Arduino mega.
reasonable speed
/Fail
Pass
Upload code for Arduino
mega.
Connect Arduino mega
with Computer via Serial
Port.
Send command “Go” and
“Back” to test.
2
M2
Check motor2
Connect Motor2 to L298
Motor2 runs with
and Arduino mega.
reasonable speed.
Pass
Upload code for Arduino
mega.
Connect Arduino mega
with Computer via Serial
Port.
Send command “Go” and
“Back” to test.
107
Note
Controlling Of Robot Using Voice
3
M3
Check motor3
Connect Motor3 to L298
Motor3 runs with
and Arduino mega.
reasonable speed
Pass
Upload code for Arduino
mega.
Connect Arduino mega
with Computer via Serial
Port.
Send command “Go” and
“Back” to test.
4
M4
Check motor4
Connect Motor4 to L298
Motor4 runs with
and Arduino mega.
reasonable speed.
.
Pass
Upload code for Arduino
mega.
Connect Arduino mega
with Computer via Serial
Port.
Send command “Go” and
“Back” to test.
5
nRF24L01 Check
nRF24L01
Connect nRF24L01 to
When you send
Arduino uno and Arduino
command from
mega.
adruino uno, adruino
Upload code for Arduino
mega will be
unno and Arduino mega.
receiving the
Connect Arduino uno and
corresponding
Arduino mega with
command.
Pass
Computer via Serial Port.
Send command to test.
108
Controlling Of Robot Using Voice
6
Kit
Check kit
Connect kit HM2007 to
HM2007
HM2007
Arduino.
Pass
Upload code for Arduino.
Check kit
Power supply for kit
7 segment LED
HM2007 ready
HM2007.
display two "00".
to accept
One single LED light
commands
showing the circuit is
Pass
ready to receive
commands.
Check kit
Press the number, two
Two LED 7 segment
HM2007 receive
LED 7 segment display
display show number
commands from
show number
corresponds
number 01 to
corresponds and single
number 20
LED will turn off.
Pass
Then press TRAIN single
LED will light up and put
into a state circuit
"setting" for one
word.Speaking words
want to install in mic is
loud, clear. Single LED
will light and get it off.
After speaking words
installed in mic is loud,
clear. Check display two
LED 7 segment.
109
Controlling Of Robot Using Voice
Check some
Press the number, two
error code when
LED 7 segment display
loaded and clear
show number
the memory
corresponds and single
55: word too long
Pass
66: word too short
77: inappropriate
LED will turn off.
Then press TRAIN single
99: clear thememory
LED will light up and put
into a state circuit
"setting" for one
word.Speaking words too
long, too short,
inappropriate and watch
display two LED 7
segment.
Press "99" and then press
CLR then memory will
be deleted
110
Controlling Of Robot Using Voice
5.2.5.2 Control Robot
Controlling Of Robot Using Voice
Author
Anhhc
Date
10/08/2015
Hoch
No
ID
Test Case
Test Case Procedure
Expected Output
Description
Inter-Test
Case
Dependence
1
CRobot
Pass
Set robot
Connect kit HM2007,
Robot receives the
ready
nRF24L01 and robot
signal and ready for
Running code.
operation
/Fail
Pass
Set up command
direction for robot with
01: forward
02: backward
04: turn left
08: turn right
10: stop
2
3
CRobot1
CRobot2
Check robot
When you singnal
forward
”forward”
Check robot
When you singnal
backward
”backward”
Robot will forward
Pass
Robot will backward
Pass
111
Note
Controlling Of Robot Using Voice
4
5
6
CRobot 3
CRobot 4
CRobot 5
Check robot
When you singnal ”turn
turn left
left”
Check robot
When you singnal ”turn
turn right
right”
Check robot
When you singnal
stop
”stop”
Robot will turn left
Pass
Robot will turn right
Pass
Robot will stop
Pass
112
Controlling Of Robot Using Voice
5.2.5.3 Android application
SOFTWARE TEST
Author
Anhhc
Date
10/08/2015
Hoch
No
ID
Test Case
Test Case
Description
Procedure
Expected Output
Inter-Test Case
Pass
Dependence
/Fail
1
SA_1 Open Main
Touch on
1.Open [Robot Control]
[Robot Control]
[Bluetooth
screen: screen is displayed
Screen
Robot]
with the
application icon
followinginformations:
Pass
- Text + Name Project
+ “speed”
- 5 buttons change speed.
- 5 buttons control robot.
-Text: show data receive from
Arduino.
2
SA_2 Showing [Request
Touch on
1. Show Alert dialog which
[Bluetooth
Turn Bluetooth
[Bluetooth
contain 2 button [Reject] /
Robot] screen
On] dialog after
Robot]
[Accept].
is displayed
application
application icon
Pass
and Bluetooth
running. ( if
of Android
Bluetooth off )
device is OFF
113
Note
Controlling Of Robot Using Voice
3
SA_3 Check Auto
Touch on
1. Show [Bluetooth Robot]
[Bluetooth
Pairing with fixed
[Bluetooth
Screen.
Robot] screen
address.
Robot]
is displayed
application icon
[Bluetooth of
Pass
Android device
is On and
Bluetooth
device of
Arduino had
previous
pairing.
4
SA_4 Send change speed Touch on [1] /
1. Send signal to robot, change
[Bluetooth
mode data: “5”,
[2] / [3] / [4] /
color of button and show
Robot] screen
“6”, “7”, “8”, “9”.
[5] button.
message from Arduino:
is displayed
Order message is:
and Bluetooth
- “minimum_speed_mode_1#”
of Android
- "speed_mode_2#"
device is On.
Pass
-"speed_mode_3#"
-"speed_mode_4#
-"maximum_speed_mode_5#"
5
SA_5 Send Control
Touch on [stop]
1. Send signal to robot, change
[Bluetooth
robot data: “0”,
/ [forward] /
color of button and show
Robot] screen
“1”, “2”, “3”, “4”,
[back] /
message from Arduino:
is displayed
[turnleft] /
Order message is:
and Bluetooth
[turnright]
- "Stop#"
of Android
button.
- "Forward#"
device is On.
Pass
- "Back#"
- "turnleft#"
- "turnright#"
114
Controlling Of Robot Using Voice
HARDWARE TEST
Author
Anhhc
Date
10/08/2015
Hoch
No
ID
Test Case
Test Case
Description
Procedure
Expected Output
Inter-Test Case
Pass
Dependence
/Fail
1
HA_1
Robot forward
Touch on
Arduino Receive correct
Bluetooth module
testing
[forward] button.
message, send back message
of robot and
and robot move forward.
Android device is
Pass
On.
[Bluetooth Robot]
screen is
displayed.
2
HA _2 Robot back
testing
Touch on [back]
Arduino Receive correct
Bluetooth module
button.
message, send back message
of robot and
and robot move backward.
Android device is
Pass
On.
[Bluetooth Robot]
screen is
displayed.
3
HA_3
Robot turn left
Touch on
Arduino Receive correct
Bluetooth module
testing
[turnleft] button.
message, send back message
of robot and
and robot move turnleft.
Android device is
Pass
On.
115
Note
Controlling Of Robot Using Voice
[Bluetooth Robot]
screen is
displayed.
4
HA _4 Robot turn
right testing
Touch on
Arduino Receive correct
Bluetooth module
[turnright]
message, send back message
of robot and
button.
and robot move turnright.
Android device is
Pass
On.
[Bluetooth Robot]
screen is
displayed.
5
HA _5 Robot stop
testing
Touch on [stop]
Arduino Receive correct
Bluetooth module
button.
message, send back message
of robot and
and robot stop.
Android device is
Pass
On.
[Bluetooth Robot]
screen is
displayed.
6
HA _6 Robot change
speed testing
Touch on [1] / [2] Arduino Receive correct
/ [3] / [4] / [5]
message, send back message
button.
and robot change speed.
116
Controlling Of Robot Using Voice
6. SYSTEM USER’S MASUAL
6.1 Controlling robot using voice
6.1.1 Installation Guide
Keyboard and LED 7 segment are used for communication and programming
with HM2007.
When startup, two LED 7 segment display "00". One single LED light
showing the circuit is ready to receive commands.
Press the number 0 after press number 1, two LED 7 segment display
show "01" and single LED will turn off, then press TRAIN single LED will
light up and put into a state circuit "setting" for one word.Speaking words want
to installed in mic is loud, clear.
When the circuit is acceptable words just said, single LED will light
and get it off. If single LED doesn’t light, you make it again.
Similar to the press number 02. The others number will accept
identification circuit 20 words (to number 01 from number 20).
In project, we set control robot with:
 01 forward
 02 backwward
 04 turn left
 08 turn right
 10 stop.
117
Controlling Of Robot Using Voice
6.1.2 Test installation
After the "settings" in the circuit, you check the circuit has received or not
received recorded voice by speaking into the mic. If circuit receive true, it will display
the corresponding number.
The new command to overwrite an old command similar import process voice.
The error code will be displayed when loaded:
 55: word too long
 66: word too short
 77: inappropriate
6.1.3 Delete the entire memory
Press "99" and then press CLR then memory will be deleted.
If you want to delete a loaded words that does not want to replace it, then press
the number that corresponds to the word then press CLR
Attention:
 When you delete the entire memory, the circuit will not display any
number.
 Want to press number 2 characters, the first press number in the tens and
the second press the units. If you press more, the circuit will not display.
118
Controlling Of Robot Using Voice
6.1.4 Preservation
Avoid anything that can damage the car. You should control the car
driving on flat roads, avoid collisions.
6.2 Controlling robot using Android application
6.2.1 Installation Guide
The first, [download] and [install] the [Bluetooth Robot] app on Android device
(Recommendation: Android 4.4). Then, supply power to the robot.
Figure 6.1: Application Bluetooth Robot.
119
Controlling Of Robot Using Voice
6.2.2 User’s Guide
-
Run application.
-
Useruser touch buttons to control directly of robot and speed of robot.
-
Speed mode robot include: 1, 2, 3, 4, 5.
+ Mode 1: minimum speed.
+ Mode 5: maximum speed.
-
This app allow user to make Smart Robot: move forward - backward, turn left –
right and Stop.
6.2.3 Setup
6.2.3.1 Bluetooth Pairing
First, open [Bluetooth settings menu] on Android device, then turn the
[Bluetooth] ON.
Second, scan to [FIND] and [PAIR] two Bluetooth module of [Android device]
and robot’s Bluetooth module (default name: HC-05). [Pairing code] is 1234 (default).
120
Controlling Of Robot Using Voice
Figure 6.2: Setup Bluetooth.
Third, after successful pairing, user run [Bluetooth Robot] application on
Android device.
If user paired two of them together before, for second using-time or more, don’t
need to set up again. User can start application and users can enjoy great moments with
robots.
121
Controlling Of Robot Using Voice
6.2.3.2 Run
After setup bluetooth, Application will auto connect with module bluetooth of
robot. Then, user can use Five-button on [Main Screen] to control Robot move
forward, backward, turn left, turn right, Stop. In addition, User can change robot speed
with five-button on [Main Screen].
Figure 6.3: Main Screen.
122
Controlling Of Robot Using Voice
7. RESULT AND CONCLUSION
7.1 Limitation in System
We find out this system may have these following limitations:
-
Use unstable in environmental interference.
-
In the voice controller board, SRAM 6264 may lose data because power
failure. However, the data entry for SRAM 6264 of the user takes only 5
minutes to set up again signal his voice.
-
Voice signals are put in at close range, and narrow scope.
-
Data transmission range of module nRF24L01 is quite short.
-
Android application can not access the installation of bluetooth to scan
and pairing.
-
Android application don't have other features or optional mode.
-
No casing for products.
7.2 Solution for Reduce Limitations
To reduce some risk and limitation, we will implement a number of following
activities:
 Appends the remote transceiver voice module instead of the mic.
 Add a battery for the SRam 6264 can work when power outages.
 Appends antenna for module RF.
 Update new vesion for android app.
 Manufacture casings for products.
7.3 Summary and Conclusion
7.3.1 Difficulty
The difficulties in the implementation process project:
123
Controlling Of Robot Using Voice
 Using voice to control equipment is also relatively new problem in Vietnam and
there is little information about the composition of the device, so when carried
out project, my group met a lot of difficulties to be able to completed the device.
 IC HM2007 very rare in Vietnam. So, that is difficult to find and check product.
That has caused a major risk to the project.
 The documents on IC HM2007 also restricted, Most of these functions must
themselves explore and experiment to get a high accuracy. Even HM2007 IC
datasheet download from the Internet is just a draft typed and repair by written.
Diagrams tenet of IC just the block diagram of the device, without a specific
connection diagram, that are difficult to design board successful right the first
time.
 Group must self-learn new tools and new programming languages.
7.3.2 Skill learned
 Design printed circuit board.
 Learn and use some useful software.
 Design hardware and calculator stable for system.
 Know programming android.
 Planning task, create schedule.
 Working in group, brainstorming, find problem and resolve problem.
124
Controlling Of Robot Using Voice
7.3.3 Conclusion
 Although facing many difficulties but after 4 months of implementation of the
project, the group has successfully product may work well on the two part are:
controlling robot using voice and control robot using smartphone.
 The project provides helpful information for those who want to learn and grow
in this field, opening up a new direction for the technology-driven automation.
 The project does not stop at the controls of a small robot that it is the basis, the
foundation for future large projects. It has opened up a new device driver for life
as well as in industrial production. The projects also a basis for developing a
number of projects necessary, significance in life such as wheelchair controlled
by voice …
125
Controlling Of Robot Using Voice
8. LIST OF REFERENCES
 http://developer.android.com
 http://arduino.vn
 https://github.com
 http://arduino-info.wikispaces.com/Nrf24L01-2.4GHz-HowTo
 http://www.alldatasheet.com
 http://www.elprocus.com/
 http://unais-tp.blogspot.com/
126
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising