Docsity

iPAQ Visual Compass Final Design Report - Project | ECE 157W, Study Guides, Projects, Research of Electrical and Electronics Engineering

Partial preview of the text

Download iPAQ Visual Compass Final Design Report - Project | ECE 157W and more Study Guides, Projects, Research Electrical and Electronics Engineering in PDF only on Docsity!

The George Washington University

School of Engineering and Applied Science

Department of Electrical and Computer Engineering

iPAQ Visual Compass

Final Design Report

16 December 2005

Prepared By: Jonathan Hus

Prepared For:

Professor T. Manuccia

ECE157-

Electrical and Computer Engineering Capstone Project Lab II

ABSTRACT

The proposed iPAQ Visual Compass is a device that will attach to the Hewlett-Packard

iPAQ rx3115 personal digital assistant (PDA). The device and associated software will

determine the heading of the user and will display the information on the screen of the

PDA in a manner that will resemble a conventional compass, thus giving the user a feel

of authenticity.

ii

vii

1 Introduction

1.1 Market Analysis

The personal digital assistant (PDA) market has increased dramatically over the last few

years. In 2002 and 2003 alone, over 23 million PDAs were shipped worldwide, and in

that timeframe Hewlett-Packard (HP) increased its market share by over 6%, as shown in

Table 1.

Table 1. Worldwide PDA Unit Shipments Company 2003 Shipments 2003 Market Share (%) 2002 Shipments 2002 Market Share (%) palmOne 4,164,790 36.4 5,144,890 42. Hewlett-Packard 2,274,835 19.9 1,621,317 13. Sony 1,401,090 12.2 1,328,555 11. Research in Motion 603,175 5.3 272,450 2. Dell 582,500 5.1 77,000 0. Toshiba 341,669 3.0 439,153 3. Others 2,087,718 18.2 3,210,394 26. Total 11,455,777 100.0 12,093,759 100. Source: Gartner Dataquest (January 2004)

With this vast installed user base, HP’s series of PDAs, known collectively as iPAQs,

represents an excellent opportunity for developers and manufactures of accessories. The

user community has continually expressed its desire for an ever-increasing set of

capabilities from these devices, thereby consolidating the functions of multiple products

onto a single device.

While a number of Global Positioning System (GPS) accessories exist for the iPAQ in

the $300 - $400 price range, a low cost digital compass solution has not yet gained wide

entrance into the marketplace. Therefore, the proposed device, which is an iPAQ

accessory that would provide the user with a compass heading displayed on his iPAQ,

would fill a currently neglected niche. The end product will consist of software that runs

on the iPAQ and a hardware peripheral that will attach to the iPAQ’s expansion port.

Ideally, the product will sell in the $50 price range.

Other devices in the market with comparable price include wristwatches. The

disadvantage with these devices is that they are a “one-trick pony.” An iPAQ accessory

would have the added benefit in that other applications could be written for this device.

For example, a map package could be incorporated in the software that would link the

compass with the geographical map, which would rotate the map to match the users

heading, thus making navigation potentially easier.

This device can be used by a user for any application that requires the current heading to

be known. The typical user community would consist of outdoor enthusiasts including

hikers, bikers, and campers.

3 Product Specifications

The key parameters of the iPAQ Visual Compass are shown in Table 3.

Table 3. iPAQ Visual Compass Specifications

Parameter Value

Power – Peripheral

Voltage 9 Volts

Current 70 mA Max

Temperature – Peripheral

Operating 50°F to 90°F

Non-Operating 50°F to 90°F

Mechanical – Peripheral

Size 1” x 3” x 3”

Weight 5 lbs max

Interface – Peripheral

Data Interface RS-232, 1200 baud

Supported Devices iPAQ rx

Measurement

Compass Accuracy ± 2 Degrees

Compass Precision 0.1 Degrees

Display 0 – 360, 0 = North, count clockwise

Pitch Compensation ± 60 Degrees

Roll Compensation ± 60 Degrees

Heading Update Rate 10 Hz

Magnetic Field Range ± 1 Gauss

N

S

W E

Figure 3. iPAQ GUI

4.2 Technical Overview

The project will be divided into two components: the software running on the iPAQ and

the peripheral. This is shown in Figure 4. A brief, high-level description of each of these

components is given below.

iPAQ rx

iPAQ Visual Compass Block Diagram

Compass Display Manager Direction Computation Manager

Visual Compass Peripheral

Sensor Module Data Acquisition Module

RS- 232

Hardware

Software Visual Compass

Software

Serial Interface Manager Power Module Figure 4. Top-Level Block Interconnection Diagram

4.2.1 Visual Compass Software

The Visual Compass Software will read the data from the serial interface and display the

heading to the user. The Visual Compass Software will be divided into three

