503

Page 1

Poster Paper Proc. of Int. Colloquiums on Computer Electronics Electrical Mechanical and Civil 2011

MEMs based Digital compass 1

L.Nanda Kumar, 2S.Veerabhadraiah 3M.Balanagabhushanamu 12

Raghu’s Center of Excellence in Embedded Systems Design, 1 l.nanda@gmail.com ,2 svbh_nstl@yahoo.com 123 Dept of Systems design, Andhra university 3 balu91@gmail.com 12 RAGHU ENGINEERING COLLEGE, Visakhapatnam, A.P. INDIA Abstract:- Micro-Electro M echanical System (MEMS) technology has been identified as one of the most promising technologies in next century for its potential in making smaller, lighter and more-functional electro-mechanical devices or machines at lower costs. Micro machined inertial sensors are a very versatile group of sensors with many applications. This paper briefly scans through the background of MEMS, M icro machined inertial sensors, types of accelerometers and typical applications. A low cost microcontroller based digital compass unit designed and developed by interfacing with Honeywell TM HMC6352 and FreescaleTM MMA7260 three-axis accelerometer is presented. An LCD is included in the design for real time display of the measured values .The advantages of this device with reference to measurement accuracies, cost, and compactness are covered in the conclusion.

The technology uses silicon micro fabrication, together with other advanced precision machining technology, as the main tool to realize various novel designs of micro-machines & devices. MEMS is a new technology leveraging the enormous capital investment in the IC fabrication technology. Digital compass has become popular in the past few years due to advancements of MEMS based magnetic sensors and feature rich microcontrollers. Compass applications are from simple hand held navigation devices to automobile navigation systems with up to date global maps [2]. A method for heading determination is described in this paper, includes the effects of pitch and roll. The measurement unit is presented in the next section.

Keywords: Applications of MEMS accelerometer, magnetic sensor applications, digital compass, tilt sensor.

Any moving object or stationary device heading measurement with respect to true north can be done by a magneto resistive sensor up to one degree resolution [3]. But the accuracy of this measurement depends upon the angle of the object/device is tilted at with respect to the earth. In order to arrive at accurate heading measurement, both magnetic sensor and accelerometer needs to be used simultaneously so as to correct the heading measurement with respect to tilt angle.

II. SYSTEM DESIGN

I. INTRODUCTION Most navigation systems today use some type of compass to determine heading direction [3]. Electronic compasses make ideal heading sensors as a complement to navigation aids, such as GPS receivers, by sensing the direction of the earth’s magnetic field [2]. The classic argument against the use of a compass is that GPS provides heading information that is computed by the difference of two most recent position fixes (waypoints). This is all fine for constantly moving objects, but for vehicles that are stationary or slowly moving the heading computation becomes unreliable. The magnetic compass has been used in navigation for centuries. Advances in the technology have led to the solid state electronic compass based on magneto resistance (MR) magnetic sensors and acceleration based tilt sensors. Electronic compasses offer many advantages over conventional needle type or gimbaled compasses such as: shock and vibration resistance, electronic compensation for stray field effects and direct interface to electronic navigation systems. An electronic compass also becomes necessary if backup navigation means are needed when dealing with the GPS blocking caused by urban jungles and obstructions such as bridges and tunnels [2]. If provided with heading, speed and time data, a reasonably accurate backup navigation method can be implemented. Today, motion sensing has given a whole new face to user interface and captured the consumer, automotive, health care field, etc; The Success of motion sensing application is driven by continuous innovations, creativity and development in the micro-fabrication techniques. Š 2011 AMAE DOI: 02.CEMC.2011.01. 503

Figure 1: Block diagram of the system developed.

The measurement system block diagram is shown in Figure 1. It is built around AVR Atmega168 microcontroller [7]. Honeywell 2-axis magneto-resistive sensor based digital compass HMC6352 is used to carryout heading measurement. Low cost capacitive Micro machined 3-axis accelerometer from Freescale semiconductor is included in the system to measure the tilt. A 16 character by two lines Liquid Crystal Display is interfaced with the microcontroller to display heading value and roll and pitch angles in degrees. The heading, roll and pitch values available at the microcontroller are also communicated to PC through standard RS232 serial 198


Poster Paper Proc. of Int. Colloquiums on Computer Electronics Electrical Mechanical and Civil 2011 communication protocol (uses IC MAX232 which is Rs232 to CMOS\TTL voltage level converter and vice versa). A simple hyper terminal like tool can be used at PC side for further study & analysis. 2.1. HMC 6352 digital compass The Honeywell hmc6352 is a fully integrated compass module [8] that combines 2 axis magneto-resistive sensors (uses Anisotropic Magneto-Resistive (AMR) technology[9]) with required analog and digital support circuits, and algorithms for heading computation. It is a 6.5mm by 6.5mm by 1mm LCC package. Figure 2 offers a complete, ready to use electronic compass. Sensor can be used in strong magnetic field environments and communicates with any microcontroller using I 2C bus system. The HMC6352 Integrated Compass module is composed of two magnetoresistive (MR) sensors [10] with orthogonal orientation for sensing the horizontal components of the earth’s magnetic field (0 to 630 milli-gauss), plus two amplifiers, a set / reset drive circuit, and a microprocessor [8]. Best accuracy is obtained in clean magnetic environments (free air) and perpendicular to the gravitational direction. At worst case, each degree of tilt from a level orientation could add two degrees of compass heading error. Magnetic errors can be introduced if operated near strong magnetic sources such as microphone or speaker magnets, transformers etc., These magnetic errors can typically be reduced or eliminated by performing the calibration routine.

