Sei sulla pagina 1di 23

Group 4: Two-Wheeled Auto-Balancing Vehicle

Date: December 1, 2006


Authors:
Trung Nguyen
Houman Tavakoli
Mauricio Real

Table of Content
1. Revision .......................................................................................................................... 3
2. Introduction..................................................................................................................... 3
2.1 Customer Requirements & Product Background...................................................... 3
2.2 Competitive Analysis................................................................................................ 4
2.2.1 Product Space Analysis...................................................................................... 4
2.2.2 Target Feature Set .............................................................................................. 5
3. Architectural Overview................................................................................................... 5
3.1 Implementation Approaches ..................................................................................... 6
3.1.1 Analog Implementation ..................................................................................... 6
3.1.2 Dynamic Wheel Balancing ................................................................................ 7
3.1.3 Fly Wheel........................................................................................................... 7
3.1.4 Segway............................................................................................................ 7
4. Top Level Description .................................................................................................... 8
4.1 Top level block diagram ........................................................................................... 9
4.1.1 Top Level Interface.......................................................................................... 10
4.1.2 Environment..................................................................................................... 11
5. Lower Level Function Block Diagram ......................................................................... 12
5.2 Function Block Diagram for Encoder..................................................................... 12
5.3 Functional Block Diagram for Micro Controller .................................................... 12
5.3.1 Micro Controller Input/Output Signal Description.......................................... 13
5.4 User Interface.......................................................................................................... 14
5.5 Power ...................................................................................................................... 15
5.5 Tilt Sensor............................................................................................................... 16
5.6 Programming Flow Chart ....................................................................................... 17
6. Funding and Gantt Chart............................................................................................... 17
6.1 Material Acquisition Table ..................................................................................... 18
6.2 Winter Term Gantt Chart ........................................................................................ 19
7. Testing........................................................................................................................... 20
7.1 Functional Testing: ................................................................................................. 20
7.2 System Testing........................................................................................................ 20
7.3 Manufacturing Test................................................................................................. 20
7.4 Safety Test .............................................................................................................. 20
7.5 Reliability................................................................................................................ 21
8. Proportional Layout Drawing ....................................................................................... 22
9. References..................................................................................................................... 23
10. Name Conventions Used............................................................................................. 23

1. Revision
1. 10/15/2006 Preliminary Draft
2. 10/17/2006 First Draft
3. 10/18/2006 Final Draft
4. 11/01/2006 Added Section 3 and 4
5. 11/30/2006 Added Sections 5, 6, 7, 8, 9, and 10

2. Introduction
The Two-Wheeled Auto-Balancing Vehicle (TAV) project goal is to produce a
transportation device that will enable people with limited mobility, have a need to get
from place to place multiple times during the course of the day or just want to have fun, a
new and novel way of getting around. The vehicle provides a platform with a handle bar
for the rider to stand and balance on. This allows for good visibility and because the rider
is in a standing position, his overall profile will be small.
This product can be use in both an occupational and recreational capacity. On the
occupational side of things this vehicle will provide office workers a mean to travel
between buildings or campus. Companies can increase its productivity and reduces
fatigue due to excessive walking. On the recreational side the TAV would provide a fun
and novel way to enjoy the outdoor.

2.1 Customer Requirements & Product Background


The idea of have a two-wheeled auto-balancing platform that can accommodate a
rider came from the fact that two-wheeled vehicles generally take up less space and are
more agile. These strengths also lend itself to the vehicle main weaknesses, stability and
balance. The balancing problem is solved by putting the burden of keeping the system in
balance on its riders and gyroscopic forces. So the rider must learn a new skill and the
vehicle is easiest to balance while in motion. This is where the two-wheeled autobalancing vehicle enters the picture. It has both the strength of being small and agile but
not the weakness of having the burden of keeping the system of rider and vehicle in
balance. By having it wheels each side of the vehicle and the ability to operate each
wheel independently of each other, the vehicle has a zero turn radius, the best of any
measurable agility metric. Because the system is balanced by microcontrollers, the
learning curve for operation such vehicle is less steep. What this mean is that the TAV
can provide an alternative to using wheelchair for certain ambulatory disability. Its
compact form and the lightweight will allow its ride to travel in confined areas such as
offices, warehouses or malls. The TAV can also be used to in place of the more
traditional devices like the bicycle, skateboard or ATV for recreational purposes. So the
market for such a product ranges from people who want to be a little more productive to
people who just want to have some fun.

