android based automated smart wheelchair

42
ANDROID BASED AUTOMATED SMART WHEELCHAIR 1. INTRODUCTION Patients having injuries and physical disabilities and with good mental health face a lot of difficulty when using the conventional hand powered wheelchair. This project enables an economic assembly in any existing wheelchair that enables a smart system for automated motion which can be controlled by any Smartphone. The concept particularly mentions ‘Smartphone’ which covers devices like any Android powered mobile phone which have inbuilt 3 axis accelerometer and Bluetooth Wireless technology. The functionality can be extended to other mobile devices using a suitable application. The other end of the system has a microcontroller powers the DC motor for linear motion of the wheelchair. The DC motor connected to the rear wheels enables linear motion. Following are some detail about the projects – • This is an android based automated wheelchair that can be used by differently able. • It uses android based Smartphone’s which have inbuilt axis accelerometer sensors and Bluetooth wireless technology. • The proposed concept exploits these features of the smart phones to use at as a transmitter and control device. 1

Upload: shashank-tiwari

Post on 31-Jul-2015

60 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ANDROID BASED AUTOMATED SMART WHEELCHAIR

ANDROID BASED AUTOMATED SMART WHEELCHAIR

1. INTRODUCTION

Patients having injuries and physical disabilities and with good mental health face a lot

of difficulty when using the conventional hand powered wheelchair. This project

enables an economic assembly in any existing wheelchair that enables a smart system

for automated motion which can be controlled by any Smartphone. The concept

particularly mentions ‘Smartphone’ which covers devices like any Android powered

mobile phone which have inbuilt 3 axis accelerometer and Bluetooth Wireless

technology. The functionality can be extended to other mobile devices using a suitable

application. The other end of the system has a microcontroller powers the DC motor for

linear motion of the wheelchair. The DC motor connected to the rear wheels enables

linear motion. Following are some detail about the projects –

• This is an android based automated wheelchair that can be used by differently able.

• It uses android based Smartphone’s which have inbuilt axis accelerometer sensors and

Bluetooth wireless technology.

• The proposed concept exploits these features of the smart phones to use at as a

transmitter and control device.

• This is an android based automated wheelchair that can be used by differently able.

2. LITERATURE REVIEW

In the paper on “voice operated wheel chair” voice command input is taken from android mobile and converted into text and this text is given to the microcontroller via Bluetooth module to control the operation of D.C. motors.

1

Page 2: ANDROID BASED AUTOMATED SMART WHEELCHAIR

In the paper “voice and touch screen based and speed control of wheel chair for physically challenged using Arduino” input to Arduino in two ways i.e. via voice command or touch command i.e. HM 2007 is used as a voice recognition device. Input method is switched through switches and input is given by any two method to Arduino. Two D.C. motors are used to provide motion.

In the paper “A wheel chair steered through voice commands and assisted by a reactive

fuzzy-logic controller”, voice command controlled and a fuzzy logic controller is used

along with a sensor network to avoid collision of the wheel chair. Fuzzy logic controller

is used to rectify problem caused due to low voice command input from the user.

3. DESIGNING AND SPECIFICATION

3.1 MECHANICAL STRUCTURE AND ITS DIMENSIONS

The following figure illustrates the important wheelchair terminologies that needs to be

considered while designing a wheelchair.

Persons with Disabilities Act (1995) recognises the rights of Indians with disabilities

and creates opportunities for equal participation in all govt. run infrastructures and

services.

2

Page 3: ANDROID BASED AUTOMATED SMART WHEELCHAIR

There are certain standards and guidelines that are provided regarding the dimensional

specifications of a wheelchair by government agencies like Bureau of Indian Standards

(BIS), Central Public Works Department (CPWD), Office of Chief Commissioner for

persons with Disabilities (CCD) etc. based on extensive survey and research on the

population of people with disabilities who use wheelchairs.

The act does not comment on these different standards and guidelines and does not

endorse any one of them. So we’re just going to go with Bureau of Indian Standards’

recommendations.

According to BIS (IS 7454 and IS 4963) :

(all measurements are in millimetres)

Unoccupied Width = 650-720

Unoccupied Length = 1000-1100

Handle Height = 910-950

Armrest Height = 700-740

Seat Height = 480-510

