Вы находитесь на странице: 1из 81

Hybrid Wheelchair

Department of Electrical and Mechanical Engineering


Faculty of Engineering and Architecture
American University of Beirut

Final Year Project


Spring 2005-2006

Advisor: Dr Ahmad Smaili


Co adviser: Dr Fouad Mrad

Group: Jackie Fares


Elias Achkar
Ramzi Stephan
Hussein Hajo

Submited on: 23.05.2006


FYP Hybrid Wheelchair Spring 05/06

2
FYP Hybrid Wheelchair Spring 05/06

Dedication
We only have to remember the smile on their faces when we met them for the first time.
We only have to remember how excited they were when we told them about our FYP.
We only have to remember their words “we are here for you; we want you to be here for
us”.
We only have to remember the staff at “Arc en Ciel” to make our dream came into
reality.
Members of the staff at “Arc en Ciel” represented for us more than just an inspiration;
they taught us that everyone among us can achieve a dream. They helped us dream about
tomorrow when we saw their dreams about today.
We cannot but offer them our hard work our hopes for success our determination for
excellence.
We cannot but thank them for what we came up with throughout this year.
We cannot but give them our hybrid wheelchair because our dream was theirs.
Finally, for our FYP to become an important invention it should go back home, the home
where it originally came from, to “Arc en Ciel”.

3
FYP Hybrid Wheelchair Spring 05/06

Acknowledgement

First and foremost, we would like to thank our Final Year Project (FYP) supervisor,
Professor Ahmad Smaili, for his support and assistance in guiding us throughout this
project. Besides just putting up with us, he was always able to give us insightful
feedback, whatever the problem was.
We would also like to thank Professor Fouad Mrad for feeding us with constructive
suggestions and comments.
Special thanks to Dr. Elie Zeitouni for providing us with his laboratory and helping us in
designing and implementing the H bridges.
Special thanks to both Mr Elie Yaacoub and Mr. Andre Mhewij for granting us with
access to their workshops which we used for implementing our wheelchair.
A special thanks to our colleague Ali Bazzi for helping us with the H Bridge design.
A special thanks to Mr khaled Joujou and Ahmad Farchoukh for their continuous
guidance.
Warm thanks to “Arc en Ciel” for donating us the chassis of the wheelchair along with
the DC motors.
Finally, we would like to thank the coordinators of the FYPs, Professor Jean Saade and
Professor Marwan Darwish, for heir time in organizing and coordinating the projects. We
are also grateful to the departments of Mechanical and Electrical Engineering for making
this FYP possible.

4
FYP Hybrid Wheelchair Spring 05/06

5
FYP Hybrid Wheelchair Spring 05/06

Abstract
In our final year project, we are looking at a problem that a small portion of the
population faces, this portion represents the “disabled”. Before choosing the topic of our
project, the whole group members were determined to make use of our final year project
for a good cause. Noticing that the disabled people in Lebanon get very little attention
from authorities, we decided to aim our project towards them in order to help as much as
we can. Our influence might end up being minimal, but remember that a ten kilometer
walk starts with a small step. Disabled people rely heavily on their wheelchairs for
transportation. The wheelchair frees them from their burdens and constraints and
provides them with mobility. It has become a necessity to all, such that they cannot live
without it anymore. For all these reasons, and in order to start a change, we decided to
concentrate our effort on pinpointing the weaknesses in wheelchairs and improving them
as much as we can. Our project will mainly feature one major idea in accordance with a
few minor ones. The major idea that we will be trying to implement is to introduce the
hybrid wheelchair for the first time. By hybrid we mean that the wheelchair will be
provided by two sources of power, a battery (electric) that works in conjunction with a
combustion engine (gasoline) in order to improve efficiency, power output, mileage, and
range of the electric wheelchair. This major idea tends to be solving in first place the
range that an electric wheelchair is limited by. Knowing that electric wheelchairs work on
batteries and have to be recharged continuously, they become bounded with a certain
range that they cannot surpass. What we are aiming for is to design a wheelchair that is
able to run outdoors, and is also able to run for long hours. In addition to this major idea,
we will be working on several issues which include designing and building the whole
body of the wheelchair from scratch, and implementing some new, unique, and intelligent
control systems that make navigation easier.

6
FYP Hybrid Wheelchair Spring 05/06

Table of Contents
Dedication .......................................................................................................................... 3
Acknowledgement ............................................................................................................. 4
Abstract.............................................................................................................................. 6
Table of Contents .............................................................................................................. 7
Chapter 1 ......................................................................................................................... 11
Introduction....................................................................................................................... 11
1.1 Problem Definition............................................................................................ 12
1.2 Management Summary ..................................................................................... 12
Chapter 2 ......................................................................................................................... 14
Literature Review.............................................................................................................. 14
2.1 Electric Wheelchair........................................................................................... 15
2.1.1 Basic Styles............................................................................................... 15
2.1.2 Indoor vs. Outdoor Use............................................................................. 15
2.1.3 Methods of Propulsion.............................................................................. 15
2.1.5 Electric Wheelchair Battery Types ........................................................... 17
2.1.6 Electric Wheelchair DC Motor Types ...................................................... 18
2.2 Hybrid Vehicles ................................................................................................ 19
2.2.1 Definition ......................................................................................................... 19
2.2.2 How Hybrid Cars Work ............................................................................ 20
2.2.3 Parallel and Series Hybrid ........................................................................ 21
2.2.4 Computer Control ..................................................................................... 22
2.2.5 Battery Charge and Discharge .................................................................. 23
2.2.6 Pros and Cons of Hybrid Vehicle ............................................................. 24
Chapter 3 ......................................................................................................................... 26
3.1 Mechanical Solution ......................................................................................... 29
3.1.1 Choosing the DC Motors .......................................................................... 29
3.1.2 Designing the Chassis for the Electric Wheelchair................................... 33
3.1.3 Choosing the Recharging Technique ........................................................ 34
3.1.4 Picking a Combustion Engine................................................................... 35
3.1.5 Picking the Alternator ............................................................................... 36
3.1.6 Installing the Alternator on the Combustion Engine ................................ 37
3.1.7 Designing the Chassis for the Combustion Engine and the Alternator .. 37
3.1.8 Designing the Chair .................................................................................. 38
3.1.9 Designing a Cover that Provides Insulation to both Sound and Heat....... 38
3.2 Control Design and Implementation................................................................. 39
3.2.1 PWM and Speed Control Principle........................................................... 39
3.2.2 Control Components ................................................................................. 40
3.3 Electrical Solution and Implementation............................................................ 48
3.3.1 The Wheelchair Battery Type................................................................... 48
3.3.2 Batteries Connections ............................................................................... 49
3.3.3 Alternator Connections ............................................................................. 49
3.3.4 Battery Charge Level Detector ................................................................. 49
3.3.5 DC Motor-Driver H-Bridge Circuit .......................................................... 50

7
FYP Hybrid Wheelchair Spring 05/06

3.3.5.1 Definition .............................................................................................. 50


3.3.5.2 Design and Implementation of the H Bridge ........................................ 51
3.3.5.3 Type and Connection of the MOSFETs................................................ 52
3.3.5.4 Need for Drivers ................................................................................... 53
3.3.5.5 Use of Regulators.................................................................................. 54
3.3.5.6 Types of Capacitors Used ..................................................................... 55
3.3.5.7 Choosing the Main Components........................................................... 56
3.3.5.8 Operation of the H Bridge Circuit ........................................................ 57
3.3.6 Main Control Circuit................................................................................. 60
3.3.6.1 Use of 16 MHz Crystal Oscillator ........................................................ 60
3.3.6.2 Use of Regulator ................................................................................... 60
3.3.6.3 AND Gate ................................................................................................. 60
3.3.6.4 Use of Relays ........................................................................................ 61
3.4 Connection of the Electronic Circuits............................................................... 63
3.5 Control Panel .................................................................................................... 64
Chapter 4 ......................................................................................................................... 66
Financial Analysis............................................................................................................. 66
Chapter 5 ......................................................................................................................... 67
Project Tasks..................................................................................................................... 67
Chapter 6 ......................................................................................................................... 68
Conclusion and Improvements ......................................................................................... 68
Glossary ........................................................................................................................... 69
Appendix A ...................................................................................................................... 71
MOSFET Datasheet .......................................................................................................... 72
Driver Datasheet ............................................................................................................... 73
12V Regulator Datasheet .................................................................................................. 74
5V Regulator Datasheet .................................................................................................... 75
AND Gate Datasheet......................................................................................................... 76
Pic Basic Code .................................................................................................................. 78

8
FYP Hybrid Wheelchair Spring 05/06

List of Figures
Figure 1: A proE drawing of our Hybrid Wheelchair....................................................... 11
Figure 2: Electrical Wheelchair available on the market today [12] ................................ 14
Figure 3: Methods of propulsion [1]................................................................................. 16
Figure 4: Parallel hybrid model [5]................................................................................... 22
Figure 5: Series hybrid model [5] ..................................................................................... 22
Figure 6: Parts of our wheelchair...................................................................................... 26
Figure 7: Leroy Somer DC Motor .................................................................................... 33
Figure 8: Main chassis ...................................................................................................... 34
Figure 9: Removed wires and unused items ..................................................................... 35
Figure 10: 250 CC ICE ..................................................................................................... 36
Figure 11: The wheelchair alternator................................................................................ 36
Figure 12: Base of the alternator....................................................................................... 37
Figure 13: ICE cover......................................................................................................... 38
Figure 14: Electrical and Control System......................................................................... 39
Figure 15: PIC16F877A.................................................................................................... 40
Figure 16: Microcontroller Block Diagram ...................................................................... 41
Figure 17: The wheelchair joystick................................................................................... 41
Figure 18: Operational region of the joystick ................................................................... 45
Figure 19: Ramp function of Current Voltage.................................................................. 46
Figure 20: Batteries of the wheelchair .............................................................................. 48
Figure 21: Battery charge level indicator.......................................................................... 50
Figure 22: Simple conceptual schematic of an H-Bridge [8] ........................................... 50
Figure 23: Ceramic capacitors [6]..................................................................................... 55
Figure 24: Chemical capacitors [6]................................................................................... 56
Figure 25: Conceptual design ........................................................................................... 58
Figure 26: H Bridge PCB.................................................................................................. 59
Figure 27: AND Gate conceptual operation ..................................................................... 61
Figure 28: Main control circuit ......................................................................................... 62
Figure 29: Electronic circuits............................................................................................ 63
Figure 30: Control panel design........................................................................................ 64