2.2 Competitive Analysis


Refer to table attached at the end.
Features Required by Customers:
Safety Measures. The vehicle must be safe to operate in its defined area and if
there is a failure the vehicle must fail in an acceptably safe manner.
Range Calculator. Provides users information to plan their trip or activity
accordingly.
Light Weight. Vehicle must be light enough for easy storage and handling.
Battery Indicator. There should also be a battery charge indicator to let the rider
know when there is not enough charge to safely operate the vehicle.
Self Balancing. Rider should be able to balance on the vehicle without having to
hold the handle bar. This will allow them to open doors or pick up something.

2.2.1 Product Space Analysis


Currently Segway holds the patents for two wheel auto balancing vehicles
using gyroscope and accelerometer. The patent was acquired in 2002; therefore there are
no competitors in this area. Scooters are the closest to this device, but they use a totally
different technology.
Segway offers multiple products in I and the x series of the two wheel auto
balancing vehicles. The products are very similar and almost identical except their wheel
sizes and their heights are different. These differences are accounted for their use in
different terrain and surface. The different products are as follows: i2,i2 police, i2
Commercial Cargo, i2 Commuter , x2, x2 Police, x2Adventure, x2 Golf.
The i2 and x2 Series:
The I series are intended for general usage such as regular commute in the city
area. It has a lighter body, easier to store and relocation such as moving it upstairs or to
the car. It elegant look will make it suitable for a business setting such as a corporate
warehouse or building. All the I series is identical except that some are equipped with
extra features. The i2 series consist of i2, i2 Police, i2 Commercial Cargo, and i2
Commuter. The only noticeable difference is in their extra accessories.
The x2 product line consists of x2 police, x2, x2 Adventure, x2 Golf. These
products are meant for the outdoor and bearing loads activities. It designed to handle
rugged terrains such as grass, gravel and rocky environment. This all the x series are
identical except for their accessories.
Differences between the i2 and x2 series other than their general accessories are
in their looks and wheel base. Below are the list of the advantages and disadvantages.
Advantages:
Speed Sensor. Detect when vehicle traveling too fast and slows it down. Also
warn if vehicle is reaching unsafe speed by shaking the handle bar.
Step on Detector. Knows when ever rider has stepped on or off the vehicle.

Beginner Mode. In beginner mode, the speed is decreased by significant amount.


RiderLess Balance Mode: In this mode, the user can move and maneuver the
Segway without actually being on it. This is useful in areas where it is dangerous
to ride.
Alarm System. It has a sound alarm system which will result in loud noise if
tampered with the Segway. Also it is very hard to move the Segway.
Turn Radius. Zero turn radius.
Wireless control Panel: All the Segway designs include a wireless panel installed
on the handle bar that will give the rider information such as different operation
modes (Power On, Beginner Mode, and Balance indicator).
Safety Shutdown: If there is a fault in the system, the Segway will let the rider
know and after 10 seconds and then it will fully stop the vehicle.

Disadvantages:
Price. $4000-$9000
No Data Link. User cannot update software if there is a glitch and product must be
recalled to update software.
Other Useful/Relevant Features:
Precise accelerometer and gyroscope.
Speed sensor.
Riderless balance mode.
Safety auto shutdown.
Multiple redundancies system.

2.2.2 Target Feature Set

