Pointing sensors in the right direction for use digital compasses

Paul Boughton

Having the right combination of tools can make the difference between success and failure. This is true whether you are navigating the open seas or designing an embedded control system.

Silicon Laboratories' Direct Sensor Interface Technology (DSiT), included in the C8051F350 precision mixed-signal microcontroller (MCU) family, is designed with this in mind.
Simply put, DSiT is the optimum balance and integration of technologies that enables a designer to take an un-conditioned, un-compensated, raw output signal from a sensor and interface it directly into a single-chip application solution.

Balanced features

DSiT incorporates all the elements necessary in an instrumentation system creating a balanced combination of features that enable designers to create truly intelligent sensor systems, as demonstrated with Silicon Laboratories' new Digital Compass Reference Design, a multi-axis tilt-compensated electronic compass.
The ability to easily interface to small signals (hundreds of µV to tens of mV) is paramount in today's sensor arena. As sensing technologies and sensor applications continue to push the limits of detection, the system level challenges to the end designer increase significantly.
These challenges are further compounded when requirements of minimising power dissipation providing intelligent processing and system cost reduction are further constrained.
We selected a tilt-compensated digital compass application as a demonstration vehicle for C8051F350 and DSiT because very small signals could be interfaced directly to the mixed-signal microcontroller with no additional instrumentation circuitry.
Additionally, the computational requirements of the compass demonstrate the capability of the high-speed 8051 core with 50MIPS peak throughput.

Earth's magnetic field

One of the oldest instruments for navigation, a compass contains a freely suspended magnetic element that displays the direction of the horizontal component of the Earth's magnetic field at the point of observation.
Even in a time when global positing satellite (GPS) systems have become commonplace, electronic compasses remain vital tools that can easily interface with other electronic systems.

The compass design is based around the C8051F350 MCU, three separate axis of magnetoresistive sensing elements, and a two-axis accelerometer.
A magnetic compass works because the Earth is a giant magnet, surrounded by a huge magnetic field. The earth has two magnetic poles, which lie near the geographic North and South Poles.
The Earth's magnetic field intensity is about 0.5 to 0.6 gauss and has a component parallel to the Earth's surface that always points toward magnetic north and is used to determine compass direction.
The azimuth is the angle between magnetic north and the heading direction. The magnetic north is the direction of the Earth's magnetic field component that is perpendicular to gravity.
There are two main factors that complicate the task of determining accurate heading with a compass. The first is that the earth's geographic north pole and its magnetic north pole are two different locations.
This is commonly referred to as the angle of declination, which is the angle between geographic or true north and magnetic north.

Declination

Declination is dependent on the relative observation position and is also subject to a long-term drift. Declination can be to the east or to the west and can be as significant as 25°.
The azimuth measured by a compass has to be corrected by the declination in order to find the heading direction with respect to geographic north.
The second is that depending on your location on the earth, the angle between the magnetic field lines of the earth and the horizontal plane change. This is commonly referred to as the angle of inclination.
Inclination is the angle between the earth's field vector and the horizontal measurement plane. The inclination varies with the actual location on earth, being zero at the equator and approaching 90° near the poles.

Directional measurement

Both of these effects must be accounted for in order to assure accurate directional measurement.
Furthermore, the orientation of the compass with respect to the fields that it is measuring (ie, the tilt of the compass relative to the horizontal plane) must also be considered.
As a result, the task of building a tilt compensated magnetic compass can be reduced to determining the variables: azimuth, inclination and declination.

Magnetoresistive sensing elements have output signals of only a few mV; signals ideally suited for DSiT. Compensation for tilt, inclination, and declination require trigonometric computations performed during run time; requiring a high performance core to ensure adequate update rates.
Furthermore, many aspects of the implementation must be additionally refined to minimise cost necessitating a highly integrated solution.
DSiT includes a multiplexer, offset digital-to-analog converter (DAC), programmable gain amplifier, comparator, 24-bit sigma delta analog-to-digital (ADC), on-board voltage reference, programmable digital filter and current controlled DACs.
The C8051F350 MCU integrates an eight-channel, 24-bit ADC with a high-speed 8051-compatible CPU delivering up to 50MIPS throughput with a 50MHz clock and 8kBytes of Flash memory and 768bytes of RAM.
The ADC has programmable analogue data conversion rates up to 1000 conversions per second and is complemented by dual 8-bit sensor-excitation DACs and an on-board temperature sensor.
It also has 17 flexible digital I/O pins that are 5 V compatible. On-board serial communication peripherals include UART, SPI and SMBus serial ports and the device also incorporates a precision internal oscillator eliminating the need for an external crystal or resonator.

Single chip solution

The result is a single chip solution that accommodates the sensor interface and the end-user application. But it is important to note that this system topology is not constrained to navigation applications using magnetoresistive sensors.
Nearly any small signal that must be intelligently processed is a candidate for DSiT. Real-time monitoring, calibration, linearisation, and control of process parameters (for example, temperature, pressure, flow, speed, force, level, etc) are one of a variety of applications ideally suited for DSiT.

Keith Odland is Product Marketing Manager at Silicon Laboratories, Austin, Texas, USA. " target="_blank">www.silabs

"

Recent Issues