论文信息
论文解读
AI 辅助整理- 方法
- 微控制器网关、NMEA解析、CAN 2.0B、多帧分段与握手同步。
- 发现
- 平均延迟19.6ms,消息重构成功率99.98%,丢包率0.02%,实现可靠实时通信。
- 机会点
- 可研究多传感器异构协议统一网关及时间同步,提升农机自主系统实时性与可扩展性。
论文摘要
将高精度定向传感器集成到弹性通信基础设施中,是下一代自主系统的关键需求。数字罗盘传感器通常以NMEA格式生成数据,而移动机器人中的分布式控制架构则主要采用CAN 2.0B协议。本研究介绍了一种基于微控制器的硬件-软件网关的设计与实现,该网关能够在自主农业平台中实现这些异构通信标准之间的无缝互操作。所提出的系统作为协议转换层运行,通过串行通信从数字罗盘获取定向数据(航向、俯仰和横滚),并将其转换为符合CAN标准的报文。传入的NMEA语句在封装为扩展CAN帧之前,经过解析、验证和过滤。为解决经典CAN的有效载荷限制和传输速率差异问题,实现了多帧分段策略和基于握手的同步机制。此外,采用缓冲技术以确保时间一致性,并防止高频数据交换过程中的数据丢失。实验评估表明,所提出的网关实现了可靠的实时通信性能,在连续CAN总线数据传输测试中,平均端到端通信延迟为19.6 ms,报文重构成功率为99.98%,丢包率为0.02%。所提出的集成框架有效弥合了传统串行传感器协议与现代基于CAN总线的分布式系统之间的差距。因此,这项工作为精准农业中的协议互操作性提供了一种可扩展且实用的解决方案,并为自主田间机器人稳健传感器集成策略的发展做出了贡献。
全文
Turkish Journal of Agriculture - Food Science and Technology2860
Turkish Journal of Agriculture - Food Science and Technology, 14(10): 2860-2869, 2026
DOI: https://doi.org/10.24925/turjaf.v14i10.2860-2869.9031
Turkish Journal of Agriculture - Food Science and Technology
Available online, ISSN: 2148-127X │www.agrifoodscience.com │ Turkish Science and Technology Publishing (TURSTEP)
A Gateway -Based Approach for Integrating Digital Compass Data into
Controller Area Network (CAN) in Precision Farming Systems
İlker Ünal1,a,*, Osman Eceoğlu2,b
1Burdur Mehmet Akif Ersoy University, Faculty of Science and Letters, Department of Precision Agriculture and Agricultural Robots, 15200,
Burdur, Türkiye
2Akdeniz University, Technical Science Vocational School, Department of Control and Automation, 07070, Antalya, Türkiye
*Corresponding author
A R T I C L E I N F O A B S T R A C T
Research Article
Received : 28.04.2026
Accepted : 28.06.2026
The integration of high precision orientation sensors into resilient communication infrastructures is
a key requirement for next -generation autonomous systems. Digital compass sensors typically
generate data in the NMEA format, whereas distributed control architectures in mobile robotics
predominantly utilize the CAN 2.0B protocol. This study presents the design and implementation
of a microcontroller -based hardware -software gateway that enables seamless interoperability
between these heterogeneous communication standards within autonomous agricultural platforms.
The proposed system operates as a protocol translation layer, acquiring orientation data (heading,
pitch, and roll) from a digital compass via serial communication and converting it into CAN -
compliant messages. The incoming NMEA sentences are parsed, validated, and filtered before
being encapsulated into extended CAN frames. To address the payload limitations of Classical CAN
and discrepancies in transmission rates, a multi-frame segmentation strategy and a synchronization
mechanism based on handshaking are implemented. Additionally, buffering techniques are
employed to ensure temporal consistency and prevent data loss during high -frequency data
exchange. Experimental evaluations demonstrated that the proposed gateway achieved reliable real-
time communication performance, with an average end to end communication latency of 19.6 ms,
a 99.98% message reconstruction success rate, and 0.02% packet loss during continuous CAN Bus
data transmission tests. The proposed integration framework effectively bridges the gap between
legacy serial sensor protocols and modern CAN Bus-based distributed systems. Consequently, this
work offers a scalable and practical solution for protocol interoperability in precision agriculture
and contributes to the development of robust sensor integration strategies for autonomous field
robotics.
Keywords:
Digital compass
CAN bus
Agricultural gateway
Sensor integration
Autonomous field robots
a iunal@mehmetakif.edu.tr https://orcid.org/0000-0002-5188-4438 b osmaneceoglu@akdeniz.edu.tr https://orcid.org/0000-0001-5778-6655
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).
Introduction
Autonomous mobile robots that have robust sensor
communication network can interact with their
environments, make decisions in real time, and carry out
activities on their own. Mobile robots cannot function truly
autonomously in dynamic, unstructured situa tions without
robust localization systems. To assure mobility,
navigation, and path planning based on the robot's position
in such surroundings, robust sensor communication
network, effective identification algorithms, and real -time
environmental identific ation is necessary (Yang et al.,
2023; Haider et al., 2022).
Developed in the early 1980s, the CAN bus has been
widely used for intra -vehicular communication since its
inception thirty years ago, mostly for cars and other land
vehicles. Robert Bosch Gmbh first developed the CAN bus
at the same time as microprocessors were being used in
automotive design. Over the past three decades, there has
been a significant increase in the use of the CAN bus. CAN
bus communications are becoming widely used to link
specialized systems and equipmen t in buses, tractor
trailers, agricultural vehicles, and mobile robots (Kessler,
2021). Also, it can used to interconnect such equipment as
the Global Navigation Satellite System (GNSS),
gyroscope, compass, navigation display, a large variety of
agricultural status sensors for agricultural mobile robots
(Cui et al., 2024). For agricultural mobile robots, the usual
method is to use an Inertial Measurement Unit (IMU) with
a Global Positioning System (GPS) to determine their
location and speed (Sun et al., 2017). However, IMU/GPS
sensor data needs to be combined with other low - or high-
Ünal and Eceoğlu / Turkish Journal of Agriculture - Food Science and Technology, 14(10): 2860-2869, 2026
2861
frequency sensor data used in mobile robot applications via
a standardized data communication system. The standard
mentioned here is the ISO 11783 standard, which is used
for agriculture and forestry machinery and uses a CAN bus
to communicate between diff erent subsystems of the
vehicle and Electronic Control Units (ECUs) (Girbés et al.,
2019). The goal of ISO 11783 is to standardize the process
and structure of data exchange between information
storage and display units, actuators, sensors, control
elements, and other components that may be installed on or
integrated into tractor s and other farm equipment (Olliver
et al., 2022).
The rapid advancement of precision agriculture has
significantly accelerated the adoption of autonomous
robotic systems aimed at improving efficiency, reducing
labor costs, and optimizing resource utilization.
Agricultural production environments are inher ently
complex due to spatial variability, dynamic weather
conditions, and biological uncertainties. As a result, the
need for robust sensing, communication, and control
systems has become increasingly critical for ensuring
reliable autonomous operations ( Mwitta & Rains, 2024;
Barbosa Júnior et al., 2024). Autonomous agricultural
robots are widely used in applications such as seeding,
fertilization, spraying, harvesting, and field monitoring.
These tasks require accurate localization and orientation
estimation to ensure precise operation and minimal crop
damage. Navigation systems in such robots typically rely
on a combination of sensors, including GNSS, IMUs,
machine vision systems, and digital compasses (Oliveira et
al., 2021; Feng et al., 2026). Among these, di gital
compasses play a crucial role by providing heading
information, which is essential for maintaining directional
stability and executing path-following algorithms.
Digital compass sensors, such as the HMR3200
(Honeywell International Inc., Charlotte, NC, USA),
provide orientation data in terms of heading, pitch, and roll
angles. These sensors are particularly valuable in
agricultural environments where GNSS signals m ay be
degraded due to obstacles such as trees, terrain undulations,
or atmospheric conditions. The redundancy provided by
digital compasses enhances navigation reliability and
improves overall system robustness (Zhang et al., 2024).
However, most digital c ompass sensors utilize serial
communication interfaces and transmit data using
standardized protocols such as the NMEA format. The
NMEA protocol is a widely adopted ASCII -based
communication standard originally developed for marine
navigation systems. Its simplicity, human-readable format,
and interoperability make it suitable for a variety of sensor
applications. Nevertheless, NMEA -based communication
suffers from several limitations, including relatively low
transmission efficiency, lack of deterministic timing, and
limited robustness against noise and data corruption in
industrial environments (Tran et al., 2021). These
limitations pose challenges when integrating NMEA-based
sensors into modern real-time robotic systems. In contrast,
the CAN protocol has become a de facto standard for
distributed embedded systems, particularly in automotive
and industrial applications. CAN 2.0B supports extended
frame identifiers, allowing for a large number of nodes and
flexible message prioritization. Its key features in clude
built-in error detection, fault confinement, arbitration -
based bus access, and high reliability under noisy
conditions (Bari et al., 2023). These characteristics make
CAN highly suitable for agricultural robotics, where
communication reliability is critical due to harsh
environmental conditions such as electroma gnetic
interference, vibration, and temperature fluctuations.
CAN Bus -based communication architectures have
been increasingly adopted in agricultural machinery and
mobile robotic platforms due to their robustness, real -time
capability, and interoperability between distributed
electronic control units (ECUs). Several studies have
demonstrated the use of CAN -based systems for
agricultural robots, autonomous navigation platforms, and
multi-sensor integration applications, including GNSS,
electronic compass, and other perception sensors
(Auernhammer, 2001; Sun et al., 20 17; Ünal, 2020;
Shamshiri et al., 2024; Cui et al., 2024; Guan et al., 2025).
These studies highlight the importance of standardized
communication infrastructures for enabling reliable data
exchange among heterogeneous components in precision
agriculture systems. However, despite these developments,
the integration of legacy sensor interfaces such as RS -
232/NMEA-based digital compass systems into modern
CAN/ISOBUS agricultural networks remains a practical
challenge requiring lightweight and cost-effective gateway
solutions. Despite the widespread adoption of CAN in
modern robotic platforms, many sensors including digital
compasses still rely on legacy communication protocols
such as NMEA ( Spravil et al., 2023). This discrepancy
creates a significant integration challenge, as direct
communication between NMEA -based sensors and CAN -
based control systems is not inherently supported.
Consequently, there is a need for efficient and reliable
protocol conversion mechanisms that can bridge this gap.
The integration of digital compass data into CAN -
based systems also facilitates advanced sensor fusion
techniques. By combining orientation data with inputs
from GNSS, IMU, and vision systems, autonomous robots
can achieve more accurate and reliable locali zation and
navigation. Multi -sensor fusion has been widely
recognized as a key enabler for robust autonomous
systems, particularly in unstructured environments such as
agricultural fields (Feng et al., 2026; Qian et al., 2025). In
addition, the increasing adoption of Internet of Things
(IoT) technologies in agriculture has further emphasized
the importance of interoperable communication systems.
Smart farming applications require seamless data exchange
between sensors, controllers, and cloud -based platforms .
Microcontroller-based protocol conversion systems play a
crucial role in enabling this interoperability by bridging
legacy devices with modern communication infrastructures
(Levshun et al., 2021).
This study addresses this integration challenge by
developing and experimentally validating a
microcontroller-based gateway architecture that enables
communication between NMEA -based digital compass
sensors and CAN 2.0B/ISOBUS networks. The novelty of
this work is not the introduction of a new communication
protocol; rather, it lies in the practical adaptation and
implementation of heterogeneous communication
interfaces within an agricultural automation context. The
proposed gateway provides a lightweight a nd scalable
solution for incorporating legacy navigation sensors into
Ünal and Eceoğlu / Turkish Journal of Agriculture - Food Science and Technology, 14(10): 2860-2869, 2026
2862
existing precision agriculture communication
infrastructures. . The main contributions of this study can
be summarized as follows: (i ) development and
experimental validation of a hardware gateway
architecture for integrating RS -232/NMEA-based digital
compass sensors into CAN 2.0B/ISOBUS networks, (ii)
implementation of a lightweight data adaptation
mechanism including NMEA parsing, CAN frame
mapping, segmentation, and synchronization for
agricultural embedded systems, and (iii) demonstration of
the feasibility of integrating legacy sensor technologies
into modern precision agriculture platforms without
requiring replacement of existing communication
infrastructures. These contributions aim to support the
development of more reliable, scalable, and efficient
autonomous agricultural systems.
Materials and Methods
The main objective of the proposed system is to create
a hardware and software mechanism that enables the
adaptation of digital compass data to the ISOBUS network
for tractor and mobile robot -based precision agriculture
applications. A general overview of the proposed system is
given in Figure 1. The system consists of three main
components:
a. Hardware structure of the system: This section
explains the properties of hardware devices for a one -
way gateway capable of enabling integration of
NMEA-based digital compass data into a CAN 2.0B
communication network,
b. Data transmission mechanism from NMEA to
ISOBUS: This section describes the use of multiple
CAN frames and the handshaking process involved in
transmitting digital compass data that exceeds 64 bits,
c. Software implementation of proposed system : This
section describes data acquisition software developed
using the Microsoft C# programming language to
receive data from a CAN bus.
Figure 1. General view of the system that will enable the
integration of a digital compass into the tractor's ISOBUS
system
HMR3200 Digital Compass
The Honeywell HMR3200 Digital Compass is a high -
precision orientation sensor designed to measure heading,
pitch, and roll for navigation and positioning applications.
The device integrates three -axis magneto resistive sensors
to detect the Earth’s magnetic field components, combined
with a two -axis tilt sensor to compensate for inclination
effects. This strapd own configuration enables accurate
heading determination even when the sensor is not
perfectly level (Honeywell, 2026). The HMR3200
provides a heading resolution of 0.1° and an accuracy of
approximately ±0.5°, making it suitable for applications
requiring precise directional measurements. It can tolerate
tilt angles up to ±40° while maintaining reliable
performance and offers a data output rate of up to 20 Hz,
which supports real -time dynamic systems (Honeywell,
2026). Communication with external systems is achieved
via RS-232 (Figure 2) or RS -485 serial interfaces, and the
device supports the NMEA data protocol (Figure 3). This
ensures compatibility with GPS receivers and other
navigation equipment. Additionally, the compass includes
hard-iron calibration c apabilities to reduce magnetic
distortions caused by nearby ferromagnetic materials
(Honeywell, 2026). Due to its robustness and wide
operating temperature range (−20°C to 70°C), the
HMR3200 is widely used in marine navigation, land
vehicles, antenna posit ioning systems, and industrial
automation applications.
Figure 2. Interface and power connections for RS232
devices
Figure 3. Process control diagram and user configurable
parameters
The HMR3200 employs a straightforward
asynchronous ASCII communication protocol based on the
widely adopted NMEA standard, which ensures
compatibility with marine and navigation -grade data
systems. This protocol enables efficient and human -
readable data ex change between the compass and host
systems such as embedded controllers, PCs, or navigation
units. Each transmitted character follows a 10 -bit frame
structure consisting of one start bit, eight data bits
transmitted least significant bit (LSB) first, no p arity bit
(with the most significant bit fixed at zero), and one stop
Ünal and Eceoğlu / Turkish Journal of Agriculture - Food Science and Technology, 14(10): 2860-2869, 2026
2863
bit. This configuration is typical of UART -based serial
communication and ensures reliable synchronization
between transmitting and receiving devices. The baud rate
is configurable, supporting standard values of 1200, 2400,
4800, 9600, 19200, and 38400 bits per second, with 19,200
bps commonly used as the default for balanced
performance between speed and reliability. The HMR3200
supports both standard NMEA sentences and proprietary
message formats, enabling it to output heading, pitch, and
roll data in structured ASCII strings. In Continuous Mode,
the sensor autonomously transmits NMEA sentences at
predefined intervals stored in EEPROM, eliminating the
need for polling by the host system. This unsolicited
transmission mode is particularly advantageous in re al-
time navigation and control applications, where continuous
data streaming is required for accurate orientation tracking.
In Continuous Mode, the HMR3200 can automatically
transmit six potential NMEA messages (three standard and
three proprietary) by set ting their update rates. The three
NMEA standard sentences are HDG (Heading, Deviation,
& Variation), HDT (Heading, True), and XDR (Transducer
Measurements) and also three proprietary sentences are
HPR (Heading, Pitch, & Roll), RCD (Raw Compass Data),
and CCD (Conditioned Compass Data) messages. The
most important angles affecting the navigation of a robot
moving across agricultural terrain are heading, roll, and
pitch. Therefore, the NMEA format chosen for this study
is the HPR message. The HPR message structure is detailed
in Figure 4.
Figure 4. The HPR message structure
CAN Protocol (ISO 11783)
The ISO/FDIS 11783 -3:2025 entitled “Tractors and
machinery for agriculture and forestry — Serial control and
communications data network — Part 3: Application layer,
transport layer and network layer” is an international
standard developed by the ISO/TC 23 /SC 19/WG 5. This
standard specifies the protocols related to the application,
network, and transport layers used in electronic
communication for agricultural and forestry machinery.
The standard defines the mapping of application layer
messages onto the C AN data link layer protocol, as
specified in ISO 11898 -1. Notably, this part of the ISO
11783 series describes how protocol data units (PDUs) are
structured and transmitted using Classical CAN data
frames, as well as how longer messages are handled
through transport layer protocols. The primary objective is
to ensure interoperability, reliability, and efficient
communication among ECUs in tractors and associated
machinery. ISOBUS is fundamentally derived from the
widely adopted SAE J1939 specification, which is built
upon the CAN Bus —a robust in -vehicle communication
standard enabling reliable data exchange among onboard
ECUs and peripheral devices. The SAE J1939 protocol
defines a higher -layer communication framew ork for
message structuring, addressing, and diagnostics, and is
extensively utilized as a recommended practice for
communication and diagnostic interactions among
components in commercial vehicle systems.
A common communication protocol in heavy -duty
vehicles, such as tractors, trucks, buses, and construction
equipment, is SAE J1939. It makes it easier for different
ECUs in the car's network to exchange data. It is renowned
for its standardized message form at and is based on the
CAN. This consists of an 18-bit Parameter Group Number
(PGN), a 29 -bit CAN Identifier (CAN ID), and a Suspect
Parameter Number (SPN). The SAE J1939 message format
consists of the following components: SOF, CAN ID,
PGN, SPN, Data fiel d, CRC (Cyclic Redundancy Check),
and EOF ( End Of File) (Figure 5).
Figure 5. CAN2.0B data frame format
Hardware structure of the system
ISOBUS technology brings several advantages for
interoperability, simplifies control and management, and
facilitates data collection and analysis, ultimately driving
the efficiency and sustainability of modern farming
operations. The digital compass is a r eliable and tested
sensor that is being used in both autonomous tractors and
farm equipment and also purpose -built agricultural robots
for providing roll, pitch and heading. Additionally, it is the
perfect navigational aid for autonomous agricultural
vehicles and machinery. The solution is perfect for
precision agriculture and autonomous maneuvering in
densely packed row crops because it provides heading
when the vehicle is stationary. On the other hand, the goal
of ISO 11783 is to standardize the process and structure of
data exchange between information storage and display
units, actuators, sensors, control elements, and other
components that may be installed on or integrated into
tractors and other farm equipment. In light of all this
information, it is c rucial that the digital compass, a
fundamental component of autonomous driving systems in
both tractors and mobile robot platforms, can transfer data
via CAN Bus in accordance with the ISOBUS standard.
This study presents the integration of the Honeywell
HMR3200, interfaced via RS -232, into an ISOBUS
network to enable real -time acquisition, transmission, and
monitoring of heading data. The proposed architecture
incorporates a gateway -based data adaptation layer that
Ünal and Eceoğlu / Turkish Journal of Agriculture - Food Science and Technology, 14(10): 2860-2869, 2026
2864
converts compass output into CAN -compliant messages
for network -level communication. Additionally, the end -
to-end data flow between the digital compass and the
tractor’s central processing unit is systematically modeled
and illustrated (Figure 6), includin g data acquisition,
protocol conversion, frame segmentation, and transmission
stages.
Figure 6. Gateway for adapting the HMR 3200 digital
compass with RS232 connection to the ISOBUS line.
In the proposed circuit, the PIC32MX570F512L is a
high-performance 32-bit microcontroller featuring a robust
RISC architecture and based on the MIPS M4K core. It
provides the full benefits of a high -performance x32
architecture, incorporating standardized features such as
512 KB of addressable program memory, 3 KB of auxiliary
flash memory, 65,536 bytes of data memory, three analog
comparators, and a 48 -channel 10 -bit analog -to-digital
converter. The device operates at frequencies up to 50 MHz
within a wide supply voltage range of 2.3 V to 3.6 V. The
MCP25625 is a highly integrated CAN solution developed
by Microchip Technology. It combines a CAN controller
compliant with the CAN 2.0B protocol and a high -speed
CAN transceiver within a single chip, significan tly
reducing system complexity and external component
requirements. This device supports both standard (11 -bit)
and extended (29 -bit) message identifiers, enabling
flexible communication in automotive and industrial
networks. The integrated CAN controller includes message
filtering, masking, and buffering capabilities, which
enhance data handling efficiency and reduce CPU load.
Communication with a host microcontroller is achieved via
an SPI interface, allowing easy integration with a wide
range of embedded systems. The MCP25625 operates at
data rates up to 1 Mb/s and is designed for robust
performance in electrically noisy environments. It
incorporates advanced error detection and fault
confinement mechanisms in accordance with the CAN
protocol, ensuring re liable data transmission. The
transceiver portion supports differential signaling on the
CAN bus and provides protection features such as thermal
shutdown and short -circuit protection. The RS232 serial
communication protocol is used for two -way
communication between the digital compass and the
proposed gateway. Additionally, NMEA row data are
transmitted to the proposed gateway by the digital compass
using this connection.
Data transmission mechanism from NMEA to
ISOBUS
In this study, an algorithm is developed for sending
digital compass data from the HMR 3200 digital compass
to the central computer. The algorithm describes the data
traffic between the NMEA data and the CAN 2.0B data
frame. In proposed system, digital compass is connected to
the proposed gateway module via RS232 port. The device
transmits NMEA messages to the designed gateway at one-
second intervals. Within the NMEA protocol, each
sentence begins with a dollar sign ($) , and the subsequent
seven characters specify the sentence type. The
$PTNTHPR sentence type is among the most significant
and widely utilized formats, as it contains heading,
magnetic field status, pitch, pitch status, roll, and roll
status. Heading, pitch, and roll measurements are presented
in degrees or mils depending on the setting in EEPROM.
For this reason, this sentence type was adopted and
exemplified within the proposed system. All
microcontroller software was developed using mikroC for
PIC, a comprehensive and feature -rich integrated
development environment specifically tailored for PIC
microcontrollers.
Upon receiving data from the digital compass, the
designed gateway acquires and processes the incoming
information, constructs an appropriate CAN data frame,
and transmits it to the central computer via the CAN Bus.
The data sent from the designed gateway is stored to an
array variable. In CAN, a single data frame can carry a
maximum payload of 8 bytes. Therefore, to transmit data
exceeding this limit, multiple CAN frames must be sent
sequentially. Accordingly, the array variable is segmented
into multiple frames, each containing up to 8 bytes. A
handshaking mechanism is implemented to inform the
receiver of the start and end of the multi -frame
transmission, ensuring proper data reconstruction and
synchronization. The designed gateway is a compact
module capable of acquiring digital compass data from the
Honeywell HMR3200 and making it available over a CAN
Bus using extended CAN 2.0B data frames. The system
transmits NMEA data to the central computer via two
dedicated CAN message identifiers. CAN message
identifier 0x00000500 is employed to signal the start and
end of a multi -frame transmission. When the data field is
set to 0xFFFFFFFFFFFFFFFF (hexadecimal), the central
computer interprets this as the initiation of transmission.
Conversely, when the data field is 0x0000000000000000
(hexadecimal), it indicates that the transmission has been
completed. CAN message identifier 0x00000501 is used to
transmit the segmented NMEA data across multiple CAN
frames.
Data transmission from the designed gateway module
to the CAN Bus is performed by encapsulating the acquired
sensor data into appropriately structured CAN data frames.
The gateway first processes the incoming information,
segments it into payloads complian t with frame size
limitations, and then transmits these segments sequentially
over the bus using predefined message identifiers. A
coordinated handshaking mechanism ensures proper
synchronization between the transmitter and receiver,
enabling reliable reco nstruction of the original data at the
central computer (Figure 7).
The CAN Bus defines variable -length data frames,
where the maximum payload size depends on the protocol
version and hardware configuration. In Classical CAN, the
data field typically ranges from 0 to 64 bits (0 to 8 bytes)
per frame. However, the proposed system overcomes this
limitation by employing a multi -frame transmission
strategy combined with a handshaking mechanism, thereby
Ünal and Eceoğlu / Turkish Journal of Agriculture - Food Science and Technology, 14(10): 2860-2869, 2026
2865
enabling the transmission and reception of data streams
with effectively unlimited length. In addition, the system is
designed to support both extended frames based on CAN
2.0B and standard CAN frames, ensuring compatibility and
flexibility across different CAN -based communication
architectures.
Figure 7. Flowchart of data transmission from the designed gateway module to the CAN Bus
Experimental Results
This study focuses on the development of gateway
hardware and software that enable the integration of digital
compass data into the ISOBUS network for agricultural
machinery equipped with ISOBUS infrastructure. The
proposed software gateway converts digita l compass data
in NMEA format into CAN 2.0B. It acquires the digital
compass data via the RS -232 interface and, through a
handshaking mechanism, segments data exceeding 8 bytes
into multiple frames before transmitting it onto the
ISOBUS network. The system hardware comprises an
automotive networking board (Microchip Technology Inc.,
Arizona, USA), the MikroE RS232 Click
(Mikroelektronika Company, Belgrade, SRB) module, and
the MikroE MCP25 Click (Mikroelektronika Company,
Belgrade, SRB) module (Figure 8). We utilized the
Microchip Automotive Development Board to design a
circuit that converts NMEA data received via the RS -232
interface into CAN 2.0B format. The board is equipped
with a PIC32MX570F512L microcontrol ler, which
performs protocol conversion and data processing tasks.
This system ensures reliable integration of serially
acquired digital compass data into the ISOBUS network for
real-time agricultural applications.
The MikroE RS232 Click module enables reliable
acquisition of digital compass data by converting RS -232
serial signals into microcontroller -compatible
communication formats. The MikroE MCP25 Click
module enables the transmission of NMEA data, converted
by the microc ontroller into CAN 2.0B format, onto the
ISOBUS communication line.
Figure 8. Designed gateway for digital compass–CAN
Bus data transmission
Ünal and Eceoğlu / Turkish Journal of Agriculture - Food Science and Technology, 14(10): 2860-2869, 2026
2866
For the central computer, data acquisition software was
developed to receive data via the CAN Bus. The software
was implemented in Microsoft C# (Figure. 9). The
connection between the central computer and the
automotive networking board was established usi ng the
Kvaser Leaf Professional HS (Kvaser, Mölndal, SE). This
device is a single -channel, high -performance USB
interface designed for High-Speed CAN communication.
Figure 9. Implementation of the software module for
digital compass data transmission on the ISOBUS
Figure 10 illustrates the algorithm developed to collect
and reconstruct segmented CAN data frames using the
proposed software (Ünal, 2020). Incoming CAN Bus
messages are first stored in a driver -level queue, while in
many cases additional buffering is als o handled at the
hardware level. These messages are subsequently retrieved
from the queue via the CANRead function. When the
message identifier is 0x00000500 and the data field is
0xFFFFFFFFFFFFFFFF (hexadecimal), the software
interprets this as the start of a multi-frame transmission and
proceeds to read the subsequent message. If the following
message has an identifier of 0x00000501, the software
iteratively concatenates the received data segments within
a loop structure. When a message with identifier
0x00000500 and data field 0x0000000000000000
(hexadecimal) is detected, the system recognizes the end of
transmission. At this stage, the reconstructed data is
converted into string format and displayed on the software
interface. The resulting message conforms to the NMEA
format. In all other cases, the program continues to monitor
and process messages from the driver queue. The
communication performance of the developed NMEA to
CAN gateway was evaluated through a continuous data
transmission test. During the experiment, the HMR3200
digital compass transmitted heading, pitch, and roll data
through the RS -232 interface, and the gateway converted
the received NMEA messages into CAN 2.0B frames using
the implemented segmentation and handshaking
mechanism. A total of 10,000 consecutive NMEA
messages were transmitted during the experimental
evaluation. The receiver software successfully
reconstructed 9,998 messages, corresponding to a
transmission success rate of 99.98%. Only 2 incomplete
transmission events were observed during the test period,
resulting in a packet loss rate of 0.02%. These events were
automatically detected by the implemented
synchronization mechanism. The measured end to end
communication latency ranged between 14.2 ms and 28.7
ms, with an average latency of 19.6 ms and a standard
deviation of 3.4 ms.
Figure 10. Flowchart of the software-based reassembly algorithm for segmented CAN Bus frames, including queue -
based message acquisition, frame synchronization, and payload concatenation
Ünal and Eceoğlu / Turkish Journal of Agriculture - Food Science and Technology, 14(10): 2860-2869, 2026
2867
The latency measurements included serial data
acquisition, NMEA parsing, CAN frame generation, multi-
frame transmission, and data reconstruction at the receiver
side. The CAN Bus utilization during the experiment
remained below 15%, indicating sufficient communication
capacity for additional sensor integration. The average
message transmission interval was measured as 995 ms ,
which was consistent with the 1 Hz update rate of the
digital compass sensor. These results demonstrate that the
proposed gateway architecture provides stable and reliable
real-time communication between NMEA based
navigation sensors and Classical CAN networks (Table 1).
The implemented multi -frame transmission and
handshaking mechanisms effectively maintain data
integrity despite the limited payload capacity of CAN 2.0B.
Table 1. Quantitative performance evaluation of the
proposed gateway.
Parameter Value
Test duration 2.8 h
Total transmitted messages 10,000
Successfully reconstructed messages 9,998
Transmission success rate 99.98%
Packet loss rate 0.02%
Average latency 19.6 ms
Minimum latency 14.2 ms
Maximum latency 28.7 ms
Latency standard deviation 3.4 ms
CAN baud rate 500 kbps
Average CAN utilization 15%
Sensor updates frequency 1 Hz
Discussion
The integration of digital compass data into ISOBUS -
based agricultural communication systems represents an
important step toward improving interoperability between
heterogeneous sensor technologies and modern precision
agriculture platforms. In this study, a gateway -based
architecture was developed to enable communication
between an NMEA-based digital compass and a CAN 2.0B
network. The experimental results demonstrate that the
proposed approach can successfully adapt legacy sensor
outputs into an existing agricultural communication
infrastructure. A major challenge addressed in this study is
the payload limitation of Classical CAN systems. Since a
single CAN frame can transmit a maximum of 8 bytes,
direct transmission of NMEA messages containing
heading, pitch, and roll information is not always possible
(Piao et al., 2023). The proposed segmentation and
handshaking mechanism provides a simple solution for
reliable data reconstruction without requiring additional
transport-layer implementations Unlike standa rdized
transport protocols such as ISO -TP (ISO-15765 Transport
Protocol), the proposed method is optimized for simplicity
and low computational overhead, making it suitable for
embedded systems with limited processing capabilities
(Erlank, A.O., & Bridges, 2016).
The use of dedicated control frames (e.g., message ID
0x00000500) to indicate the start and end of multi -frame
transmission ensures synchronization between sender and
receiver. This approach simplifies the reconstruction
process on the central computer and reduces ambiguity in
message interpretation. However, this design also
introduces certain dependencies, particularly regarding
message ordering and bus reliability. In high -load CAN
networks, where arbitration delays and message collisions
may occur, the absence of built -in retransmission or
sequence numbering mechanisms could potentially lead to
incomplete data reconstruction (Bozdal et al., 2020).
Therefore, while the proposed system is efficient, its
robustness under extreme network conditions remains an
area for further investigation. Another significant
contribution of this study lies in the successful bridging of
heterogeneous co mmunication standards. The gateway
enables data transfer from a RS-232-based digital compass
to a CAN -based ISOBUS network. This capability is
particularly valuable in agricultural contexts, where legacy
sensors and modern control systems must coexist. The
ability to integrate such devices without requiring
hardware replacement provides both economic and
operational advantages (Miller et al., 2025). Furthermore,
this approach aligns with the modular and interoperable
design philosophy of ISOBUS, which aims to standardize
communication between tractors and implements
(Auernhammer, 2001).
A comparison with existing CAN -based transmission
approaches highlights the specific advantages of the
proposed gateway architecture. ISO -TP (ISO 15765)
provides a standardized transport mechanism for
transmitting messages larger than the Classical CAN
payload limitation by defining segmentation, flow control,
and reassembly procedures. However, ISO -TP introduces
additional protocol overhead and requires implementation
of transport -layer communication management, which
may increase software complexity in re source-constrained
embedded agricultural systems (Ye at al., 2025). On the
other hand, CAN FD provides a significant improvement
over Classical CAN by increasing the payload capacity
from 8 bytes to up to 64 bytes per frame (Lodge et al.,
2024). This capability reduces the requirement for message
segmentation and improves communication efficiency.
However, CAN FD requires compatible hardware
components and network infrastructure, which may limit
its direct adoption in existing agricultural machinery
equipped with Classical CAN/ISOBUS systems.
Compared with these approaches, the proposed gateway
method focuses on a lightweight and practical integration
strategy for legacy NMEA -based sensors. The
implemented multi -frame transmission and handshaking
mechanism e nables reliable data transfer using existing
CAN 2.0B hardware without requiring modification of the
existing communication infrastructure. Therefore, the
proposed architecture provides a cost-effective solution for
integrating digital compass sensors into precision
agriculture platforms where compatibility with existing
systems is a priority (Table 2).
Future studies will focus on extending the gateway
architecture to support CAN FD communication,
implementing advanced error detection and recovery
mechanisms, and integrating additional agricultural
sensors such as GNSS, IMU, and environmental
monitoring devices. Furthermore, field-based experiments
on autonomous tractors and agricultural robots will be
conducted to evaluate long -term performance under real
operating conditions. Overall, the proposed system
provides a practical and scalable approach for integrating
heterogeneous sensor technologies into precision
agriculture communication networks.
Ünal and Eceoğlu / Turkish Journal of Agriculture - Food Science and Technology, 14(10): 2860-2869, 2026
2868
Table 2. Comparison of the proposed approach with existing CAN-based transmission methods.
Conclusion
This study presented the design and implementation of
a gateway system for adapting digital compass data to an
ISOBUS-based communication infrastructure. The
proposed system successfully converts NMEA data into
CAN 2.0B format and transmits it over a CAN Bus using a
multi-frame transmission strategy. The implementation
demonstrates that the limitations of Classical CAN,
particularly the 8 -byte payload restriction, can be
effectively overcome through segmentation and
handshaking mechanisms. The developed sys tem ensures
reliable data transmission, synchronization, and
reconstruction, enabling seamless integration of digital
compass data into ISOBUS -compatible agricultural
machinery. The modular hardware and software
architecture provides flexibility, scalabili ty, and
compatibility with existing systems. The use of
standardized communication protocols enhances
interoperability and reduces system complexity. Moreover,
the developed data acquisition software successfully
reconstructs and visualizes incoming data, confirming the
effectiveness of the proposed approach. However, the
study also identified several areas for improvement,
including the need for enhanced robustness, reduced
latency, and support for advanced ISOBUS features.
In conclusion, the proposed gateway system represents
a practical and efficient solution for integrating digital
compass data into agricultural communication networks. It
contributes to the advancement of precision agriculture by
enabling better data utili zation, improved system
interoperability, and enhanced operational efficiency.
Future research should focus on integrating CAN FD
technology, implementing advanced error detection and
recovery mechanisms, and extending the system to support
additional sens or types and communication protocols.
Furthermore, future developments will investigate the
integration of advanced ISOBUS compatibility features,
including standardized device identification, network
management functions, and enhanced interoperability with
existing agricultural electronic control units (ECUs). These
improvements will contribute to transforming the proposed
gateway from a sensor adaptation module into a more
comprehensive communication interface for next -
generation precision agriculture systems.
Declarations
Ethical Approval Certificate
Not applicable.
Author Contribution Statement
Ilker Ünal : supervision, conceptualization,
investigation, writing original draft, visualization,
validation, methodology, software.
Osman Eceoğlu: conceptualization, methodology, and
writing review & editing.
Fund Statement
No financial support was received for this work.
Conflict of Interest
The authors declare no conflict of interest.
Acknowledgments
Not applicable.
References
Auernhammer, H. (2001). Precision farming—the environmental
challenge. Computers and Electronics in Agriculture, 30(1 –
3), 31–43. https://doi.org/10.1016/S0168-1699(00)00153-8
Barbosa Júnior, M. R., Santos, R. G. d., Sales, L. d. A., &
Oliveira, L. P. d. (2024). Advancements in Agricultural
Ground Robots for Specialty Crops: An Overview of
Innovations, Challenges, and Prospects. Plants, 13(23), 3372.
https://doi.org/10.3390/plants13233372
Bari, B. S., Yelamarthi , K., & Ghafoor, S. (2023). Intrusion
Detection in Vehicle Controller Area Network (CAN) Bus
Using Machine Learning: A Comparative Performance
Study. Sensors, 23(7), 3610.
https://doi.org/10.3390/s23073610
Bozdal, M., Samie, M., Aslam, S., & Jennions, I. (2020).
Evaluation of CAN Bus Security Challenges. Sensors, 20(8),
2364. https://doi.org/10.3390/s20082364
Cui, L., Le, F., Xue, X., Sun, T., & Jiao, Y. (2024). Design and
Experiment of an Agricultural Field Management Robot and
Its Navigation Control System. Agronomy, 14(4), 654.
https://doi.org/10.3390/agronomy14040654
Erlank, A.O., & Bridges, C.P. (2018). A hybrid real -time agent
platform for fault -tolerant, embedded applications.
Autonomous Agents and Multi -Agent Systems, 32(1), 252 –
274. https://doi.org/10.1007/s10458-017-9378-4
Feng, L., Xu, C., Tang, H., Wei, Z., Guan, X., Xu, J., Yang, M.,
& Li, Y. (2026). Application of navigation technology in
agricultural machinery: A review and prospects. Artificial
Intelligence in Agriculture, 16(1), 94 -123.
https://doi.org/10.1016/j.aiia.2025.10.003
Girbés, V., Hernández, D., Armesto, L., Dols, J. F., & Sala, A.
(2019). Drive Force and Longitudinal Dynamics Estimation
in Heavy -Duty Vehicles. Sensors, 19(16), 3515.
https://doi.org/10.3390/s19163515
Feature Proposed Gateway ISO-TP (ISO 15765) CAN FD
CAN compatibility CAN 2.0B / ISOBUS CAN 2.0B / CAN FD CAN FD
Maximum payload/frame 8 bytes 8 bytes (segmented) 64 bytes
Segmentation required Yes Yes Usually no
Transport layer overhead Low Medium-High Low
Additional hardware requirement No No Yes
Implementation complexity Low Medium Medium
Suitable for legacy agricultural
systems High Medium Low-Medium
Main advantage Simple sensor integration Standardized transport protocol High data throughput
Ünal and Eceoğlu / Turkish Journal of Agriculture - Food Science and Technology, 14(10): 2860-2869, 2026
2869
Guan, X., Ge, H., Nie, S., & Ding, Y. (2025). Research on
Agricultural Autonomous Positioning and Navigation System
Based on LIO-SAM and Apriltag Fusion. Agronomy, 15(12),
2731. https://doi.org/10.3390/agronomy15122731
Haider, M.H., Wang, Z., Khan, A.A., Ali, H., Zheng, H., Usman,
S., Kumar, R., Bhutta, M.U.M., & Zhi, P. (2022). Robust
mobile robot navigation in cluttered environments based on
hybrid adaptive neuro -fuzzy inference and sensor fusion.
Journal of King Saud University-Computer and Information
Sciences, 34(10), 9060 -9070.
https://doi.org/10.1016/j.jksuci.2022.08.031
Honeywell. (2026). HMR3200/HMR3300 Digital Compass
Solutions User’s Guide. https://www.inertial -
solutions.us/pdf_files/HMR32003300_manual.pdf
Kessler, G.C. (2021). The CAN Bus in the Maritime Environment
- Technical Overview and Cybersecurity Vulnerabilities. The
International Journal on Marine Navigation and Safety of Sea
Transportation, 15(3), 531 -540.
http://dx.doi.org/10.12716/1001.15.03.05
Levshun, D., Chechulin, A., & Kotenko, I. (2021). Design of
Secure Microcontroller -Based Systems: Application to
Mobile Robots for Perimeter Monitoring. Sensors, 21(24),
- https://doi.org/10.3390/s21248451
Lodge, N., Tambe, N., & Saqib, F. (2024). Addressing
Vulnerabilities in CAN -FD: An Exploration and Security
Enhancement Approach. IoT, 5(2), 290 -310.
https://doi.org/10.3390/iot5020015
Miller, T., Mikiciuk, G., Durlik, I., Mikiciuk, M., Łobodzińska,
A., & Śnieg, M. (2025). The IoT and AI in Agriculture: The
Time Is Now —A Systematic Review of Smart Sensing
Technologies. Sensors, 25(12), 3583.
https://doi.org/10.3390/s25123583
Mwitta, C., & Rains, G.C. (2024). The integration of GPS and
visual navigation for autonomous navigation of an Ackerman
steering mobile robot in cotton fields. Frontiers in Robotics
and AI, 11(1), 1359887.
https://doi.org/10.3389/frobt.2024.1359887
Oliveira, L. F. P., Moreira, A. P., & Silva, M. F. (2021). Advances
in Agriculture Robotics: A State -of-the-Art Review and
Challenges Ahead. Robotics, 10(2), 52.
https://doi.org/10.3390/robotics10020052
Olliver, A., Schlingmann, N., & van der Vlugt , P. (2022).
ISOBUS Technologies – The Standard for Smart Agriculture.
In: Zhang, Q. (eds) Encyclopedia of Smart Agriculture
Technologies. Springer, Cham. https://doi.org/10.1007/978 -
3-030-89123-7_117-1
Piao, J., Jin, S., Seo, D. -H., Woo, S., & Chung, J. -G. (2023).
MAC-Based Compression Ratio Improvement for CAN
Security. Applied Sciences, 13(4), 2654.
https://doi.org/10.3390/app13042654
Qian, H., Wang, M., Zhu, M., & Wang, H. (2025). A Review of
Multi-Sensor Fusion in Autonomous Driving. Sensors,
25(19), 6033. https://doi.org/10.3390/s25196033
Shamshiri, R.R., Navas, E., Dworak, V., Cheein, F.A.A., &
Weltzien, C. (2024). A modular sensing system with
CANBUS communication for assisted navigation of an
agricultural mobile robot. Computers and Electronics in
Agriculture, 223, 109112.
https://doi.org/10.1016/j.compag.2024.109112
Spravil, J., Hemminghaus, C., von Rechenberg, M., Padilla, E.,
& Bauer, J. (2023). Detecting Maritime GPS Spoofing
Attacks Based on NMEA Sentence Integrity Monitoring.
Journal of Marine Science and Engineering, 11(5), 928.
https://doi.org/10.3390/jmse11050928
Sun, R., Cheng, Q., Xue, D., Wang, G., & Ochieng, W. Y. (2017).
GNSS/Electronic Compass/Road Segment Information
Fusion for Vehicle -to-Vehicle Collision Avoidance
Application. Sensors, 17(12), 2724.
https://doi.org/10.3390/s17122724
Tran, K., Keene, S., Fretheim, E., & Tsikerdekis, M. (2021).
Marine Network Protocols and Security Risks. Journal of
Cybersecurity and Privacy, 1(2), 239 -251.
https://doi.org/10.3390/jcp1020013
Ünal, İ. (2020). Integration of ZigBee based GPS receiver to CAN
network for precision farming applications. Peer -to-Peer
Networking and Applications, 13(1), 1394 –1405.
https://doi.org/10.1007/s12083-020-00897-3
Yang, L., Li, P., Qian, S., Quan, H., Miao, J., Liu, M., Hu, Y., &
Memetimin, E. (2023). Path Planning Technique for Mobile
Robots: A Review. Machines, 11(10), 980.
https://doi.org/10.3390/machines11100980
Ye, J., Chen, Y., Simayi, A., Liu, Y., Lu, Z., & Wu, J. (2025). A
Network Traffic Characteristics Reconstruction Method for
Mitigating the Impact of Packet Loss in Edge Computing
Scenarios. Future Internet, 17(5), 208.
https://doi.org/10.3390/fi17050208
Zhang, S., Cui, M., & Zhang, P. (2024). Development and
Application of a High -Precision Portable Digital Compass
System for Improving Combined Navigation Performance.
Sensors, 24(8), 2547. https://doi.org/10.3390/s24082547
论文原文与出版信息
Turkish Journal of Agriculture - Food Science and Technology