Price. Half the price of the Segway with the profit margin of about 50 to 100
percent.
Size. Our design will have a smaller overall profile and smaller wheels, making it
easier to go through doors and navigate hallways. Perfect for office settings.
Turning Handle: Better turning mechanism, designed to require less movement.
Speed Changer: Will have multiple speed options: Fast, Normal, Slow.
External Data Link: User can update software manually.

3. Architectural Overview
The purpose of the Two-Wheeled Auto-Balancing Vehicle is to provide an
alternative mean of transportation. It can be used in place of bicycles, walking, public
transportation, and automobiles for distances of up to 20 miles. Current the only product
out on the market that is directly related to the TAV is the Segway. Our aim is to out
perform our competitor in the following areas: price, size, turning mechanism, speed
setting and external data link.

The TAV will beat the Segway in price and size just by using pre fabricated
modules for the motor controller, AVR board, and powered wheel chair motor. This
alleviates us from having to research and design the modules, thereby, saving both money
and time. Also, by picking components that are small, the TAV will be 10 to 20 percent
smaller than its competitor.
Auto-balancing of the TAV and Segway is based on the principal of controlled
falling. This process is analogous to walking. Walking involves putting the body out of
balance and then catching it with the leg before the body hits the ground. Human can do
this naturally/instinctively because biological balancing mechanisms like the fluid in the
inner ear and various muscles. The TAV on the other hand will use tilt sensors and
motors.
There are three major components that give the TAV its auto balancing ability:
motor controller, microcontroller, and tilt sensor. The microcontroller, being the brain of
the operation, will take in inputs from the tilt sensor and outputs to the motor controller to
balance the system. When an unbalance state is sensed through the tilt sensor, the vehicle
will move the base backward or forward to balance the vehicle. By making these small
changes at the rate of about 100 times a second, the illusion of the vehicle being balanced
all the time can be achieved.
To move forward or backward, the rider put the vehicle out of balance by leaning
forward or backward, respectively. This forces the vehicle to move forward or backward
to balance the system out. If the rider continue to lean in a particular direction the vehicle
will continues to move in that direction to try and balance the vehicle out.
Current model of the Segway uses a system where the rider must lean right or
left in order to turn. This extra movement while visual looks cool but in fact is just an
inefficient use of kinetic energy. To turn the TAV left or right only requires turning a
potentiometer. The changes in voltage will be fed into an Analog to Digital converter on
the microcontroller. The microcontroller will then decide between the two different
modes of turning based on whether the vehicle is in motion or not. These two possible
modes are: turn in place and turn while moving. If the vehicle is stationary the
microcontroller will use turn in place mode, which will turn the wheels in opposite
directions. This will allow the vehicle to turn in place. If the vehicle is moving then the
microcontroller will use the other mode which will only slow down one motor with
respect to the other motor. This will make the vehicle turn in an arc because of the
different in wheel speed.
A feature that differ the TAV from the Segway is an external data link. This will
be implemented by making the programming port of the AVR board available externally
on the base of the vehicle. This is beneficial because it allows user to update the software
manually. If there is no external data link a recall of the product would be the only way to
fix software bugs.

3.1 Implementation Approaches


3.1.1 Analog Implementation
This method will not require a Microcontroller as the decision making device. It
will implement Analog circuitry such as Op Amps, BJT, and Comparators to keep the

vehicle in balance. The disadvantages are more components, harder to change, and more
complex circuitry involved. The device is also more vulnerable to destruction and error,
since the logic of balancing is done using only hardware.

3.1.2 Dynamic Wheel Balancing


Dynamic Wheel Balancing will require one stationary wheel and one dynamic
wheel for it to balance. The stationary wheel will be placed at the center of the device and
will be able to rotate 360 degrees. The dynamic wheel will rotate in circular motion with
its center at the stationary wheel. The disadvantages are harder to balance, Vehicle will
shift right or left when getting balanced and it is easier to tip over.

3.1.3 Fly Wheel


Use fly wheel to add extra balancing mechanism for the vehicle. The inertia of
the fly wheel will help keep the vehicle balance. This method is not consistent. It is also
hard to keep the speed of fly wheel constant.