Combined Knee + Toe Clearance Depth = 400-450

For the scaled down model, the dimensions which will be used are as follows:

Unoccupied Width = 325

Unoccupied Length = 500

Handle Height = 455

Armrest Height = 350

Seat Height = 240

Combined Knee + Toe Clearance Depth = 200

3

Page 4: ANDROID BASED AUTOMATED SMART WHEELCHAIR

The base plate length = Unoccupied Length - (Combined Knee + Toe Clearance Depth )

= 500 - 200 = 300

The Materials to be used are as follows:

A suitable fabric shall be used for covering the seat and back rest that should be non

toxic and non allergic.

3.2 LOCATION OF DRIVE WHEEL

The location of the drive wheels (the wheels powered by the motor) in the rear, middle or front of the chair has a definite effect on the chair’s performance in different environments.

3.2.1 Maneuverability

The position of the drive wheels significantly affects the space needed for the chair to turn around, and the way the chair maneuvers in tight spaces.

Mid-wheel drives are the most maneuverable because they have the smallest 360-degree turning circumference and the tightest turning radius (20 to 26 inches), making them excellent indoor chairs.

Front-wheel drives have a turning radius of 25 to 28 inches and a larger 360-degree circumference than mid-wheel drives. However, they actually navigate around tight corners better than the other two drive systems because the position of the pivot point gives them a very short front end. But turning around in a small space is tricky because of the long back end.

Rear-wheel drives have the largest 360-degree circumference and turning radius (30 to 33 inches) of the three drive systems, making them more difficult to maneuver in tight spaces.

In addition, the footrests on a rear-wheel drive chair take up more space because they’re typically angled forward at anywhere from 80 to 60 degrees in order to clear the larger front casters.

The amount of space taken up by the footrests varies depending on the drive system and the particular angle required by the user.

When the footrest angle changes, so does the turning radius measurement. This makes comparing the turning specifications on chairs a little tricky. Most experts include the footrests in the turning radius measurement, but most manufacturers don’t due to the variability of footrest angles.

Because mid-wheel drives have small front casters that are wider apart than on other drive systems, 90-degree footrests add less than an inch to the turning radius.

4

Page 5: ANDROID BASED AUTOMATED SMART WHEELCHAIR

On front-wheel drive chairs, there are no front casters to interfere with having 90-degree footrests. When the footrests are counted in the turning radius measurement, they add less than an inch.

Another factor that affects maneuverability is how the weight is distributed on the wheelchair. “Chairs have an ideal weight distribution, and the further away you get from that, the more you impact the [maneuverability],” says Pogir. “What you find sometimes with the rear-wheel drive is that a lot of the weight is over the casters, and they perform very poorly.”

Mid-wheel and front-wheel drives are less sensitive to problems caused by weight distribution than rear-wheel drives.

3.2.2 Handling obstacles and inclines

Front-wheel drives are optimal for traversing obstacles such as curbs, grass, gravel, uneven terrain and snow. This is because the 14-inch drive wheels are the first wheels to encounter obstacles and they pull the rest of the wheelchair over them.

A rear-wheel drive means the drive wheels are pushing the front casters over obstacles. Because pushing is harder than pulling, rear-wheel drives aren’t quite as efficient going over obstacles as front-wheel drives.

3.3 MECHANICAL DESIGN

(a)Front view (b) Side View

5

Page 6: ANDROID BASED AUTOMATED SMART WHEELCHAIR

(c) Top view (d) Right view

(e) Isometric view

3.4 CASTER DESIGN

6

Page 7: ANDROID BASED AUTOMATED SMART WHEELCHAIR

Caster stems must be kept as vertical as possible. Caster stems that are not vertical cause a number of problems. If the stem leans forwards at the top the chair is difficult to turn and the knees are lower wheeling forwards than when wheeling backwards. If the stem is leaning backwards at the top, the chair is difficult to keep in a straight line and the knees raise up higher when rolling forwards. Also whenever the wheeler stops the chair will roll backwards a little.

3.5 TRANSMITTING MACHINE

3.5.1 SMARTPHONE –

A Smartphone is a mobile phone built on a mobile OS, it has more advanced

computing capability and connectivity than a ordinary phone. Most

Smartphone’s are equipped with accelerometers for user interface control that