The movable beams can be deflected from their rest position by subjecting the system to acceleration (see Figure 4). As the beams attached to the central mass move, the distance from them to the fixed beams on one side will increase by the same amount that the distance to the fixed beams on the other side decreases. The change in distance is a measure of acceleration [11]. The g-cell beams form two back-to-back capacitors (see Figure 4). As the center beam moves with acceleration, the distance between the beams changes and each capacitor’s value will change, (C = Aε/D). Where A is the area of the beam, ε is the Dielectric constant, and D is the distance between the beams. The ASIC uses switched capacitor techniques to measure the g-cell capacitors and extract the acceleration data from the difference between the two capacitors. The ASIC also signal conditions and filters (switched capacitor) the signal, providing a high level output voltage that is ratio-metric and proportional to acceleration.

Figure 4: simplified transducer physical model

2.3.System integration The HMC6352 as a slave device communicates via twowire I2C bus system. The host microcontroller ATMEGA168 as a master device establishes I2C communication with slave device. HMC6352 uses layered protocol [8, 13] with the interface protocol defined by I2C bus specification version 2.1 and the lowered command protocol defined by Honeywell. The factory set 7 bit -device address for HMC6352 is 42H for write operation and 43H for read operation. Pull up resistor 10k ohms is used for SDA and SCL line. All the data transactions with HMC6352 are initiated by the host microcontroller which is responsible for generating clock signal and 8 bit data transfer . Bus sequence begins with master by issuing start sequence followed by slave address byte with read or write bit added. At 9th clock, the device will issue ACL (NACK) signal. Following these bus events, the actual data byte for write or read takes place. All the bus transactions are terminated with master using stop sequence. HMC6352 provides output data in one of the three available output data modes (heading mode, raw magnetometer mode & magnetometer mode). This system configured the device to send heading value. The heading output value will be in degrees from zero to 3599 with a decimal point before the last digit. This value is available in binary format occupied by two bytes. The Figure 5(a) shows the proto model developed for heading measurement. The roll and pitch tilt angle measurement was done by [14] MMA7260q accelerometer that was connected to the host microcontroller (see Figure

Figure 2: Honeywell HMC6352, a two-axis, chip-scale digital compass.

2.2. MMA7260QT accelerometer Figure 3 shows [11,12] Freescale MMA7260qt low cost capacitive micro-machined accelerometer available in 6mm by 6mm by 1.5mm QFN Pb-free package device consisting two surface micro-machined capacitive sensing cells(g cells) ,integral signal conditioning ASIC with g-select allows for selection among 4 sensitivities (1.5g/2g/4g/6g). The g-cell is a mechanical structure formed from semiconductor materials (polysilicon) using semi-conductor processes (masking and etching). It can be modeled as a set of beams attached to a movable central mass that move between fixed beams.

Figure 3: MMA7260QT low cost capacitive micro machined accelerometer.

© 2011 AMAE DOI: 02.CEMC.2011.01. 503

199


Poster Paper Proc. of Int. Colloquiums on Computer Electronics Electrical Mechanical and Civil 2011 5(b)). Tilt is a static measurement where gravity is the acceleration being measured. Therefore, to achieve the highest degree resolution of a tilt measurement low g sensitivity is better and so mma7260 was configured to select in low g (800mv/g) mode using g-select. A simple tilt measurement was done using in-built 10 bit ADC of Atmega168 microcontroller. Accelerometer was connected to ADC0 to ADC2 channels of microcontroller and external analog reference voltage of 3.3 volts is applied. With the help of few additional I/O pins, a simple 16 character by 2 lines LCD is used to display the roll and pitch angles in degrees as well as the compass heading value in degrees. Software takes care in such a way that the digital compass measurement will be carried out only when the roll and pitch angles are zero. Measuring tilt using three axis solutions produces more accurate results [15]. And so the system uses accurate tilt algorithm using C language to measure tilt angle. For this following logic equation in C is used to calculate roll and pitch. Roll angle in radians (Rho) = atan (ax/sqrt(pow(ay,2)+pow(az,2))) . Pitch () angle in radians (Phi) = atan (ax/sqrt(pow(ay,2)+pow(az,2))) . As one radian is equal to 57.2957795129 degrees, the resultant roll and pitch angle in degrees can be measured by multiplying the above resultant value with 57.2957795129.

Figure 5 (b): LCD shows 0.64 roll and 2.33 pitch angles in degrees.

