Android-based wheelchair controller.

(1)

UNIVERSITI TEKNIKAL MALAYSIA MELAKA

ANDROID-BASED WHEELCHAIR CONTROLLER

This report submitted in accordance with requirement of the Universiti Teknikal Malaysia Melaka (UTeM) for the Bachelor’s Degree in Electronics Engineering

Technology (Industrial Electronics) (Hons.)

by

MUHAMAD HAFIZUDDIN BIN MUSTAFA B071110182

900326-14-5175

FACULTY OF ENGINEERING TECHNOLOGY 2015


(2)

UNIVERSITI TEKNIKAL MALAYSIA MELAKA

BORANG PENGESAHAN STATUS LAPORAN PROJEK SARJANA MUDA

** Jika Laporan PSM ini SULIT atau TERHAD, sila lampirkan surat daripada pihak berkuasa/organisasi berkenaan dengan menyatakan sekali sebab dan tempoh laporan PSM ini perlu dikelaskan sebagai SULIT atau TERHAD.

TAJUK: Android-Based Wheelchair Controller

SESI PENGAJIAN: 2014/15 Semester 1

Saya MUHAMAD HAFIZUDDIN BIN MUSTAFA

mengaku membenarkan Laporan PSM ini disimpan di Perpustakaan Universiti Teknikal Malaysia Melaka (UTeM) dengan syarat-syarat kegunaan seperti berikut: 1. Laporan PSM adalah hak milik Universiti Teknikal Malaysia Melaka dan penulis. 2. Perpustakaan Universiti Teknikal Malaysia Melaka dibenarkan membuat salinan

untuk tujuan pengajian sahaja dengan izin penulis.

3. Perpustakaan dibenarkan membuat salinan laporan PSM ini sebagai bahan pertukaran antara institusi pengajian tinggi.

4. **Sila tandakan ( )

SULIT

TERHAD

TIDAK TERHAD

(Mengandungi maklumat yang berdarjah keselamatan atau kepentingan Malaysia sebagaimana yang termaktub dalam AKTA RAHSIA RASMI 1972)

(Mengandungi maklumat TERHAD yang telah ditentukan oleh organisasi/badan di mana penyelidikan dijalankan)

Alamat Tetap:

No. 2112, Jalan Limau Purut, Gong Limau, Kemaman Terengganu

Tarikh: ________________________

Disahkan oleh:

Cop Rasmi:

Tarikh: _______________________ 10 December 2014


(3)

i

DECLARATION

I hereby, declared this report entitled “Android-based wheelchair controller” is the results of my own research except as cited in references.

Signature : ……….

Author’s Name :

Date :

Muhamad Hafizuddin Bin Mustafa 10 December 2014


(4)

ii

APPROVAL

This report is submitted to the Faculty of Engineering Technology of UTeM as a partial fulfillment of the requirements for the degree of Bachelor of Electronics Engineering Technology (Industrial Electronics) (Hons.). The member of the supervisory is as follow:

………


(5)

i

ABSTRAK

Projek ini adalah berkaitan dengan pengawal kerusi roda berasaskan sistem android. Sistem ini direka untuk mengawal kerusi roda menggunakan peranti android. Objektif projek ini adalah untuk memudahkan pergerakan orang kurang upaya atau orang-orang cacat dan orang tua yang tidak mampu untuk bergerak. Hasil reka bentuk ini akan membolehkan orang-orang tertentu untuk menjalani kehidupan tanpa bergantung pertolongan daripada orang lain. Teknologi Android adalah satu teknologi yang boleh memberikan cara baru untuk berinteraksi diantara manusia dengan mesin atau peralatan. Masalah dalam mengerakan kerusi roda dapat diselesaikan dengan mengunakan teknologi android. Ini boleh direalisasikan dengan menggunakan bluetooth sebagai peranti perantara. Dalam projek ini, antaramuka dibina mengunakan Basic4Android untuk membangunkan program untuk memasang pada peranti android yang akan mengawal pergerakan kerusi roda. Projek ini menggunakan papan IOIO dan Motor arus terus untuk mengerakkan kerusi roda. Keputusan dan analisis keatas inovasi ini akan menerangkan dalam laporan ini. Keputusan projek ini menunjukkan bahawa projek ini boleh digunakan untuk kerja-kerja kajian akan datang dan untuk mereka bentuk inovasi kecemerlangan yang memenuhi keperluan pasaran dan kepentingan awam.