are used to present landscape or portrait views of the phone’s screen, based on

the way the device is being held. Also most smart phones have Bluetooth

Wireless Technology inbuilt in the device for various small range wireless

applications like headset, file transfer, wireless input devices etc. the following

project uses above features of the Smartphone to use it as a transmitter and

control device and completely eliminating the need for a separate transmitter

block.

3.5.2 ACCELEROMETER –

7

Page 8: ANDROID BASED AUTOMATED SMART WHEELCHAIR

An accelerometer is a device that measures proper acceleration ("g"). Proper

acceleration is different from the acceleration (i.e. rate of change of velocity),

e.g. an accelerometer at rest on the surface of the Earth will measure an

acceleration g= 9.81 m/s2 straight upwards whereas, accelerometers in free fall

orbiting and accelerating due to the gravity of Earth will measure zero.

• An accelerometer is an electromechanical device that will measure acceleration

forces. These forces may be static, like the constant force of gravity pulling at

your feet, or they could be dynamic - caused by moving or vibrating the

accelerometer. The Smartphone Accelerometer is a semiconductor IC that

measures motion and its intensity in all 3 axes and directly can provide values to

suitably designed application.

• Often accelerometers is used to present landscape or portrait views of the

devices screen based on the way the device is being held.

3.5.3 BLUETOOTH –

• Bluetooth present in the Smartphone can be tapped using protocol stacks in the app

design environment of the mobile operating system.

• Functional app-this app interfaces accelerometer to work with Bluetooth module.

8

Page 9: ANDROID BASED AUTOMATED SMART WHEELCHAIR

3.6 RECEIVING SECTION

3.6.1 MICROCONTROLLER –

It is a small computer on a single integrated circuit containing a processor core,

memory, and programmable input/output peripherals. Program memory is also

often included on chip, as well as a typically small amount of RAM.

Microcontrollers are designed for embedded applications, in contrast to the

microprocessors used in personal computers or other general purpose

applications.

• Its need involves the reception of data signals that are transmitted by the

Smartphone via Bluetooth module and control the working of DC motors. e.g.

Arduino (an open source single board microcontroller).

•The wheelchair interacts with the Smartphone app by means of this Arduino

microcontroller via Bluetooth. The Bluetooth receiver that can be interfaced

with the Arduino board is EGBT – 045MS Bluetooth module.

3.6.2 BLUETOOTH RECEIVER SPECIFICATIONS –

EGBT-045MS is a generic Bluetooth Modules loaded with SPP firmware for

UART wireless cable replacement functions. The EGBT-045MS can be

configured by the user to work either as a master or slave Bluetooth device using

a set of AT commands.

SPECIFICATIONS EGBT-046S:

Radio Chip: CSR BC417

Memory: External 8Mbit Flash

Output Power: -4 to +6dbm Class 2

Sensitivity: -80dbm Typical

Bit Rate: EDR, up to 3Mbps

9

Page 10: ANDROID BASED AUTOMATED SMART WHEELCHAIR

Interface: UART

Antenna: Built-in

Dimension: 27W x 13H mm

Voltage: 3.1 to 4.2VDC

3.7 MICROCONTROLLER -

As in a PC the input using keyboard or mouse are given to central processing unit

(CPU) then output given out using monitor, A PC majorly consists of –

1. Processor (measured in Hz)

2. Memory – (a) HDD (in Bytes)

(b) RAM (in Bytes)

3. Input / Output devices (no.)

A microcontroller also works similarly, where input using R/C, sensors are given to

Microcontroller which gives output using LCD, motor, LED etc., it’s a system scaled

down to a size of IC(chip), it consists of –

1. Microprocessor (in Hz)

10

Page 11: ANDROID BASED AUTOMATED SMART WHEELCHAIR

2. Memory – (a) Flash (in bytes)

(b) SRAM (in bytes)

3. Input / Output pins (no.)

The microcontroller used in the project is AVR Atmel ATmega16. ATmega16 has

microprocessor of 16 MHz, flash memory of 16kb (hence ATmega16), SRAM of 1kb,

with 40 pins in PDIP (plastic dual inline package). These 40 pins, these are divided into

4 ports leaving 8 pins which are used for power supply.

40 pins are divided as seen from left side of board

