Wheelchair is guided by voice commands full documentation

86
School of Applied technological sciences Department of Mechatronics engineering MotoChair: A Fully Motorized Voice-Operated Wheelchair Graduation Project I Report by: Ala’a Dweikat Majd Al Yazori Sa’ed AlDaraghmeh Supervisor by: Dr. Aiman Al-Share’, PhD Dr. Nathir Rawashdeh, PhD Submitted in partial fulfillment of the requirements for the degree of BACHELOR OF SCIENCE in Mechatronics Engineering at The German Jordanian University

description

it's includes a full documentation of the wheelchair project. you can find presentation of this project in the previous upload

Transcript of Wheelchair is guided by voice commands full documentation

Page 1: Wheelchair is guided by voice commands full documentation

School of Applied technological sciencesDepartment of Mechatronics engineering

MotoChair: A Fully Motorized Voice-Operated Wheelchair

Graduation Project I Report

by:Ala’a DweikatMajd Al Yazori

Sa’ed AlDaraghmeh

Supervisor by:Dr. Aiman Al-Share’, PhD

Dr. Nathir Rawashdeh, PhD

Submitted in partial fulfillment ofthe requirements for the degree of

BACHELOR OF SCIENCE

inMechatronics Engineering

atThe German Jordanian University

Amman, JordanSummer 2012

Page 2: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

MotoChair: A Fully Motorized Voice-Operated Wheelchair

A Project by

Ala’a DweikatMajd Al Yazori

Sa’ed AlDaraghmeh

Supervised by:

_______________________, Head of Mechatronics Engineering Dept.Dr. Nathir A. Rawashdeh

_______________________, Mechatronics Engineering Dept.Dr. Aiman Alshare

Evaluated by:

_______________________, Dean, School of Applied Technical SciencesDr. Ziyad N.Masoud

_______________________, Mechatronics Engineering Dept.Dr. Mohammad A. Nazzal

___________________________Date

2

Page 3: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Acknowledgment

First and foremost, all our gratitude is due to Allah the Almighty for guiding us through, and aiding us in completing this work successfully.

We would like to express our sincere gratitude to our supervisors Dr. Aiman AlShare' and Dr. Nathir Rawashdeh, for their help, support and empowerment throughout this project. We would also like to deeply thank and appreciate the Mechatronics department at the German Jordanian University, for providing us with great assistance and insight.

Finally, we would like to thank our families and friends for their love, support and encouragement.

A. DweikatM. Al Yazori

S. AlDaraghmeh

3

Page 4: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Abstract

This project aims to design, integrate, program, interface and test a fully motorized, voice-operated wheelchair. A regular standard wheelchair was used as the main skeleton that has been on modified to meet this project’s goals. In this project, the procedure of Mechatronic systems design was followed to assure the quality of the final product i.e. the MotoChair. The project has consisted of the following parts: Hardware, software, interface and testing. Finally, a working prototype in addition to a complete comprehensive documentation will be submitted prior to a project defence session at the German Jordanian University.

Keywords: Mechatronics engineering, Interface, Assistive technology, Mobility aids, Powerchair, Motorized wheelchair, Voice recognition, Disabled, Battery powered wheelchair.

4

Page 5: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

5

Page 6: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Table of Contents

2.1.1 Advantages of DC series motors.................................................................................................11

2.1.2 Series Motor Operation..........................................................................................................11

2.1.3 Reversing the Rotation...........................................................................................................12

2.2 Power and Torque calculations..................................................................................................13

2.3 Gear Box Calculations:...............................................................................................................15

2.4 Extra pulley calculations:...........................................................................................................15

Gears...........................................................................................................................................15

Belts.............................................................................................................................................16

Chapter 3: Electrical Design.................................................................................................................21

3.1 Drive circuit................................................................................................................................21

3.2 Pulse width modulation PWM...................................................................................................27

3.2.1 PWM Duty cycle and frequency..........................................................................................27

3.2.2 Averaging the PWM microcontroller output......................................................................28

3.3 Voice recognition kit..................................................................................................................28

3.3.1 What is voice recognition?..................................................................................................28

3.3.2 Features of the HM 2007 voice recognition kit...................................................................29

3.4 The Battery................................................................................................................................30

3.4.1 Wheelchair batteries overview...........................................................................................30

Chapter 4: Conceptual Design.............................................................................................................33

4.1 Functional Block diagram of the system....................................................................................33

4.2 Joystick commands flow chart...................................................................................................34

4.3 Voice commands flow chart......................................................................................................35

4.4 Component list..........................................................................................................................36

Chapter 5: Control Method.................................................................................................................37

Chapter 6: Software and Interfacing....................................................................................................38

6.1 Microcontroller selection and programming.............................................................................38

6.2 Voice recognition kit programming...........................................................................................40

Programming...................................................................................................................................40

Testing Recognition.........................................................................................................................40

Chapter 7: Testing and Performance...................................................................................................43

6

Page 7: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

7.1 Actual speed measurement.......................................................................................................43

7.2 accuracy of the wheelchair's voice commands at a quite environment....................................44

7.3 accuracy of the wheelchair's voice commands at a noisy environment....................................45

Chapter 8: Challenges and Difficulties.................................................................................................48

Chapter 9: Further development.........................................................................................................49

Possible additions to this project:........................................................................................................49

References...........................................................................................................................................50

Appendix.............................................................................................................................................51