(6)

ii

ABSTRACT

This project is related to the android-based wheelchair controller. The system is designed to control a wheelchair using the android device. The objective of this project is to facilitate the movement of people who are disabling or handicapped and elderly people who are not able to move well. The result of this design will allow certain people to live a life with less dependence on others. Android technology is a key which may provide a new way of human interaction with machines or tools. Thus the problem that they are facing can be solved by using android technology to move the wheelchair. This can be achieved with used the Bluetooth as an intermediary. In this project, Basic4android interface is designed therefore to develop the program for installing to the android device that will controls the movement of wheelchairs. This project uses IOIO board and direct current motor to create the movement of wheelchair. The results and analysis of this innovation will describe in this report. The results of this project show that this project can be used for future research works and to design excellence innovation that meet the market needs and public interest.


(7)

iii

DEDICATION

Alhamdulillah, praise to the Almighty Allah S.W.T This thesis is dedicated to:

My beloved family, My Parents, My Supervisor,

My lecturers And all my friends


(8)

iv

ACKNOWLEDGEMENT

Alhamdulillah, thank you Allah because of His blessing, I finally complete and finish my final year project successfully.

During the process to complete my project objective, I do a lot of research either by using internet, reading past year thesis, reference books and journal. With the guidance and support from peoples around me, I finally complete the project due to the time given. Here, I want to give credit to those who helped me to achieve what I had achieved in my final year project.

I would like to express my sincere and gratitude and respect towards my project’s supervisor, En. Khairul Azha Bin A.Aziz for his kind, encouragement and suggestions. Without his continued support and interest, the project would not be like what it likes today. May Allah bless and reward him for his sincere, endeavour and contribution in the way of knowledge.

I also want to thanks to my beloved parents because without them, I will not be able to do well in my final year project. They did give me a lot of support, both from money and moral support to help me continue for what I had started on.

Thank you to all lecturers, staffs, friends and all who has directly and indirectly involved on this project. Your helps and cooperation will never be forgotten. May Allah bless and reward them for their sincere, endeavour and contribution in the way of knowledge.


(9)

v

TABLE OF CONTENT

Abstract i

Abstrak ii

Dedication iii

Acknowledgement iv

Table of contents v

List of tables ix

List of figures x

List of abbreviations, Symbols and Nomenclatures xii

CHAPTER 1: INTRODUCTION 1

1.1 Project Background 1

1.2 Problem Statement 3

1.3 Project Objective 3

1.4 Scope of Project 4

1.4.1 The basic concept of android application 4

1.4.2 The basic movement of the wheelchair 4

1.4.3 The software used to program android device 4 1.4.4 The other technologies used to communicate sensory and

command information.

5

1.5 Project methodology 5

1.6 Thesis structure 6

1.7 Conclusion 7

CHAPTER 2: LITERATURE REVIEW 8

2.1 Wheelchair History 8

2.1.1 Hand-Propelled wheelchairs 9

2.1.2 Electricity-controlled wheelchairs 9

2.1.3 Automated Guided wheelchairs 10


(10)

vi 2.2.1 Features and specification of android 14

2.2.2 Basic of android application 15

2.2.3 Advantages of android 16

2.3 Bluetooth technologies 17

2.3.1 The advantages of Bluetooth 18

2.3.2 The disadvantages of Bluetooth 19

2.4 IOIO board 20

2.4.1 Main features of IOIO board 21

2.4.2 The IOIO-OTG board contains the following components 22

2.4.3 Input/output pin IOIO board 23

2.4.4 Legend for the table IOIO pin in appendix A 23

2.5 Power supply 24