- Pins 1 to8 are Port B (naming B.0, B.1, B.2, B.3, B.4, B.5, B.6, B.7)

- B.5 is MOSI (master output slave input).

- B.6 is MISO (master input slave output).

- B.7 is SCK (system clock).

11

Page 12: ANDROID BASED AUTOMATED SMART WHEELCHAIR

- Pins 14 to 21 are port D (naming D.0 to D.7)

- D.0 and D.1 are RXD and TXD which are receiver and transmitters of Bluetooth

interface respectively.

- D.4 and D.5 are OC1B and OC1A.

- Pins 22 to29 are port C (naming C.0 to C.7)

- Pins 32 to 40 are port A (naming A.0 to A.7)

- Pin 9 is Reset

- Pins 10 and 11 are Vcc and GND for the power supply to microcontroller (5V

DC).

- Pins 12 and 13 are XTAL2 and XTAL1 respectively, which are crystal

oscillators.

- Pins 30 and 31 are AGND and AVcc for power supply to Analog to Digital

Convertor (ADC with 5V DC).

- Pin 33 is Aref i.e. reference voltage to ADC.

The ports and connectors in the microcontrollers are as follows –

Power Switch – It is used to turn the power supply of the board on. Power flows to

voltage regulators, only when the power switch is in down position. Voltage regulators

regulate the power supply to 5 volts and the power supply can be given through the

power connector or DC jack.

Reset Switch – It is used to reset the program to zero and restart the program execution.

During program execution, Reset switch is in down position and when downloading the

program to the chip, it should be in up position.

LEDs - Four LEDs are there on the board for the testing purpose. These can be

programmed to glow. Connection details are –

LED 1: PortC.1

LED 2: PortC.2

12

Page 13: ANDROID BASED AUTOMATED SMART WHEELCHAIR

LED 3: PortC.3

LED 4: PortD.2

3.8 HARDWARE DESCRIPTION

LCD - Four LEDs are provided on the board for the testing purpose. These LEDs can be

programmed to glow. Connection details of the LEDs and microcontroller pins are

given below –

LED 1 : PortC.1

LED 2 : PortC.2

LED 3 : PortC.3

LED 4 : PortD.2

Each individual LED can be programmed to glow or to blink by programming the

corresponding microcontroller pin.

Programmable Micro-Switches – These switches are connected with microcontroller

and can be used as input device to the microcontroller. These switches can be used for

testing purpose. Connection details of these pins are given below –

S1 : PortD.7

S2 : PortC.0

When these switches are pressed, they actually short the corresponding microcontroller

pin with GND, so it is required to use internal pull up registers to use these switches as

input device.

3.8.1 Motor Connectors -

13

Page 14: ANDROID BASED AUTOMATED SMART WHEELCHAIR

MOTOR1

For Connector 1 –

PWM Channel = PWM1B

Direction Bit = PortD.3

For Connector 2 –

PWM Channel = PWM1A

Direction Bit = PortD.6

MOTOR2

For Connector 1 –

PWM Channel = PortC.6

Direction Bit = PortC.7

For Connector 2 –

PWM Channel = PortC.4

Direction Bit = PortC.5

4. HOW TO USE THE EQUIPMENTS -

1. Connect the power supply to proper terminal of the board.

2. Connect the ISP cable on ISP header on the board and connect it at USB port of the

host computer.

3. Install the drivers of the ISP USB cable

4. Keep the reset button at up position and switch on the power button.

5. The board is now ready to download the program from the computer, make sure that

power is coming to the board and Power LED is glowing.

14

Page 15: ANDROID BASED AUTOMATED SMART WHEELCHAIR

6. Open AVRDUDE software and upload the HEX file generated by compiling the

program in Bascom Software to Flash Option

7. Click on Execute command

8. Now, switch off the power button, disconnect the ISP cable, and change the reset

button position.

9. Switch on the power button to run your program.

5. SIMULATION AND EXPERIMENTATION-

Table 1

WHEEL CHAIR TYPES TURNING RADIUS(Inches)

Mid wheel drive

Wheel chair

20-26

Front wheel drive

Wheel chair

25-28

Rear wheel drive

Wheel chair

30-33

Table 2

WHEEL Step, bump or curb that is up

Step, bump or curb that is up

Step, bump or curb that is up