components: Compass Display Manager, Direction Computation Manager, and Serial

Interface Manager. The Serial Interface Manager is responsible for all communication

with the serial port. It will read the values obtained from the peripheral and put the data

in the format that is required by the Direction Computation Manager. The Direction

Computation Manager will then take the values and perform the calculations necessary to

generate a direction. This direction will be passed to the Compass Display Manager,

which will update the GUI to show the current direction.

4.2.2 Visual Compass Peripheral

The Visual Compass Peripheral gathers data from the environment and passes the

information to iPAQ via the serial interface. This module is divided into three

components: the Sensor Module, the Data Acquisition Module, and the Power Module.

The Sensor Module will be composed of sensors that detect the Earth’s magnetic field in

relation to the Visual Compass Peripheral. The values obtained from the sensors will be

provided to the Data Acquisition Module. The Data Acquisition Module is responsible

for digitizing the values obtained from the Sensor Module and sending these values to the

iPAQ via the serial interface. The Power Module provides a regulated power supply for

the Data Acquisition Module and the Sensor Module.

4.3 Alternatives

The aforementioned design decomposition was influenced by a desire to put as much of

the computing and calculations in the software modules running on the iPAQ and to

make the peripheral essentially a “dumb” device. Ideally, this will lower the chip count

of the peripheral, thus reducing both the price and the time required for hardware

debugging. While this may increase software complexity, this is acceptable since the end

product will be cheaper and making software changes during the implementation phase is

easier than making hardware changes.

4.4 Theory of Operation

The measured magnetic field in the X and Y horizontal plane will typically be in the 200

mGauss range. The ideal sensor outputs for a compass rotated horizontally are shown in

Figure 5. Given the X and Y components, it is a simple matter of using the arctan

function to determine the angle.

1 Figure 5. Ideal Sensor Outputs

While the X and Y magnetic field components are sufficient for determination of the

compass heading if the compass is held perfectly horizontal, this is neither practical nor

does it satisfy the requirements. A number of solutions are available to remedy this

(^1) Applications of Magnetic Sensors for Low Cost Compass Systems

5 Design Plan

5.1 Overview

The two-level component decomposition of the iPAQ Visual Compass is shown in Figure

6. The functionality of each of the software components was described in Section 4.2.

and the functionality of each of the hardware components was briefly described in

Section 4.2.2.

iPAQ Visual Compass Component Hierarchy

iPAQ Visual Compass Visual Compass Software Visual Compass Peripheral Compass Display Manager Direction Computation Manager Data Acquisition Module Sensor Module Serial I nterface Manager Power Module Figure 6. iPAQ Visual Compass Hierarchy

5.2 Specifications

The following sections contain the specifications for the three software modules and the

three hardware modules.

5.2.1 Visual Compass Peripheral

The Visual Compass Peripheral and its subcomponents are shown in Figure 7. Overall,

the peripheral must detect the x, y, and z components of the Earth’s magnetic field and

the pitch and roll of the device. The information must be digitized and sent to the iPAQ

via the RS-232 serial interface. The unit must also contain its own power supply, since

no power will be used from the iPAQ.

iPAQ Visual Compass Peripheral

Power Module

Sensor Module Data Acquisition Module

iPAQ Peripheral Functional Decomposition

Z Sensor Pitch Sensor Signal Conditioning Unit Data Formatting Level Conversion Battery Power Conditioning Y Sensor X Sensor Roll Sensor Analog Conversion Unit PWM Conversion Unit To iPAQ Figure 7. Visual Compass Peripheral Block Diagram

5.2.1.1 Sensor Module

The Sensor Module measures the x, y and z components of the environmental magnetic

field and converts the components to three analog signals in the range of 0 – 5 volts. This

module also measures the pitch and roll components of the peripheral and provides a

pulse wave modulated (PWM) signal for each measurement.

Table 5. Sensor Module Specifications Unit Input Linearity Output Current Consumption Temperature Supply Voltage X-Axis Sensor ±1 Gauss (G) 0.1% 0 - 5 VDC 4 mA 50 - 90° F 4.75 - 5.25 VDC Y-Axis Sensor ±1 Gauss (G) 0.1% 0 - 5 VDC 4 mA 50 - 90° F 4.75 - 5.25 VDC Z-Axis Sensor ±1 Gauss (G) 0.1% 0 - 5 VDC 4 mA 50 - 90° F 4.75 - 5.25 VDC Pitch Sensor ±60° 0.1%

5 VDC

PWM 4 mA 50 - 90° F 4.75 - 5.25 VDC Roll Sensor ±60° 0.1%

5 VDC

PWM 4 mA 50 - 90° F 4.75 - 5.25 VDC

5.2.1.1.1 Sensor Unit

The Sensor Unit consists of the five sensors required for the system to operate. It also