9
FYP Hybrid Wheelchair Spring 05/06

List of Tables
Table 1: Relation between Joystick, Speed and Direction................................................ 43
Table 2: Primary Required Voltage on the Motors........................................................... 44
Table 3: Added Voltage .................................................................................................... 44
Table 4: Four Useful Connections .................................................................................... 51
Table 5: Four Useful Connections .................................................................................... 56
Table 6: H-Bridge inputs and direction of rotation........................................................... 60
Table 7: Summary Table of AND Gate ........................................................................... 61
Table 8: Cost Analysis ...................................................................................................... 66
Table 9: Project Tasks....................................................................................................... 67

10
FYP Hybrid Wheelchair Spring 05/06

Chapter 1
Introduction

Figure 1: A proE drawing of our Hybrid Wheelchair

11
FYP Hybrid Wheelchair Spring 05/06

1.1 Problem Definition


Last summer two members of the group were doing their internship at the University of
Madison-Wisconsin, and in order to go to work daily, they had to walk down the
highway for about fifteen minutes. On their way, they noticed that in the middle of the
highway lie two parallel yellow lines about a meter and a half wide. Later on, they saw
one day an electric wheelchair passing through these two lines. It turned out that this lane
was marked specifically for electric wheelchairs, and that is how all things started. They
inquired more about the subject and got to know that these lanes are made specifically for
wheelchair users, and run all the way on the highways of the city of Madison. Then one
thought led to another, and soon we were criticizing this method and defining problems.
We asked ourselves one question: how far can these electric wheelchairs run in the
outdoors without being charged, and how can they make use of those long range
highways? That is how we formulated our problem. It spurted out of a need, a need which
is the desire to use wheelchairs for long hours without being recharged. Asking some
disabled people a couple of questions, we concluded that their electric wheelchairs
actually do provide them with a long range, but the problem is that they sometimes forget
to recharge the batteries, or never go on far trips out of fear that they might face a type of
terrain that they cannot surpass. What we want to present for these disabled people is the
opportunity to run their wheelchair for days without the burden of thinking about the
charge of the batteries. We want to give them peace of mind, freedom, allow them to go
on long trips and enjoy their time without having to constantly check their charge and
range left. So our major problem and the one that we intend to solve are to remove the
range boundaries that keep haunting wheelchair users.

1.2 Management Summary


The problem we are facing and trying to solve is the problem disabled people face
whenever they get on their wheelchairs. “How much charge is there left in my batteries?”
and “What is the range that I can safely travel before I lose power?” These questions
describe this problem, which is best defined as the limited range that disabled people face

12
FYP Hybrid Wheelchair Spring 05/06

when using their wheelchair. What we aimed for through our Final Year Project is to
solve this problem by designing and building the first ever hybrid wheelchair. By hybrid
we mean that our wheelchair will be powered by two sources of energy: electrical and
gasoline. The way we went around in achieving our goal is by placing a 250 cc gasoline
engine on a specially made chassis that absorbs vibrations to the back of an electric
wheelchair. In addition to absorbing vibrations, the chassis and the engine are fully
covered and are well insulated to minimize noise and heat radiation. A 28.4 volts, 100
amps alternator is connected to the engine through a 13 degree conic belt. Thus, when the
engine is turned on, the alternator is rotated and power is generated. On the front part of
our wheelchair two 12 volt batteries are placed in series. The generated electricity is
directed towards the batteries and is made use of to recharge them. The wheelchair is
fully controlled by a joystick placed near the left hand rest. Next to the right hand rest
there is a control panel that contains all of the switches and battery charge level indicator.
So in general, we have achieved our goal of building and implementing our design and as
a result, we lay today our hands on the first ever fully functional hybrid wheelchair.

13
FYP Hybrid Wheelchair Spring 05/06

Chapter 2

Literature Review

Figure 2: Electrical Wheelchair available on the market today [12]

14
FYP Hybrid Wheelchair Spring 05/06

2.1 Electric Wheelchair


Electric wheelchairs appeared in the 1950s. Today's models are better described as
electronic chairs rather than electric chairs. Electronic circuitry allows for a control of
speed and a precise control of direction.

2.1.1 Basic Styles

Many of today's sophisticated electric wheelchairs conform to two basic styles.


The first is called the traditional style and consists of a power source mounted behind or
underneath the seat of the wheelchair. As the name implies, the traditional unit looks very
much like a manual wheelchair.
The second design is known as a platform chair. In this design, the seating area, which
can often be raised or lowered, sits on top of the power source.

2.1.2 Indoor vs. Outdoor Use

There are several groups of powered wheelchairs, based on the intended use. Wheelchairs
designed strictly for indoor use have a smaller area between the wheels, allowing them to
negotiate the tighter turns and more confined spaces of the indoor world. Other designs
allow the electric wheelchair to be used both indoors and outdoors, on sidewalks,
driveways, and hard, even surfaces. Finally, some electric wheelchairs are able to
negotiate more rugged terrain such as uneven, stony surfaces.

2.1.3 Methods of Propulsion

Wheelchairs are classified according to the drive wheel location relative to the system
centre of gravity (chair and user). The following are the three basic methods of
propulsion:

15
FYP Hybrid Wheelchair Spring 05/06

• Rear Wheel Drive Wheelchair


This is the most common method of drive for an electric wheelchair. The drive wheels
are located behind the center of gravity while the front wheels are casters. This method
makes the wheelchair fast, but can give a poor turning capability when compared to front
and mid wheel drive chairs.

• Center Wheel Drive Wheelchair


This method of drive is the best method of drive for an electric wheelchair. The drive
wheels are directly below the center of gravity while the front and rear wheels are casters.
The wheelchair can be a little unsteady when starting and stopping but it could not be
suitable for uneven surfaces.

• Front Wheel Drive Wheelchair


This method of drive gives a lower top speed than rear wheel drive chairs, but offers a
good turning capability. The drive wheels are in front of the center of gravity while the
rear wheels are casters. [1]

Figure 3: Methods of propulsion [1]

16
FYP Hybrid Wheelchair Spring 05/06

2.1.5 Electric Wheelchair Battery Types

There are three different battery types used in wheelchair. 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. These batteries need to be filled with distilled water, and they do have
a higher maintenance rate, but are lighter than Gel or AGM batteries. [10]

Positive Aspects
Cheaper
Less vulnerable to overcharging
Great performance with careful maintenance
Lighter per Ah compared to most Gel or AGM’s

Negative Aspects
Require 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. [10]

Positive Aspects
No maintenance
Cannot leak
Operate better than wet batteries in low temperatures

17
FYP Hybrid Wheelchair Spring 05/06

Less gas released when charging than wet batteries


Approved for air travel
Longer life cycle than wet batteries

Negative Aspects
Expensive
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 type of batteries reduces the chance
of battery damage caused by vibration and jarring. [10]

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

Negative Aspects
Highest cost
Susceptible to overcharging
New technology

2.1.6 Electric Wheelchair DC Motor Types

Most power wheelchairs currently utilizes PM motors with iron magnets, brushes and
indirect drive trains. Recent innovations within the power wheelchair industry include the
use of rare earth magnets; and brushless, gearless, direct drive motors.

18
FYP Hybrid Wheelchair Spring 05/06

Rare earth magnets support much higher magnetic fields than iron magnets. Motors
utilizing rare-earth magnets are smaller and lighter and more powerful than analogous
motors with iron magnets.
Brushless motors are more efficient than brush motors (brushes introduce electrical
power loss). Brushes are also subject to wear and require regular inspection and
replacement.
Gearing and belts in the indirect drive train are a source of mechanical power loss. Highly
efficient, gearless, direct drive motors have recently appeared in the power wheelchair
market. These motors can be mounted in close to the drive wheels and allow good access
to the under seat compartment. However, these motors tend to be relatively large and
expensive.

The following list includes some of the motor technologies that have been suggested.
• A brushless, gearless motor, entirely contained within the power wheelchair’s
drive wheel.
• Pancake stepping motors efficiently generate high torque, even at high speeds.
These motors are durable and reliable.
• Disc-armature DC motors have high power to weight ratio and efficiency.
• Alternating current, three phases, squirrel cage induction motors (SCIM) are
inexpensive, efficient, highly reliable, and have a torque speed characteristic very
adequate for vehicle propulsion.

2.2 Hybrid Vehicles

2.2.1 Definition

A hybrid car is a vehicle that uses a combination of at least two different fuel sources for
its propulsion. Although many combinations are possible, generally when people are
talking about hybrid cars, they are referring to cars with a combination of

19
FYP Hybrid Wheelchair Spring 05/06

• A gasoline internal combustion engine


• An electric motor
• A battery that powers the electric motor and stores energy for future use.
Hybrid cars may also be called gas-electric hybrids. Some examples of current hybrid
cars include the Toyota Prius, Honda Civic Hybrid (HCH), and the Honda Insight.

2.2.2 How Hybrid Cars Work

Hybrid cars work by seamlessly integrating a gas engine, an electric motor and a high-
powered battery. The battery provides power for the electric motor and is recharged by
recapturing energy that would normally be lost when decelerating or coasting. This
recapturing of energy is called regenerative braking. If needed, power from the gas
engine can be diverted to recharge the battery as well. Because of these charging
strategies, hybrid cars never need to be plugged in. [2]
To understand how the gas engine, electric motor and battery work together, it is best to
divide hybrids into two categories: mild hybrids and full hybrids. Each has its own
approach to incorporating the three components.

