-
2022-09-23 10:15:04
HMC1055 Three-axis compass sensor set
feature
3 precision sensor assemblies
XY-axis 2-axis magnetoresistive sensor Earth magnetic field detection Single-axis magnetoresistive sensor for Z-axis earth field detection 2-axis accelerometer for 60° tilt compensation
Product Description
Honeywell 's HMC1055 three-axis compass sensor set combines the popular HMC1051Z single-axis and HMC1052 dual-axis magnetoresistive sensors plus a 2-single-axis MEMSIC MXS3334UL accelerometer kit. By combining these three sensor packages, OEM compass system designers will have the need to create their own tilt compensation block compass designs using these proven components. The HMC1055 chipset includes three sensor ICs with application notes for sensor functionality, reference designs and design tips for integrating compass functionality into other platforms
200228141041.png" />
Application Notes
The HMC1055 chipset consists of three sensors packaged into an integrated circuit compass development for tilt compensation electronics. The three sensors consist of a Honeywell HMC1052 dual-axis magnetic field sensor, a Honeywell HMC1051Z single-axis magnetic sensor, and a Memsic MXS3334UL dual-axis accelerometer. Traditionally, a compass is accomplished by sensing the horizontal vector component of the Earth's magnetic field from south pole to north pole using a two-axis magnetic sensor held level (perpendicular to the gravitational axis). The compass consists of a third-axis magnetic sensor and a two-axis accelerometer for measuring pitch and roll that can be electronically "gimbed" and can point to North Pole, regardless of level. The HMC1052 dual-axis magnetic sensor contains two anisotropic magnetic (AMR) sensor elements in a single MSOP-10 package. Each element is a complete Wheatstone bridge sensor that changes the resistance of the bridge and the magnetoresistance in proportion to the vector magnetic field component on its sensitive axis. The orientations of the two bridges on the HMC1052 are orthogonal to each other, so a two-dimensional representation of the magnetic field can be measured. The bridges have a common positive bridge power connection (Vb); and are tied together with all bridge ground connections to form a complete dual-axis magnetic sensor. Each bridge has about 1100 ohm load resistance, so each bridge will draw a few milliamps of current from a typical digital supply. This bridge output pin will be presented with the strength of the exposed magnetic field and the voltage supply on the bridge. Because the Earth's total magnetic field strength is small (~0.6 Gauss), the vector component of each bridge in the Earth's magnetic field is even smaller, producing only a few millivolts of nominal bridge supply value. Instrumentation amplifier circuit; interfaces with differential bridge outputs, and amplifies sensor signals hundreds of times, then outputs each bridge voltage. The HMC1051Z is an additional magnetic sensor in an 8-pin SIP package that is used to place the sensor silicon die vertically relative to the orientation of the printed circuit board (PCB) location. Placing the HMC1052 flat (horizontal) on the PCB and the HMC1051Z vertically, all three vector components (X, Y, and Z) of the Earth's magnetic field are sensed. Through the Z-axis component of the magnetic field, the electronic compass can be oriented arbitrarily; and through the tilt sensor, a tilt-compensated compass heading measurement is performed as if the PCB were perfectly level.
HMC1055
Advanced Information Sensor Products
The MXS3334UL is a dual-axis accelerometer in an 8-pin LCC package that provides the Earth's gravitational field. When the MXS3334UL is held horizontal and placed horizontally on the PCB, the two digital outputs provide a 100 Hz pulse width modulated (PWM) square wave with a 50% duty cycle. Because the accelerometer is tilted or rolled from horizontal to vertical, the dual duty cycle and dual duty cycle will change its work by plus or minus 20% from the 50% center point. The reference design in Figure 1 shows the reference design containing all three sensor elements of the HMC1055 Chipset for a tilt-compensated electronic compass, operating from a regulated 5.0-volt power supply (called Vdd). The HMC1052 sensor bridge elements A and B are called R1A , R2A, R3A, R4A and R1B, R2B, R3B, R4B respectively create a voltage divider network that puts a nominal 2.5 volts into subsequent amplifier stages. The HMC1051Z sensor bridge elements R14Z, R15Z, R16Z and R17Z also perform a similar voltage division method to their amplification stages.
In this design, each amplifier stage uses a single op amp (op amp) from a common LMV324M quad op amp - Ampere Integrated Circuit (IC). For example, resistors R1, R2, R3, and R4 plus capacitor C1 configure op amp X1 as an instrumentation amplifier with a voltage gain of about 200. These instrumentation amplifier circuits take the difference in the voltage sensor bridge and amplify the signal to display the analog-to-digital converter (ADC) inputs on the microcontroller, denoted AN1, AN2, and AN3. Because the zero-field reference level is 2.5 volts, each in-amp circuit receives a 2.5 volt reference voltage (Vref) from a resistor divider circuit consisting of R12 and R13. For example, a +500 mV Gaussian earth field on an HMC1052 Bridge A will produce a voltage difference of 2.5 mV at the sensor bridge output pins (0.5 Gauss times 1.0mV/V/Gaussian sensitivity rating). This is 2.5 millivolts times 200, representing a 0.5 volt offset, referenced to a 2.5 volt Vref, representing the total voltage at AN1 +3.0 volts. Likewise, the positive and negative magnetic field vectors of any Bridge B and HMC1051Z bridges are converted to voltages as stated in AN2 and AN3.
The microcontroller also receives sensor input from the mxs334ul accelerometer directly from Doutx and doubles as two digital inputs, denoted DI0 and DI1. Alternatively, the MXS3334UL temperature output pin (Tout) can be routed to another microcontroller ADC input to further compensate for the temperature of the sensor input. Power is supplied from the 5.0 volt Vdd supply directly to the MXS3334UL to the accelerometer VDA pin and to the Vdd pin via port 10 with an ohmic resistor (R10) for moderate digital noise decoupling. Capacitors C6 and C7 are in the accelerometer and the entire compass circuit. The set/reset circuit of the electronic compass consists of mosfetx4 and X5, capacitors C3 and C4, and resistor R9. The purpose of the set/reset circuit is to recalibrate the magnetic moment in the magnetic sensor bridge when they are exposed to strong magnetic fields, such as speaker magnets, magnetized hand tools, or high current conductors, such as welding cables or power feeders. The set/reset circuit is toggled by the microcontroller for each logic state transition in the HMC1052 and HMC1051Z.
Operation details
With the compass circuit fully powered, sensor bridge A creates a voltage difference between OUTA and OUTA + which is then amplified by a factor of 200 and presented to the microcontroller analog input AN1. Likewise, Bridge B and Bridge C create a voltage difference that is magnified by a factor of 200 and displayed to the microcontroller analog inputs AN2 and AN3. These analog voltages at AN1 and AN2 can be thought of as "X" and "Y" vector representations of the magnetic field. This third analog voltage (AN3), plus the tilt information from the accelerometer, is added to the X and Y values to produce the tilt compensated X and Y values, sometimes designated X' and Y'. To extract these X, Y, and Z values, the voltages from AN1 to AN3 will be passed through the microcontroller's on-board analog-to-digital converter (ADC). The position of the compass according to the resolution of the ADC. Generally, a compass with a 1-degree incremental display will have a 10-bit or larger ADC. An 8-bit ADC is better suited for a basic 8-base point (north, south, east, west, and diagonal points) compass. The choice of a single microcontroller has a large number of different ADC implementations and is an instance where the ADC reference voltage and compass reference voltage can be shared.
The most frequently asked question in AMR compass circuits is the set/reset band must pulse frequency. This answer is not common for most low-cost compasses; from a range of once per second to a menu of user selections once per compass. While the setup circuit consumes very little energy on a per-pulse basis, a constant per-pulse secondary flow can drain a new watch battery in less than a year. At the other extreme of a "set" pulse the user manually requests a compass heading, and the battery life impact is negligible. From a perceptual point of view for an average person, the set pulse interval should be chosen for the shortest time the user can tolerate inaccurate pulses of the compass heading after the compass circuit is exposed to a large nearby magnetic source. The interval of a typical automatic low-cost compass can be every 10 seconds or every hour, depending on the power capacity of the battery. A "setup" function that provides user commands can be a convenient alternative to regular or automated routines. In portable consumer electronics applications such as compass watches, PDAs, and cordless phones; choosing the appropriate compass heading data stream has a large impact on circuit power consumption. For example, a sports watch's heading update rate per second can keep the compass circuit off for close to 99% of the life of the watch, with only 10 milliseconds of measurement snapshots per second and a once-per-minute set pulse to allow corrections. The magnetic field sensing bandwidth of the HMC1052 and HMC1051Z sensors is 5 MHz, so the minimum snapshot measurement time is mainly derived from the settling time of the op amp plus the sample - and the hold time of the microcontroller ADC. In some "gaming" applications for wireless phones and handheld computers, more frequent title updates allow sensor input to be reacted to by the virtual reality software. Typically, these update rates follow a precedent set more than a century ago by the film industry ("movie") with 20 or more updates per second. In the time period between these frequent updates while creating value, some users may only choose to power on the sensor bridge exclusively to optimize the rest of the circuit for lower power consumption.
Compass Firmware Development
To implement an electronic compass with tilt compensation, microcontroller firmware must be developed to capture sensor input to the end-user system and interpret it as meaningful data. Typically firmware can be divided into logical routines such as initialization, sensor output acquisition and raw data manipulation, header calculations, calibration routines and output formatting. For sensor output data acquisition, the analog voltages at the microcontroller inputs AN0 to AN3 are digitized and the result is a "count" number representing the measured voltage. For a compass, it's not necessary that the ADC's absolute sense counts scale down to the sensor's millisecond Gaussian measurement, but it is important to reference the zero Gaussian ADC count level. For example, an 8-bit ADC has 512 counts (0 to 511 binary digits), then a count of 255 would be zero offset and zero Gaussian. In effect, any offset error due to the tolerance of the sensor bridge (bridge offset voltage) multiplied by the amplifier gain stage plus the amplifier; and the magnetic error (near the magnetized material) from the hard iron effect. Typically factory or user calibration procedures in a clean magnetic environment obtain corrected values for the counts from the intermediate ADC scale. Further adjustment of each magnetic correction value Once the compass assembly reaches the end user position, it is strongly required that the sensor axis be removed from the magnetic environment offset. For example, measuring AN0 (Vref) results in about 255 counts, and measuring AN1, AN2, and AN3 results in 331, 262, and 205 counts, respectively. The calibration values for the next 31, -5 and 20 counts will be subtracted resulting in corrections of 301, 267 and 205, respectively. If the pitch and roll are known to be zero, then the (Z axis output) values can be ignored and the tilt corrected X and Y axis values will be the corrected values for AN1 and AN2 minus the voltage reference for AN0. The calculation yields arctan[y/x] or arctan[(267-255)/(301-255)] or 14.6 degrees east of magnetic north.
Advanced information sensor product heading calculation
Once the magnetic sensor axis output is collected and the calibration corrections subtracted, the next heading calculation is to collect the pitch and roll data from the MEMSIC mxs334ul accelerometer output. The MXS3334UL produces a 100Hz, 50% duty cycle pulse-width modulated (PWM) digital waveform at full level (zero tilt) with its Doutx and Douty pins corresponding to the X and Y sensitive axes. These will change the duty cycle of the output pins from 30% to 70% when each axis is fully tilted (±1g). The PWM scale output is strictly gravity, so a 45-degree tilt results in 707 milligrams or a ±14.1% point duty cycle from 50% center rotation. The positive X-axis direction of the MXS3334UL is towards the front of the user platform, and the pitch down will result in a reduced PWM duty cycle while increasing the duty cycle. Likewise, the Y-axis arrow is 90 rotated counterclockwise, resulting in a left scroll corresponding to a decrease in duty cycle and a right scroll corresponding to an increase in the duty cycle. Measuring pitch and roll data for a microcontroller is fairly simple because dual transmit and dual logic signals can be sent to the microcontroller digital input pins for duty cycle measurements. During firmware development or factory calibration, the interrupt or watchdog timer function should be used to scale 100 Hz (10 ms) edges. Then measuring the falling edge of the rising edge of Doutx and Douty (duty cycle calculation) should be the process of counting the clock cycles. For example, a 1MHz clocked microcontroller accrues 10,000 cycles per rising edge and 5,000 cycles per rising edge. The falling edge represents 50% duty cycle or zero degrees of pitch or roll. Once the duty cycle of each axis output is measured and mathematically converted to gravity values, these values can be compared to a memory mapped table if the user needs true pitch and roll angles. For example, if pitch and roll data are known in one-degree increments, a 91-point map can be created to match the gravity value (sign independent) and the corresponding degree indication. Because a tilt-compensated compass requires the sine and cosine of the pitch and roll angles, the format of the gravity data is already between 0 and 1 and no memory mapping of trigonometric functions is required. The gravitational angles for pitch and roll are already appropriate The sine and cosine of the angle are just 1 minus the sine (cosine = 1 – sine).
equation:
Add pitch, then roll angle from raw X, Y, and Y magnetic sensor inputs. After calculating X' and Y', the compass heading can be calculated by the following formula: Azimuth (heading) = arctangent (Y'/X') To perform arc-tangent trigonometric functions, memory mapping needs to be implemented. Thank goodness repeats at each 90° quadrant, so for one degree compass resolution requirements, a mapping quotient of 90 arcs - the tangent function can be used. If you need 0.1° resolution, you need 900 positions, only 180 positions with 0.5° resolution. In addition, for the zero and minimum cases of 0°, 90°, and 180°, special case quotient detection is also required, and the quotient is calculated for the first 270°. After the heading is calculated, two heading correction coefficients can be added to deal with the declination and platform angle errors. Magnetic declination is the difference between magnetic pole and geometric north pole, and varies according to the latitude and longitude (global position) of the user's compass platform. If you have access to Global Positioning Satellite (GPS) information that results in latitude and longitude calculations, then declination can calculate angles or draw a memory map for heading corrections. If the sensor does not exactly match the mechanical characteristics of the user platform. These angular errors can be plugged into firmware development and/or factory calibration.
Compass Calibration
In the paragraph describing the raw magnetic sensor data, from input AN0 to AN3. The firmware calibration routine will create the Xoff, Yoff and Xsf and distortions of the Earth's magnetic field at the Ysf sensor for the "hard iron" calibration coefficients. Usually these distortions come from nearby magnetized components. Soft iron deformation is more complex and does not take into account the pit value, usually ignored for low value cost comparison applications. Soft iron deformations caused by bending magnetic fields of non-magnetized iron materials are either very close to the sensor or bulky. Placing the compass away from ferrous materials is the best way to reduce errors. The benefit amount depends on the amount of ferrous material and its proximity to the compass platform. To derive the calibration factor, the sensor assembly (platform) and its fixed end platform (eg watch/person, boat, turn at least one full turn when the compass electronics collects many consecutive readings. Speed and rate of turn Depends on how fast the microcontroller collects and processes X, Y, and Z data in the calibration routine. A good rule of thumb is to collect readings every few degrees of rotation for a few rotations or keep the rotation slow enough to collect readings at the correct rate of rotation .Xh and Yh readings during calibration are zero values at Xoff and Yoff, and axis scale factor (Xsf and Ysf) unit values. Then, tabulate the collected calibrated X and Y values to find the minimum X and Y values Values and Maximums Y, Xmax, Ymax, Xmin and Ymin values are converted to the following values at the end of the calibration session:
If the end stage cannot be reversed, the Z-axis data is usually not corrected. Portable or handheld application, then the compass assembly can be reversed and Zoff can be calculated like Xoff and Yoff, but with only two reference points (upright and inverted). The factory value for Zoff is probably the only possible value. Corrected X, Y, and Z counts are created by subtracting the offsets, as previously described. The scale factor value is only used after subtracting the Vref count from the offset-corrected axis count. For more details on the calibration of the iron effect, see the white paper "Magnetoresistive Sensors in Navigation Systems". The offset due to the sensor bridge offset voltage for each sensor axis is part of the Xoff, Yoff and Zoff calculations. These are offset even without magnetic field interference. To find their true values, the set and reset drive circuits can be toggled when measurements are taken shortly after each conversion. After the reset pulse, the polarity of the sensor bridge is reversed in the magnetic field portion while the offset remains constant. Therefore, the reset and set pulses can be added together. The magnetic part of the total will be canceled, leaving only a value of double the offset. The result can then be divided by 2 to get the bridge offset. The reason for knowing the bridge offset is that the offset drifts with temperature. Whether the user needs the best heading accuracy, a new calibration environment should be performed each time a new temperature is encountered. For further compass design considerations, see Application Notes AN-212, AN-213, and AN-214.