
Table 2: Specifications of the Gateway.
Model The Things Indoor
Gateway
Frequency EU868
TX power 20 dBm
Chipset SX1308
Dimensions 90 × 80 × 40 mm
LoRaWAN Spec Version V.1.0.3
2.3 Connection Diagram
This work employs an MPU6050 sensor connected to
a TTGO T-Beam board via the Inter-Integrated Cir-
cuit (I2C) protocol, a widely used two-wire interface
with Serial Clock Line (SCL) and Serial Data Line
(SDA). I2C enables multiple devices to connect to
a single bus using unique addresses, making it effi-
cient for systems with many peripherals (Nguyen and
Dugenske, 2018), (Jouhari et al., 2023). Compared
to SPI, I2C uses fewer pins. It offers the flexibility
of multiple master-slave configurations, making it an
ideal choice for reliable communication between the
MPU6050 sensor and the TTGO T-Beam board (Chen
and Huang, 2023).
The TTGO T-Beam board also includes a GPS
module connecting to the ESP32 microcontroller
via the Universal Asynchronous Receiver-Transmitter
(UART) protocol. UART is a simple serial communi-
cation protocol that sends data between the GPS mod-
ule and the microcontroller via the TX (transmit) and
RX (receive) pins. The GPS module provides crit-
ical position data such as latitude, longitude, time,
and speed, which the ESP32 processes before trans-
mitting over LoRa or cloud storage. Unlike I2C and
SPI, UART does not require a clock signal and instead
transfers data at synchronized baud rates (e.g., 9600
or 115200 bps) (Chen and Huang, 2023) (Sharma
et al., 2018).
By integrating I2C for sensor connectivity and
UART for GPS data sharing, the TTGO T-Beam ef-
fectively gathers, processes, and sends data, making
it ideal for IoT-based monitoring systems.
2.4 Proposed System Model
We have developed an IoT-based system model that
monitors the location and movement of livestock by
integrating the MPU6050 sensor with the TTGO T-
Beam module. The MPU6050 sensor measures three
components of acceleration (Accel x, y, z) and three
components of angular velocity (Gyro x, y, z), as
shown in Fig. 3. These measurements allow for a de-
tailed analysis of the livestock’s movement and orien-
Figure 3: Data Collection for Monitoring and Tracking.
tation, which are critical for understanding their be-
havior. Additionally, the system collects data on lo-
cation (latitude and longitude), movement speed, and
time, which are essential for tracking the livestock’s
geographic position and activity patterns. The com-
bination of acceleration and angular velocity data,
along with GPS data for location tracking, provides
a comprehensive overview of the animal’s behavior
and movement.
As shown in Fig. 3, the GPS data is represented
by a red line for latitude and a blue line for longi-
tude, which tracks the livestock’s geographic move-
ment over time. This visualization allows for easy
tracking of the animal’s movement across various ter-
rains, and helps monitor changes in their behavior that
may indicate stress, illness, or other significant events.
The ability to collect both movement (acceleration
and angular velocity) and location data in real-time
provides valuable insights into livestock behavior and
can aid in early detection of potential issues, improv-
ing overall animal welfare and farm management.
The TTGO T-Beam, equipped with a GPS mod-
ule, serves as the central device in this monitoring
system. The data collected by the system, as shown in
Fig. 4, is crucial for real-time monitoring and perfor-
mance analysis of the livestock. The analysis of ani-
mal movement patterns, activities, and geographic lo-
cations helps farmers make better-informed decisions
regarding the care and management of their livestock.
The MPU6050 sensor provides detailed movement
and orientation data, while the GPS module tracks the
geographic location, both of which are essential for
accurate monitoring.
This system is specifically designed to operate in
rural areas, where cellular network infrastructure may
be sparse or non-existent. By utilizing the LoRa com-
munication protocol, the system ensures reliable data
transmission over long distances, even in areas with
limited connectivity. This capability is critical for
monitoring livestock in remote regions, where tra-
ditional communication networks may not be avail-
able. The ultimate objective of this system is to enable
more informed decision-making in livestock manage-
IoTBDS 2025 - 10th International Conference on Internet of Things, Big Data and Security
276