Components' information and datasheets......................................................................................51

200V N-Channel MOSFET.............................................................................................................51

BJT (2N3055)....................................................................................................................................51

SERIES MOTOR WITH GEAR BOX.....................................................................................................52

PIC 16F877A microcontroller...........................................................................................................52

Battery:............................................................................................................................................53

HM2007 speech recognition:...........................................................................................................54

Voltage Regulator:...........................................................................................................................55

Datasheet from Ibn Sina Center for Medical Equipment and Services............................................56

Software Code.................................................................................................................................57

Extra Pictures...................................................................................................................................62

7

Page 8: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Chapter 1: Introduction

This Document contains information about the project “MotoChair: A Motorized Voice-Operated Wheelchair”. This project is done as a graduation prerequisite for the Bachelor of Science in Mechatronics engineering at the German Jordanian University.

1.1 Project Description

This project aims to design, integrate, program, interface and test a fully motorized, voice-operated wheelchair. A regular standard wheelchair was used as the main skeleton that has been on modified to meet this project’s goals. In this project, the procedure of Mechatronic systems design was followed to assure the quality of the final product i.e. the MotoChair. The project has consisted of the following parts: Hardware, software, interface and testing. Finally, a working prototype in addition to a complete comprehensive documentation will be submitted prior to a project defence session at the German Jordanian University.

Keywords: Mechatronics engineering, Interface, Assistive technology, Mobility aids, Powerchair, Motorized wheelchair, Voice recognition, Disabled, Battery powered wheelchair.

1.2 Objectives

This project aims to:1. Design, integrate, program, interface and test a fully motorized, voice-

operated wheelchair. 2. Apply the major engineering skills and use the engineering knowledge

acquired from the study of Mechatronics engineering.

8

Page 9: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

3. Appreciate the importance of coordinated team work.4. Integrate between the engineering knowledge and the needs of

everyday life.5. Know that any technology gains its importance from the value it adds to

our lives, and from its role in solving a problem or satisfying a need.

1.3 Team

This project was conducted by the following Mechatronics Engineering students at the German Jordanian University as a prerequisite to their graduation, under the supervision and guidance of Dr. Aiman AlShare’, PhD & Dr. Nathir Rawashdeh, PhD.

1. Ala’a Dweikat2. Majd Al-Yazori3. Sa’ed AlDaraghmeh

1.4 The theory behind this project

Assistive Technology (AT), that refers to hardware and software solutions for persons with physical, cognitive or sensory disabilities, can help people to have a more productive and pleasant lives. There are several physical disabilities/conditions which require the use of a wheelchair including brain injury, stroke, fractures, amputation, pulmonary disease, neurological disorders, musculoskeletal diseases/injuries and spinal cord injuries. In such cases the use of a wheelchair can bring an enhanced independence that will increase the user’s quality of life. However some of the impairments cause severe difficulties on the use of wheelchair manual or electric. [1]

In a survey aimed to collect information from patients concerning the usefulness of new electric wheelchairs. The study concluded that 9 to 10 % of patients who use power chairs and who received appropriate training “find it

9

Page 10: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

extremely difficult or impossible to use the wheelchair for activities of daily living”. Some of the pointed reasons are difficulty on controlling the wheelchair with a joystick, uncomfortable and inappropriate interface for the disability (because users with severe motor impairments are unable to operate the joystick smoothly).

For elderly patients arthritis is one of the major reasons for wheelchair use. The repeated usage of joysticks and continuous wrist movements can be very painful for an arthritic patient, and may result in reinforced difficulties. For the referred groups of users a voice based interface is highly encouraging because it represents a natural and simple way of controlling the device. For other types of disabilities different types of interfacing devices can be used.

The first known application of a voice interface for controlling a wheelchair was published by Staton et al.. The voice interface provided basic commands for wheelchair movement and no real world experiences were performed. In 2002 the RoboChair have been developed, with three operating modes: intelligent obstacle avoidance, collision detection, and contour following. It uses mixed voice and joystick inputs and a fuzzy control system. A third-party speech recognition system was used. The VOIC is a Voice Operated Intelligent Wheelchair. The voice recognition uses a neural network for pattern detection with a self organizing architecture. The system was evaluated on two scenarios with distinct users and SNRs (Signal to Noise Ratio). The announced error rate for the 5 words vocabulary, in Slovenian, was 1.8% for a quiet environment and 6.4% with heavy background noise (no SNR was specified). [1]

10

Page 11: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Chapter 2: Mechanical Design

2.1 Series DC motors

In this project two 12V Series DC motors were used. Series motors are commonly used as traction motors in many applications, as they offer high starting torque, are robust, have a simple design and are relatively low cost. Most of their applications are of an industrial nature, such as conveyors, but are also common in road-going electric vehicles. DC series motors are an ideal choice for battery-operated equipment over AC motors, as they don’t require the use of expensive complicated inverter circuitry to convert the DC voltage to an AC voltage required by the motor.

2.1.1 Advantages of DC series motors

• Huge starting torque• Simple Construction • Designing is easy• Maintenance is easy• Cost effective

2.1.2 Series Motor Operation

Operation of the series motor is easy to understand. In Figure 2.1 you can see that the field winding is connected in series with the armature winding. This means that power will be applied to one end of the series field winding and to one end of the armature winding (connected at the brush).