• Full Hybrid
In full hybrids the gas engine, electric motor, and battery work together.
When a full hybrid is started the battery typically powers all the accessories. The gasoline
engine is used only if the battery needs to be charged or more power is needed than the
battery can supply.
At lower speeds the electric motor can operate independently. Then at higher speeds the
gasoline engine takes over.
During slow acceleration, reversing, and continuous slow speeds the batteries power the
electric motor. Only if the battery needs to be charged will gasoline engine be used.
When the vehicle is moving at mid-range speeds or accelerating both the eclectic motor
and gasoline engine are used.
Braking in hybrid vehicles is different than in conventional vehicles. Regenerative
braking, as it is called, converts energy that would be wasted in conventional vehicles, to

20
FYP Hybrid Wheelchair Spring 05/06

electricity and stores it in the battery. When slowing the electric motor is reversed so the
electricity the rotating wheels are actually turning the motor, rather than vice versa. When
the car actually stops, conventional friction brakes are applied where both the gasoline
engine and electric motor shut off, though the battery continues to power auxiliary
systems. [3]

• Mild Hybrid
In mild hybrids the electric motor depends on the gas engine for power, though the
electric motor can generate electricity. When a mild hybrid vehicle is started the gasoline
engine warms up. The gasoline engine powers the vehicle when it is moving at a constant
rate, such as highway driving. During periods of acceleration the gasoline engine and the
electric motor are both utilized to propel the vehicle. Mild hybrid also utilizes
regenerative breaking.
Mild hybrid systems can be broken down into subcategories:

The Stop/Start hybrid system is not true hybrids since electricity is not used to propel
the vehicle. However, the electric motor is used when the vehicle is stopped.

The Stop/Start hybrid system is not true hybrids since electricity is not used to propel
the vehicle. However, the electric motor is used when the vehicle is stopped.

The Integrated Starter Alternator with Damping (ISAD) hybrid system allows the
electric motors to help move the vehicle in addition to providing stop/start capability.

The Integrated Motor Assist (IMA) hybrid system is similar to the ISAD but has a
larger electric motor and more electricity can be used to help move the vehicle. [3]

2.2.3 Parallel and Series Hybrid

Most hybrids use a combination of mechanical and electrical power to move a vehicle.
These two systems work together to deliver energy to the wheels. Manufacturers are
using two different design approaches, either a Parallel or Series system.

21
FYP Hybrid Wheelchair Spring 05/06

• Parallel Hybrid
In a parallel system the battery and engine are both connected to the transmission. As a
result either the battery via the electric motor, or the engine directly to the transmission,
or a combination of both, can provide propulsion power.

Figure 4: Parallel hybrid model [5]

• Series Hybrid
In the series type the gasoline engine turns a generator, and the generator can either
charge the batteries or power an electric motor that drives the transmission. Thus, the
gasoline engine never directly powers the vehicle. However, today’s hybrids are all
parallel hybrids.

Figure 5: Series hybrid model [5]

2.2.4 Computer Control

For the entire ride, the computer will be calculating when to let the gasoline engine do all
the work and how much of a boost it needs from the electric motor. Because of the

22
FYP Hybrid Wheelchair Spring 05/06

intermittent assist from the electric motor, the gasoline engine can achieve basically the
same performance as a conventional car despite its smaller, more efficient size.

2.2.5 Battery Charge and Discharge

Where is the electric motor getting its power? It’s actually getting and giving power back
and forth from a set of nickel metal hydride batteries. Once again, the computer is
playing an important role by knowing when to reclaim excess energy when breaking the
wheels with the electric motor (which is now working like a generator). It also knows
when to pass power from the battery to the electric motor for acceleration. The computer
is monitoring the amount of charge in the batteries, making sure that they never charge
over 80% and never under 30% of their capacity. In this way, the batteries will last a
couple of hundred thousand miles.

• Recharging Batteries
The batteries found in conventional cars and in hybrid cars are both rechargeable. The
difference is in the construction of the batteries interior and the amount of energy the
battery can store.

A hybrid car uses a conventional lead acid battery. But a hybrid car also has a
rechargeable battery, which is constructed quite differently. It is what is called a deep
cycle battery. The internal construction of the battery allows it to be fully discharged and
recharged over and over again. It is very similar to a battery used in electric vehicles such
as GM’s EV1 or a golf cart or new-fangled electric personal scooters. The difference is
that electric vehicles need a lot of stored energy, since the stored electrical energy is the
only fuel the vehicle has to make it move down the road.

These batteries are very large and heavy. For an example, the battery pack in the Electric
Ranger battery build by Ford in the late 1990s was 1600 pounds. These batteries carried a

23
FYP Hybrid Wheelchair Spring 05/06

serious amount of energy. Most of these battery packs are a series of smaller batteries
connected together in a series array that adds up to a higher voltage.

The hybrid car uses a mixture of today’s gasoline engine and the battery found in electric
vehicles (EV), which never found acceptance in the passenger car market. The hybrid
battery has evolved a generation or two since the EV days. Today Nickel-Metal-Hydride
(NiMH) is being used for hybrid batteries instead of lead acid to reduce the weight and
deliver more energy from a smaller package. Because a hybrid also uses a gas engine, the
size of the battery is not as large as a pure electric vehicle EV battery. On vehicles such
as the Honda Civic and Insight, and the Toyota Prius, the hybrid battery voltages are 300
volts or greater. Where the starter battery in a typical car was measured by cranking
amps, hybrid batteries are measured by kilowatt-amp-hours. [4]

2.2.6 Pros and Cons of Hybrid Vehicle

Pros of Hybrid Vehicles

• Hybrids emit up to 97% less toxic emissions and half as much greenhouse-
causing carbon dioxide as the average car.
• Mileage is noticeably higher.
• Hybrids are just as safe as their non-hybrid counterparts. The fact that they run on
electricity as well as gas has no bearing on their safety.
• The performance of Hybrids is improving more and more with each passing year,
so their efficiency and improvements look bright for the future.
• The Hybrid's battery pack never needs to be charged from an external source - it
gets recharged during regenerative braking and by the gasoline engine when
necessary.
• Due to a smaller engine, and lightweight materials used in manufacturing
Hybrids, they tend to weigh less than their non-Hybrid counterparts.

24
FYP Hybrid Wheelchair Spring 05/06

• Hybrids can run on alternative fuels, decreasing our dependency on fossil fuels,
and increasing the fuel options. [5]

Cons of Hybrid Vehicles

