Application of the hottest v2xe geomagnetic sensor

2022-08-17
  • Detail

Application of v2xe geomagnetic sensor in single chip microcomputer system

1 introduction

v2xe is a new 2-axis compass and geomagnetic sensor with integrated microprocessor as control and interface [1]. U2xe uses the 3V working power supply commonly used in the new system, which has the advantages of low power consumption, small size, strong anti noise ability under various conditions, large measurement sensitive sensing area, etc. V2xe combines the patented magnetic field induction sensor and measurement circuit technology of PNI company, and is not affected by the compensated drift. The measurement results at different temperatures are very stable. V2xe inputs/outputs data through a simple and easy standard SPI interface

2 performance characteristics

the typical characteristics of v2xe are as follows:

low power (3V DC, 2mA output)

small package size (25.4mm × 5.4mm × 11.5mm); Through the display screen, we can get the shape of the experimental machine and various experimental parameters

high magnetic induction (0.01 °)

high magnetic accuracy (2.0 °)

digital interface output (3V standard SPI interface)

with high magnetic field induction (0.00015gauss)

has a large magnetic field range (± 11gauss)

v2xe pin functions are listed in Table 1

apply v2xe to GPS system, read the measurement data of v2xe with AT89C2051, and transmit the data to GPS processor through serial port. Figure 1 shows the schematic diagram of v2xe connecting to MCU. Since AT89C2051 has no standard SPI port output [2], P1.7, P1.6 and P1.5 are used to simulate SCLK, miso and MoSi terminals respectively. The reset pin sync of v2xe is controlled by P3.7 pin, ssnot is grounded, and v2xe works in slave mode

3 data format and command word

v2xe has two data formats: big endian and little endian. Big endian data is stored from high to low, and little edit data is stored in reverse order, that is, the data with the lowest 8 bits is placed in the highest 8 bits, and the data with the highest 8 bits is placed in the lowest 8 bits. As shown in Figure 2

the command format with data consists of a start flag (sync flag), an instruction type (frame type) and an end flag (Terminator). Figure 3 shows a setdatacomponents (0x03) command with parameters heading (0x02) and magnitude (0x05). V2xe common command words include getmodinfo, modinforesp, setdatacomponent, GetData, dataresp, setconfig, getconfig, configresp, and saveconfig. Its instruction codes and functions are shown in Table 2

4 programming example

spi interface data receiving and sending are synchronous. V2xe will send 0x00 every time it receives a data. When v2xe sends the response of the command, it will not process any input data. Therefore, when the host obtains v2xe data, it should send and receive at the same time. Write the send receive function spitransmit in C language as follows:

the typical application process of a v2xe system is shown in Figure 4

when v2xe leaves the factory, the version number of the chip is solidified in its ROM. The user can first read the version number to judge whether the device works normally when using v2xe system for the first time. He can first send the command getmodinfo to v2xe, and then read the return value modinforesp. The procedure is as follows:

3. According to the scope of use, it can be divided into warning tape, carpet tape, electrical tape, protective film tape, winding tape, sealing tape, die-cutting tape, etc, The chip information obtained is stored in the array Verson, and it can be compared with the actual version number (v2xev201) according to the read value to determine whether the system works normally. If the system works normally, first set the return data format as required to determine that v2xe returns these values of interest to users, mainly including geomagnetic direction angle, magnetic field strength, temperature and calibration status bits. In addition, some initialization parameters should be set, mainly including declination (local geomagnetic angle, which can be obtained from http://), true north (setting the reference angle to geomagnetic north [3]), big en. At the same time, it should be quietly placed on the base of the experimental machine. Dian (select the large and small mode of data), dampingsize (data buffer, average the data in the buffer as the actual output of v2xe)

in the practical application of v2xe, calibration is often required. Common commands include startcal, stopcal, getcaldata, caldataresp and setcaldata. The instruction code and function description are shown in Table 3. During the standard process, the v2xe device should be placed horizontally as far as possible, and the device should be rotated in place for two weeks from the beginning of calibration to the end of calibration. The time of each revolution shall not be less than 30s. After the calibration is completed, you can query the innovative Yongqi in the enthusiasm, and smell the number of business opportunities from it. Calstate can judge whether the calibration is successful. After completing the initialization work such as parameter setting and calibration, you can obtain the data of v2xe by sending the command GetData (0x04). For v2xe, you must read out its output every time you send the command. Otherwise, the next normal output will be affected

5 conclusion

the system has been successfully applied to handheld GPS positioning and navigation products. At room temperature, the measured direction angle deviation is within 2 ° and the measured temperature deviation is less than 1 ℃. The geomagnetic sensor v2xe has broad application prospects in GPS positioning and magnetic field detection with its advantages of simple interface, low power consumption, small volume and simple software design

(end)

Copyright © 2011 JIN SHI