BW SENSING LEC315M User manual

LEC315M
Angle Compensation
3D Electronic Compass
with Modbus
Technical Manual

The LEC315M is a 3D Electronic Compass with high accuracy. It offers high
accuracy heading information when tilt angle reaches 40° initially.
LEC315M is a small size, low power consumption compass that is widely used in
the antenna steadiness, vehicle navigation, system integration, etc.
Introduction
Features
Applications
●Accuracy: 2°
Operating t emperature: -40℃~+85℃●
Low work current: <40mA●
● High pitch angle measurement range: ± 30°
● Hard magnetic, soft magnetic and angle
compensation
●RS232/RS485/TTL Optional, Modbus Optional
●Satellite tracking
Drilling equipment●
Optical range finder●
Combat equipment●
●Navigation of the underwater robot
Marine measurement●
Robotic system●
Unmanned aerial vehicles●
LEC315M
Angle Compensation 3D Electronic Compass with Modbus
Bewis Sensing Technology LLC www.bwsensing.com Tel:+86 189 2129 2620

Power supply
Operating current
Operating temperature
Sore temperature
5VDC
30mA(40mA max)
-40~+85℃
-55~+100℃
Specifications
Compass Heading
Parameters
Compass Pitch
Parameters
Calibration
Physical
Specifications
Heading Accuracy
Resolution
Repeatibility
Pitch Accuracy
Roll Accuracy
Resolution
Hard Iron Calibration
Soft Iron Calibration
Limit Tilt User Calibration
Size
Weight
RS232/485/TTL Interface
Startup Delay
Max Output Frequency 50gHZ
<50 ms
Optional
130g
L55 x W37 x H24 (mm)
Yes
Yes
Yes
0.01°
0.2°
0.2º
0.3°
0.1°
2°(RMS)
RS-232 Communication Rate 2400 to 115200 baud rate
Interface
Specifications
Output Format Binary high energy protocol
Environment Shock Resistance 2000g
Measuring Range ±30°
Electrical Specifications
Performance Specifications
LEC315M
Angle Compensation 3D Electronic Compass with Modbus
Bewis Sensing Technology LLC www.bwsensing.com Tel:+86 189 2129 2620

metal /Aviation plug(1.5m)
IP67
Magnesium Aluminum
Three M4 screws
Size:L55*W37*H24(mm)
Size:L33*W27*H6(mm)
Hole Φ 2mm
23
29
33
27
Resolution: the sensor is able to detect and distinguish the minimum the measured
change within measuring range.
Accuracy: error between actual angle and the root mean square of angle (≥16 times)
multiply measured by the sensor.
Mechanical Characteristics
Connector
Protection level
Shell material
Installation
Package size
Bare plate product size
LEC315M
Angle Compensation 3D Electronic Compass with Modbus
Bewis Sensing Technology LLC www.bwsensing.com Tel:+86 189 2129 2620