Step, bump or curb that is up

15

Page 16: ANDROID BASED AUTOMATED SMART WHEELCHAIR

CHAIR TYPES to 2 inches to 2.5 inches to 3.2 inches to 3.3 inches and high

Mid wheel drive

Wheel chair

Yes Yes No No

Front wheel drive

Wheel chair

Yes Yes Yes Yes

Rear wheel drive

Wheel chair

Yes No No No

Table 3

WHEEL CHAIR TYPES Stability on straight path Stability on inclined path

Mid wheel drive

Wheel chair

equal more

Front wheel drive

Wheel chair

Equal moderate

Rear wheel drive

Wheel chair

Equal least

Stability due to battery allocation on an inclined plane:

Table 4

16

Page 17: ANDROID BASED AUTOMATED SMART WHEELCHAIR

WHEEL CHAIR TYPES

Front position Mid position End position

Front wheel drive

Wheel chair

Less stable stable stable

Mid wheel drive

Wheel chair

- - -

Rear wheel drive

Wheel chair

Stable stable Less stable

Mid wheel drive Wheel chair

Front wheel drive Wheel chair

Rear wheel drive Wheel chair

0

20

40

60

80

100

120

Chart Title

turning radius obstacles Rear wheel drive Wheel chair

6. PROGRAMMING -

Programming is done in BASIC Language using BASCOM – AVR.

17

Page 18: ANDROID BASED AUTOMATED SMART WHEELCHAIR

About BASCOM – AVR : BASCOM – AVR is an IDE based development platform

and is developed by MCS Electronics. BASCOM uses BASIC programming language.

It is very easy to write, compile and download the program with BASCOM.

Basics of programming language required during programming –

1. Define $regfile – instruct the compiler to use the specified register file.

Syntax –

$REGFILE = "name_of_file"

Since we are using Atmega16 Microcontroller, we will define

$regfile= “m16def.dat” //this file is loaded for Atmel atmega16

2. $crystal –It defines the clock speed at which you want to run your microcontroller.

Syntax –

$CRYSTAL = Value

// Value - A numeric constant defining the Frequency of the crystal.

Example –

$crystal = 4000000 //it set the clock speed at 4MHz.

3. Config - The CONFIG statement is used to configure the various hardware devices

and other features of microcontroller.

We are required to configure the following hardware and features:

a) LCD

b) ADC

c) Timer

18

Page 19: ANDROID BASED AUTOMATED SMART WHEELCHAIR

4. Defining Variables

To define a variable in BASCOM , the syntax is:

Syntax –

DIM var as type

Var- Name of Variable

Type - Bit, Byte, Word, Integer, Long, Single, Double or String

Example

Dim A as Integer

Dim B as String * 8

Example

Dim A as Integer

Dim B as String * 8

First statement is defining A variable as integer and second one is defining B variable as

String of 8 characters long. Other than Integer and String there many data types

available in BASCOM.

5. Start Command –

This command is used to start the specified device.

Syntax –

START device

Device - TIMER0, TIMER1, COUNTER0 or COUNTER1, WATCHDOG, AC

(Analog comparator power) or ADC(A/D converter power)

Example –

Start ADC

19

Page 20: ANDROID BASED AUTOMATED SMART WHEELCHAIR

6. CLS Command

Clear the LCD display and set the cursor to home.

Syntax/ Example –

Cls

7. If – Else statement, Loops and Select – case statement

7.1. Do Loop

Do

<statements>

Loop

7.2. Do Until Loop

Do

<statements>

Loop until (condition)

7.3. While Loop

While (condition)

<statements>

end

7.4. If – else statement

If (condition) then

<statements>

else

20

Page 21: ANDROID BASED AUTOMATED SMART WHEELCHAIR

<statements>

endif

7.5. If – elseif – else ladder statement

If (condition) then

<statements>

else if (condition)

<statements>

else

<statements>

endif

7.6. For loop

For (varname) = (starting point) To (end point)

STEP (value)

<statements>

Next

Example of For loop –

For A = 1 To 5 STEP 1

Print “Hello”

Next

7.7. Case – Select Statement

select case varname

case (test1 varname)

<statement>

21

Page 22: ANDROID BASED AUTOMATED SMART WHEELCHAIR

case (test2 varname)

<statement>