3.1.4 Segway
Implementations used in Segway are similar to our project, but instead of using
a microcontroller, they have used computers to do the logic. The disadvantage of Segway
is the cost of the computers controlling the device. The computers are too expensive and
the same routine can be done using only a microcontroller that is 100 times less
expensive.

4. Top Level Description


The Two-Wheeled Auto Balancing Vehicle is self balancing. In order to move
forward or backward the rider will lean forward or backward, respectively. To turn the
vehicle, the rider will turn a handle to left or right. Figure 4.1.1 and Figure 4.1.2 describe
all the inputs on the TAV.

Figure 4.1. 1

Figure 4.1. 2

user_com

Figure 4.2

9
roation

motor_serial

power

power

rotation

4.1 Top level block diagram

4.1.1 Top Level Interface


Device

pwm_power

Voltage

12-24
Volts

Current

Description

Other
Specs

3-100
Amps

Connection from motor controller to the


motor. This is the PWM that the motor
controller will generate to run the motor at
different speeds. The power is generated
from Battery to motor controller.

N/A

power line

12-24
volts

3-300
Amps

rotation

5 Volts

<30 mA

encoder/L

5 Volts

<20 mA

steer_cntrl

5 Volts

<10 mA

Feet_sensor1/2

5 Volts

<10 mA

engage_button

5 Volts

<10 mA

mode_select

5 Volts

<10 am

power_on/off

5 Volts

<10 mA

user_com

5 Volts

<100 mA

Power line will supply power to all the circuitry


and devices. The devices that require power
are the microcontroller board, Gyroscope,
Accelerometer, and Motor Controller. The
Accelerometer and Gyroscope will use 5 Volt
supply which can be taken from regulated
voltage off of the microcontroller board
Encoders are mounted on the motors and
able to detect rotation on the motors by
generating pulse.
Output generated from the encoder to the
Microcontroller. It is connected to the
Microcontroller through a regular I/O pin.
Voltage change caused by potentiometer will
be connected to the ADC(Analag to Digital
Converter) PIN. With a reference voltage, the
microcontroller will be able to know which
way the pot is turning and there fore knows
which way the user desires to turn.
Input is 2 photo sensors that will detect step
on, and generate an signal to 2 regular I/O
pin of the microcontroller.
Input is a regular ON/OFF switch and its
output is to regular I/O pin in microcontroller.
It is responsible for knowing when the user
commanded a go which will result in auto
balancing and moving of the Vehicle.
Input is a regular ON/OFF state switch and its
output is to regular I/O pin in microcontroller.
It is responsible for knowing when the user
wants to change speed. In software, there are
three different settings of max speed possible
that the user can get by pressing the button
continuously.
Input is a switch and its output is a relay that
will allow master power to flow through the
circuit and turning all devices on.
Input is to LCD and its output is to SPI
register on microcontroller. It functions as a
line of communication between LCD and
microcontroller

10

N/A
Implement
using a
photodiode

N/A
Use 10 bitADC on
microcontro
ller to
detect
changes in
voltage

N/A

N/A

N/A
Relay
output

N/A

X-Y/gyro/accelrate

0-5 Volts

<10 mA

4 lines of inputs to microcontroller. 2 from


accelerometer which and 2 from gyroscope.
They both are data generated because of tilt.
The x will output voltage depending on the
amount of tilt on the x direction, and the Y
input will generate voltage depending on the
y direction tilt.

Use 10 bitADC on
microcontro
ller to
detect
changes in
voltage

4.1.2 Environment
The operating temperatures of the TAV are from 60 to 90 degrees Fahrenheit.
This is because the TAV provides very little protection from the environment, operating
it outside of this range is dangerous for the rider. The storage temperature of the TAV is
between 32 to 120 degrees Fahrenheit because anything lower or higher will cause
damage to the AVR board and/or the battery.
The TAV cannot be operated on loose gravel, sand or other slippery surfaces.
This is because any amount of slip will inhibit the TAV from being able to balance itself.
Rider should also avoid steep hill or inclines because this will over work the motor,
making it draw more current which in turn can overheat the battery.