2.4. Results and Discussion A 10-bit ADC cuts 3.3V supply into 1023 steps of 3.2mV for each step. Therefore, by taking one ADC reading at 0g (0° of tilt for an x-axis device), would now result in the following: 0°: 1650mV + 3.2mV = 1653.2mV 90°: 2450mV + 3.2mV = 2453.2mV This results in a 0.229 degree resolution at the highest sensitivity point (0°) and a 3.26 degree resolution at the lowest sensitivity point (90°) [14]. As seen in Figure 6, the typical output of capacitive, micromachined accelerometers is more like a sine function. The figure shows the analog output voltage from the accelerometer for degrees of tilt from -90° to +90°. The change in degrees of tilt directly corresponds to change in the acceleration due to a changing component of gravity acted on the accelerometer. The slope of the curve is actually the sensitivity of the device. As the device is tilted from 0°, the sensitivity decreases. The slope of output voltage decreases for an increasing tilt towards 90°. Because of this nonlinearity, the degree resolution of the application must be determined at 0° and 90° to ensure the lowest resolution is still within the required application limits. The system is able to measure heading angle with a resolution of +/-1°.

Figure 5 (a): Proto model of Digital compass using HMC6352 Here LCD shows 282.3 degrees heading value.

Figure 6: Typical Nonlinear output of X, Y and Z accelerometer.

© 2011 AMAE DOI: 02.CEMC.2011.01. 503

200


Poster Paper Proc. of Int. Colloquiums on Computer Electronics Electrical Mechanical and Civil 2011 CONCLUSION

[9] FressscaleTM MMA7260QT Technical datasheets, Document no: Rev 05 -03/2008. Freescale semiconductor Inc © 2005-2008. [10] Yull Heilordt Henao Roa and Fabiano fruett “A sports activities monitoring system based on acceleration and rotation microelectromechanical sensors”- pp 1-5, sep 2009, 8th international conference & workshop on ambient intelligence and embedded systems AMiES-09 proceeding. [11] Device Operational Overview of HMC6352, Application note from www.honeywell.com. [12] Michelle Clifford and Leticia Gomez “Measuring Tilt with Low-g Accelerometers” Application note: AN3107 Rev 0 05/2005 © Freescale semiconductors, Inc 2005. [13] Kimberly Tuck “Tilt Sensing Using Linear Accelerometers”, Application note: AN3461, Rev 2 06/2007 © Freescale semiconductors, Inc 2007.

In this paper, compact and low cost compass developed giving 1° accuracy in heading angle measurement is discussed. The compass can meet the requirements of various navigation systems for different applications. While taking the measurements with the compass, caution must be taken such that neither the varying magnetic disturbances nor soft iron materials should be present near the compass. The compass required to be shielded suitably if it is to be used in such environmental conditions. Variations in the earth’s field from a true north heading can be measured if the geographical location of the compass is known. This can be done by using a GPS system and IGRF reference model to compute the variation angle.

Nanda Kumar.L obtained his M.Sc degree in electronics in 2003 from Andhra university, MS software systems in 2011 from BITS ,pilani and he is currently pursuing PhD in department of Systems Design, he is working as projects design engineer in Raghu’s center of excellence - An embedded systems design and software develop ment center. .He is professional member in IACSIT and IACQUER.

ACKNOWLEDGEMENTS We express our sincere and profound gratitude to Sri Raghu Kalidindi, Chairman of Raghu Educational Institutions for his encouragement in providing necessary lab and resources to carry out this research work. REFERENCES

Prof.S.veerabhadraiah obtained Msc from Andhra University in 1969 and PG diploma from IIT Mumbai in 1976. He was ex-Scientist-G in NSTL (Naval Science and Technological Laboratory) , Visakhapatnam. He has 11 technical papers to his credit. He is Fellow of IETE and professional member in IACQER.. Presently he is Dean of Raghu educational institutions. He is also pursuing PhD in dept of systems design , A.U.

[1] Stephen Beeby, Graham Ensell, Michael Kraft and Neil White “MEMS Mechanical Sensors”, ISBN 1-58053-536-4, PP 173-211 @2004 ARTECH HOUSE INC. [2] Mark Amundson “The role of compassing in telematics”. in telematics platforms, navigation data plays a vital role and permits new dynamic possibilities, Analysis Usa Focus – Telematics Update, Issue 24, pp 16,17, October – November 2003. [3] Michael J. Caruso “Applications of Magneto resistive Sensors in Navigation Systems” solid state electronics center, Honeywell Inc. [4] Electronic compass solution, web portal liter-ature from www.honeywell.com. [5] AN203 “COMPASS HEADING USING MAGNETOMETERS” Application Note 7/95 rev A from www.ssec.honeywell.com. [6] Michael J. Caruso “Applications of Magnetic Sensors for Low Cost Compass Systems” solid state electronics center, Honeywell Inc. [7] Atmega168 Technical data, Rev. 2545R–AVR–07/09, © ATMEL 2009 from www.atmel.com. [8] 2-Axis Compass with Algorithms HMC6352 Technical data, #900307 Rev D, Jan2006, © 2006 Honeywell International Inc.

© 2011 AMAE DOI: 02.CEMC.2011.01. 503

Balanagabhushanamu.M received his Msc in electronics and M.Phil from Andhra University. MS from BITS pilani in 2011 and he is currently pursuing PhD in dept of systems design, A.U.

201


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.