Installation
Calibration
Although the LEC315M can compensate for magnetic interference, users should choose a
minimum magnetic interference environment to install and use it. Please make sure the LEC315M
is away from the iron, nickel, magnets, engines and other magnetic substances as far as possible
when place it.
Strictly avoid the magnet, motor and other strong magnetic material close to the
compass within 10cm, which may cause the compass measurement accuracy irreversible
decline.
Each LEC315M compass provides a 1.5-meter cable (optional). Every installation location
magnetic field environment is different, the user must evaluate the installation of the operating
environment feasibility.
Our recommended test method is: install the LEC315M compass on the vertical erected
aluminum (or other non-magnetic material) rod for the heading accuracy measurement
(turning rod perpendicular to the rotating platform, try to avoid large external magnetic field
interference).
The electronic compass has been calibrated at the factory. In the area where the
magnetic field is small, environmental calibration is not necessary when using it, and it can
be used directly. But in the process of actual use, it is suggested that the magnetic
calibration should be carried out. You can select the calibration method according to the
actual situation.
Plane-calibration:
1, place the electronic compass in working environment. Do not carry any magnetic
object such as keys and phones
2, connect the product to the system, and put it horizontally
3, send the command of the MODBUS protocol to start calibrating: 01 06 00 14 00 00 C9
CE
4, keep the compass horizontal, rotate one round steadily over about 10 seconds
5, Make the compass in the following state (X at 90° or -90°, Y axis nears 0°, or Y at 90°or
-90 °, X axis nears 0°) approximately uniform rotation for a week -- this step can be omitted.
6, send command: 01 06 00 15 00 00 98 0E to save the calibration
7, the calibration is complete.
Multidimensional calibration:
1, place the electronic compass in working environment. Do not carry any magnetic
object such as keys and phones
2, keep the compass horizontal (within ±5 degrees)
3, send the command of the MODBUS protocol to start calibrating: 01 06 00 11 00 00 D9
CF
4, set the product face up horizontally (The pitch and roll angles are both within ±5
degrees). Rotate one round steadily over about 10 seconds
5, place the product back up horizontally (The pitch is within 0±5 degrees and the roll is
within 180±5 degrees).Rotate one round steadily over about 10 seconds.
LEC315M
Angle Compensation 3D Electronic Compass with Modbus
Bewis Sensing Technology LLC www.bwsensing.com Tel:+86 189 2129 2620

1
3
4
5
GND
5VDC
1
5
4
2
3
6
7
8
9
BLACK GND
YELLOW TXD
RED VCC
GREEN RXD
RS 232 wiring diagram
Electrical Connections
RED
1
5VDC
BLUE
2
NC
BLACK
3
GND
GREEN
4
RXD
(B、D-)
YELLOW
5
TXD
(A、D+)
RED VCC 5VDC
YELLOW TXD 485+
485-
BLACK GND
RS 485 wiring diagram
GND
Signal
acquisition
Electronic
Compass
1
3
4
5
GREEN RXD
6, place the product vertically with a smooth side of the shell down (The pitch is within
0±5 degrees and the roll is within 90±5 degrees).Rotate one round steadily over about 10
seconds
7, place the product vertically with the other smooth side of the shell down (The pitch is
within 0±5 degrees and the roll is within -90±5 degrees).Rotate one round steadily over
about 10 seconds
8, after rotating four faces , send command: 01 06 00 12 00 00 29 CF to save the
calibration. Because of the MODBUS protocol, there is no return value to indicate the
quality of the calibration.
9, the calibration is complete.
Wiring Diagram
Line function
Electronic
Compass
LEC315M
Angle Compensation 3D Electronic Compass with Modbus
Bewis Sensing Technology LLC www.bwsensing.com Tel:+86 189 2129 2620

Communacation Protocol
1 Data frame format:(8data bits, 1 stop bit, no parity check, default baud rate 9600)
0x77
2 Command format:
2.1 Read the PITCH angle Command:01 03 00 01 00 01 D5 CA
2.2 Read the ROLL angle Command: 01 03 00 02 00 01 25 CA
Data Format: Hexadecimal.
Address code: default 01 (note: address must not exceed FFF).
Function code: 03 for read register, 06 for prefabricated register.
Address of register: the starting address of the register that needs to be operated.
Number of registers: the number of registers to operate on.
CRC check: Through the calculation of the host computer. (suggested using CRC software)
Address Code
(1byte)
Function Code
(1byte)
The first address of
the read register
(2 byte)
Number of
read registers
(2byte)
CRC check
(2 byte)
Command response:
Command response:
XX XX denotes pitch angle with an angle value of hexadecimal number. (PLC or configuration software
read out the number is directly the decimal number). The angle is calculated as follows:
Actual angle = (data converted to decimal -20000 / 100).
For example: the return value of the angle value is 3D52, turning it into decimal is 15698,
The real data is (15698-20000)/100=-43.02°, and the other axes are the same.
03(read)
06(write)
01
Address Code
(1byte)
Function Code
(1byte)
The first address of
the read register
(2 byte)
Number of
read registers
(2byte)
CRC check
(2 byte)
03 00 01 00 01 XX XX
01
Address Code
(1byte)
Function Code
(1byte)
Number of
bytes of data
(1 byte)
Data
(2byte)
CRC check
(2 byte)
03 02 XX XX ZZ ZZ
01
Address Code
(1byte)
Function Code
(1byte)
The first address of
the read register
(2 byte)
Number of
read registers
(2byte)
CRC check
(2 byte)
03 00 02 00 01 XX XX
01
Address Code
(1byte)
Function Code
(1byte)
Number of
bytes of data
(1 byte)
Data
(2byte)
CRC check
(2 byte)
03 02 XX XX ZZ ZZ
XX XX XX XX XX XX
LEC315M
Angle Compensation 3D Electronic Compass with Modbus
LEC315M
Angle Compensation 3D Electronic Compass with Modbus
Bewis Sensing Technology LLC www.bwsensing.com Tel:+86 189 2129 2620