11

5. Lower Level Function Block Diagram


5.2 Function Block Diagram for Encoder

5.3 Functional Block Diagram for Micro Controller

12

5.3.1 Micro Controller Input/Output Signal Description


PORT NAME

DESCRIPTION
ADC will convert voltage level a number for use by the
micro controller to detect lateral tilting.
Y_ACC_RATE
ADC will convert voltage level a number for use by the
micro controller to keep the vehicle balanced.
X_ACC_RATE
ADC will convert voltage level to a number for use by the
micro controller to keep vehicle balanced.
Y_GYRO_RATE
ADC will convert voltage level a number for use by the
micro controller to detect lateral tilting.
X_GYRO_RATE
Timer/Counter will count the pulses so that velocity can
be determined.
ENC_R_IN
Timer/Counter will count the pulses so that velocity can
be determined.
ENC_L_IN
ADC converted the potentiometer voltage level to
determine steering.
STEER_IN
FEET_SENSOR1 Active low input to determine if user is on.
FEET_SENSOR2 Active low input to determine if user is on.
Active low input to determine if user is ready to move.
ENGAGE_IN
Toggle between the three different mode settings.
MODE_SEL_IN
MOTOR_CNTRL RS232 communication to the motor controller

13

5.4 User Interface


USER INPUT
STEER CONTROL
+5 Vcc

steer_cntrl

10K

ENGAGE
+5 Vcc

10K

engage_button

470

MODE SELECT
+5 Vcc

10K

mode_button

470

POWER ON_OFF
+5 Vcc

10K

power_on/off

470

FEET SENSOR
+5 Vcc

10K

feet_sensor1

470

10K

feet_sensor2

470

14

5.5 Power
POWER

power

BATTERY (NPC-B1412)

Voltage Regulator
(8V)

.33 uF

.01uF

LM7808

.1 uF

.01 uF

.01uF

.33 uF

Voltage Regulator
(5v)

LM7805

.1 uF

.01 uF

FUSE
(FP375)

VCC +5 Votls

power

15

5.5 Tilt Sensor


TILT SENSOR

GYROSCOPE

x_gyro_rate

ADXRS150

y_gyro_rate

0.1u

330K

ACCELEROMETE
R

x_acc_rate
ADXL203

y_acc_rate
0.1u

32K

16

5.6 Programming Flow Chart

6. Funding and Gantt Chart