contains the component that is required to maintain the sensitivity of the magnetic

sensors.

5.2.1.1.1.1 X-Axis Sensor

The X-Axis Sensor determines the X-axis component of the magnetic field. A number of

sensors exist for the determination of the magnetic field components including Hall

Table 6. X-Axis Sensor Specifications Unit Input Linearity Output Current Consumption Temperature Supply Voltage X-Axis Sensor ±1 Gauss (G) 0.1%

  • 5mV to + 5mV 4 mA 50 - 90° F 4.75 - 5.25 VDC

5.2.1.1.1.2 Y-Axis Sensor

The Y-Axis Sensor determines the Y-axis component of the magnetic field. It operates in

the same manner as the X-Axis Sensor. The Y-Axis Sensor must be orthogonal to the X-

Axis Sensor and the Z-Axis Sensor. The specifications of the Y-Axis Sensor are shown

in Table 7.

Table 7. Y-Axis Sensor Specifications Unit Input Linearity Output Current Consumption Temperature Supply Voltage X-Axis Sensor ±1 Gauss (G) 0.1%

  • 5mV to + 5mV 4 mA 50 - 90° F 4.75 - 5.25 VDC

5.2.1.1.1.3 Z-Axis Sensor

The Z-Axis Sensor determines the Z-axis component of the magnetic field. It operates in

the same manner as the X-Axis Sensor. The Z-Axis Sensor must be orthogonal to the X-

Axis Sensor and the Y-Axis Sensor. The specifications of the Z-Axis Sensor are shown

in Table 8.

Table 8. Z-Axis Sensor Specifications Unit Input Linearity Output Current Consumption Temperature Supply Voltage Z-Axis Sensor ±1 Gauss (G) 0.1%

  • 5mV to + 5mV 4 mA 50 - 90° F 4.75 - 5.25 VDC

5.2.1.1.1.4 Pitch Sensor

The Pitch Sensor determines the pitch of the peripheral. The sensor used for this

application is an accelerometer based on heat transfer by convection. A gas acts as the

proof mass for this sensor. A heat source is surrounded by equally spaced

thermocouples. When the sensor has zero pitch, the temperature gradient is even around

the heat source, so the thermocouples output the same voltage. When the sensor is

pitched, convection causes the temperature gradient to be asymmetrical and, therefore,

the output voltage of the thermocouples is different.^3 This difference is proportional to

the degree of pitch.

The sensor uses this voltage difference to create a PWM output, shown in Figure 10. The

PWM signal has a 50% duty cycle when the sensor is not pitched. The duty cycle

increases with a positive pitch and decreases with a negative pitch. The duty cycle is

related to the gravitational force by the following equation:

A(g) = (T2/T1 – 0.5)/20%

(^3) MEMSIC MXD2020GL/ML Revision D

T T Figure 10. Pitch/Roll Sensor Output

The pitch can then be calculated from the gravitational force using the following

equation:

Pitch = sin-1^ (A/g)

This equation is valid over the range of -60° to 60°. For the iPAQ Visual Compass, these

calculations are performed by other modules in the system. The measurement of T2 is

performed by the PWM Conversion Unit. The gravitational force calculation and the

Pitch calculation are performed by the Direction Computation Manager. Therefore, as

indicated earlier, the output of the Pitch Sensor is solely a PWM signal with a period of

10ms, an amplitude of 5V, and a duty cycle that varies proportionally with the pitch.

These specifications are shown in Table 9.

Table 9. Pitch Sensor Specifications Unit Input Linearity Output Period Current Consumption Temperature Supply Voltage Pitch Sensor ± 60° 0.1%

5 VDC

PWM 10 ms 4 mA 50 - 90° F

VDC

5.2.1.1.1.5 Roll Sensor

The Roll Sensor determines the roll of the peripheral. It operates in the same manner as

the Pitch Sensor. The only difference is that the physical orientation of the roll sensor

must be orthogonal to the Pitch Sensor. The specifications of the Roll Sensor are shown

in Table 10.

Table 10. Roll Sensor Specifications Unit Input Linearity Output Period Current Consumption Temperature Supply Voltage Roll Sensor ± 60° 0.1%

5 VDC

PWM 10 ms 4 mA 50 - 90° F

VDC

5.2.1.1.1.6 Set/Reset Strap

As previously discussed, the magnetic sensors determine the magnitude of the magnetic

field through the use of magnetoresistive elements. However, as these resistors are

exposed to local, intense magnetic fields, the magnetic domains of the sensors can

become misaligned. In order to realign them, thereby maintaining the sensitivity, each

sensor contains a Set/Reset (S/R) strap. To take advantage of this feature, a current must

be applied through the device first in one direction and then in the opposite direction.

The first direction is referred to as the “Reset Pulse” and the second direction is referred