You are on page 1of 6

A LoRaWAN-based Camel Crossing Alert and

Tracking System
Tariq Al Balushi, Ayoub Al Hosni, Hashim Al Theeb Ba Omar, Dawood Al Abri
Department of Electrical and Computer Engineering, Sultan Qaboos University
PO Box: 33, Al-Khod 123, Oman
Email: alabrid@squ.edu.om

Abstract— Vehicle accidents caused by camel crossing is a nearby the road. One important feature that distinguishes our
serious problem in regions where there is a large population of system from previously proposed systems is that it utilized a
camels. This paper presents a camel alert and tracking system long-range communication technology (LoRaWAN). This
that tracks the locations of camels and warns drivers whenever allows the system to detect the presence of camels from far
the camels approach the road. The proposed system consists of away and hence it can give an early warning approaching
four components: collars that are attached to the camels, a camels. Moreover, it can be used to provide a visual indicator
control unit located in the area where the system is deployed, of the number of camels in the nearby region as well as their
warning signs that are fixed along the road, and a system server. distance from the road (i.e. use different flashing light colors to
In this system, the collar unit will periodically obtain the camel
indicate the closeness of the camels to the road).
location using GPS and transmit it to the control unit using
LoRaWAN. The control unit will process the received data and The remainder of this paper is organized as follows.
activate, via a LoRaWAN broadcast, the warning signs if there Section II reviews the related work. In section III, system
are camels approaching the road. The control unit will also design is presented. Implementation and testing are discussed
forward the received data to the server where it will be stored in in section IV. Section V concludes the paper.
a database that can be accessed by authorized personals to track
and locate camels. A prototype has been built and tested to II. RELATED WORK
validate the proposed system. The results demonstrate the
feasibility of the system in terms of functionality, safety, and cost. Several approaches had been proposed to minimize the
animal-vehicle accidents. These may be classified into three
Keywords—GPS; LoRaWAN; system integration; types [6]: road-based conventional methods, roadway-based
engineering design; camel; tracking; animal crossing; animal- detection systems, and animal-based technologies. Road-based
vehicle accident conventional methods include fencing, underpass/overpass for
animal crossing, repellent, and warning signs. Out of these
I. INTRODUCTION methods, fencing and underpass/overpass seems the most
The problem of accidents caused by animal crossing (such effective although costly [1]. Roadway-based detection
as deer, kangaroo, camels, cows, etc..) is a serious problem in systems focus on detecting the appearance of animal near the
many places of the world [1][2][3][4]. For example, in road. An example of this type is the system described in [7]
Australia, kangaroos are considered a major risk to drivers in where infrared sensors are used to detect the presence of deer
rural area. It is estimated that more than 20,000 kangaroo- and then activates flashing lights to alert drivers to presence of
vehicle accidents occur in the year 2015 in Australia alone [2]. deer. A similar system, tested in Florida, is described in [8].
In the Middle East, camels are major concern and involved in According to [8], the tested system cause some drivers to
many road accidents. Typically, in an accident with a camel, reduce their speed on average by 3.82 km/h. Another example
the camel falls on the roof of the car, which results in cervical is the system described in [9] that uses a vehicle mounted
and head injuries [5] and possibly death. For example, in Saudi camera and image processing technique to detect the
Arabia, camels are involved in almost 97% of vehicle-animal appearance of animals. The third approach uses collar attached
accidents with fatality rate of 0.25 fatalities per accident [4]. to the animal to alert drivers to its presence (e.g. via flashing
light that is activated when the collar is nearby). An example of
Camels travel long distances and cross numerous roads this type is the system described in [10] where radio collars are
annually causing many road accidents. These accidents result put on some members of elk herds to activate flasher on
in significant damage to vehicles and potentially the death of crossing signs.
drivers and the camels. These accidents can be reduced if the
drivers are alerted to the sudden and unexpected camels Although some of the proposed techniques can be applied
crossing of the road. This paper presents a system to alert the to any type of animals, some others are more effective to
drivers about camels approaching the road and to allow camel reduce the animal-vehicle accidents based on the species type
owners to track their cattle. The proposed system will monitor and habitat [10]. For example, using image-processing
the geolocation of camels, and using LoRaWAN wireless approach to recognize animal presence in a road scene may be
technology, the location data is relayed to a control unit that more accurate in detecting large animals compared to small
activates warning signs along the road whenever the camels are ones. Moreover, in areas with dusty weathers like the Middle
East, the dust may hinder the detection of animals. For