2.3 Read the HEADING angle Command: 01 03 00 03 00 01 74 0A
2.4 Read the Heading, Pitch and Roll angle Command: 01 03 00 01 00 03 54 0B
Command response:
01
Address Code
(1byte)
Function Code
(1byte)
The first address of
the read register
(2 byte)
Number of
read registers
(2byte)
CRC check
(2 byte)
03 00 03 00 01 XX XX
01
Address Code
(1byte)
Function Code
(1byte)
Number of
bytes of data
(1 byte)
Data
(2byte)
CRC check
(2 byte)
03 02 XX XX ZZ ZZ
Command response:
01
Address Code
(1byte)
Function Code
(1byte)
The first address of
the read register
(2 byte)
Number of
read registers
(2byte)
CRC check
(2 byte)
03 00 01 00 03 XX XX
01
Address Code
(1byte)
Function Code
(1byte)
Number of
bytes of data
(2 byte)
Data
(2byte)
CRC check
(2 byte)
03 06 XX XX YY YY ZZ ZZ ZZ ZZ
XX XX means PITCH angle YY YY means ROLL angle ZZ ZZ denotes HEADING angle
2.5 Set relative / absolute zero Command: 01 06 00 0A 00 00 A9 C8 / 01 06 00 0A 00 01 68 08
Command response:
01
Address Code
(1byte)
Function Code
(1byte)
Function Code
(1byte)
Zero Point Type
(2byte)
CRC check
(2 byte)
06 00 0A 00 00(Absolute)
00 01(Relative) XX XX
01
Address Code
(1byte)
Function Code
(1byte)
Function Code
(1byte)
Zero Point Type
(2byte)
CRC check
(2 byte)
06 00 0A 00 00(Absolute)
00 01(Relative) XX XX
Note: The measured angle is referred to the zero point calibrated in factory if absolute zero
point is set. The measured angle is referred to the current angle if relative zero point is set.
The zero point is the zero point of the dip Angle, and when installing, try to install it in the
zero attachment. The Angle changes more, which will cause the change of azimuth.
LEC315M
Angle Compensation 3D Electronic Compass with Modbus
LEC315M
Angle Compensation 3D Electronic Compass with Modbus
Bewis Sensing Technology LLC www.bwsensing.com Tel:+86 189 2129 2620