case else

<statement>

End select

8. GETADC command

This command is used to take input from the analog sensor connected to the

development board. This command retrieves the analog value from channel 0-7 of port

A. The range of analog value is from 0 to 1023.

Syntax

var = GETADC(channel [,offset])

Var – The variable in which the value will be stored.

Channel – It is the pin no. of port A to which anolog sensor is connected.

Offset – It is an optional numeric variable that specifies gain or mode.

6.1PROGRAMS USED IN THE PROJECT –

6.1.1 LCD – LCD would be used to show a message or signal e.g. direction of the

wheels driven by motor (FORWARD, BACKWARD, LEFT, RIGHT). The

programme used is as follows –

$regfile = "m16def.dat".

$crystal = 1000000

ConfigLcd = 16 * 2

ConfigLcdpin = Pin ,Rs = Portb.2 , E = Portb.3 , Db4 = Portb.4 ,

Db5 = Portb.5 , Db6 = Portb.6 , Db7 = Portb.7

ConfigAdc = Single ,Prescaler = Auto , Reference = Avcc

Start Adc

22

Page 23: ANDROID BASED AUTOMATED SMART WHEELCHAIR

Config Timer1 = Pwm ,Pwm = 8 , Prescale = 1 , Compare A Pwm = Clear

Down , Compare B Pwm = Clear Down

Start Timer1

Do

Lcd "delhi"

Lowerline

Lcd "mumbai"

Wait 10

Cls

Lcd "mumbai"

Lowerline

Lcd "noida"

Wait 5

Cls

Lcd "noida"

Lowerline

Lcd "amity"

Wait 5

Cls

Lcd "amity"

Wait 2

Cls

Loop

End

6.1.2 LED –

$regfile = "m16def.dat".

$crystal = 1000000

ConfigLcd = 16 * 2

ConfigLcdpin = Pin ,Rs = Portb.2 , E = Portb.3 , Db4 = Portb.4 ,

Db5 = Portb.5 , Db6 = Portb.6 , Db7 = Portb.7

ConfigAdc = Single ,Prescaler = Auto , Reference = Avcc

Start Adc

23

Page 24: ANDROID BASED AUTOMATED SMART WHEELCHAIR

Config Timer1 = Pwm ,Pwm = 8 , Prescale = 1 , Compare A Pwm = Clear

Down , Compare B Pwm = Clear Down

Start Timer1

Config Portc.1 = Output

Config Portc.2 = Output

Config Portc.3 = Output

Config Portd.2 = Output

Do

Cls

Lcd "led ON"

Portc.1 = 1

Portc.2 = 1

Portc.3 = 1

Portd.2 = 1

Wait 5

Cls

Lcd "led OFF"

Portc.1 = 0

Portc.2 = 0

Portc.3 = 0

Portd.2 = 0

Wait 2

Loop

End

6.1.3 MOTOR – There are two motors used in the wheel chair to drive the wheels

and other two are freewheels. The two motors will be connected to the

microcontroller through the board. The motor will be programmed to run at a

particular range of speed predefined. To move forward and backward both the

wheels will move clockwise and anti-clockwise respectively, but to turn right

and left one motor will be completely stopped and other motor will keep

running, let’s say if we have to turn left, left wheel will completely stop and

right wheel will run and to turn right, right wheel will completely stop and left

24

Page 25: ANDROID BASED AUTOMATED SMART WHEELCHAIR

wheel will keep running. A tabular chart depicting the different speeds fed

through programme are given below –

Table 5

Related

pins or

ports

Forward Left Right Stop Backward

Motor 1 Speed Pwm1a 150 100 0 0 105

Direction PortD.6 0 0 0 0 1

Motor 2 Speed Pwm1b 150 0/255 150 0 105

Direction PortD.3 0 0/1 0 0 1

A timer programme is added in the motor programme for delaying the

motor reaction after the signal is given to it by given seconds (1 or 2). The complete

programme is given as follows –

$regfile = "m16def.dat".

$crystal = 1000000

ConfigLcd = 16 * 2

ConfigLcdpin = Pin ,Rs = Portb.2 , E = Portb.3 , Db4 = Portb.4 ,

Db5 = Portb.5 , Db6 = Portb.6 , Db7 = Portb.7