Funding for this project will by the senior design project coordinator and the
TEKBOT group. The senior design project coordinator will provide $250. An
arrangement was reach with the TEKBOT group to cover the rest of this project cost if
they get to keep the final result.
To reduce cost many of the components will be order as sample. So the final
material cost of this vehicle will be under actual cost.
The production of the chassis and wiring of all electrical components will be done
during the winter break (December 8, 2006 January 9, 2006. Starting winter term of
2006/2007 troubleshooting of any bug is exist in the chassis and electronic component
will begin.
17

6.1 Material Acquisition Table


Product
Motor
Motor Controller
Battery
Hub
Wheel
Power Button
Spring Loaded Button
Toggle Button
Fuse
Battery Charger
Potentiometer
Microcontroller
PVC Tubing
Photo reflector
Resistor
Accelerometer
Gyroscope
PCB Breakout Board
Diamond Plated Aluminum
LCD

Model Number
NPC-T64
Roboteq's AX2550
NPC-B1412
NPC-PH448
NPC-PT5306

Quantity
2
1
2
2
2

NPC-C2409
mega128.2
R64-P5578

ADXL213

4
4

SUB TOTAL
Approximate Shipping Costs
TOTAL

Cost
$572.00
$485.00
$158.00
$40.00
$156.00
$5.00
$5.00
$5.00
$10.00
$84.00
$5.00
sample
$20.00
$4.40
sample
sample
sample
$19.80
$50.00
$20.00
$1,641.20
$200.00
$1,841.20

18

Lead Time
2 Weeks
2 Weeks
2 Weeks
2 Weeks
2 Weeks
1 Week
1 Week
1 Week
1 Week
2 Weeks
1 Week
0
1 - 3 Days
1 Week
0
4 to 6 Weeks
0
2 to 3 Weeks
0

6.2 Winter Term Gantt Chart


December
1
1.1
1.2
1.3
1.4

Chassis
Build Housing
Build and Mount Handle Bar
Mounting Components
Wire Electronics

2
2.1
2.2

Software
Develop Balance Algorithm
Input/Output Integration

3
3.1
3.2

Testing
Software
Hardware

19

January

February

March

7. Testing
7.1 Functional Testing:

Balancing Test: The user will lean forward or backward, the vehicle has to
perform these functions:
o Move to the correct direction
o The user will stay balanced after leaning( user will not fall)
o The vehicle will stop moving forward or backward when user stops
leaning
o The vehicle will not move back and forth too much so that the user will
have difficulty getting on the vehicle.
Speed Variation Test: Test to see if the variation of speed is accomplished by
leaning forward/backward. The user has to be able to reach the max speed
allowed by leaning forward or backward. The more the user leans, the faster the
vehicle goes.
Turn Left/Right: the user has to be able to turn left or right by adjusting the
potentiometer. the more the user turns the knob, the bigger radius of turn has to be
accomplished.
Emergency Kill: Be able to stop power and stop vehicle by pressing the E button.
Be able to change the max speed by selecting the correct mode.

7.2 System Testing

Gyroscope/Accelerometer Output: The variance of the Gyroscope output based on


Tilt, The voltage of both when vehicle is presumed to be balanced has to be set
correctly.
Motor Controller has to be able to handle the power needed for the motors to
accomplish the desired speed
Battery has to be able to supply enough voltage and enough current to the motor
controller for desired speeds and speed variations.
Microcontroller is able to convert the Analog voltage to Digital of the
Potentiometers correctly and does the ADC conversion of Gyroscope ad
Accelerometer fast enough that does not pose any danger to the user during the
operation of vehicle.

7.3 Manufacturing Test

Gyroscope/Accelerometer Output: The variance of the Gyroscope output based on


Tilt, The voltage of both when vehicle is what the data sheet indicates.

7.4 Safety Test

The speed of vehicle does not go over maximum allowed.

20

Battery/Motor/Motor Controller poses no risk of electrocuting the user


Vehicle stays connected everywhere at all times during operation ( no loose
screws or wheels)
Emergency Kill: Be able to stop power and stop vehicle by pressing the E button.
Usability on different terraces.

7.5 Reliability

Battery life is as advertised.


Motors are able to run for a long time or distance.
Durability of assembled component to survive basic usage.

21

8. Proportional Layout Drawing

Figure8. 1 Front View

BATTERY

Tire

BATTER

Tire

Right Motor
Left Motor
Motor Controller
Micro Controller

Figure8. 2 Top View

22

9. References
[1] Segway INC. LAST UPDATED 2006
http://www.segway.com/products/ - consulted10/18/06
[2] Tom Harris. Last Updated 2005
http://travel.howstuffworks.com/ginger.htm - Last consulted 10/18/06
[3] United States Patent and Trademark Office. Last Updated 9/19/2006
http://patft.uspto.gov/netacgi/nphParser?Sect1=PTO2&Sect2=HITOFF&p=1&u=%2Fnetahtml%2FPTO%2
Fsearchbool.
html&r=1&f=G&l=50&co1=AND&d=PTXT&s1=segway&OS=seg
way&RS=segway Last Consulted 10/18/06
[4] Wikipedia Last Updated 2006
http://en.wikipedia.org/wiki/Segway - Last consulted 10/13/06

10. Name Conventions Used


TAV: Two-Wheeled Auto-Balancing Vehicle

23

Potrebbero piacerti anche