2.6 DC motor 24

2.7 DC motor driver 26

2.7.1 30A DC motor driver 27

27.2 Features of the MD30C 27

2.8 RF module 28

2.9 Basic4android software 28

2.10 Existing technology 30

2.10.1 Accelerometer based hand gesture controlled wheelchair 30 2.10.2 Inductive tongue control of powered wheelchairs 31 2.10.3 Head movements based control of an intelligent

wheelchair in an indoor environment.

32

2.11 Conclusion 33

CHAPTER 3: METHODOLOGY 34

3.1 Introduction 34

3.2 Software Implementation 37

3.2.1 Installing the basic4android software 38

3.2.2 Install and configure basic4android 39

3.2.3 Create and design interface 40


(11)

vii 3.2.5 Installation application on the android phone 42

3.3 Hardware Implementation 44

3.3.1 Modifying the tire of the wheelchair 44

3.3.2 Development of control box 47

3.3.3 Development of RF receiver module 48

3.4 Gant chart 49

3.5 Conclusion 49

CHAPTER 4: RESULT AND DISCUSSION 50

4.1 Analysis of software part 50

4.1.1 Interface Design 50

4.1.2 Movement of wheelchair 52

4.1.2.1 Forward 52

4.1.2.2 Reverse, turn left and turn right 53

4.1.3 Controlling appliance 55

4.1.4 Qibla Direction 57

4.2 Analysis of hardware part 60

4.2.1 Declare the movement of the wheelchair 60

4.2.2 The truth table for motor driver 62

4.2.3 Compass analysis 62

4.3 Discussion 65

CHAPTER 5: CONCLUSION AND FUTURE WORK 67

5.1 Conclusion 67

5.2 Future work 68

REFERENCES 69

APPENDICES

A Data sheet IOIO board B Gantt chart


(12)

viii D Data sheet Motor Driver MD30C


(13)

ix

LIST OF TABLES

2.1 Android version 12

2.2 Specification of android 15

2.3 Advantages and Disadvantages of various type of DC Motor 25

4.1 Configuration data for RF module 55

4.2 Qibla code for Malaysia state 57

4.3.1 Range Searching for Qibla Direction 59

4.3.2 Angle Range for Qibla Direction 59

4.4 The Button Command 61

4.5 The Truth Table of Motor Driver 62


(14)

x

LIST OF FIGURES

1.1 Block diagram for overview project 2

2.1 Bluetooth Technologies 17

2.2 IOIO board 20

2.3 Basic4android software 29

2.4 Accelerometer based hand gesture controller 30

2.5 Inductive tongue controller 31

2.6 Head movement based controller 33

3.1 Flowchart for the overall project 36

3.2 Flowchart for software implementation 37

3.3.1 Android SDK and a platform 38

3.3.2 Basic4 Android Software 39

3.3.3 Path configuration 39

3.4 Designer Interface 40

3.5.1 Add coding to the view 41

3.5.2 coding the function view 41

3.6.1 B4A Bridge connection 42

3.6.2 connect to B4A-Bridge (Bluetooth) 42

3.6.3 Connection using wifi IP 43

3.6.4 Compile the Program 43

3.7.1 Original Tire of the Wheelchair 44

3.7.2 Sprocket Combined with Fixed Gear’s Removal Teeth 45 3.7.3 Attach the Tire Bicycle with the Timing Chain and Gear 45

3.7.4 Hub Bicycle Is Small 46

3.7.5 Bush Is Completely Attached With The Hub Bicycle 46

3.8.1 Control Box 47

3.8.2 Female to female jumper wire 48


(15)

xi 3.9.2 Internal connection of the 3 pin plug socket 49

4.1.1 Interface Design 51

4.1.2 Sample Coding From Designer Scripts 51

4.2.1 Coding for moving forward 52

4.2.2 Coding for reverse 53

4.2.3 Coding for moving to the right 53

4.2.4 Coding for moving to the left 54

4.2.5 Moving to the right 54

4.3.1 Output relay 1 (K1) 55