ConfigAdc = Single ,Prescaler = Auto , Reference = Avcc

Start Adc

Config Timer1 = Pwm ,Pwm = 8 , Prescale = 1 , Compare A Pwm = Clear

Down , Compare B Pwm = Clear Down

Start Timer1

Do

Cls

Lcd "forward"

Pwm1a = 150

Portd.6 = 0

Pwm1b = 150

Portd.3 = 0

25

Page 26: ANDROID BASED AUTOMATED SMART WHEELCHAIR

Wait 2

Cls

Lcd "left"

Pwm1a = 100

Portd.6 = 0

Pwm1b = 0

Portd.3 = 0

Wait 2

Cls

Lcd "stop"

Portd.6 = 0

Portd.3 = 0

Pwm1a = 0

Pwm1b = 0

Wait 2

Loop

End

6.1.4 SENSOR CALIBERATION – To ensure that there is no obstacle while

operating a sensor is provided so that when an object comes in front of the wheelchair

the motors stop running. For this a calibration of sensor is needed to ensure sensor is

working properly and giving signal at the right time to reduce the speed. The programme

is used to display obstacle or no obstacle also, as LCD screen shows “Obstacle”

message in case of obstacles and “no obstacle message” in case of no obstacles.

Programme for calibration is as follows –

$regfile = "m16def.dat".

$crystal = 1000000

ConfigLcd = 16 * 2

ConfigLcdpin = Pin ,Rs = Portb.2 , E = Portb.3 , Db4 = Portb.4 ,

Db5 = Portb.5 , Db6 = Portb.6 , Db7 = Portb.7

ConfigAdc = Single ,Prescaler = Auto , Reference = Avcc

Start Adc

26

Page 27: ANDROID BASED AUTOMATED SMART WHEELCHAIR

Config Timer1 = Pwm ,Pwm = 8 , Prescale = 1 , Compare A Pwm = Clear

Down , Compare B Pwm = Clear Down

Start Timer1

Dim A As Integer

Do

Cls

A = Getadc(1)

Lcd A

Wait 1

Loop

End

6.1.5. BLUETOOTH – A Bluetooth module is used in the project to connect the

system with a smart phone using Bluetooth. As we know that when the Smartphone is

moved left, right, forward, or backward the accelerometer in the Smartphone identifies

the motion and forward the signal using Bluetooth app like Bluetooth with sensor. To

transfer this message program is fed to the system which is as follows –

$regfile = "m16def.dat".

$crystal = 2000000

$baud = 9600

ConfigLcd = 16 * 2

ConfigLcdpin = Pin ,Rs = Portb.2 , E = Portb.3 , Db4 = Portb.4 ,

Db5 = Portb.5 , Db6 = Portb.6 , Db7 = Portb.7

ConfigAdc = Single ,Prescaler = Auto , Reference = Avcc

Start Adc

Config Timer1 = Pwm ,Pwm = 8 , Prescale = 1 , Compare A Pwm = Clear

Down , Compare B Pwm = Clear Down

Start Timer1

Dim A As String * 1

Cls

Do

27

Page 28: ANDROID BASED AUTOMATED SMART WHEELCHAIR

A = Waitkey()

Cls

LCD A

Loop

End

6.1.6 FINAL PROGRAM FOR THE WHEELCHAIR –

$regfile = "m16def.dat"

$crystal = 2000000

$baud = 9600

ConfigLcd = 16 * 2

ConfigLcdpin = Pin ,Rs = Portb.2 , E = Portb.3 , Db4 = Portb.4 ,

Db5 = Portb.5 , Db6 = Portb.6 , Db7 = Portb.7

ConfigAdc = Single ,Prescaler = Auto , Reference = Avcc

Start Adc

Config Timer1 = Pwm ,Pwm = 8 , Prescale = 1 , Compare A Pwm = Clear

Down , Compare B Pwm = Clear Down

Start Timer1

ConfigSerialin = Buffered , Size = 10

Enable Interrupts

Declare Sub Getsign(s As String)

Dim B As Byte , Sign As String * 5

Dim Ob As Integer , Nob As Integer , Mob As Integer , Ir As Integer

Cls

Lcd "sense obs"

Wait 3

Ob = Getadc(1)

Lowerline

28