• They cost more - anywhere from $2,000 to $5,000 more the non-Hybrid version
of the same vehicle.
• Hybrids have a more complex power train, which means more chances for failure
and fewer fixes that your typical mechanic could do.
• Parts may cost a bit more and not be as readily available as typical car parts.
• Special high-mileage tires are smaller, but they cost more to replace.
• High-performance electric motors are not yet available in Hybrid vehicles, whose
emphasis is on economy not speed. (However, they're getting better each year) [5]

25
FYP Hybrid Wheelchair Spring 05/06

Chapter 3
Solution and Implementation

Figure 6: Parts of our wheelchair

26
FYP Hybrid Wheelchair Spring 05/06

After well defining earlier in this report the problem we aim to solve, it is now time to
introduce to you the solution. Our solution was divided into three main parts:

1. Mechanical part
2. Control part
3. Electrical part

In general, the solution we thought of was creating a hybrid wheelchair, one that is able
to generate power within itself and recharge its own batteries. We came across several
ideas for creating a hybrid wheelchair. At first we thought of building an electric
wheelchair and adding to it an electric generator that will be used only to recharge the
batteries. However, we did not agree on implementing this method for the following
reasons.
• The generators turn on manually by pulling a lever hard
• We cannot make use of the generators to propel the wheelchair

Because the user of a wheelchair will not be able to pull on a lever to turn on the
generator, we wanted to use something that can be turned on automatically, with the press
of a button. In other words we needed a combustion engine with an electric start-up mode
option. Being limited by the size, we had to choose a relatively small combustion engine
that will fit on a wheelchair.

Finding the perfect engine was a very hard task. Being limited by lots of parameters, we
had to compromise and find the best combination. What we needed was an engine that is:
• Relatively small
• Able to produce enough power to recharge the batteries
• Powered on by an electric switch

After lots of searching we found out that there is no such engine available in the
Lebanese market. We tried our luck by surfing the net, but to no avail. A quick decision
had to be made, where we had to select 2 out of 3 parameters, and then work out the

27
FYP Hybrid Wheelchair Spring 05/06

problem of the third parameter by other means. Therefore, we chose to buy a relatively
small and electrically powered engine.

Dealing with the third parameter that we overlooked when buying our engine, we had to
come up with an ingenious way to solve our power problem. Since the alternator
embedded in the engine is not big enough to provide enough power to recharge the
batteries, we thought of using another alternator to do the job. What we decided to do
was to get a big alternator that is keen of recharging the batteries and installing it on the
combustion engine. So whenever the engine is turned on, the alternator will turn too and
generate power to recharge the batteries.

That was a general idea of our solution. We shall indulge ourselves now more
specifically in the 3 (mechanical, electrical, and software) aspects of the solution, and
describe them in details.

28
FYP Hybrid Wheelchair Spring 05/06

3.1 Mechanical Solution


The mechanical work was basically based on building the whole system. The system
includes the actual electrical wheelchair with its chassis, motors, chair, and control panel.
In addition to the wheelchair, a combustion engine had to be placed on its own chassis
and connected to the wheelchair.
Now we shall divide the solution into steps:

3.1.1 Choosing the DC Motors

In order to choose the required DC motors that can do the job, we conducted a theoretical
study that aims to helping us choose the optimal type and size of DC motors.

Horsepower calculations for a 37˚ incline

ƒx

R: Incline reaction to wheelchair weight.


ƒx: friction force.
W: wheelchair weight

29
FYP Hybrid Wheelchair Spring 05/06

Predefined parameters

Mwheelchair = 150 Kg
This mass accounts for both the mass of the wheelchair approximated to be equal to 70
Kg, and the mass of a standard disabled user which is about 80 Kg.
• g = 9.81m/s2
• Maximum angle of inclination: αmax = 37˚. According to the international laws
for transportation the maximum slope angle should not exceed 37˚. We are not
sure if this law is respected in Lebanon, but it is definitely respected in the
large cities like Beirut, Jounieh and Tripoli.
• Coefficient of friction: µ = 0.5 - 07, we will assume the value µmax = 0.7, to
account for the worst possible conditions.
• Wheel Radius: R = 40cm = 0.40 m
• Wheel perimeter: Pwheel = 2.512 m
• Assuming the required acceleration: ax = 1 m/s2
• The average velocity of the wheelchair is: Vav = 5 km/h = 1.39 m/s

Weight of the Wheelchair


W= M × g = 150 × 9.81 = 1471.5 N

Reaction of the incline


R = W cos(37˚) = 1175.19 N

Friction force
ƒx = µmax × R = 0.7 × 1175.19 = 822.6 N

Weight in the direction of the movement


Wx = W sin(37˚) = 885.57 N

30
FYP Hybrid Wheelchair Spring 05/06

At equilibrium
ΣFx = F - ƒx - Wx = 0
Î Fmin = ƒx + Wx = 822.6 + 885.57 = 1708.17 N

Also:
ΣFx = M × ax = F - ƒx - Wx
ÎF = 150 + 885.57 + 822.6
Propulsion force F = 1858.17 N

Torque at the wheel


T = F × R = 1858.17 × 0.15 = 278.72 N.m

Calculation of rpm
V = 5000/ 60 = 83.33 m/min
Î rpm = V/ Pwheel = 33.17 rpm
T = 278.72 N.m =205 lb-ft

Î HP = (T*rpm)/5252;
= (205* 33.17)/5252
= 1.29
Horsepower calculations on flat surfaces

The wheelchair is going to spend the largest portion of its running time on flat surface.
This is why it is necessary to have an approximate idea of the horsepower required to run
the wheel chair on this kind of terrain.

Weight of the Wheelchair


W= M × g = 150 × 9.81 = 1471.5 N

Reaction of the incline


R = W = 1471.5 N

31
FYP Hybrid Wheelchair Spring 05/06

Friction force
ƒx = µmax × R = 0.7 × 1471.5 = 1030 N

At equilibrium
ΣFx = F - ƒx = 0
Î Fmin = ƒx = 1030 N

Also
ΣFx = M × ax = F - ƒx - Wx
ÎF = 150 + 1030
Propulsion force F = 1180 N

Torque at the wheel


T = F × R = 1180 × 0.15 = 177 N.m

Calculation of rpm
V = 5000/ 60 = 83.33 m/min
Î rpm = V/ Pwheel = 33.17 rpm

T = 177 N.m = 130.54 lb-ft

Î HP = (T*rpm)/5252;
= (130.54* 33.17)/5252
= 0.82

32
FYP Hybrid Wheelchair Spring 05/06

The motors we chose are permanent magnet, self braking motors. The motors run on a 24
volts and 13 amps power source. The motors are self braking, but the brakes can be
released mechanically and electrically. If the motor is fed by a 24 volt source, then its
brakes will be released immediately. These motors reach a peak current during starting
equal to 25 amps.

Figure 7: Leroy Somer DC Motor

3.1.2 Designing the Chassis for the Electric Wheelchair

Our first step was drawing sketches of what we wanted our chassis to look like, and then
we proceeded with drawing these sketches using PRO-E. The challenge in designing was
to design a wheelchair that will hold a 250 cc combustion engine and a 100 amp
alternator both on one chassis, and connect them to the chassis of the wheelchair. The
tricky part comes in centering the weight distribution of the whole system, and in keeping
the center of gravity as low as possible for the following reason: Our system is a dynamic
model and not static, this means that our wheelchair will be driven around, and we want it
to be as steady on the road as possible.
After we designed the chassis for the electric wheelchair, we set into building it.
However, we did not have to manufacture the chassis on our own because ‘Arc en Ciel’
has donated to us a chassis with two electric DC motors. These are the permanent
magnet, self braking motors that I talked about earlier in this report. The picture below
shows the chassis with the DC motors and the batteries that we added to it later on.

33
FYP Hybrid Wheelchair Spring 05/06

Figure 8: Main chassis

3.1.3 Choosing the Recharging Technique

Knowing that we had to find a way to recharge the batteries, we had to choose which one
was the most efficient and applicable of all. In the end all our options were narrowed
down to two techniques:
• Electric generator
• Scooter combustion engine
The advantages of the electric generator are that it is simple to use, provides enough
power, is small in size, and is silent. The disadvantages on the other hand are that it
cannot be turned on automatically.
The advantages of a scooter combustion engine are that it can be turned on with the press
of a button, which means that it has an electric start-up option. The disadvantages are that
it takes so much space, and it is noisy.
Our decision was to go with the scooter combustion engine because we thought that it
would be hard on the disabled to pull on a lever arm every time they wanted to turn on
the engine, keeping in mind that we will find a solution to the scooter’s disadvantages.

34
FYP Hybrid Wheelchair Spring 05/06

3.1.4 Picking a Combustion Engine

After deciding to proceed with the scooter engine, we had to choose what size of engine
we need. The alternators embedded in all sizes of scooters were not big enough to
recharge our batteries. As you will see later on, we were obliged to use 24 V batteries,
and all alternators in scooters are used to recharge either a 6 V or a 12 V battery.
Therefore, we came up with the idea of using the engine to turn another alternator
installed on it. Now we had to find an engine powerful enough to turn the alternator and
make it generate electricity. The engine that we chose was a 250 cc, 30 bhp, Honda
Freeway engine. We took the decision of picking this engine based on the following
information. In general, you need a power source equivalent to 7 HP to operate a 150
amp alternator.

The combustion engine that we needed was one of a scooter, but we could not find an
engine by its own in the market. What we had to do was buy a whole scooter, and then
remove the engine from it. So basically, we bought the scooter, which was a Honda
Freeway, and we worked on stripping it off till we had the engine with its electrical
components in our hands. When we were done taking the scooter apart, we had to build a
special chassis for the engine. The chassis that we built is made from iron, and it holds
the engine in position while minimizing the vibrations. The reason it minimizes
vibrations is because it holds the engine through dampers. The next step was to connect
both the wheelchair chassis to the engine chassis.

Figure 9: Removed wires and unused items

35
FYP Hybrid Wheelchair Spring 05/06

Working some more on the engine, we cleaned it, changed its spark plug for better
performance, installed a fuel tank and connected it, removed unnecessary electrical
wirings and wrapped the necessary ones tidily, cleaned the carburetor, and disassembled
the clutch system.

Figure 10: 250 CC ICE

3.1.5 Picking the Alternator

Because we were obliged to use 24 V batteries, we had to pick an alternator that is used
to recharge 24 V batteries. Therefore, we bought a 26.8 V, 100 amps alternator. This
alternator is usually installed on a 2400 cc diesel engine. This engine is used on trucks,
and provides enough power to make the alternator function properly. Our challenge is to
install it on a 250 cc engine and make it operate. We will be optimizing with gear sizes in
order to find the best combination in terms of speed and torque.

Figure 11: The wheelchair alternator

36
FYP Hybrid Wheelchair Spring 05/06

3.1.6 Installing the Alternator on the Combustion Engine

The alternator had to be connected to the engine in order to operate, and we had to find a
way to connect them together. The best way was to connect them by a belt that turned on
similar gears on both ends. By similar gears we do not mean in size, in fact we mean that
they are similar in the groove in which the belt sits. For more functionality, we placed the
alternator on the chassis through a metallic bar that rotates across its hinge axis. This
provides the alternator with different levels of installation.

Figure 12: Base of the alternator

3.1.7 Designing the Chassis for the Combustion Engine and the
Alternator

There was no place for the combustion engine and the alternator on the wheelchair, so we
had to build them their own chassis and then connect this chassis to the rear end of the
wheelchair. On this chassis both the combustion engine and the alternator will sit, and
will be covered and insulated by a plexiglass cover. The horizontal base of the chassis is
drilled through in order to make way for the exhaust pipes to pass.

37
FYP Hybrid Wheelchair Spring 05/06

3.1.8 Designing the Chair

The chair was simple and straight to the point. It was composed of four metals welded
together to form a horizontal frame. From the both sides of this frame extends (up and
down) metallic bars. The bars on the lower side are used to fix the wheelchair on the
chassis. The bars on the upper side are used to form a back rest. On this frame sits a piece
of wood that is cushioned and covered by leather.

3.1.9 Designing a Cover that Provides Insulation to both Sound and


Heat

In order to minimize noise and heat, we built a very tight cover that covers up the whole
engine and alternator. The cover is made up of 5 mm Plexiglas that is cushioned from the
inside walls with a 2 cm layer of Styrofoam. We believe that this combination is the best
combination of materials that can be use to insulate against noise and heat at the same
time. Of course two holes had to be drilled across two sides of the cover so that the
engine receives its need of air.

Figure 13: ICE cover

38
FYP Hybrid Wheelchair Spring 05/06

3.2 Control Design and Implementation


The diagram below shows a summary of the electrical and control system of our
wheelchair

PWM

H-Bridge
Clockwise

Counter Clockwise
PIC16F877A

Release Brakes
Joystick
PWM

H-Bridge
Clockwise

Counter Clockwise

Release Brakes

Figure 14: Electrical and Control System

3.2.1 PWM and Speed Control Principle

To control the speed of the DC motors, one needs a variable voltage DC power source.
However if you take a 24v motor and switch ON the power to it, the motor will start to
speed up: motors do not respond immediately so it will take a small time to reach full
speed. If we switch the power off sometime before the motor reaches full speed, then the
motor will start to slow down. If one switches the power on and off quickly enough, the
motor will run at some speed that is between zero and full speed. Therefore, PWM
switches the motor on in a series of pulses. To control the motor speed it varies
(modulates) the width of the pulses; from here came then naming: Pulse Width
Modulation.

The PWM signal is a square wave that has a duty cycle


time of high in a period
= × 100 .
time of the period

39
FYP Hybrid Wheelchair Spring 05/06

In essence, as the duty cycle increases the speed of the motor increases. For example, if
the duty cycle is 0%, the motor will not rotate. If the duty cycle is 50%, the motor would
rotate half its speed. If the duty cycle is 100%, the motor would be rotating at full speed.

Since the PWM signal is a square wave, then it should have a frequency. The normal
operational frequency for DC motors is between 2 KHz and 6 KHz. By trial and error, we
found that for our DC motors, the best frequency is 2 KHz.

3.2.2 Control Components

• Microcontroller

The microcontroller is the brain of the wheelchair; without it, the machine won’t be able
to move. Its main job is to take as input some signals from a joystick and generate two
PWM signals: one for each motor. These PWM signals enter the H-Bridges in order to be
able to control the speed of the rotation of the DC motors. Therefore, the main use of the
PIC is for DC motors speed control. In addition to that, the microcontroller should also
control the steering mechanism of the wheelchair and should coordinate between the DC
motors. Therefore, the microcontroller should control the speed and direction of rotation
of each motor.

• PIC16F877A

The decision fell on PIC16F877A because of its capability of generating two PWM
signals at the same time. Also, the PIC is a very efficient and powerful microcontroller
with so many pins that can be easily programmed. Besides, the components are cheep and
do the job perfectly.

Figure 15: PIC16F877A

40
FYP Hybrid Wheelchair Spring 05/06

• Microcontroller I/O

PWM

Clockwise Right motor


Counter Clockwise

PIC16F877A
Joystick Drop Brakes
Release

PWM

Clockwise Left motor


Counter Clockwise

Brake Brakes
Release

Figure 16: Microcontroller Block Diagram

Input: the only input to the PIC is joystick.

Joystick: The joystick that is used in the project has two potentiometers
(forward/Backward, right/left). The voltage of these potentiometers ranges between 0-5V.
If the joystick is still (nothing is applied on it), the two voltages would be 2.5V. Also, the
joystick can rotate 360o. These facts give the user the ability to go in any direction at
different speeds according to the combination to the two voltages across the
potentiometers.

Figure 17: The wheelchair joystick

Outputs: There are two sets of outputs; the first is for the right motor, while the second is
for the left motor. Each set has 4 outputs:
o PWM signal: this is the signal that specifies the speed of the motor

41
FYP Hybrid Wheelchair Spring 05/06

o Clockwise: if ON, it means that the motor should run clockwise. If OFF, it means
that the motor should NOT run clockwise.
o Counter Clockwise: if ON, it means that the motor should run counter clockwise.
If OFF, it means that the motor should NOT run counter clockwise.
o Release Brakes: if ON, the brakes of the motor are released. The brakes are
always released whenever the motor should be rotating.

In each set, “Clockwise” and “Counter Clockwise” outputs can NOT be ON together.
If one of which was ON, the brakes should be released. However, if both were OFF, it
means that the motor is OFF and the brakes should be applied.

Note that the two DC motors should either be rotating clockwise together or counter
clockwise together, or not rotating at all. It is impossible for one to be rotating
clockwise while to other is rotating counter clockwise. But it is possible for one to be
rotating in a certain direction while the other is not rotating at all: in this case the
wheelchair should be steering either to the right or left.

• Control Algorithm

The control starts from the joystick where there the two potentiometers discussed before.
The joystick is responsible for generating two output voltages:
V1: the voltage across the forward/Backward potentiometer
V2: the voltage across the right/left potentiometer.

According to the combination of V1 and V2, the direction of motion is known and hence
the duty cycle needed for each H-Bridge (motor). In reality, the voltage across the DC
motors will always be either 0V or 24V, but the duration of applying the 24V is what
causes the speed variation (PWM main principle). However, note that varying the duty
cycle is as if varying the voltage across the motor. Therefore, we will use this note to
build upon it the control algorithm.

42
FYP Hybrid Wheelchair Spring 05/06

In this report, we would be using two kinds of voltage across the motor:
The required voltage: it is the voltage level across the motor should be reached after
some time and stay as that level.
The current voltage: it is the voltage across the motor at a certain time t.

By trial and error, the DC motors start running at a frequency of 2 KHz when the duty
cycle ~ 60 % (around 14V), hence the range of operation of the motors is between 60%
(+14V) Æ100% (+24 V) (Similarly for the negative voltages). Note that if any of the
required voltages gets above +24V (less than -24V), then the required voltage is set to
+24V (-24V).
According to the values of V1 and V2 together, the required voltages across the motors
can be specified. This is done in two steps:
1. Primary required voltage: is the required voltage that results from V1
(forward/Backward) only.
2. Final required voltage: is the actual required voltage. It is the sum of the primary
voltage with an additional value (0Æ10V) that results from the variation in V2.
Final required voltage = primary required voltage + added voltage.
V1 and V2 range between 0Æ5V, the relative directions are as follows:

Table 1: Relation between Joystick, Speed and Direction

V1 (Volts) speed direction V2 (Volts) speed direction


0 Æ 0.5 100% backward 0 Æ 0.5 100% right
0.5 Æ 1 85% backward 0.5 Æ 1 85% right
1 Æ1.5 70% backward 1 Æ1.5 70% right
1.5 Æ 2 60% backward 1.5 Æ 2 60% right
2Æ3 0% NA 2Æ3 0% NA
3 Æ 3.5 60% forward 3 Æ 3.5 60% left
3.5 Æ 4 70% forward 3.5 Æ 4 70% left
4 Æ 4.5 85% forward 4 Æ 4.5 85% left
4.5 Æ 5 100% forward 4.5 Æ 5 100% left

43
FYP Hybrid Wheelchair Spring 05/06

The following tables show the primary required voltages and the added voltage to each
motor with respect to the variation of V1 and V2 respectively:

Table 2: Primary Required Voltage on the Motors

V1 (Volts) Primary Required Voltage on the motors


Right (Volts) Left (Volts)
0 Æ 0.5 -24 -24
0.5 Æ 1 -20 -20
1 Æ1.5 -17 -17
1.5 Æ 2 -15 -15
2Æ3 0 0
3 Æ 3.5 15 15
3.5 Æ 4 17 17
4 Æ 4.5 20 20
4.5 Æ 5 24 24

Table 3: Added Voltage

V2 Added Voltage (if 3<V1<5) Added Voltage (if 0<V1<2)


(Volts) Right (V) Left (V) Right (V) Left (V)
0 Æ 0.5 0 +10 0 -10
0.5 Æ 1 0 +8 0 -8
1 Æ1.5 0 +6 0 -6
1.5 Æ 2 0 +4 0 -4
2Æ3 0 0 0 0
3 Æ 3.5 +4 0 -4 0
3.5 Æ 4 +6 0 -6 0
4 Æ 4.5 +8 0 -8 0
4.5 Æ 5 +10 0 -10 0

44
FYP Hybrid Wheelchair Spring 05/06

Note that the region between 2V and 3V are dead zones (as if nothing is applied). So the
operational region of the joystick is shown in the following figure:

V1
Operational
Region
2
3 2 3 V2
Figure 18: Operational region of the joystick

The current voltage: at t0, the current voltages at each motor should be zero. Then as the
required voltages changes, the current voltage increases/decreases gradually until it
reaches the value of the required voltage. At that instance (required voltage = current
voltage), the current voltage stays at that level until the required voltage changes again.
Therefore, the periodic rate of increase/decrease of the current voltage depends on the
required voltage. The relation is as follows:

current voltage( t −1) + [required voltage − current voltage(i ) ]


current voltage( t ) =
number of steps to reach the required voltage

According to this relation, the current voltage will reach the required voltage of each
motor at the same time no matter what is the value of the initial current voltage. The
following graph shows an increasing slope of the current voltage:

45
FYP Hybrid Wheelchair Spring 05/06

Current Voltage

Vreq= V(f)

V(i)

Time
Period
Figure 19: Ramp function of Current Voltage

According to the current voltage, the PWM duty cycle can be defined. For example:
If the |current voltage| = 24VÆ duty cycle = 100%.
If the |current voltage| = 20VÆ duty cycle = 83.33%
If the |current voltage| = 15VÆ duty cycle = 62.5%.

Notice that if the duty cycle < 60%, the motors would not rotate. Therefore:
If the -14V< current voltage < 14VÆ duty cycle = 0%
Finally, having the duty cycle for each motor, it is easy to generate the PWM signals
from the PIC16F877A microcontroller.

• Assigned Pins in the PIC Microcontroller

We need two analog inputs, 2 PWM signals, and 6 digital outputs:


Analog inputs: An0 (A0) and An1 (A1)
2 PWM signals: C1 and C2
2 Release Brakes: A2 and A5
2 Clockwise: C4 and D2
2 Counter Clockwise: C5 and D3

46
FYP Hybrid Wheelchair Spring 05/06

• Software Used

To program the PIC16F877A, we used PIC Simulator IDE. This software allows the user
to write an easy Basic code, run a simulation, and generate a hex file to be downloaded
onto the PIC.

47
FYP Hybrid Wheelchair Spring 05/06

3.3 Electrical Solution and Implementation

The electrical work was mostly oriented towards electronics. In order to be able to
control the wheelchair electrically, we had to connect different subsystems together with
the help of several electronic circuits.

3.3.1 The Wheelchair Battery Type

We need 24 V to run two DC motors, for this we used two 12V valve regulated lead acid
batteries and we connected them in series to provide us with the necessary 24V.

VRLA batteries operate as a starved electrolyte system in which the quantity of


electrolyte is limited to the amount that either is absorbed in the plates or wets the fibers
in the separator. The resulting system allows gases produced during overcharge to diffuse
from one plate to the other and to be recombined back in the electrolyte. This
recombination creates a closed system, thus reducing the release of gases into the
atmosphere under normal overcharge conditions. Since the electrolyte is recycled, there is
no need to add water to the batteries. This reduced maintenance leads to a longer-life
battery in a clean and compact package that can be installed when flooded cell batteries
are impractical. [7]

Figure 20: Batteries of the wheelchair

48
FYP Hybrid Wheelchair Spring 05/06

3.3.2 Batteries Connections

In order to get the required 24 volts to run the two DC motors, we had to connect two 12
volt batteries in series, and in order to recharge these batteries, we had to connect them to
an alternator. To achieve the 24 volts, we first connect one negative end of the first
battery to the chassis, and then we connect the other positive end of the same battery to
the negative end of the second battery. Now whenever we want to extract 24 volts we
connect the positive to the ‘free’ positive end of the second battery, and the negative end
to any part of the metallic chassis.

3.3.3 Alternator Connections

The alternator is connected directly to the ‘free’ positive end of the battery by its main
source. The alternator is also connected to the negative end of the battery through the
chassis. So by connecting the live wire to the positive end, the alternator is constantly
recharging the battery when it is turning. However, this alternator sometimes does not
start to recharge whenever it starts turning, so we had to give it an electric shock to jump
start it. We came up with a relay system that is powered from the batteries and connected
to an input in the alternator. To this wire is connected a 24 volt lamp. This lamp indicates
the state of the alternator. Whenever the lamp is turned on, the alternator is not
recharging. Whenever the lamp is turned off, it indicates that the alternator is recharging.

3.3.4 Battery Charge Level Detector

We bought a circuit that indicate the charge condition of a 12 volt, lead acid battery. We
connected the circuit to the terminals of one battery. It is composed of four LEDs where
each LED represents an approximate 25% change in charge condition, so that 3 LEDs
indicate 75%, 2 LEDs indicate 50%, etc.

49
FYP Hybrid Wheelchair Spring 05/06

When the yellow and the green LEDs are off, the driver of the wheelchair needs to turn
the internal combustion ON in order to recharge the batteries.

Figure 21: Battery charge level indicator

3.3.5 DC Motor-Driver H-Bridge Circuit

3.3.5.1 Definition

Specialized circuits (motor drivers) have been developed to supply motors with power
and to isolate the other ICs from electrical problems. These circuits can be designed such
that they can be completely separate boards, reusable from project to project.
A very popular circuit for driving DC motors is called an H-Bridge. It’s called that
because it looks like the capital ‘H’ on classic schematics.
The great ability of an H-Bridge is that the motor can be driven forward and backward at
any speed, optionally using a completely independent power source.
Its simple conceptual schematic is as follows:

Figure 22: Simple conceptual schematic of an H-Bridge [8]

50
FYP Hybrid Wheelchair Spring 05/06

A basic H-Bridge has 4 switches, relays, transistors, or other means of completing a


circuit to drive a motor. In the above diagram, the switches are labeled A1, A2, B1, and
B2. Since each of the four switches can be either open or closed, there are 24 = 16
combinations of switch settings. Many are not useful and in fact, several should be
avoided since they short out the supply current (e.g., A1 and B2 both closed at the same
time). There are four combinations that are useful:

Table 4: Four Useful Connections

Closed Switches Polarity Effect


A1 & A2 Forward Motor spins forward
B1 & B2 Reverse Motor spins backward
A1 & B1 Brake Motor acts as a brake
None Free Motor floats freely

3.3.5.2 Design and Implementation of the H Bridge

Before we proceed, it is important to highlight the fact that we need two H Bridges, one
for each DC motor. Each one of these H Bridges is a high power bridge because it will be
designed to handle about 25 A and 24 V DV supply. One of the first concerns we had to
face when confronted with high power requirements is the question of power dissipation.
Any voltage drop across a device carrying current is accompanied with power being
dissipated in the device as heat. In high current applications, any voltage drop can create
significant needs for heat sinks and other means of removing the heat from the current
carrying device.
For this reason, we attempted to reduce the voltage drops that might be found in a high
current application. A device that is ideal for this is the MOSFET.

51
FYP Hybrid Wheelchair Spring 05/06

3.3.5.3 Type and Connection of the MOSFETs

It is important to choose a switching device that can efficiently handle the high current.
For this type of application, there are two types of switches to choose from, one is the
Insulated Gate Bipolar Transistor (IGBT) and the other is a Metal Oxide Semiconductor
Field Effect Transistor (MOSFET). They both have advantages and disadvantages.

IGBTs typically are used in applications for switching frequencies less than 20 kHz, high
voltage applications (>1000V), and high temperature situations (>100˚C).
MOSFETs are typically used for applications of high switching frequencies, low voltage
applications (<250V), and lower temperature situations. The IGBT’s conduction losses
are higher than a MOSFET’s conduction losses at lower temperatures, thus making it
more efficient in the long run for low temperature applications.

A MOSFET generally has three interfaces with the circuit: the Gate (used to control
switching), the Source, and the Drain. In an N-Channel MOSFET, when a voltage
between the Gate and the Source is greater than the “Gate Threshold Voltage” is applied
to the gate, current is allowed to pass from the Source to the Drain. Because we either
want all the current, or none of the current to pass to the motor through the MOSFET, we
simply either throw the gate to 0V or to the maximum voltage in the circuit. [11]

The IRFP064N MOSFET switch was chosen for the H-bridge inverter since it will be
utilized in a low voltage (24V) and high current (25A at starting, 13A at normal
operation) application and a low temperature situation. Temperature will be maintained
with the implementation of heat sinks.

To minimize switching and conduction losses, two MOSFETs will be placed in parallel
for each switch. The IRFP064N MOSFET will have a static on-state resistance of
approximately 0.008Ω. The static on-state resistance for one switch with two MOSFETs
in parallel will be approximately 0.004Ω. Taking the worst-case input current and the
static on-state resistance of the MOSFET into consideration, the worst power losses can
be calculated as follows:

52
FYP Hybrid Wheelchair Spring 05/06

• Power dissipation calculation


Ohm's Law states that:
Voltage = Current x Resistance

Now the power equation is:


Power = Voltage x Current

Combining these equations we get:


Power = (Current x Resistance) x Current
Or
Power = I2R (in watts)

Since every two MOSFETs are connected in parallel, their RDSon decreases to half from
0.008 to 0.004 thus reducing the current dissipation into half.
Î
P = (13) 2 x 0.004 = 0.676W

The MOSFETs we used are N channel MOSFET because P channel MOSFET cannot
handle high current.
In each channel, we have two MOSFETs connected in parallel. In order to be in parallel
we need to connect the gate, drain and source of one MOSFET to the gate, drain and
source respectively of the other MOSFET placed in parallel with it.

3.3.5.4 Need for Drivers

Gate drivers are used to drive a MOSFET that is connected to the positive supply and is
not ground-referenced but is floating.
In order for the MOSFET to conduct, two requirements must be met:

53
FYP Hybrid Wheelchair Spring 05/06

o The MOSFET should have a reference ground


o The voltage between the gate and the source should be between 5V and
20V.
Since the sources of the MOSFETs in the upper side are connected to the end terminals of
the motor, a floating ground exists. Therefore we need to create a virtual ground in order
for the MOSFET to conduct. In addition to that, the gate of the MOSFET is voltage
controlled and not current controlled thus a voltage between 5V and 20V should be
supplied between the gate and the source of the MOSFETs.

IR2110 driver was the best choice for many reasons:


o It is compatible with the IRFP064N MOSFET we have already chosen because
they are both manufactured by the same company “IR”.
o We could have used a pulse transformer instead, but economically speaking a
pulse transformer with its circuit would have cost us 5 to 6 times more.

3.3.5.5 Use of Regulators

The driver needs a low side fixed supply voltage equal to 12 V and a logic supply voltage
equal to 5 V. But, we only have a 24 V DC supply. Therefore, we need two regulators:
the LM7812 and the LM7805 that supplies respectively a voltage of 12 V and 5 V.
As a general rule the input voltage should be limited to 5 to 6 volts above the output
voltage. Therefore, we connect a resistor in series with each regulator for voltage drop.
These resistors are chosen upon testing so that the desired voltage drop occurs across
each resistor.
For the LM7812: the resistor connected in series is equal to = 2.2KΩ and the voltage drop
across this resistor is around 6V.
For the LM7805: the resistor connected in series is equal to = 400Ω and the voltage drop
across this resistor is around 12V.

54
FYP Hybrid Wheelchair Spring 05/06

3.3.5.6 Types of Capacitors Used

In this H Bridge, three types of capacitors were used while each type was performing a
different task.

• Back up Capacitors
Each time the DC motor turns ON or OFF, an instantly drop of voltage power outage
may occur in the batteries. The capacitor, like the battery, can be continuously trickle-
charged until power delivery is needed.
Immediately upon power outage, two 10000 μF chemical capacitors connected in parallel
with the battery will deliver the back-up power to the DC motor. Once operating, the
battery can deliver uninterrupted power to the DC motor and the capacitors can be idled.

• Ceramic Capacitors
Ceramic capacitors are small in size and value, ranging from a few Pico Farads to 1 µF.
Not polarized, so either end can go to ground.

Figure 23: Ceramic capacitors [6]

These capacitors are used because the DC Motor generates a lot of “noise” from the
brushes that are used to turn the motor. There is also a large amount of voltage spikes that
are generated in controlling the motor because when the coils of the DC motor receive 24
V from the battery, they send high frequency parasites, and thus a need for ceramic
capacitors is a must since these capacitors are high frequency filters.
Ceramic capacitors are placed in parallel with the back up capacitors as well as right at
the output of the regulator so that the parasite is not transmitted throughout the circuit.

55
FYP Hybrid Wheelchair Spring 05/06

• Chemical Capacitors
These capacitors are polarized and care should be taken while placing them in the circuit.
If they are connected incorrectly they can be damaged, and in some extreme cases they
can explode.

Figure 24: Chemical capacitors [6]

This type of capacitor is used as a filter to bypass low frequency signals

3.3.5.7 Choosing the Main Components

The following lists out the rational for the key components in the circuit. Unfortunately, it
was inherently required that the controller be a relatively inexpensive part. Therefore, the
cost of each component was a factor in the decision making process.

Table 5: Four Useful Connections

Number
Components of Items Usage
Used
This component is an advanced process technology
with 175°C operating temperature.

It has fast switching and can handle around 110A


IRFP064N 8 and 55V. It also has a reasonably low voltage drop
and resistance across it.

This component is also a key component when it


comes to staying compatible with PWM. It has a

56
FYP Hybrid Wheelchair Spring 05/06

pulse width of less than 300 microseconds, which


allows for a frequency of 3000 Hz.

This component is high voltage, high speed power


MOSFET and IGBT drivers with independent high
and low side referenced output channels.

IR2110 drivers 2 The floating channel can be used to drive an N-


channel power MOSFET or IGBT in the high side
configuration which operates up to 500 or 600
volts.

L7812CV This is the power regulator that would be used to


regulator 1 keep a constant 12V.

EE345 This is the power regulator that would be used to


regulator 1 keep a constant 5V logical supply.

3.3.5.8 Operation of the H Bridge Circuit

As we said earlier, an H-bridge is a configuration of four switching devices that allows


you to change the direction of current flow through a load, in our case through a DC
motor. This is done by selecting which pair of MOSFET is on and which pair is off.
The H-bridge requires that there be two MOSFETs located between the battery and the
DC motor, and two MOSFETs located between the load and the system ground return.
The MOSFETs are turned on in pairs, either high left and lower right, or lower left and
high right, but never both MOSFETs are on the same "side" of the bridge. If both
switches on one side of a bridge are turned on, this creates a short circuit between the
battery plus and battery minus terminals. If the bridge is sufficiently powerful it will
absorb that load and the batteries will simply drain quickly.

57
FYP Hybrid Wheelchair Spring 05/06

Referring to the circuit in figure 11 below:

Figure 25: Conceptual design

Each driver has a high input and a low input as well as a high output and a low output. So
we connect the high input of the first driver to the low input of the second driver and vice
versa. We also connect the high output and the low output of one driver to the high
MOSFET and the low MOSFET of the same side respectively.
“A” and “B” are the two logic input to the circuit. One of them is the PWM signal and the
other one is set to zero. When we activate one of the high side MOSFET and its
diagonally opposite low side MOSFET we have to make sure that the remaining
MOSFETs are not operating. For this, one PWM enters in either in “A” or “B”.
For example, if “A” is now set to “1” and “B” is set to “0”, the high input of one driver
with the low input of the second driver are activated thus activating two diagonally
opposite MOSFETs while the others are off. Once we want this motor to run in the
opposite direction we set the PWM at A to zero then we send the PWM signal through B.
Therefore, at any time we want the motor to switch direction, a passage by zero is
obligatory.

58
FYP Hybrid Wheelchair Spring 05/06

Figure 26: H Bridge PCB

59
FYP Hybrid Wheelchair Spring 05/06

3.3.6 Main Control Circuit

In order for the PIC16F877A to operate and provide required result, certain connections
should be made. Some of these connections are imposed by the datasheets of certain
components while the others are the result of desired circuit functionality.

3.3.6.1 Use of 16 MHz Crystal Oscillator

The PIC16F877A needs frequency in order to operate, thus the crystal will provide the
PIC with a frequency equal to 16 MHz.

3.3.6.2 Use of Regulator

The PIC16F877A requires a voltage of 5V in order to operate, but since we only have a
24V DC supply we need a regulator LM7805 to provide the PIC with the required 5V.
However, we can not directly connect the 24 V to the regulator because it can not handle
such a high voltage. Therefore, we connect a resistor, between the regulator and the
24VDC, for voltage drop. The value of this resistor is chosen upon testing so that the
input to this regulator is around 12V.
A 330μF capacitor is also connected between one terminal of the resistor and the ground
to prevent a direct application of voltage to the regulator; instead it provides a soft
starting.

3.3.6.3 AND Gate

The DC motors of the wheelchair should be able to operate in both rotational directions
(clockwise and counter clockwise). Therefore, we need two PWM signals for each H-
Bridge to control the direction. The following table shows how the inputs of the H-Bridge
affect the direction of rotation of the motors:
Table 6: H-Bridge inputs and direction of rotation

H-bridge Input 1 H-bridge Input 2 Direction of Rotation


PWM 0 Clockwise
0 PWM Counter Clockwise

60
FYP Hybrid Wheelchair Spring 05/06

However, the microcontroller that we are using (PIC16F877A) can only generate two
PWM signals (one for each motor). Therefore, in order to be able to change the direction
of rotation and still use only one PIC16F877A for both motors, AND gates should be
used. For each H-Bridge, two AND gates are needed: the PWM signal for that H-Bridge
(motor) enters both AND gates as the first input. The second input is the “clockwise” and
“counter clockwise” bits to AND gate #1 and #2 respectively. The following figure
shows clearly the diagram of the AND gates:

PWM

Clockwise #1 Output 1

#2 Output 2
Counter Clockwise

Figure 27: AND Gate conceptual operation

Table 7: Summary Table of AND Gate

Clockwise Counter Clockwise Output1 Output2


1 0 PWM 0
0 1 0 PWM

In this way, the PWM enters only one of the inputs of the H-bridge while the other input
is zero. This will cause the motor to rotate clockwise or counter clockwise depending on
the relative bits.

3.3.6.4 Use of Relays

Relays are remote control electrical switches that are controlled by another switch or a
computer, in our case it is controlled by the PIC microcontroller. Relays allow a small
current flow circuit to control a higher current circuit.

61
FYP Hybrid Wheelchair Spring 05/06

The relay contains a sensing unit, the electric coil, which is powered here by DC current.
When the applied current or voltage exceeds a threshold value, the coil activates the
armature, which operates either to close the open contacts or to open the closed contacts.
When a power is supplied to the coil, it generates a magnetic force that actuates the
switch mechanism. The magnetic force is, in effect, relaying the action from one circuit
to another [13]. The first circuit is called the control circuit; the second is called the load
circuit.
In our case, the relays are used to release the brakes of the motor each time the motor is
turned ON and lock the brakes each time the motor is turned OFF.

For the relay to operate it needs a current higher than the one provided by the PIC, thus a
transistor is needed. But, this transistor can receive a voltage around 0.6V however the
PIC microcontroller provides a voltage of 5V. For this reason we connect two resistors in
series for voltage drop so that only 0.6V enters to the transistor.
The relay consists of coils not resistance, when it turns off it gives a counter
electromotive force, thus we connect a diode parallel with the coil but in opposite
direction because in case this emf goes through the capacitor it will blow off.

Figure 28: Main control circuit

62
FYP Hybrid Wheelchair Spring 05/06

3.4 Connection of the Electronic Circuits


The Main control circuit receives a command from the joystick; transmits it to the H
Bridges where each H Bridge makes the DC motor connected to it run in the desired
direction and at the desired speed.
At the basis of the wheelchair chassis, a wooden plate on which we have fixed all the
electronic circuits and made the appropriate connections.

Figure 29: Electronic circuits

Note that because the negative end of the battery is connected to the chassis, then any
mishap that may occur and cause the any of the components to touch the chassis can
cause a severe short circuit that will destroy the circuits. To prevent such an action from
happening, we installed a fuse on the positive input wire between the battery and the
main circuit.

63
FYP Hybrid Wheelchair Spring 05/06

3.5 Control Panel

The control panel is strategically placed on the left hand of the wheelchair user. Its
location allows the user to easily reach all the switches on that panel.
This control board holds all the switches that will allow the user to have power over
everything related to the wheelchair except the steering which is controlled by the
joystick placed on the right hand side of the user.
Below is an illustrative picture of control board with references explaining all the
components placed on it:

Figure 30: Control panel design

(1)Æ ON/OFF Key: This key is responsible of turning ON/OFF the power of the
combustion engine. Whenever the charge in the batteries becomes small this key needs to

64
FYP Hybrid Wheelchair Spring 05/06

be turned ON in order to be capable of starting the combustion engine. This key is also
used to turn OFF the engine when the no more battery charging is needed.

(2)Æ START Button: After the ON/OFF key is turned ON, the start button needs to be
pushed for the engine to start. This button should be held down for around 1 second after
which the engine will automatically start. Note that this button can not be used to turn
OFF the motor.

(3)Æ Charging indicator (Lamp): This red lamp will let the user know whether the
batteries are being charged or not. As a matter of fact, as long as this red lamp is turned
on the user knows that no charging is taking place in the batteries; hence the charge
switch (switch number (5)) has to be triggered. After pushing switch number (5),
charging of the batteries will start.

(4)Æ Charge sensor: The charge sensor consists of 4 lamps of different colors, red,
yellow, green and orange. When the batteries are fully charged all the lamps are turned
on and when the batteries are empty only the red lamp is turned on. This charge sensor
will help the user know when he needs to turn ON the combustion engine, hence starting
to charge the batteries.

(5)Æ Start charging switch: As explained in (3) this switch needs to be triggered
whenever the big red lamp in the middle of the control panel is turned ON. When this
switch is triggered the red lamp will automatically turn off and charging of the batteries
will start.

(6)Æ Electric circuits ON/OFF switch: this switch controls the power in the electric
circuits (H-bridges and main circuit) whenever the user needs to move in his wheelchair
this switch has to be turned ON or else no power will be delivered to the 2 DC motors.
Two yellow lights on the H-bridges circuits indicate whether the switch is turned ON or
OFF. Note that this switch is crucial for the safety of the user. If anything goes wrong the
user can freeze the wheelchair by simply turning OFF this switch.

65
FYP Hybrid Wheelchair Spring 05/06

Chapter 4
Financial Analysis
To design and build our hybrid wheelchair, cost were diverse: physical, mental and of
course financial.
This wheelchair is the combination of many components of different type and size joined
together. We would like you to keep in mind that this wheelchair is the first draft, it needs
lot of optimization. We tried our best to decrease our expenses but because of our lack of
experience, many costs could not be avoided.

Table 8: Cost Analysis

Component Type Qty Price/Quantity Total Price

Internal Commbustion Engine 250 CC 1 $400 $400

Alternator 100 Amps 1 $135 $135

I.C.E. Cover Plexi Glass 1 125 $125

Electronic Components H Bridge 2 $60 $120

Electronic Components Main Controller 1 $15 $15

Batteries 12V dry cells 2 $27 $54

Raw Material Metal NA $100 $100

Miscellaneous NA NA $50 $50

DC Motor 24 V PM 2 Donated Donated

TOTAL $912 $999

66
FYP Hybrid Wheelchair Spring 05/06

Chapter 5
Project Tasks
The Gant chart below shows the tasks accomplished in order to achieve our goal and its
required duration.

Table 9: Project Tasks

Project Tasks
March April May
Components Phase
Get the chassis and the DC motors
Buy the internal combustion engine
Buy the batteries
Buy the necessary material
Buy the wheels
Buy the alternator
Design Phase
Design the whole wheelchair using proE
Design the connections
Design the 3 required circuits
Write the pseudocode of the Software
Design the ICE cover
Implementation Phase
Build the mechanical part
Build the circuits
Write the code
Join everything together
Documentation Pahse
Organize and consolidate information
Design recommendation report
Submit final report
Presentation Phase
Develop power point presentation
Develop the poster
Submit the presenation

67
FYP Hybrid Wheelchair Spring 05/06

Chapter 6
Conclusion and Improvements
The wheelchair that we built is still in its first phase of development. Therefore, our main
goal was to make it work as it was planned to by any means possible. This leaves margin
for many ways of improvement. First of all, the most important improvement we can
apply to our wheelchair is o connect the combustion engine through a drive train to the
wheels. This will enable the combustion engine to aid in propelling the wheelchair
whenever it is turned on. This way, we can increase recharging efficiency, provide more
power to the wheelchair, decrease the load off the DC motors, and make use of the
combustion engine in other ways than just using it to recharge the batteries. Another
improvement deals with the software that is controlling the propulsion of the wheelchair.
Our code is performing the job of controlling the wheelchair well; however it lacks some
smoothness and easiness in use. Our code is still an alpha version that can be conducted
to several improvements. The joystick we are using can be replaced by a more
sophisticated one that will provide a better grip and feel of the movement. Our joystick is
composed of a two way variable resistor that enables us to control the wheelchair in two
directions, x-axis and y-axis. Much more elaborate joysticks are available in the market,
but are much more expensive. Another noticeable improvement is the size of our
wheelchair. Having to install a 250 cc engine with a 100 amp alternator on a wheelchair
was not an easy task. Besides being hard, our final design was big and took much space
behind the electric wheelchair. This area of the project, which is size and weight, can play
a big role in the improvements that the wheelchair will be conducted to. Finally, so much
work lies ahead to improve our system to reach its optimal condition, but this
improvement will require more research, more effort, more time, and above all more
funding.

68
FYP Hybrid Wheelchair Spring 05/06

Glossary

MOSFET = form of field-effect transistor controlled by voltage rather than current, like
a bipolar transistor. MOSFETs have a significantly higher switching speed than bipolar
transistors. They generate almost no loss (little heat generation), which lends the power
supply fast response, excellent linearity, and high efficiency.

DC = (direct current) is the unidirectional flow or movement of electric charge carriers


(which are usually electrons). The intensity of the current can vary with time, but the
general direction of movement stays the same at all times. As an adjective, the term DC is
used in reference to voltage whose polarity never reverses.

PWM = (Pulse Width Modulation) A modulation technique that generates variable-width


pulses to represent the amplitude of an analog input signal. The output switching
transistor is on more of the time for a high-amplitude signal and off more of the time for a
low-amplitude signal. The digital nature (fully on or off) of the PWM circuit is less costly
to fabricate than an analog circuit that does not drift over time.

LED = (Light Emitting Diode) A display and lighting technology used in almost every
electrical and electronic product on the market, from a tiny on/off light to digital
readouts, flashlights, traffic lights and perimeter lighting. LEDs are also used as the light
source in multimode fibers, optical mice and laser-class printers.

VRLA = (Valve Regulated Lead Acid) batteries. They are low maintenance and provide
superior battery performance.

69
FYP Hybrid Wheelchair Spring 05/06

EMF = (Electromotive Force) is a quantitative expression of the potential difference in


charge between two points in an electrical field

ICE = one in which combustion of the fuel takes place in a confined space, producing
expanding gases that are used directly to provide mechanical power. Such engines are
classified as reciprocating or rotary, spark ignition or compression ignition, and two-
stroke or four-stroke; the most familiar combination, used from automobiles to lawn
mowers, is the reciprocating, spark-ignited, four-stroke gasoline engine.

70
FYP Hybrid Wheelchair Spring 05/06

Appendix A
Components Datasheet

71
FYP Hybrid Wheelchair Spring 05/06

MOSFET Datasheet

72
FYP Hybrid Wheelchair Spring 05/06

Driver Datasheet

73
FYP Hybrid Wheelchair Spring 05/06

12V Regulator Datasheet

74
FYP Hybrid Wheelchair Spring 05/06

5V Regulator Datasheet

75
FYP Hybrid Wheelchair Spring 05/06

AND Gate Datasheet

76
FYP Hybrid Wheelchair Spring 05/06

Appendix B
PIC Code

77
FYP Hybrid Wheelchair Spring 05/06

Pic Basic Code


TRISA.0 = 1
TRISA.1 = 1
TRISA.2 = 0
TRISA.3 = 1
TRISA.5 = 0
TRISC = 0
TRISD = 0
ADCON1 = %00000100

''''''''Variables''''''''''
Dim fb As Word
Dim rl As Word
Dim r_req_vol As Byte 'right motor required voltage
Dim l_req_vol As Byte 'left motor required voltage
Dim r_req_vol_old As Byte
Dim l_req_vol_old As Byte
Dim r_vol As Byte 'right motor voltage
Dim l_vol As Byte 'left motor voltage
Dim b1 As Byte ' "b" is the starting voltage of the motors
Dim a As Byte ' "a" is the ratio of multiplication of the ramp
Dim max_vol As Byte
Dim min_vol As Byte
Dim temp1 As Byte
Dim temp2 As Byte
Dim r_duty As Byte 'duty cycle for right motor
Dim l_duty As Byte 'duty cycle for left motor
Dim l_result As Word
Dim r_result As Word
Dim r_hi As Word 'integer of result
Dim r_lo As Word 'decimal of result
Dim l_lo As Word
Dim l_hi As Word

Dim r_negative As Bit


Dim r_positive As Bit
Dim l_negative As Bit
Dim l_positive As Bit
Dim r_diff As Byte
Dim l_diff As Byte
Dim r_duty_vol As Byte
Dim l_duty_vol As Byte

Dim r_brake As Bit


Dim l_brake As Bit

''''''intialization''''''''
a = 10
b1 = 14 '14 volts

temp1 = 127 + b1
temp2 = 127 - b1

78
FYP Hybrid Wheelchair Spring 05/06

r_brake = 0
l_brake = 0

max_vol = 151 'max_vol=24V


min_vol = 103 'min_vol=-24V

r_req_vol = 127
l_req_vol = 127

r_req_vol_old = 127
l_req_vol_old = 127

r_diff = 0
l_diff = 0

r_vol = 127 'voltages on the motors start @ 0V= 127


l_vol = 127
r_result = r_vol * 10
l_result = l_vol * 10
''''''''MAIN LOOP''''''''''
main:

Adcin 0, fb 'joystick forward/backward: analog input0


Adcin 1, rl 'joystick right/left: analog input1

Gosub fb_rotine
l_req_vol = r_req_vol
Gosub rl_rotine

Gosub coordination

Gosub diff_calculation

r_hi = 0
l_hi = 0
r_lo = 0
l_lo = 0

Gosub rightmotor
Gosub leftmotor
Gosub r_logic
Gosub l_logic
Gosub pwm

r_req_vol_old = r_req_vol
l_req_vol_old = l_req_vol

PORTC.4 = r_positive
PORTC.5 = r_negative

79
FYP Hybrid Wheelchair Spring 05/06

References

[1] New Definition, http://www.assistive-technology.ca/newdef2.htm

[2] “How hybrids work,” http://www.hybridcars.com/how-hybrids-work.html

[3] “Terms,” http://www.hybridcars.com/terms.html

[4] “Hybrid Batteries,” http://www.hybridcars.com/battery-comparison.html

[5] “Hybrid Cars Information and Resources”, http://www.hybrid-car.org/hybrid-cars-


work.html

[6] “Capacitor Types,”


http://www.markallen.com/teaching/ucsd/147a/lectures/lecture2/last.php

[7] “The Basic Chemistry of Gas Recombination in Lead-Acid Batteries”,


http://www.tms.org/pubs/journals/JOM/0101/Nelson-0101.html

[8] “The Motor Controller H-Bridge”, http://www.ksurct.org/howto/hints/h-bridge.pdf

[9] “Batteries”, http://www.itdg.org/docs/technical_information_service/batteries.pdf

[10] “Comparing Marine Battery Technologies”,


http://www.vonwentzel.net/Battery/index.html

[11] “MOSFET basics”, http://www.web-ee.com/primers/files/WebEE/AN-9010.pdf

[12] “Electric Wheelchair”,


http://www.clearleadinc.com/site/consumer_electric_wheelchair.html

80
FYP Hybrid Wheelchair Spring 05/06

[13] “Relay Operation”,


http://www.sea.siemens.com/step/templates/lesson.mason?components:4:3:2

81

Вам также может понравиться