4.3.2 Sample Code for Switching the RF Transmitter Module 56

4.3.3 Interface for button switch 1 and 2 56

4.4.1 Setting the Qibla’ Direction 58

4.4.2 Searching Qibla Direction 58

4.4.3 Stop Searching Qibla Direction 59

4.4.4 Qibla button 59

4.5 Direction of DC Motor 61

4.6.1 Printed compass with the actual compass 63

4.6.2 Placing phone with the printed compass 63


(16)

xii

LIST OF ABBREVIATIONS, SYMBOLS AND

NOMENCLATURE

SDK - Software Development Kit

VB - Visual Basic

GUI - Graphic User Interface

API - Application Programming Interface

RAM - Random Access Memory

ROM - Read Only Memory

UART - Universal Asynchronous Receiver/Transmitter USART - Universal Synchronous Asynchronous

Receiver/Transmitter

RF - Radio Frequency

DC - Direct Current

AC - Alternating current

AVD - Android virtual devices

B4A - Basic for android

EPWs - Electric power wheelchairs

A.D - Anno Domini

OS - Operating System

SMS - Short message service

MMS - Multimedia massage

NFS - Near field communication

VoIP - Voice over internet protocol USB - Universal serial port

PC - Personal computer

UI - User interface

SSL - Secure socket layer


(17)

xiii PCB - Printed circuit board

MCU - Multipoint control unit

PWM - Pulse width modulation

SPI - Serial peripheral interface LCD - Liquid crystal display

OTA - Over the air

GND - ground

PWR - Power


(18)

1 While the needs of many individuals with disabilities can be satisfied with electric wheelchairs, some members of the disabled community find it is difficult or impossible to operate a standard power wheelchair. This project could be part of an assistive technology. It is for more independent, productive and enjoyable living. The background, objectives, problem statement and scopes of the project will be discussed in this chapter.

1.1 Project Background

Android-based wheelchair controller is a system where the DC motor is used to move the wheelchair. Nowadays, handicapped people face problem to control wheelchair by themselves. Sometimes they need other people to help them. This project will provide a new way to control the movement of wheelchair such as turn to left, right, forward and reverse direction. The overall wheelchair operation uses DC motor and motor driver module combines with microcontroller system such as IOIO board.

Android-based wheelchair controller that consists of android device and a control box that can be attached to standard wheelchairs to control the movement by using a DC motor. Bluetooth communication protocol is used to communicate sensory and command information between the android device and the control box.

There are 4 options for basic motions of a wheelchair to be applied by the user. The four conditions of the wheelchair can be described as:

INTRODUCTION


(19)

2 (a) Moving forward

(b) Moving backward (c) Turning to the right (d) Turning to the left

This project describes the design and development of the motion control using android device for a wheelchair application. Figure 1.1 shows the block diagram for overall of the project.


(20)

3

1.2 Problem Statement

Patients involved in physical injuries and disabilities with good mental strength struggle to get through places using the conventional hand powered wheelchair. A wheelchair is a chair with wheels, designed to be a replacement for walking. A wheelchair is a device used for mobility by people for whom walking is difficult or impossible, due to illness or disability. To face this problem, an android device that can control DC motor will be developed.

1.3 Project Objective

In order for the project to be implemented, the following objectives must be achieved for this project:

(a) Design Android system that can control the movement of a wheelchair. (b) Design android system that can control electric appliances.

1.4 Scope of Project

The scope are listed to ensure the project is conducted within its intended boundary. Scope is useful to ensure the project is heading in the right direction to achieve the goal. The scopes of this project are to study the basic of android from several published papers and books and also study the code use to control the movement of the Android-based wheelchair controller.

The main focus of this project is to apply what already learned about the android application. The parameters for this project can be classified as:


(21)

4 1.4.1 The basic concept of android application

In this project, android application is use to control the movement of the wheelchair. Android is a software bunch comprising not only operating system but also middleware and key applications. Android applications are composed of one or more application components (activities, services, content providers, and broadcast receivers).