Page 29: ANDROID BASED AUTOMATED SMART WHEELCHAIR

Lcd Ob

Wait 1

Cls

Lcd "sense no obs"

Wait 3

Nob = Getadc(1)

Lowerline

Lcd Nob

Wait 1

Cls

Mob = Ob + Nob

Mob = Mob / 2

Cls

Do

Getsign Sign

Cls

Lcd "signal is :"

Lowerline

Lcd Sign

Wait 2

Cls

Lcd "moving"

Lowerline

If Sign = "FORWARD" Then

Lcd "fwd"

Pwm1b = 0

Portd.3 = 0

Pwm1a = 255

Portd.6 = 0

Elseif Sign = "BACKWARD" Then

Lcd "stop"

Pwm1b = 255

Portd.3 = 0

Pwm1a = 0

Portd.6 = 0

Elseif Sign = "LEFT" Then

Lcd "left"

Pwm1b = 0

29

Page 30: ANDROID BASED AUTOMATED SMART WHEELCHAIR

Portd.3 = 0

Pwm1a = 0

Portd.6 = 0

Elseif Sign = "RIGHT" Then

Lcd "right"

Pwm1a = 255

Portd.6 = 0

Pwm1b = 255

Portd.3 = 0

End If

Wait 1

Loop

Sub Getsign(s As String)

S = ""

Do

Ir = Getadc(1)

If Ir> Mob Then

Cls

Lcd "obstacle"

Pwm1b = 255

Portd.3 = 0

Pwm1a = 0

Portd.6 = 0

End If

B = Inkey()

Select Case B:

Case 0

Case Else

S = S + Chr(b)

If S = "FORWARD" Or S = "BACKWARD" Or S = "LEFT" Or S = "RIGHT"

Then Exit Do

End Select

Loop

End Sub

30

Page 31: ANDROID BASED AUTOMATED SMART WHEELCHAIR

7. CONCLUSION –

In our project we designed and fabricated Android Based Automated Smart Wheelchair,

which can be used on inclined and flat terrains and obstacles. The results are as follows-

1. Users can use their existing android phones to download and install the android

app to use it as a controller for their wheelchair.

2. The use of the existing android phone considerably reduces the cost of the

wheelchair.

3. The operation of the wheelchair is done by tilting the smartphone in different

directions.

4. Front wheel drive provides high maneuverability, have less turning radius as

compared to rear wheel drives and are optimal for handling obstacles and

inclines.

5. Obstacle avoiding feature is provided with the help of IR sensors.

6. The optimisation of ergonomics has been added in our design to make the

wheelchair more convenient and comfortable.

8. FUTURE PROSPECTS –

• Can also alarm the user about the obstacle.

• Improvements can be made by using various hand gestures of the user.

• Battery can be recharged by alternator.

• Automatic balancing of sitting area can be provided using secondary

accelerometer in case of bumps and curbs.

• Movements can be controlled and location of wheelchair can be tracked using

server connection.

• Eyes movement based automated wheelchair.

31

Page 32: ANDROID BASED AUTOMATED SMART WHEELCHAIR

9. BIBLIOGRAPHY/REFERENCES -

• Based on the research paper

1. “Smartphone Accelerometer Controlled Automated Wheelchair” by

Vigneshwar. Santhanam and Vignesh. Viswanathan.

2. “Android Based Mobile Drive System “ by Anand bansal and Harshdeep.

Available online at www.ijecse.org

3. “Voice Operated Wheelchair” by Jayesh K.Kokate

Available online at www.ijret.org

4. “Voice and Gesture Based Wheelchair Using AVR and Android” by

D.Pundlik and P.Mahajan

Available online at www.ijettjournal.org

• http://psrcentre.org/images/extraimages/ICECEBE%20113824.pdf

• Wikipedia – Smartphone, http://en.wikipedia.org/wiki/Smartphone

• www.parth-shah.org

• www.nextsapiens.com

• http://eng.usf.edu/alqasemi/android

• http://www.societyofrobots.com

• http://www.electrical4u.com

• http://www.powerelectricalblog.com

• http://en.wikipedia.org

• http://www.slideshare.net/niteshsinghns/embedded-c-working-with-avr-studio

• http://www.resna.org/

• http://en.wikipedia.org/wiki/Human_factors_and_ergonomics

32