l-))) 
accidents caused by camels, there is very little work done to
investigate and devise methods to deal with this problem. Al-
Ghamdi and AlGadhi [4] study the effectiveness of using
different types of road signs to reduce the speed of motorists in
sections of road that have high probability of camel-vehicle
accidents. They found that a triangular warning sign that is
double the standard one with reflective material to be effective
in this regard. Another system is the Camel Vehicle Accident Control
Avoidance System (CVAAS) [6]. CVAAS was designed in the Unit

Kingdom of Saudi Arabia. This system designed to reduce the


number of accidents caused by the camels crossing road.
CVAAS uses GPS technology. The system uses two units:
Animal-Based Unit (ABU) and Road-Side Unit (RSU). The Collar Unit System
Server
ABU is attached to the camel and consists of GPS receiver that
is interfaced to a dedicated short-range communication
(DSRC) transmitter. The DSRC transmits camel data (e.g. Fig. 1. System architecture
location, velocity, and heading) to a DSRC receiver on the
RSU. The RSU will activate the warning system if there are
camels within a dangerous distance from the road.
Our proposed system can detect the presence of camels
from far distance (up to 18km in line of sight conditions). This
can be exploited to provide visual indicator to drivers about the
level of animal of activity in the area and hence make drivers
more vigilant. Moreover, the long-range of the system can
reduce the cost of system as one control unit can control large
number of signs that are spread over longer distance (compared
this, for example, with DSRC, which have a range of few
hundred meters [11]).
III. SYSTEM DESIGN
A. Marketing Requirements
The proposed system should meet the following marketing
requirements:
x The system should be easy to use, configure and upgrade.
x The system should have long range that covers the
required camel’s detection area.
Fig. 2. The functional decomposition of the system
x The system should detect all camels within the range
covered by the system.
x The device should have a long battery lifetime. x The collar unit cost should be reasonable.
x The device should be comfortable for the camels and B. Engineering Requirements
resist damage due to the camel’s movement. In order to achieve the marketing requirements mentioned
above, we need to base our system on engineering view by
x The system should alert the drivers to camels approaching defining engineering requirements. Our engineering
the road when they at a reasonable distance from the road. requirements are as follows:
x The system will be autonomous, easy to configure, and
x The system should alert drivers about camels’ presence have a modular design.
with minimal distraction.
x The system will use medium to long range low power
x The system should record the camel’s location wireless technologies.
periodically.
x The collar will check the camel’s location periodically
x Camel owners should only be able to access the logs of with a location-checking period that is configurable by
the camels they own. the owner (default:10s).
x The system should work around the clock and withstand
the high temperatures of the region weather.


Fig.3 The interface between different components