When voltage is applied, current begins to flow from negative power supply terminals through the series winding and armature winding. The armature is not rotating when voltage is first applied, and the only resistance in this circuit will be provided by the large conductors used in the armature and field windings. Since these conductors are so large, they will have a small amount of resistance. This causes the motor to draw a large amount of current from the

11

Page 12: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

power supply. When the large current begins to flow through the field and armature windings, it causes a strong magnetic field to be built. Since the current is so large, it will cause the coils to reach saturation, which will produce the strongest magnetic field possible. [7]

2.1.3 Reversing the Rotation

The direction of rotation of a series motor can be changed by changing the polarity of either the armature or field winding. It is important to remember that if you simply changed the polarity of the applied voltage, you would be changing the polarity of both field and armature windings and the motor's rotation would remain the same.

Figure 2.1: DC series motor connected to forward and reverse motor starter.Thomas E. Kissell. Industrial Electronics, Second Edition. © 2000.

12

Page 13: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

The figure bellow demonstrates a schematic of the series DC motor:

Figure 2.2: Series DC motor schematic

2.2 Power and Torque calculations

The Rotational Speed of each of the available motors = 4000 rpm.

The relation between the rotational speed and power is given by the equation:

Torque= Output PowerRotational Speed

Ea=V t−I a ( Ra+R f )

Ea=12V −12.5 × (0.05Ω+0.02 Ω)=11.125V

Where:

Ea is the armature voltage (Volt).V t is the total voltage (12V).

13

Page 14: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

I a is the armature current (Ampere).Ra is the armature resistance (Ohm).R f is the field resistance (Ohm).

Pd=I a× Ea

Pd=12.5 Amp ×11.125V =139.063W

Where:

Pd is the Electrical power developed inside the motor.

τ e=Pd

ωmotor

= 139.063

2× π×4000

60

=0.33198 N . m

Where:

τ e is the electrical torque developed inside the motor (N.m).ωmotor is the rotational speed of the motor (r.p.m).

ωmotor=2× π ×Number of rotations per minute

60Secondminute

Pout=Pd−P r

Where:

Pout is the mechanical output power of the motor (Watt).Pr is the rotational power losses (%).

τ shaft=Pd−Pr

ωmotor

=τ e × 0.9=0.3 N . m

Where:

τ shaft is the mechanical torque on the shaft.

14

Page 15: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

2.3 Gear Box Calculations:

By using a gear box with a step down ratio = 0.08 we find that:

ωgear=0.08 ×ωmotor=0.08× 4000=320 rpm

Where:

ωgear is the rotational speed of the gear (r.p.m).ωmotor is the rotational speed of the motor (r.p.m).

And:

τ gear=Pout

ωmotor

= 125.666

2× π ×32060

=3.75 N .m

Where:

τ gear is the torque on the gear.

2.4 Extra pulley calculations:

Gears and belts transmit rotary motion from one shaft to another, often changing speed and torque in the process. Gear sets are generally used where the two shafts are close together. Belts and pulleys, or sheaves, on the other hand, link shafts that are farther apart. [15]

Gears A pair of gears reduces speed in proportion to the relative number of teeth. The gear on a motor shaft is typically smaller and has fewer teeth than the one on the machine shaft. The speed ratio is R = NL/NS, where NL = number of teeth in large gear, and NS = number of teeth in small gear. If the large gear

15

Page 16: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

has 40 teeth and the small one 20, the speed ratio is 2:1, and the machine shaft turns once for two turns of the motor shaft. The speed is cut in half, and torque is doubled.

Belts A belt decreases speed in proportion to the diameters of its pulleys or sheaves. The pulley on a motor shaft is typically smaller than the one on the machine shaft. The speed ratio is R = DL /DS, where DL = diameter of large pulley, and DS = diameter of small pulley.

Thus, if the diameters of the two pulleys are 40 in. and 20 in., the speed ratio is 2:1. As before, the speed is cut in half, but the torque is doubled.

The figure bellows shows the Gear drive and the belt drive that transmitters the motion to the wheel through the pulley that is attached to it.

Figure 2.3: Gear drive and Belt drive.Penton Media Inc. © 2012

16

Page 17: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Taking into consideration that the Power output from motor is reserved; it will be transmitted to the pulley with small losses in tension in the belt.

D gear=5cm

D pully=20 cm

Where:

D gear is the diameter of the small pulley attached to the gearbox.D pully is the diameter of the large pulley attached to the wheel.

To find the rotational speed of the large pulley:

D1 n1=D2 n2

0.05 m ×320 rpm=0.2 m× n2−−→ n2=80 rpm

Where:

D1 is the diameter of the small pulley attached to the gearbox.D2 is the diameter of the large pulley attached to the wheel.n1 is the rotational speed of the small pulley attached to the gearbox.n2 is the rotational speed of the large pulley attached to the wheel.

From the power equation:

P2=P1 ×(1−Pr)

P2=125.666 ×(1−0.10)=113.099W

Where:

P1 is the power of the small pulley attached to the gearbox (Watt).P2 is the power of the large pulley attached to the wheel (Watt).

17

Page 18: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Pr is the Frictional power losses in the belt (assumed 10%).

Thus:

τ pulley=Pout

ωmotor

= 113.099

2 × π ×8060

=13.50 N . m

Where:

τ pulley is the torque on the large pulley attached to the wheel.

Velocity of the belt (V belt )=π ×n1× D1

60=π × 320× 0.05

60

V belt=0.8377ms

Where:

V belt is the theoretical velocity of the belt.

Assuming the max load = 100 kg:

τ required=τ losses+(J ×∝)

Where:

τ losses is the torque losses (N.m).J is the second moment of area (kg.m2).∝ is the rotational acceleration.

J=mass ×r2=100 kg×0.3 m2=9kg .m2

Where:

18

Page 19: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

r is the radius of the Wheel (It's diameter = 0.6 m).

The figure bellow shows the speed profile of the wheelchair. The speed profile is obtained from the assumption that the wheelchair will accelerate from 0 to 0.5 m/s speed in 1 second. Then it will continue its motion in a constant speed equals to 0.5 m/s.

012340

0.1

0.2

0.3

0.4

0.5

0.6

Speed Profile of the WheelChair

Speed (m/s)

Figure 2.4: Speed profile of the wheelchair

We want the wheelchair to reach a constant speed of (0.5 m/s) during (1 second):

From profile speed we determine the angular acceleration and then the required torque as follows:

α=ar

Where:

19

Page 20: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

α is the angular acceleration of the Wheel (rad

s2 ).

a is the linear acceleration of the wheel (m

s2).

a=0.5

ms

1 s=0.5

m

s2

α=0.5

m

s2

0.3 m=1.666

rads

τ required=0.8 N .m+9kg

m2×1.666

rad

s2=15 N . m

Because we have 2 motors (one for each wheel) we need a total torque of: 27.0 N.m. This value is based on the extreme conditions of operation, i.e. the belt losses are 10% and the Load = the max load = 100 Kg at the required speed profile.

20

Page 21: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Chapter 3: Electrical Design

The electrical design of this project consisted of motors' drive circuit, battery, Pulse width modulation, the voice recognition kit and the connections between them, in addition to the connection with the joystick and microphone.

3.1 Drive circuit

Drive circuit is a circuit used for the purpose of controlling another circuit of component, in order to control and regulate their operation. Motor drives have been developed to offer power supply for the motors and isolate the electronic components, such as the ICs, from electrical problems.

One popular type of motor drive circuits is the H-Bridge (sometimes called: the Full Bridge). It has been named that because it looks like the letter H when viewed on the discrete schematic. An H-Bridge is an electronic circuit that allows the voltage to be applied on the load in either direction. It is used to allow DC motors to operate in two opposite directions i.e. forward and Backward. The direction of rotation of a series motor can be changed by changing the polarity of either the armature or field winding.

The figure bellow shows a schematic of a simple H-Bridge:

Figure 3.1: simple H-Bridge

21

Page 22: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

© www.mcmanis.com/chuck/robotics/tutorial/h-bridge/

The four sides of the H-Bridge represent four switches that are activated in pairs; (1) High left and Low right, (2) High right and low left. This will result in controlling the current flow direction and therefore the direction of rotation of the motor. In this project two H-Bridges were used; one for each motor.

Four BJT transistors were used as switches for the H-Bridge. They take their signals from the microcontroller through resistors and transmit it to the four relays that control the power supply of the motors, thus deterring the direction of rotation of the motors and consequently the direction of the wheelchair's motion.

The figure bellow demonstrates the connection of the drive circuit:

Figure 3.2: Motors' drive circuit schematic.

22

Page 23: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

The table bellow shows the direction of rotation of the Wheelchair based on the direction of rotation of the two motors.

Left motorRight motorDirection

ON ( CW )ON ( CW )Forward

ON ( CCW )ON ( CCW )Backward

ON ( CW )OFFRight

OFFON ( CW )Left

Table 3.1: Wheelchair motion

Where:CW: ClockwiseCCW: Counter Clockwise

The table bellow shows the direction of rotation of the motors based on the state of the transistors i.e. on – off.

DirectionLeft motor Right motor

Transistor 1 Transistor 2 Transistor 3 Transistor 4

Non 0 0 0 0

Forward 1 0 1 0

Reverse 0 1 0 1

Right 1 0 0 0

Left 0 0 1 0

Table 3.1: the direction of rotation of the motors based on the state of the transistors

23

Page 24: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Drive circuit simulation:

In order to verify our design prior to the circuit's actual construction a computer simulation was conducted using the software: Proteus VSM version 7.6.

Proteus Virtual System Modeling (VSM) combines mixed mode SPICE circuit simulation, animated components and microprocessor models to facilitate co-simulation of complete microcontroller based designs. The simulation takes place in real time (or near enough to it): a 1GMHz Pentium III can simulate a basic 8051 system clocking at over 12MHz. Proteus VSM also provides extensive debugging facilities including breakpoints, single stepping and variable display for both assembly code and high level language source. [12]

The following figure shows the simulation:

24

Page 25: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

25

Page 26: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Figure 3.3: Proteus VSM simulation

The pictures bellow show the actual testing circuit built for this project and the motors relay box:

The relay box

26

Page 27: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

The drive circuit

3.2 Pulse width modulation PWM

Pulse width modulation is used to control the average power that goes a load in a motor. A digital signal is used to generate an analogue output that is intended to go to the motor. It operates by changing the average voltage level through generating a constant frequency signal in which the pulse width is manipulated or changed.

For example, if a the normal digital signal (5V = on , 0V = off) is to be changed to an average of 2.5V, the signal 5V will be on for half of the time. As shown in the figure bellow:

27

Page 28: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Figure : PWM digital output and average output© http://www.best-microcontroller-projects.com/pwm-pic.html

3.2.1 PWM Duty cycle and frequency

The Duty cycle refers to the percentage of time that a signal is high or low. For example, in the upper graph of above figure, the signal is 10% of the time high so the average is low. Whereas in the lower graph, the signal is 90% of the time high so the average is high. In this project the duty cycles 100% and 50% to represent to speeds modes High speed and low speed.

The importance of the frequency of the PWM depends on the driven device; it should be high (KHz) if the target is to create a DC signal. The magnitude of it depends on the desired output, the amount of tolerated error and the use.

3.2.2 Averaging the PWM microcontroller output

We need to average the PWM signal by converting it to a useful analogue signal so that we can benefit from it. This is done by using a capacitor as a low pass filter, in which the output frequency will decrease as the input frequency increases.

28

Page 29: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

3.3 Voice recognition kit

In this project the HM2007 voice recognition kit was used.

3.3.1 What is voice recognition?

Voice recognition is "the technology by which sounds, words or phrases spoken by humans are converted into electrical signals and these signals are transformed into coding patterns to which meaning has been assigned. While the concept could more generally be called "sound recognition", but the focus is on the human voice because we most often and most naturally use our voices to communicate our ideas to others in our immediate surroundings. In the context of a virtual environment, the user would presumably gain the greatest feeling of immersion, or being part of the simulation, if they could use their most common form of communication, the voice. The difficulty in using voice as an input to a computer simulation lies in the fundamental differences between human speech and the more traditional forms of computer input. While computer programs are commonly designed to produce a precise and well-defined response upon receiving the proper (and equally precise) input, the human voice and spoken words are anything but precise. Each human voice is different, and identical words can have different meanings if spoken with different inflections or in different contexts. Several approaches have been tried, with varying degrees of success, to overcome these difficulties. [13]

29

Page 30: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

3.3.2 Features of the HM 2007 voice recognition kit

Single chip voice recognition CMOS LSI.

Speaker –dependent isolates-word recognition system.

External 64k SRAM can be connected directly.

Maximum 40 words can be recognized for one chip.

Maximum 1.92 sec of words can be recognized.

Two control modes are supported: manual and CPU mode.

Response time: less than 300ms

A microphone can be connected directly.

5V single power supply.

The figure bellow shows a schematic of the HM2007 voice recognition kit:

Figure : HM2007 voice recognition kit

30

Page 31: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

© http://www.imagesco.com/speech/sr07schematic.JPG

3.4 The Battery

3.4.1 Wheelchair batteries overview

[http://www.apparelyzed.com/wheelchair/electric-wheelchairs.html]

There are three different battery types that can be used in electric wheelchairs. These are "Wet", "Gel", and the newer "AGM (Absorbed Glass Mat)" types. Their properties are listed below:

Wet Batteries

Wet batteries use the chemical reaction between lead and sulphuric acid to create electrical energy. As the batteries need filling with distilled water, they do have a higher maintenance rate, but are lighter than Gel or AGM batteries. Wet batteries are also prone to leakage, something which is important if you intend to put your wheelchair in the hold of an aircraft.

Positive AspectsCheaper.Less vulnerable to overcharging.Great performance with careful maintenance.Lighter per Ah (Ampere Hour) compared to most Gel or AGMs.

Negative Aspectsrequire maintenance.Battery acid can leak, causing corrosion and damage to chair and wiring.Not approved for airline travel.High rate of self-discharge when left sitting (6-7% per month).

Gel Batteries

Gel batteries contain a mixture of sulphuric acid, fumed silica, pure water, and phosphoric acid, which forms a thixotropic gel. As there is no liquid in the battery, they do not leak or require maintenance like wet batteries.

31

Page 32: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Positive AspectsNo maintenance.Cannot leak.Operate better than wet batteries in low temperatures.Less gas released when charging than wet batteries.Approved for air travel.Longer life cycle than wet batteries

Negative AspectsExpensive.More weight per Ah than wet batteries.Susceptible to overcharging.

AGM Batteries

AGM batteries have an absorbent glass mat sandwiched between the plates, saturated with acid electrolyte, but with none free to spill. This “sandwich” allows uniform distribution of the electrolyte over the plates, and reduces the chance of battery damage caused by vibration and jarring.

Positive AspectsNo maintenance.Can’t spill or leak.Shock resistant.Minimal gasses released when charging.Low self-discharge rate (3% per month at 77’F).Approved for air travel.

Negative AspectsHighest cost.Susceptible to overcharging.

3.4.2 The battery used in this project

In this project a regular car battery (ACDelco 46B24L) was used as a proof of concept; Due the availability of this type, its price and the lack of special electrical wheelchairs' batteries in the market. However, using a car battery is

32

Page 33: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

not a good choice for this application because it is a starting (Cranking) battery; which is designed to deliver quick bursts of energy for short periods of time and is not design for long operation periods. Whereas such application requires a Deep Cycle battery; which has less instant energy, but greater long-term energy delivery. [18]

These are some typical (minimum - maximum) typical expectations for batteries if used in deep cycle service. There are so many variables, such as depth of discharge, maintenance, temperature, how often and how deep cycled, etc. that it is almost impossible to give a fixed number. [19]

Starting: 3-12 months Golf cart: 2-7 years AGM deep cycle: 4-8 years Gelled deep cycle: 2-5 years Deep cycle (L-16 type etc): 4-8 years Industrial deep cycle (Crown and Rolls 4KS series): 10-20+ years. NiFe (alkaline): 5-35 years NiCad: 1-20 years

33

Page 34: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Chapter 4: Conceptual Design

4.1 Functional Block diagram of the system

34

Page 35: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

4.2 Joystick commands flow chart

35

Page 36: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

4.3 Voice commands flow chart

36

Page 37: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

4.4 Component list

Regular Wheelchair (Adult size).

Voice recognition kit.

Drive circuit

o Microcontroller.

o Relays.

o Transistors.

o Resistors.

Voltage regulator to get 5v for microcontroller.

Battery 12v 40A.

2 motors 12.5 A 12V 1/8 HP + A gearbox ( to increase torque and decrease

speed of the motor)

2 Belts ( to connect pulley with motors )

2 pulleys ( to increase torque and decrease speed of motor )

Joystick

37

Page 38: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Chapter 5: Control Method

In this project an open-loop control approach was used in order to reduce the system's complexity. We assumed that the user will control the wheelchair as they see suitable and then adapt to the operation of the system. Although some control on the wheels rotation must be added at least, but this might be solved by manipulating the Pulse width modulation and adding a compensation factor (multiplier) to the software code to make the weaker wheel rotate faster than the other. This will help in overcoming the differences of the speeds of rotation in the wheels.

38

Page 39: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Chapter 6: Software and Interfacing

6.1 Microcontroller selection and programming

A microcontroller is a small computer built for the purpose of executing specific tasks. It is manufactured on a single small integrated circuit (IC) and used mainly in products that require giving the user some degree of control on the operation. Microcontrollers are designed for embedded applications not like the microprocessors or the other general purpose applications.

Microcontroller have many advantages that make it the number one candidate to be used in automatically controlled devices such as remote controls, power tools, office machines, automobile engine control systems and other embedded systems.

Advantages of microcontrollers:

Microcontrollers are cost effective and very cheap to replace while microprocessors are 10 times more expensive.

They require less power. All-in-one: they usually contain a CPU, ROM, RAM and I/O ports.

The above mentioned reasons made it very suitable for us to choose the controller of the wheelchair to be a microcontroller (PIC 16F877A). The code was programmed using MicroBasic programming language and then tested and simulated in the German Jordanian University's Microcontroller and Microprocessor laboratory, before being installed on the PIC microcontroller.

*Check the Appendix for more information about the microcontroller used and to see the software code.

The following Pictures demonstrate the PIC 16F877A microcontroller and its programmer:

39

Page 40: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Figure 6.1: PIC 16F877A microcontroller

Figure 6.2: PIC programmer

40

Page 41: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

6.2 Voice recognition kit programming

When the kit is turned on the HM2007 checks the static RAM periodically. In case that everything is ok, the screen displays "00" and the red light goes on. It is now ready for commands.

Programming

Programming the circuit starts by pressing (on the keypad) the word number that is desired to save a sound command on it. The circuit can save up to 40 words. When the number(s) is pressed on the keypad, the red light goes off and the number will be displayed on the screen. The next step is to press "#" to start saving the sound command. Then the command can be spoken in a clear way. Finally the LED should blink momentarily to show that the command has been saved. The process continues until the desired number of commands (given that it should be within the memory range of the kit) is saved.

Testing Recognition

The circuit is continually listening. Repeat a trained word into the microphone. The number of the word should be displayed on the digital display. For instance if the word "directory" was trained as word number 25. Saying the word "directory" into the microphone will cause the number 25 to be displayed.

Programming our commands:

In our project we saved each command two times (one in a quite environment and the other in a noisier one) to assure that the system will be able to recognize the commands in different situations without the need to implement some sophisticated noise reduction or elimination techniques.

However, this method is not highly reliable and was used as a proof of concept and will be altered in any further development ventures.

41

Page 42: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

42

Page 43: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

The table bellow shows the chosen numbers and the command saved on them:

Command numbersForward 1 2

Backward 3 4Right 5 6Left 7 10Stop 11 12

Table 6.1: Voice kit commands

The following figures show a Picture and a schematic of the keypad, in addition to Pictures of the real voice kit:

Figure 6.3: Voice Kit's Keypad© 2007 Images SI, Inc.

43

Page 44: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Figure 6.4: The voice kit, the display and the keypad

Figure 6.5: Our Voice circuit connected to the drive circuit

44

Page 45: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Chapter 7: Testing and Performance

7.1 Actual speed measurement

The actual speed of the wheelchair was measured in a flat surface with a user weight = 80kg. Several trials were conducted in which the distance crossed was 4m, and the times were recorded. The average time of the trials resulted in 7s per 5 meters. Therefore the theoretical and experimental speeds will be:

(1) Theoretical speed (V theoritical):

π × n1× D1

60=π ×320 rpm ×0.05 m

60=0.8377

ms

(2) Experimental Speed (V experimental):

Weight of the Testing person = 80 kg.

Distance: 5 meters

Time: 7 seconds

V experimental=5 m7 s

=0.7143ms

45

Page 46: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

7.2 accuracy of the wheelchair's voice commands at a quite environment

A series of 10 trials were conducted in a quite environment (indoors with minimum noise), and the responses of the system were observed to test the percentage error of the voice recognition in a quite environment. The results were as follows:

TrialsForwardReverseRightLeftDoneErrorDoneErrorDoneErrorDoneError

Trial 1

Trial 2

Trial 3

Trial 4

Trial 5

Trial 6

Trial 7

46

Page 47: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Trial 8

Trial 9

Trial 10

error10%10%20%20%

7.3 accuracy of the wheelchair's voice commands at a noisy environment

A series of 10 trials were conducted in a noisy environment (outdoors with cars' and surroundings' noise), and the responses of the system were observed to test the percentage error of the voice recognition in a noisy environment. The results were as follows:

TrialsForwardReverseRightLeftDoneErrorDoneErrorDoneErrorDoneError

Trial 1

Trial 2

Trial 3

47

Page 48: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Trial 4

Trial 5

Trial 6

Trial 7

Trial 8

Trial 9

Trial 10

error40%50%60%60%

48

Page 49: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

7.4 Battery life

Due to the fact that the battery used in this project is a regular car starting battery, we could not obtained any scientifically reliable data on its life time per charge; because its operational life was short and we needed to recharge it many times during the testing phase of this project. However, we have contacted some commercial electric wheelchairs suppliers in the market and obtained some data regarding the battery life time per charge (in terms of the distance crossed) of the regular power wheelchairs.

The battery specifications for a commercial electric wheelchair obtained from Ibn Sina Center for Medical Equipment and Services – Amman, Jordan:

Battery : 26AH X 12V X 2pcs. (option: 40AH)

Charger : 24V, 4AMP (Automatic Type)

Battery Weight : 20 Kgs (10Kgs X 2pcs.)

Continues travelling distance: 21 Km (Option 40AH batteries: 33Km)

*The data above are intended to illustrate the normal battery life per charge for one of the available commercial electric wheelchair, and may not apply to the case of this project due to differences in other factors.

To see the complete datasheet, refer to the Appendix.

49

Page 50: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Chapter 8: Challenges and Difficulties

Throughout the making of this project we encountered several challenges difficulties. Some of them we were able to manage, but others we were not. The major challenge was to find and obtain the required components from the Jordanian market especially the motors and the battery.

Also we encountered a great challenge in finding the suitable pulleys and fixing them to the wheels without affecting the motion of the wheels. Several trials were done but none was successful. In order to overcome this obstacle, we had to design a new mechanism for the wheels in which a new shaft was made using a turning machine, then two sets of bearings were added to the shaft outside the wheel. Thus we were able to fix the pulleys with the wheels without affecting the motion of the latter ones.

The battery was another challenge and it very hard to find a suitable battery for the electric wheelchair application, in an affordable price. Batteries of this kind can be found at the medical equipment supplier but with very expensive prices. Therefore we used a regular battery for the purpose of proving the concept.

Finally, we faced several difficulties in programming and debugging the software. The major one was that at the beginning after the code was simulated and verified, it did not work in the real application. We tried countless times to fix this problem and changed several PIC microcontrollers but this did not solve the problem. After a long period of trials we found that the voltage regulator was corrupted (the microcontroller was not getting the required 5V) and needed to be replaced!

50

Page 51: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Chapter 9: Further development

After working on this project, we found that the electric wheelchair market in Jordan is far away from saturation and it still needs a lot of contributions in this area. This project can be –with a small effort- commercially worthwhile.

The major area of necessary improvement is the noise elimination in order to get the best voice operation functionality. Many sophisticated methods can be used such as Real-time adaptive noise cancellation for automatic speech recognition, but an excellent quality microphone with noise isolation may be sufficient.

Also a well reliable control method is very essential to this project and the safety of its user. A PID controller may be added in addition to torque sensors and speed feedback to ensure the perfect operation of the system in all environments especially starting, stopping and breaking at inclined surfaces.

Possible additions to this project:

After completing the major milestones of this project, one or more of the following feature might be added to it.

1. Emergency stop system.2. User Bio-Feedback.3. Foldable multi-purpose table.4. GPS emergency system (GPS/E911).5. Solar battery charging.

51

Page 52: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

References

[1] Coelho, L & Braga, D. zGo: A Voice Operated Wheelchair with Biosignal Monitoring for Home Environments. Proceedings of the 2th International Conference on Software

Development for Enhancing Accessibility and Fighting Info-Exclusion, June 3-5, Porto Salvo, Portugal. 2009. http://www.danielabraga.com/PDF/DSAI09_3.4.p84.pdf

[2] Mano, M et al.. Wheelchair for physically disabled people with voice, ultrasonic and infrared sensor control. Aotonomous Robotics, 2, 203-224. 1995.

[3] http://en.wikipedia.org/wiki/Motorized_wheelchair

[4] http://www.nskelectronics.com/files/hm2007_voice_recog_kit.pdf

[5] http://www.imagesco.com/articles/hm2007/SpeechRecognitionTutorial02.html

[6] http://zone.ni.com/devzone/cda/ph/p/id/53

[7] http://www.lmphotonics.com/DCSpeed/series_dc.htm

[8] http://www.rehab.research.va.gov/

[9] http://electric-wheelchairs-pro.com/

[10] http://www.robotroom.com/HBridge.html

[11] http://www.mcmanis.com/chuck/robotics/tutorial/h-bridge/

[12] http://www.labcenter.com/index.cfm

[13] http://www.hitl.washington.edu/scivw/EVE/I.D.2.d.VoiceRecognition.html

[14] http://www.engineersgarage.com/microcontroller/

[15] http://www.microchip.com/pagehandler/en-us/family/16bit/architecture/home.html

52

Page 53: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Appendix

Components' information and datasheets

200V N-Channel MOSFETIRF640B

Features:

18A, 200V, RDS(on) = 0.18Ω @VGS = 10 V

Fast switching

BJT (2N3055).

Ic maxVcE maxhFE minPtot maxCategory(typical use)

53

Page 54: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

15 A60 V20117 WGeneral purpose, high

power

SERIES MOTOR WITH GEAR BOX

The name plate:

Vn (V)In (A)n1 Before gear box

n1 After gear box

Rg no.

1212.54000 rpm320 rpm11AIM186002

PIC 16F877A microcontroller.

Pin diagram:

54

Page 55: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Feature for PIC 16F877A:

Key featurePic 16F877AOperating frequencyDC – 20 MHzResets ( and delays)POR, BOR (PWRT,OST)

FLASH program memory (14-bit words)

8K

Data memory (bytes)368EEPROM Data memory (bytes)256

interrupts15I/O portsPorts A,B,C,D,ETimers3

Capture/Compare/PWM modules2Serial communication MSSP,USART

Parallel communicationPSP10-Bit Analog-to-digital module8 input channels

Analog comparators2Instruction set35 instructions

packages40-pin PDIP

Battery:

55

Page 56: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

HM2007 speech recognition:

Features for HM2007:

Single chip voice recognition CMOS LSI.

Speaker –dependent isolates-word recognition system.

External 64k SRAM can be connected directly.

Maximum 40 words can be recognized for one chip.

Maximum 1.92 sec of words can be recognized.

Two control mode is supported: manual and CPU mode.

Response time: less than 300ms

A microphone can be connected directly.

5V single power supply.

56

Page 57: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Voltage Regulator:

Electrical Characteristics (KA7805)

(Refer to test circuit, 0°C < TJ < 125°C, IO = 500mA, VI =10V, CI= 0.33μF, CO=0.1μF, unless otherwise specified)

57

Page 58: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Datasheet from Ibn Sina Center for Medical Equipment and Services

58

Page 59: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

59

Page 60: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Software Code

Program wheelchair

dim j as bytedim v as byte

main:

trisb = $ff 'define port b as input trisd = $ff 'define port d as input trisc = $00 'define port c as output pwm_init (5000) 'initialize the PWM with a desired frequency in Hz pwm_start 'starts PWM

if portd.3 = 1 then 'check the selector button if pressed or no delay_ms (300) goto joy

else delay_ms (300) goto voice end if

joy:while true j = portd 'the four direction of joystick and the selector button(selector d3)

60

Page 61: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

select case j

case $18 'leftpwm_change_duty(90) 'changes PWM duty ratio portc.4 = 0 'output to transistor1 portc.5 = 0 'output to transistor2portc.6 = 1 'output to transistor3 portc.7 = 0 'output to transistor4

case $28 'right pwm_change_duty(90) 'changes PWM duty ratio portc.4 = 1portc.5 = 0portc.6 = 0portc.7 = 0

case $48 'forwardpwm_change_duty(240) 'changes PWM duty ratio portc.4 = 1portc.5 = 0portc.6 = 1portc.7 = 0

case $88 'backwardpwm_change_duty(90) 'changes PWM duty ratio portc.4 = 0portc.5 = 1portc.6 = 0portc.7 = 1

case else 'if we not press any button portc.4 = 0portc.5 = 0portc.6 = 0

61

Page 62: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

portc.7 = 0

end select

delay_ms(200)

if portd.3 = 0 then 'Confirmation of the selector case goto voiceend ifwendvoice: portc.4 = 0 'output to transistor1 portc.5 = 0 'output to transistor2 portc.6 = 0 'output to transistor3 portc.7 = 0 'output to transistor4while true v = portb 'the output of SRC select case v

case $81,$82 'forward pwm_change_duty(240) 'changes PWM duty ratio portc.4 = 1 portc.5 = 0 portc.6 = 1 portc.7 = 0 delay_ms(1000)

case $83,$84 'backward pwm_change_duty(90) 'changes PWM duty ratio portc.4 = 0 portc.5 = 1 portc.6 = 0 portc.7 = 1 delay_ms(1000)

62

Page 63: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

case $85,$86 'right pwm_change_duty(90) 'changes PWM duty ratio portc.4 = 1 portc.5 = 0 portc.6 = 0 portc.7 = 0 delay_ms(1000)

case $87,$90 'left pwm_change_duty(90) 'changes PWM duty ratio portc.4 = 0 portc.5 = 0 portc.6 = 1 portc.7 = 0 delay_ms(1000)

case $93,$94 'speed pwm_change_duty(255) 'changes PWM duty ratio portc.4 = 1 portc.5 = 0 portc.6 = 1 portc.7 = 0 delay_ms(1000)

case $91,$92 'stop portc.4 = 0 portc.5 = 0 portc.6 = 0 portc.7 = 0 delay_ms(500)

case else 'for any disturbance

63

Page 64: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

portc.4 = 0 portc.5 = 0 portc.6 = 0 portc.7 = 0 end select

if portd.3=1 then 'Confirmation of the selector casegoto joyend if

wend

end.

64

Page 65: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

Extra Pictures

65

Page 66: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

66

Page 67: Wheelchair is guided by voice commands full documentation

MotoChair: A Fully Motorized Voice-Operated Wheelchair 2012

67