1.4.2 The basic movement of the wheelchair

The movement of the wheelchair is control by the android application. The wheelchair can move to the right, to the left and also move forward and move backward. All of this movement can be controlled by using android application.

1.4.3 The software used to program android device

This project use Basic4android (basic for android) software to program android application. Basic4android is a rapid application development tool for native Android applications, developed and marketed by Anywhere Software Ltd. Basic4android is an alternative withed to program with Java and the Android SDK. Basic4android includes a visual designer that simplifies the process of building user interfaces that target phones and tablets with different screen sizes. Compiled programs can be tested in AVD manager emulator or B4A Bridge, which enables testing within a real phone. The language itself is similar to Visual Basic and Visual Basic .Net though it is adapted to the native Android environment. Basic4android is an object oriented and event driven language.


(22)

5 1.4.4 The other technologies used to communicate sensory and command

information.

This wireless technology enables communication between Bluetooth-compatible devices. It is used for short-range connections between desktop and laptop computers, digital cameras, scanners, cellular phones, and printers. Bluetooth takes care of all these limitations. Because the technology is based on radio waves, there can be objects or even walls placed between the communicating devices and the connection won't be disrupted. Also, Bluetooth uses a standard 2.4 GHz frequency so that all Bluetooth-enabled devices will be compatible with each other.

The project will be study and analyze so that during the testing and simulation, the good result achieve. Last but not least, to develop a prototype to implement it into real life.

1.5 Project Methodology

In order to achieve a good project, there are several procedure that must be follow. Initially, the first step is to find information about the wheelchair problem. Furthermore, get more information about the wheelchair problem from the journal, internet, book and also article. Besides that, the research continues with the search on the basic concept of android application and also search on coding for basic4android software to be programmed at the android device. Next, after finishing the research, the coding will be simulate in order to identify whether the coding can be simulate without any error. After that, the hardware for the android-based wheelchair controller will be design. Lastly, the hardware will combine with the coding to get the complete android-based wheelchair controller that will be controlled by android device.


(23)

6 1.6 Thesis Structure

Chapter 1:

The first chapter introduces brief idea of the project. It focused on the overview of the project, detailing the objectives, the problem statement, scope and outcome of the project.

Chapter 2:

Projects background is discussed in this chapter. The method concept, theory, and some characteristic of component of hardware that used in this project is discussed in this chapter. This chapter also contain a definition of term used in this project also discusses the concept of the research and how it related with the theory.

Chapter 3:

This section is methodology chapter. Methodology chapter is a schedule or steps that need to be complete, detailed reports of studies done to achieve aim objective. This chapter explains the procedure taken to complete the project. It consist the detail development of this project.

Chapter 4:

Chapter four is about the result and discussion that we obtain based on the methodology that we used. All the simulations, data collection and analysis obtained were discussed in detail. The results were compared with the outlined objectives in order to state some hypothesis and conclusion.

Chapter 5:

Chapter five is about the conclusion and future work. In this section, we will conclude what we have done and followed by some recommendation on how to improve the performance of the system based on the desired results.


(24)

7 1.7 Conclusion

At the end of this chapter, we know on how this project wants to develop. The problem statement in this chapter describe why this project must be develop and there is some technology that need to be learned to overcome the problem statement. In this project I will use android system to control the movement of the wheelchair.


(1)

2 (a) Moving forward

(b) Moving backward (c) Turning to the right (d) Turning to the left

This project describes the design and development of the motion control using android device for a wheelchair application. Figure 1.1 shows the block diagram for overall of the project.


(2)

3

1.2 Problem Statement

Patients involved in physical injuries and disabilities with good mental strength struggle to get through places using the conventional hand powered wheelchair. A wheelchair is a chair with wheels, designed to be a replacement for walking. A wheelchair is a device used for mobility by people for whom walking is difficult or impossible, due to illness or disability. To face this problem, an android device that can control DC motor will be developed.

1.3 Project Objective

In order for the project to be implemented, the following objectives must be achieved for this project:

(a) Design Android system that can control the movement of a wheelchair. (b) Design android system that can control electric appliances.

1.4 Scope of Project

The scope are listed to ensure the project is conducted within its intended boundary. Scope is useful to ensure the project is heading in the right direction to achieve the goal. The scopes of this project are to study the basic of android from several published papers and books and also study the code use to control the movement of the Android-based wheelchair controller.

The main focus of this project is to apply what already learned about the android application. The parameters for this project can be classified as:


(3)

4

1.4.1 The basic concept of android application

In this project, android application is use to control the movement of the wheelchair. Android is a software bunch comprising not only operating system but also middleware and key applications. Android applications are composed of one or more application components (activities, services, content providers, and broadcast receivers).

1.4.2 The basic movement of the wheelchair

The movement of the wheelchair is control by the android application. The wheelchair can move to the right, to the left and also move forward and move backward. All of this movement can be controlled by using android application.

1.4.3 The software used to program android device

This project use Basic4android (basic for android) software to program android application. Basic4android is a rapid application development tool for native Android applications, developed and marketed by Anywhere Software Ltd. Basic4android is an alternative withed to program with Java and the Android SDK. Basic4android includes a visual designer that simplifies the process of building user interfaces that target phones and tablets with different screen sizes. Compiled programs can be tested in AVD manager emulator or B4A Bridge, which enables testing within a real phone. The language itself is similar to Visual Basic and Visual Basic .Net though it is adapted to the native Android environment. Basic4android is an object oriented and event driven language.


(4)

5

1.4.4 The other technologies used to communicate sensory and command

information.

This wireless technology enables communication between Bluetooth-compatible devices. It is used for short-range connections between desktop and laptop computers, digital cameras, scanners, cellular phones, and printers. Bluetooth takes care of all these limitations. Because the technology is based on radio waves, there can be objects or even walls placed between the communicating devices and the connection won't be disrupted. Also, Bluetooth uses a standard 2.4 GHz frequency so that all Bluetooth-enabled devices will be compatible with each other.

The project will be study and analyze so that during the testing and simulation, the good result achieve. Last but not least, to develop a prototype to implement it into real life.

1.5 Project Methodology

In order to achieve a good project, there are several procedure that must be follow. Initially, the first step is to find information about the wheelchair problem. Furthermore, get more information about the wheelchair problem from the journal, internet, book and also article. Besides that, the research continues with the search on the basic concept of android application and also search on coding for basic4android software to be programmed at the android device. Next, after finishing the research, the coding will be simulate in order to identify whether the coding can be simulate without any error. After that, the hardware for the android-based wheelchair controller will be design. Lastly, the hardware will combine with the coding to get the complete android-based wheelchair controller that will be controlled by android device.


(5)

6

1.6 Thesis Structure

Chapter 1:

The first chapter introduces brief idea of the project. It focused on the overview of the project, detailing the objectives, the problem statement, scope and outcome of the project.

Chapter 2:

Projects background is discussed in this chapter. The method concept, theory, and some characteristic of component of hardware that used in this project is discussed in this chapter. This chapter also contain a definition of term used in this project also discusses the concept of the research and how it related with the theory.

Chapter 3:

This section is methodology chapter. Methodology chapter is a schedule or steps that need to be complete, detailed reports of studies done to achieve aim objective. This chapter explains the procedure taken to complete the project. It consist the detail development of this project.

Chapter 4:

Chapter four is about the result and discussion that we obtain based on the methodology that we used. All the simulations, data collection and analysis obtained were discussed in detail. The results were compared with the outlined objectives in order to state some hypothesis and conclusion.

Chapter 5:

Chapter five is about the conclusion and future work. In this section, we will conclude what we have done and followed by some recommendation on how to improve the performance of the system based on the desired results.


(6)

7

1.7 Conclusion

At the end of this chapter, we know on how this project wants to develop. The problem statement in this chapter describe why this project must be develop and there is some technology that need to be learned to overcome the problem statement. In this project I will use android system to control the movement of the wheelchair.