x The system will record the camel’s location periodically server for logging it. The server will allow the owners to
with a logging period that is configurable by the owner access the movement logs of their camels through a website. In
(default:10min). addition, it can be useful to identify areas where there is high
camels crossing, which can be used to optimize the use of other
x Access to the camel’s movements will be authenticated. measures to deal with camel-vehicle accidents problem (e.g.
identify a suitable location for camels’ underpass). The
x The collar will be attached to the camel neck and should functional decomposition of the system is shown in Fig. 2.
not weigh more than 1.5kg.
Our proposed system provides the following advantages:
x A blinking sign will alert the drivers to any camel that is
within a distance of 300m from the road. x Compared to passive measures to deal with camel-vehicle
accidents (e.g. fences, regular warning signs), the system
x The system should work 24/7 and at temperatures provides a dynamic visual alert signals that notify drivers
between 0 and 70 C. that there are camels actually present within a range of
300m of the road.
x The system provides tracking capability. This enables the
C. Top Level Description of the Proposed System camel owners to know the location of their cattle from
The proposed system consists of four main units: the collar anywhere using the website as an interface to the system.
unit, the control unit, the sign unit and the server unit as In addition, data collected over time can provide valuable
illustrated in Fig. 1. The collar unit will wrap around the camel information about camels’ movement pattern and their
neck and it will track the location of the camels. The collar unit numbers. This, in turn, can be used to optimize the
will send the location to the control unit using LoRaWAN. placement of other measures to deal with problem (e.g.
LoRaWAN is a communication protocol that operates on top location of underpass for camels).
of a LoRa radio link. Readers interested in further detail about
x The system uses LoRaWAN, which uses unlicensed ISM
LoRaWAN can consult [12] [13]. LoRaWAN is chosen here
bands and provides low power long-range
because it provides long-range transmission (up to 18km was
achieved in rural areas [14]) and consumes very little power. communication. The long-range enables the system to
This suits our application as it enables the system to detect detect camels from further distance compared to existing
presence of camels from large distances. This may be used to system. This in turn can be used to provide visual
provide a visual indictor of the camels’ activity in the area and indicator to drivers about the level of animal of activity in
hence make drivers more watchful for these camels. The low the area and hence make drivers more vigilant. The long
power consumption reduces the frequency of replacing range reduces the required number of control units to
batteries. Note here that several collar units can communicate cover large areas and hence reduces the system’s cost.
with one control unit (the exact number depends on the LoRa
radio configuration; see [13] [15]). Once the control unit The interfaces between the different units is shown in Fig. 3.
receives the location data from the collar unit, it will activate Next, we provide a brief description of the system’s different
the signs if there are camels near the road (within 300m of the units:
road). In addition, it sends the location data to the system


1) The Collar Unit
In the proposed system, a collar will be wrapped around the
camel’s neck. The collar unit consist of four parts: the power
unit, GPS module, the LoRa module, and the processing unit.
The power unit uses solar power and lithium battery to power
the collar. The GPS is used to get the location of the camel.
The LoRa module is used for communication between the
collar and control unit. The processing unit will control the
operation of the collar.
The processing unit will obtain the location of the camel
periodically (default period: 10s) and send it along with camel
id to the control unit. Note that the location sampling period is
chosen small to enable the system to alert the driver to the
presence of a camel at early time of it entering the warning
region, which is chosen to be the area within 300m of the road.

2) The Control Unit


The control unit consist of four parts: the power unit, the
LoRa module, the network module, and the processing unit.
The power unit is used to power the control unit. The LoRa
module is used for: i) the communication between the collar
and control unit and ii) for sending a broadcast message to
control the road warning signs. The network module will be
used to send the location data to the server to log it. It will use
any network access technology that is available in the area of Fig. 4. The tested system prototype
deployment (e.g. LTE) to communicate with system’s server.
The processing unit will be used to orchestrate the process, to of-birth. The gateway table contains information of LoRaWAN
measure the distance from camel to the closest point on the gateways used in the system such ID, its location, number of
center of the road and to operate the signs. Note here that the channels. Log table is used to store the time-stamped logged
frequency of sending data to the server to log it can be location data for the camels.
configured independent of the location-sampling period used
by the collar unit. The logging period will depend on the To provide an access to the system functionality, a website
required granularity of location tracking. It can be made much is developed that allow camels’ owners to view the collected
larger than the collar’s location sampling period if the intention data, managing their cattle, and modifying their information. In
is to obtain the general areas where camels graze (the system addition, it provides a mean for new users to register in the
default: 10 min). On other hand, collar’s location-sampling system.
period has to be made small to provide a semi-real time
notification of camels approaching the road. The control unit is
also responsible to turn the warning signs on or off based on IV. IMPLEMENTATION AND TESTING
whether the camels are within 300m of the road or not.
To assess the functionality of the proposed system, a
prototype was built and tested. Initially, each unit was built and
3) The Sign Unit tested separately to ensure that it works according to its
intended use. Following the successful unit tests, the different
The road warning signs will be distributed along the road in
units were integrated together to create the whole system
the areas where camels are known to cross frequently to notify
prototype. In this prototype, we have used a simple LED
the drivers through the use of a flasher. A sign unit will consist
instead of a whole sign to test if the alert is activated correctly
of LoRa module to receive the control broadcast, a flasher, and
as desired. Fig. 4 shows the full system prototype. Next, we
a simple processor.
provide more detail about the implementation of the different
units.
4) The Server Unit A. The Collar Unit
The server consists of two main components: the database
and the website. The database consists of five main tables: The collar is used to obtain the location of the camel and to
owner table, configuration table, camel table, gateway table, send it to control unit. It consists of a microcontroller, a GPS
and log table. The owner table contains data pertaining to the module, a LoRa Module and a power unit.
owners of camels such name, ID, phone number. The The implementation of the collar started by interfacing the
configuration table contains the system’s configuration data GPS Module with the microcontroller using a UART Tx/Rx
(e.g. frequency of logging location). The camel table contains port. The GPS-microcontroller subsystem was tested by
information about the camel such ID number, its name, date-


