
Calibration
The electronic compass has been calibrated at the factory. In places where the influence of the
magnetic field environment is small, it is not necessary to perform environmental calibration and can
be used directly. During actual use, it is recommended to perform calibration.
Method 1 - Plane calibration:
1.Connect the product to the system and place the product in a horizontal state;
2.Open the serial port debugging assistant and send 77 04 00 11 15;
3.Rotate the product in the horizontal plane (with the pitch and roll angles within ±5°) around the z-
axis (z-axis is vertical) and rotate 2-3 turns. The rotation process is as slow as possible and rotates at a
constant speed. The time of one rotation is controlled between 10 seconds and 15 seconds;
4.Rotating the compass around the X-axis or the Y-axis, the rotation process is as slow as possible and
rotates at a constant speed, rotating 2-3 turns around each axis, and the time of one rotation is about
15 seconds;
5.Complete calibration, send 77 04 00 12 16 to save calibration.
Method 2 - Multi-face calibration:
1.Fix the electronic compass in the use environment, and try not to carry magnetic items such as keys
and mobile phones during calibration;
2.Place the compass in a horizontal state (within ±5°);
3.Send the following calibration command in hexadecimal format: 77 04 00 08 0C, return value 77 05 00
88 00 8D;
4.The product is placed horizontally, face up (pitch and roll are within ±5°), rotate one revolution at a
constant speed approximately and use for more than 10 seconds.
5.The product is placed horizontally, with the mounting surface facing up (pitch and roll are within ±5°),
rotate one revolution at a constant speed approximately and use for more than 10 seconds.
The main sensitive components of the LEC315 sensor are magnetometers and accelerometers.
The compass uses a magnetometer to sense the geomagnetic field to calculate the direction of the
sensor. The accelerometer is used to measure the angle between the compass and the gravity, and
provides the tilt compensation when the compass calculates the azimuth. The earth's magnetic
field is easily interfered by the external magnetic field. Users should pay attention to the surrounding
magnetic field during installation to ensure that the sensor is exposed to the earth's magnetic field
and avoid using it near ferromagnetic materials and changing magnetic fields, Such as engines,
iron plates, iron bolts and nuts, wires, motors, speakers, antennas, etc. It is important to strictly avoid
magnets, motors and other strong magnetic substances within 10cm of the compass, which may
cause the measurement accuracy of the compass to irreversibly decrease.We strongly recommend
magnetic field calibration after installation and every time the magnetic field environment
changes. After the calibration in accordance with the manual, the firmware and program in the
LEC315 can effectively eliminate the interference of the magnetic field. As long as the position
of the compass and the surrounding magnetic field environment have not changed, it is no longer
necessary to compensate the sensor.
Tests have shown that if the user performs the calibration operation according to the requirements of
the user manual so that the compass can meet the above requirements during installation and
correctly calibrate the sensor, the heading accuracy of the sensor will be less than 2 degrees (RMS).
The recommended test method is to mount the LEC315 sensor horizontally on a non-
magnetic material away from interference for heading angle measurement. Avoid extra
magnetic field interference during measurement.
LEC315
Inclination compensation 3D
electronic compass
Measurement & Installation
Azimuth calibration step:
Bewis Sensing Technology LLC www.bwsensing.com Tel:+86 189 0617 7922