2.6 Query the relative /Absolute zero point Command: 01 03 00 05 00 01 94 0B
Command response:
01
Address Code
(1byte)
Function Code
(1byte)
The first address of
the read register
(2 byte)
Number of
read registers
(2byte)
CRC check
(2 byte)
03 00 05 00 01 XX XX
01
Address Code
(1byte)
Function Code
(1byte)
Number of
bytes of data
(1 byte)
Data
(2byte)
CRC check
(2 byte)
03 02 ZZ ZZ
00 00(Absolute)
00 01(Relative)
2.7 Set baud rate Command: 01 06 00 0B 00 02 79 C9
Send
Address Code
(1byte)
Function Code
(1byte)
CRC check
(2 byte)
01 06 00 0B XX XX
Response
01
Function Code
(2byte)
06 00 0B
Baud rate type
(2byte)
XX XX
XX XX
XX XX
Note: if XX XX in the baud rate type is
0000, the baud rate is revised to 2400;
0001 indicates that the baud rate is revised to 4800;
0002 indicates that the baud rate is revised to 9600 (the default value);
0003 indicates that the baud rate is revised to 19200;
0004 indicates that the baud rate is revised to 115200;
If the baud rate is changed immediately after the command is sent, the return value is generally confusing.
2.8 Set address Command: 01 06 00 0D 00 02 99 CB
Send
Address Code
(1byte)
Function Code
(1byte)
CRC check
(2 byte)
01 06 00 0D HH LL
Response
LL
Function Code
(2byte)
06 00 0D
Modified address
(2byte)
HH LL
XX XX
XX XX
Note: HH LL represents the address of the product to be changed, HH represents the high position of the
address, and LL represents the status of the address, which is 00 00-00 FF. In the example, the address of
the product is changed to 0002.
LEC315M
Angle Compensation 3D Electronic Compass with Modbus
Bewis Sensing Technology LLC www.bwsensing.com Tel:+86 189 2129 2620

LEC315M
Angle Compensation 3D Electronic Compass with Modbus
2.9 Query address Command: 77 04 00 2F 33
Send
Identifier
(1byte)
Function
Length
(1byte)
Checksum
(1byte)
77 04 00
Response
77
Product custom
protocol address
(1byte)
05 00
MODBUS
address
(1byte)
XX
33
XX
Note: Because the MODBUS protocol specifies that the product can communicate only when it knows the
address of the module, when the MODBUS protocol communication, the address is known in advance and
can not be queried. This product uses custom protocols to query the address of the MODBUS protocol. You
can see the product introduction of a custom protocol about related custom protocol. And the command is
valid for 10 seconds before power.
The XX in the MODBUS address is the product address of the protocol.
Function
Length
(1byte)
2F
2F
2.9 Query address Command: 77 04 00 2F 33
Send
Identifier
(1byte)
Function
Length
(1byte)
Checksum
(1byte)
77 04 00
Response
77
Product custom
protocol address
(1byte)
05 00
MODBUS
address
(1byte)
XX
33
XX
Note: Because the MODBUS protocol specifies that the product can communicate only when it knows the
address of the module, when the MODBUS protocol communication, the address is known in advance and
can not be queried. This product uses custom protocols to query the address of the MODBUS protocol. You
can see the product introduction of a custom protocol about related custom protocol. And the command is
valid for 10 seconds before power.
The XX in the MODBUS address is the product address of the protocol.
Function
Length
(1byte)
2F
2F
2.10 Save setting Command:01 06 00 0F 00 00 78 09
01
Address Code
(1byte)
Function Code
(1byte)(2byte)CRC check
(2 byte)
06 00 0F 00 00 XX XX
Function Code
(1byte)
Command response:
01
Address Code
(1byte)
Function Code
(1byte)(2byte)CRC check
(2 byte)
06 00 0F 00 00 XX XX
Function Code
(1byte)
Note: command should be sent without a power outage after all previous settings that need to be changed
are changed. Otherwise, there is no memory function.
Bewis Sensing Technology LLC www.bwsensing.com Tel:+86 189 2129 2620

LEC315M
Angle Compensation 3D Electronic Compass with Modbus
Bewis Sensing Technology LLC www.bwsensing.com Tel:+86 189 2129 2620
Test Standard
Enterprise quality system standards: ISO9001: 20 standard (certificate number: 7859
CE certification (certificate number: 3;?
RoHS (certificate number: -

LEC315M
Angle Compensation
3D Electronic Compass
with Modbus
Wuxi Bewis Sensing Technology LLC
Address: Building 30, No. 58 Xiuxi Road, Binhu District, Wuxi City, Jiangsu Province, China
Tel/Whatsapp: +86 189 2129 2620
Email: [email protected]
Website: www.bwsensing.com
Table of contents
Other BW SENSING Compass manuals