Fig. 5 Internal view of the collar unit prototype

displaying the location on a PC terminal. The LoRa module


was then interfaced with the GPS-microcontroller subsystem
using the ISP port for control and the I2C for data transfer. The
collar was tested by making it sends location to another LoRa-
microcontroller subsystem that had been connected to a PC
terminal to display received location.
The power unit of the collar was designed and created Fig. 6. Internal view of the control unit prototype
using a lithium charging circuit that allows charging via a USB
C. The Server
port and a 2.4 W solar cell. This circuit charges a 4000 mAh
3.6 V lithium battery. The circuit provide the collar power The server was developed using the XAMPP package as a
using a USB port. Fig. 5 shows an internal view of the collar development environment. The XAMPP contains multiple
unit prototype. types of servers. We had used MySQL database server and
Apache web server. MySQL is used to store the data collected
from the camels and allow authorized personals to access these
B. The Control Unit data. The database will also store the relative data about the
LoRaWAN gateways used in the system. Apache is used to run
The control unit is used to receive the camel location,
PHP scripts that control the content displayed on the website.
process it, operate the signs and relay the data to the system’s
server. It consists consist of a microcontroller, a LoRa module, Through the website, visitors can get information about the
and an Ethernet module for communication with server. The service that is provided, how the system works, contact the site
microcontroller will calculate the shortest distance between the admin for additional help and register to the service. Regular
camel and the centre of the road and whenever the camel is users can view and modify their data, view and modify their
near the road, the controller should activate the sign. In the camel’s information, and view their camel’s location logs. The
prototype, an LED is added directly to control unit to test website has an interactive password condition window when
whether the alert signal is activated according to the desired trying to create a password and uses argon2 for hashing the
system functionality or not. The Ethernet module was password to store it securely in the database. Fig. 7 shows the
interfaced and connected to the microcontroller using the SPI sign in page of the website for mobile.
port for control and the UART Tx/Rx for data transfer. The
control unit send the received camel data to a PHP script that
store the data in the database at the server. Fig. 6 shows the V. CONCLUSIONS
internals of the control unit prototype. The control unit was
tested outdoor at a road inside Sultan Qaboos University. The Camel-vehicle accidents are a huge problem that affects
control unit successfully activate the alert when the collar unit social life. These accidents are increasing over time due to the
become within the pre-specified distance from the road (in the carelessness of the camel owners and the increase of camel
prototype testing, the warning distance was configured to population. In this paper, we have presented a system to alert
10m). Moreover, the location data was successfully logged in drivers when a camel is or about to cross the road. The system
the database. can keep logs of the camel locations for the owner. A prototype
was built and tested to assess the functionality of the system.
The system’s prototype had been tested thoroughly and it
passed all types of tests (unit, integration, and acceptance).


[2] K. Saleh, M. Hossny, and S. Nahavandi, “Effective
Vehicle-Based Kangaroo Detection for Collision
Warning Systems Using Region-Based Convolutional
Networks,” Sensors, vol. 18, no. 6, Jun. 2018.
[3] U. Klöcker, D. B. Croft, and D. Ramp, “Frequency and
causes of kangaroo–vehicle collisions on an Australian
outback highway,” Wildl. Res., vol. 33, no. 1, pp. 5–15,
2006.
[4] A. S. Al-Ghamdi and S. A. AlGadhi, “Warning signs as
countermeasures to camel–vehicle collisions in Saudi
Arabia,” Accid. Anal. Prev., vol. 36, no. 5, pp. 749–760,
2004.
[5] M. O. Bashir and F. M. Abu-Zidan, “Motor vehicle
collisions with large animals.,” Saudi Med. J., vol. 27, no.
8, pp. 1116–1120, 2006.
[6] K. Ragab, M. Zahrani, and A. Ul Haque, “Camel-Vehicle
Accidents Mitigation System: Design and Survey,” in
Future Information Technology, 2011, pp. 148–158.
[7] K. M. Gordon, S. H. Anderson, B. Gribble, and M.
Johnson, “Evaluation of the FLASH (Flashing Light
Animal Sensing Host) System in Nugget Canyon,
Wyoming,” 2001.
[8] M. K. Grace, D. J. Smith, and R. F. Noss, “Reducing the
threat of wildlife-vehicle collisions during peak tourism
periods using a Roadside Animal Detection System,”
Accid. Anal. Prev., vol. 109, pp. 55–61, 2017.
[9] S. U. Sharma and D. J. Shah, “A Practical Animal
Detection and Collision Avoidance System Using
Computer Vision Technique,” IEEE Access, vol. 5, pp.
347–358, 2017.
Fig. 7. The mobile version of the sign in page of the website [10] M. Carey, “Addressing wildlife mortality on highways in
Washington,” 2001.
[11] J. B. Kenney, “Dedicated short-range communications
The proposed system provides many advantages compared (DSRC) standards in the United States,” Proc. IEEE, vol.
to static means of warning drivers (i.e. regular road warning 99, no. 7, pp. 1162–1182, 2011.
sign). It dynamically generates an alert whenever camels are [12] J. de Carvalho Silva, J. J. Rodrigues, A. M. Alberti, P.
approaching the road. In addition, the system logs the camels’ Solic, and A. L. Aquino, “LoRaWAN—A low power
movements and provide access to this data via website. WAN protocol for Internet of Things: A review and
Moreover, the system has long coverage range, which allows opportunities,” in 2017 2nd International
it to detect presence of camels from far away. This may be Multidisciplinary Conference on Computer and Energy
exploited to provide a visual indicator of the level of camel Science (SpliTech), 2017, pp. 1–6.
activity in the area and/or their locations from the road. For [13] F. Adelantado, X. Vilajosana, P. Tuset-Peiro, B.
future work, it will be interesting to add analysis tools to the Martinez, J. Melia-Segui, and T. Watteyne,
system for studying camels’ movements pattern and behavior. “Understanding the limits of LoRaWAN,” IEEE
Moreover, it will be interested to test the reliability and Commun. Mag., vol. 55, no. 9, pp. 34–40, 2017.
effectiveness of the system by deploying it to area with known [14] R. Sanchez-Iborra, J. Sanchez-Gomez, J. Ballesta-Viñas,
history of camel-vehicle accidents. Another possible direction M.-D. Cano, and A. F. Skarmeta, “Performance
of investigation is to study the possibility of optimization the Evaluation of LoRa Considering Scenario Conditions,”
number of deployed units based on the camels’ movement Sensors, vol. 18, no. 3, p. 772, 2018.
pattern and behavior. [15] M. C. Bor, U. Roedig, T. Voigt, and J. M. Alonso, “Do
LoRa low-power wide-area networks scale?,” in
REFERENCES
Proceedings of the 19th ACM International Conference
[1] J. H. Hedlund, P. D. Curtis, G. Curtis, and A. F. on Modeling, Analysis and Simulation of Wireless and
Williams, “Methods to reduce traffic crashes involving Mobile Systems, 2016, pp. 59–67.
deer: what works and what does not,” Traffic Inj. Prev.,
vol. 5, no. 2, pp. 122–131, 2004.



You might also like