Received 18 October 2022, accepted 22 October 2022, date of publication 26 October 2022, date of current version 4 November 2022.
Digital Object Identifier 10.1109/ACCESS.2022.3217494
MEMS Gyro and Accelerometer as North-Finding
System for Bulk Direction Marking
NUR HAZLIZA ARIFFIN
1
, (Member, IEEE) AND NORHANA ARSAD
2
, (Senior Member, IEEE)
1
School of Engineering, Monash University Malaysia, Subang Jaya 47500, Malaysia
2
Center of Advanced Electronic and Communication Engineering, Faculty of Engineering and Built Environment, Universiti Kebangsaan Malaysia, Bangi 43600,
Malaysia
Corresponding author: Nur Hazliza Ariffin ([email protected])
This work was supported in part by the School of Engineering, Monash University Malaysia, under SEED, under Grant-2020; and in part
by the Centre for Collaborative Innovation (PIK), Universiti Kebangsaan Malaysia (UKM), under Grant INOVASI-2017.
ABSTRACT The ability to seek the accuracy of the true north direction is essential in determining the
direction of the ground vehicle, sea, and air and as a reference point in the determination of Qibla direction
as well. Theodolite is mainly used for surveying applications in measuring angles, including determining the
direction for Muslims to perform ritual prayers, Qibla. However, transferring point-by-point from outdoor
to indoor via theodolite requires many experts and is a complicated process. In this paper, we present
the development of a highly accurate and compact north-finding prototype for bulk direction marking
based on a Micro-Electro-Mechanical System (MEMS) gyroscope and accelerometer sensor. The system
consists of two modules; a GPS-based transmitter module to obtain latitude and longitude information and
a MEMS gyroscope and accelerometer-based receiver module to detect the geographic north and mark the
direction. We accomplish the accuracy by implementing a 4-point static rotation method to compensate for
the gyroscope bias and a digital complementary filter system to filter out drift error and fluctuations in the
data. We tested the developed prototype on different geographic landscapes, weather conditions, and various
building types. The field test results prove that the developed system achieves an accuracy of ±7’ 06’’,
verified by the Department of Survey and Mapping Malaysia.
INDEX TERMS Accelerometer, direction marking, geographic north, GPS, gyroscope sensor, MEMS
gyroscope, north-finding, static rotation method, true north.
I. INTRODUCTION
Geographic north (also known as true north) is the point on
the north pole in the middle of the Arctic Ocean where all
the earth’s longitude lines converge. Unlike magnetic north,
which is created by the earth’s magnetic field and constantly
moves due to magnetic changes and flux lobe elongation,
geographic north never changes. And thus, knowing the
geographic north is crucial in applications that need abso-
lute north orientation, such as geodetic surveying, mapping,
topography, attitude determination, trajectory verification,
and military applications [1]. Even in essential navigation
tools such as compass and GPS (Global Positioning System),
geographic north plays the crucial role of fixed reference
The associate editor coordinating the review of this manuscript and
approving it for publication was Santosh Kumar .
point; magnetic declination (the angle on the horizontal plane
between magnetic and true north) is applied to determine the
actual direction when using a compass [2]. In contrast, while
the GPS geographic coordinates are defined relative to the
latitudes of the north pole (90
N), south pole (90
S), and the
equator (0
) [3].
Regarding finding direction in modern society, the readily
available electronic compass and GPS-based technologies
is the most popular choice, commonly used in navigation
apps, maps, and digital compasses [4]. To correct the mag-
netic declination and ensure precise direction, the World
Magnetic Model (WMM) is used, which comes pre-installed
on Android and iOS devices. The WMM is a spatial-scale
geomagnetic model of the earth’s magnetic field [5]. It keeps
track of the changes in the magnetic field and is updated
every five years as the magnetic north drifts towards Siberia
114214
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/
VOLUME 10, 2022
N. H. Ariffin, N. Arsad: MEMS Gyro and Accelerometer as North-Finding System for Bulk Direction Marking
at around 50 60 km a year. The next WMM update was
supposed to be at the end of 2020. However, the European
Space Agency (ESA) recently reported that the magnetic
north is drifting unexpectedly, thus rendering the WMM data
too inaccurate to wait for the next scheduled update. An out-
of-cycle update for the WMN has been issued around mid-
2020 [6] showing that electronic compass and GPS-based
technologies are unstable for permanent direction-marking
applications. In addition, the heading accuracy of digital
compasses can be degraded by electromagnetic interference
and ferrous materials. At the same time, GPS signals can be
easily obstructed inside buildings in geographically isolated
locations, challenging landscapes, and harsh weather condi-
tions [7], [8]. Due to all these factors, it is safe to say that
electronic compass and GPS-based technologies cannot be
used if the goal is to find and mark the accurate direction in
varying geographic situations.
Because of the issue with drifting magnetic north and
inaccurate WMM data, 19.5 million Muslims in Malaysia
face a severe problem; the Qibla direction they have marked
using mechanical and digital compasses is entirely wrong.
Qibla is the direction of the Kaaba building in Mecca, Saudi
Arabia, -It is used for daily prayers and various religious
practices, including burying the dead with the head in line
with the Qibla direction. This practice helps archaeologists
determine the remains of Muslim cemeteries if no other signs
are present [9].
The Department of Islamic Development Malaysia
(JAKIM) is fully responsible for determining the exact Qibla
direction for prominent mosques and principal infrastructures
across the country. Their primary method to determine the
Qibla is using a mixture of theodolite and GPS to create high
precision, quasi-solar compass system [10]. Meanwhile, the
general public and non-principal businesses such as hotels
and shopping malls rely on mechanical and digital compasses
to mark their Qibla [11]. And as stated earlier, these personal
markings are inaccurate. JAKIM has to complete a country-
wide bulk Qibla direction marking correction in many high-
rise buildings and geographically isolated locations within
the next three years. Such a task is very challenging with their
current system and workforce numbers.
Looking at this situation, it is clear that there is a pressing
need for a high-accuracy, compact, and mobile direction-
finding and marking system based on geographic north that
is low in cost and easy to use for non-experts. The design
must be robust and versatile for use inside and outside high-
rise buildings and in varying geographic landscapes. Micro-
Electro-Mechanical System (MEMS) gyroscope can fulfill
all these criteria because it does not have rotating parts that
use bearings and thus can be miniaturized to fit a small printed
circuit board (PCB). MEMS gyroscope utilizes the Corio-
lis acceleration effect on the vibrating mechanical element
to detect the velocity of the Earth’s angular rotation rate
[12]. MEMS gyroscope can provide precise readings and is
initially used for military navigation. As the demand soars
in the civilian market, it is now fully adapted for low-cost
applications in the automotive, industrial, medical, and
mobile device industries. The cost of production is expected
to decrease further as MEMS gyroscope technology gradu-
ally reaches its commercial maturity [4], [13].
In this paper, we proposed the development of a highly
accurate yet affordable north-finding and directing marking
system using MEMS gyroscope, accelerometer, and GPS.
The developed system comprises two modules: indoor and
outdoor. The outdoor module includes a global positioning
system (GPS) to provide location information (latitude and
longitude) fed into the indoor module inside the building
via wireless communication technology medium on 433MHz
radio frequency waves. The location information is then pro-
cessed using vector algebra formulas for Qibla angle deter-
mination. The indoor module consists of a MEMS gyroscope
and accelerometer on the horizontal rotating laser mounted
on a stepper motor to detect the geographic north and mark
the desired direction. This paper is structured as follows:
Section 2 describes the theoretical background of the pro-
posed system, while Section 3 describes the development
of the prototype. Section 4 discusses the analysis and field-
testing results, and Section 5 concludes the paper.
II. THEORETICAL BACKGROUND
A. TRANSMITTER AND RECEIVER MODULES
We came up with the concept of two separate modules for
the north-finding system instead of a single device commonly
reported after a thorough discussion with The Department of
Islamic Development Malaysia (JAKIM). They raised con-
cerns over the reliability of the GPS reading on a single
device for direction marking inside closed-off buildings with
multiple rooms and high-rise infrastructures [14]. While the
geographical north determination only needs to be done once
per location, the bulk Qibla direction marking based on geo-
graphical north requires personalized marking at each sub-
location. Thus, we devised with a separate transmitter module
stationed outside the buildin g and a receiver module placed
inside the building. The two modules will communicate via a
specialized wireless medium. Fig. 1 shows the block diagram
of the two-modules concept for the system.
The transmitter module is solely responsible for obtaining
the accurate latitude and longitude data of the measurement
location. As it has a more straightforward function and thus
a less complex design than the receiver module, we focused
on ensuring the transmitter module has a compact and very
light design yet maintains high accuracy even in poor envi-
ronments. The receiver module bears an enormous burden
in the whole system; it is responsible for receiving and pro-
cessing the data from the transmitter while simultaneously
controlling the MEMS gyroscope and accelerometer data
and filtering their inputs, so they are free from errors. After
the gyroscope and accelerometer find the geographic north
direction, the transmitter module then needs to compute the
transmitter latitude and longitude data against the geographic
north angle to obtain the desired direction [15] and drive the
laser marker towards that direction.
VOLUME 10, 2022 114215
N. H. Ariffin, N. Arsad: MEMS Gyro and Accelerometer as North-Finding System for Bulk Direction Marking
FIGURE 1. Block diagram of the transmitter and receiver modules
concept for the north-finding system.
This is why the MPU6050 sensor combines a 3-axis
MEMS gyroscope and a 3-axis accelerometer was chosen as
the geographic north-finder because, despite its affordable
price, it can give very accurate readings [16]. The 3-axis
accelerometer of the MPU6050 acts as an auxiliary sensor
that counter the errors experienced by the MEMS gyroscope
sensor. This is done by feeding the data from both sensors into
a filter system. The accelerometer also helps the MEMS gyro-
scope differentiates between the system’s rotation and the
Earth’s rotation when the system is rotated without moving.
The angular velocity of the system’s rotation will be measured
by the accelerometer and subtracted from the gyroscope data
to obtain the Earth’s rotation velocity and geographic north
direction [17].
The wireless communication medium between the two
modules must be at a frequency band specific to that system
and will not be disrupted by nearby signals. We achieved this
by choosing 433 MHz radio frequency (RF) modules that
only communicate within that frequency band [18].
B. 4-POINTS STATIC ROTATION METHOD
The geographic north’s orientation is obtained by observing
the horizontal component of the earth’s rotation vector. And
in the case of using MEMS gyroscope to find north, this
sensor type tends to show long-term drift and thus requires
bias compensation. In the static north-finding model, a stan-
dard method of 2-point static rotation is applied to mitigate
the additive bias errors through differential azimuth measure-
ment. The sensitive gyroscope axis needs to be discretely
turned by ±180
(also known as maytagging) to detect the
azimuth [19].
An improvement to the static rotation method is intro-
duced in this paper. Instead of the standard 2-points rotation,
we used a 4-points static rotation method [19] in which
the sensitive gyroscope axis was discretely turned by ±90
in the 1-2-3-4-1 clockwise direction, followed by 1-4-3-2-1
FIGURE 2. 4-points static rotation method.
counterclockwise movement, as shown in Fig.2. Measure-
ment of the four points (one full rotation) for each order are
represented by the following equations
V
0
=
E
cos
(
lat
)
cos
(
ϕ
)
V
(1)
V
90
=
E
cos
(
lat
)
cos
ϕ
π
2
=
E
cos
(
lat
)
sin
(
ϕ
)
(2)
V
180
=
E
cos
(
lat
)
cos
(
ϕ π
)
=
E
cos
(
lat
)
cos
(
ϕ
)
(3)
V
270
=
E
cos
(
lat
)
cos
ϕ
3π
2
=
E
cos
(
lat
)
sin
(
ϕ
)
(4)
where
E
is the rotation rate of the earth’s magnitude, which
is 15.0411
/hr (approximately 0.0042
/s), lat is the latitude
angle of the measurement location, and ϕ is the azimuth
angle. Thus, the azimuth angle will be
ϕ = tan
1
V
(
90
)
V
(
270
)
V (0
) V
(
180
)
(5)
C. DIGITAL COMPLEMENTARY FILTER SYSTEM
While the basis of the static north-finding model is modu-
lating discrete rotation of the sensitive gyroscope axis, the
dynamic north-finding model is based on modulating the
continuous process of the axis to measure the Earth’s rota-
tion rate (also known as carouseling). A Kalman filter is
commonly used in many pieces of research to reduce the
effect of bias drift when using the dynamic method [19].
However, some literature argues that the Kalman filter’s algo-
rithm is too complex, has a long computational time, and is
difficult to program on specific 8-bit microcontrollers [20,
21]. Reference [21] suggests that the filter can have simpler
algorithms and fewer sensors. As our receiver module takes
data from the MEMS gyroscope and accelerometer, the filter
114216 VOLUME 10, 2022
N. H. Ariffin, N. Arsad: MEMS Gyro and Accelerometer as North-Finding System for Bulk Direction Marking
FIGURE 3. Block diagram of the digital complementary filter system.
must be able to smoothly integrate both inputs, keep drift
error at a minimum, and has a less complex algorithm for
faster computational time.
Hence, we developed our own digital complementary fil-
ter system that uses the strength of one sensor (MEMS
gyroscope) to overcome the weakness of the other sensor
(accelerometer), and vice versa. This is achieved by combin-
ing high-pass and low-pass filters that work simultaneously.
The high pass filter will filter out the drift error from the gyro-
scope, while the low pass filter will filter out the fluctuations
in the accelerometer’s input data [22]. Based on Fig. 3 below,
the gyroscope angle rate input will be integrated first to
produce the attitude angle before it passes through the high
pass filter to overcome the drift angle error. Meanwhile, the
accelerometer input will go through the integration process
twice to obtain the output angle before being filtered by the
low pass filter. Both filters work simultaneously, and the sum
from both filtered data will give a more accurate angle.
For this system, a mathematical algorithm is developed
for the high pass and low pass filters using an integrated
development environment (IDE) based on (6) as follows
Angle = a ×
(
gyro_data × dt
)
+
(
1 a
)
×
(
acceleerometer_data
)
(6)
where a = coefficient value. Position data obtained from the
MEMS gyroscope and accelerometer will undergo a simula-
tion process simultaneously through the high pass and low
pass filters to obtain the output angle value. The low pass
filter allows frequency signals lower than the cutoff frequency
to pass through, and gyroscope signals with higher frequen-
cies than the designated cutoff frequency will be blocked.
Similarly, the high pass filter will only allow frequency sig-
nals higher than the cutoff frequency to pass through, and
accelerometer signals lower than the cutoff frequency will be
blocked. Filtered signals from both sensors are then combined
to get the best signal and angle value. The coefficient value
from (6) will be tuned throughout the experiment to get the
best value. The coefficient value for the filters will always add
one so that the resulting angle is always accurate and linear.
D. ALLAN VARIANCE
Measuring the bias stability of a gyroscope can help deter-
mine its stability over a period of time, with the bias stability
coefficient commonly denoted in units of a degree per hour
(
/hr) or degree per second (
/s). A common approach to mea-
suring bias stability is using the Allan Variance, a method to
characterize noise and stability by analyzing a time sequence
and describing the intrinsic noise as a function of the aver-
aging time [23]. The calculation begins by splitting a long
data sequence into bins based on averaging time τ . The Allan
variance calculation is as follows
AVAR
2
(
τ
)
=
1
2 ·
(
n 1
)
X
i
y
(
τ
)
i+1
y
(
τ
)
i
2
(7)
where AVAR
2
(
τ
)
is the Allan variance as a function of the
averaging time τ , y
i
is the average value of the measurements
in bin i, and n is the total number of bins.
Uncorrelated noise in the output influences the Allan vari-
ance at a short averaging time τ . At first, the Allan variance
gradually decreases as the average time increases until it
levels off due to 1
f noise. As the power of 1
f noise can
be used to define bias stability, the minimum value of Allah
variance represents the bias stability of the gyroscope. The
Allan variance increases again as the averaging time gets
longer due to bias drift or angular rate random walk error in
the output [24].
III. PROTOTYPE DEVELOPMENT
A. GPS-BASED TRANSMIT TER MODULE
A compact 81 mm × 64 mm printed circuit board (PCB) was
specifically developed for the transmitter module, consisting
of several main components, namely an ATMega328 inte-
grated circuit, a wireless transceiver communication device
that operates at 433 MHz radio frequency (RF) waves,
an organic light emitting diode (OLED) display, and a GPS
module. The transmitter module was placed outside the build-
ing (where the GPS signal was clear) to receive only the lati-
tude and longitude coordinates of the location. The GPS mod-
ule used was a GPS SKM53 series with an embedded GPS
antenna that can function well even in poor GPS signal envi-
ronments. In addition, this module uses the high-performance
single MediaTek 3329 chip architecture. No electronic com-
pass and geomagnetic model are integrated with the GPS
module. Fig. 4 shows the complete assembly of the GPS-
based transmitter module.
The ATMega328 microcontroller functioned as a proces-
sor unit that retrieved location data from the SKM53 GPS
module and then displayed the latitude and longitude coordi-
nates of the location via the OLED display. This processing
unit received data continuously while, at the same time, the
location information was transmitted to the receiver module
inside the building through the wireless 433 MHz RF wave
communication medium.
B. MEMS GYROSCOPE AND ACCELEROMETER
(MPU6050)-BASED RECEIVER MODULE
The developed receiver (and marker) module consists of
Arduino Mega 2560 microcontroller, RFBee wireless com-
munication device at 433 MHz radio frequency, 16 × 2 light
emitting diode (LED) display, micro stepper motor, laser
VOLUME 10, 2022 114217
N. H. Ariffin, N. Arsad: MEMS Gyro and Accelerometer as North-Finding System for Bulk Direction Marking
FIGURE 4. GPS-based transmitter module.
FIGURE 5. MEMS gyroscope and accelerometer (MPU6050)-based
receiver module.
marker, and a MPU6050 sensor module that combines 3-axis
MEMS gyroscope and a 3-axis accelerometer in a single
sensor. Fig. 5 shows the complete assembly of the transmitter
module.
Location data sent by the transmitter module was detected
by the receiver module placed inside the building via the
RFBee communication medium in real-time. The data was
processed and displayed on the 16 × 2 LED display in the
latitude and longitude coordinate format. At the same time,
those latitude and longitude data were processed inside the
C programming software with the help of the Arduino Mega
microcontroller.
Meanwhile, the MEMS gyroscope and accelerometer
inside the MPU6050 sensor were rotated horizontally on
a rotating laser marker. The stepper motor turned into
micro-motion mode under the control of the Arduino Mega
2560 to collect the output data from the gyroscope and
accelerometer. The data were fed into the microcontroller
for simultaneous simulation through the digital comple-
mentary filter system to filter out errors and obtain an
accurate direction angle of the geographic north. Once
the geographic north was successfully detected, it was set
as the reference point for the direction determination and
marking.
FIGURE 6. a) 433 MHz v1.1 RF transceiver module installed in the
transmitter module. b) RFBee 433 MHz UART wireless module (1km)
installed in the receiver module.
TABLE 1. Bias stability measurement for mpu6050 with Allan variance.
C. WIRELESS COMMUNICATION MEDIUM BETWEEN
MODULES
A wireless communication medium that functions at 433 MHz
radio frequency (RF) waves was chosen as the specialized
communication method between the two modules because it
operates under a similar concept as the wireless sensing net-
work. The transmitter module was equipped with a 433 MHz
v1.1 RF transceiver module, as shown in Fig. 6a, while the
receiver module was equipped with RFBee 433 MHz UART
wireless module (1km), as shown in Fig. 6b. Both 433 MHz
modules were chosen because of their smaller size and
thinner design. In addition, both modules operate at a fre-
quency band between 433.4 MHz and 473.0 MHz for 1 km.
Unless signals with the same frequency band are nearby, the
communication medium cannot be disrupted.
IV. RESULTS AND DISCUSSION
A. BIAS STABILITY COEFFICIENT
Static measurement was done for 4 hours on MPU6050 to
collect the output data. The data was then processed using
MATLAB software for Allan variance analysis. Fig. 7 shows
the Allan variance plot for MEMS gyroscope output, while
Fig. 8 shows the same plot for accelerometer output, both on
the x-axis at a sample rate of 100Hz. Table 1 presents the bias
stability measurement for MPU6050 with Allan variance.
The bias stability coefficient for MPU6050 is the key
feature to be considered before the geographic north-finding
experiment can be carried out. Based on the measurement in
Table 1, the bias stability coefficient for the MEMS gyroscope
of the MPU6050 sensor is 0.001241
/s, which equals 4.47
/h.
This coefficient value is smaller than the earth’s angular
114218 VOLUME 10, 2022
N. H. Ariffin, N. Arsad: MEMS Gyro and Accelerometer as North-Finding System for Bulk Direction Marking
FIGURE 7. Allan deviation of the MEMS gyroscope on the x-axis.
FIGURE 8. Allan deviation of the accelerometer on the x-axis.
FIGURE 9. Output measurement at four coefficient values for 90
angle
position experiment.
velocity at 0.0042
/s, and thus the MPU6050 is deemed capa-
ble of measuring the angular rotation of the earth’s axis [25].
B. COEFFICIENT VALUE FOR DIGITAL COMPLEMENTARY
FILTER SYSTEM
At first, the coefficient value a from (6) for the digital com-
plementary filter system was randomly assigned in the algo-
rithm code. Then, the angle measurement was done when the
MPU6050 was at a 90
position to narrow down the potential
coefficient value. Fig. 9 shows the output angle for coefficient
values of 0.95, 0.96, 0.97, and 0.98.
FIGURE 10. Output measurement at a) 0.958 b) 0.956 and c)
0.954 coefficient values for 90
angle position experiment.
Based on Fig. 9, the 0.95 and 0.96 coefficient values are
the closest to a 90
angle. Thus, the subsequent measurement
focused on the values between 0.95 and 0.96. Fig. 10 shows
the results for three values, namely 0.958, 0.956, and 0.954.
From the three values, Fig. 10c clearly illustrates that the
coefficient value of 0.954 gives the highest output angle accu-
racy at the 90
position, compared to 0.958 and 0.956 values.
Fig. 11 shows the performance of 0.954 coefficient value
when tested at angle of 0
, 90
, and 180
, respectively, for
200 measurements.
Due to its stable performance and accurate output,
0.954 was chosen as the coefficient value for our digital
complementary filter system and used in the subsequent
experiments to determine geographic north.
C. GEOGRAPHIC NORTH FINDING USING 4-POINTS
STATIC ROTATION METHOD
The experiment to find geographic north using 4-points static
rotation method was done under 300 seconds for one direc-
tion, in which 50 measurements were recorded. During the
investigation, the initial position of the MEMS gyroscope
headed geographic north. After that, the rotator was turned
90
clockwise heading east for the second cycle of mea-
surement, another 90
clockwise, heading south for the third
cycle, and finally heading west for the last measurement
cycle. Fig. 12 shows the output measurement of the rotations
with Fig. 12a for the geographic north heading, Fig. 12b for
the east heading, Fig. 12c for the south heading, and Fig. 12d
for the west heading.
VOLUME 10, 2022 114219
N. H. Ariffin, N. Arsad: MEMS Gyro and Accelerometer as North-Finding System for Bulk Direction Marking
FIGURE 11. Performance of 0.954 coefficient value at a) 0
b) 90
and c)
180
.
FIGURE 12. Output measurement when MEMS gyroscope headed
towards a) geographic north b) east c) south and d) west.
Measurements were continued for five complete rotations.
Fig. 13 shows a total of 1000 recorded measurements that
took 1.7 hours. Each measurement point in Fig.13 represents
the average azimuth of 50 measurements in each direction.
The experimental results in Fig. 13 show that the azimuth
approaches zero value when the MEMS gyroscope sensor is
either in the east or west direction. Meanwhile, the azimuth
FIGURE 13. Measurement results with each measurement point
represent the average azimuth of 50 measurements in each direction.
reaches a minimum value in the geographic north direction
and a maximum value in the south direction. The measure-
ment results also show that the gradient of the graph in
the east and west directions is steeper, meaning they are
easier to detect accurately compared to the north and south
directions [26].
D. FIELD TESTS OF PROTOTYPE FOR BULK DIRECTION
MARKING
A field test to determine the communication distance between
the transmitter and receiver modules via the wireless radio
frequency at 433MHz (RFBee 433MHz) was first conducted.
We found that the maximum distance when both modules are
at the same level is 600 meters. In contrast, when the receiver
module was placed at a different story inside the building,
the communication distance can cover a maximum height of
14.58 meters.
Field tests were carried out throughout Malaysia to find the
geographic north, the feasibility of the north-finding system,
and whether it can accurately detect and mark the desired
Qibla direction based on the geographic north. The locations
of the field test were selected based on different geographic
landscapes, weather conditions, and various building types,
namely:
1) SITUATION 1
Inside a closed building in the Collaborative Innovation Cen-
ter (PIK), UKM Bangi, at latitude 2.9273
N.
2) SITUATION 2
In a semi-open area at latitude 2.9228
N, located in IMEN,
UKM Bangi.
3) SITUATION 3
In an open area located on the hill at Sheikh Tahir Astronom-
ical Center, Penang, at latitude 5.4115
N and an altitude of
40 m above sea level.
4) SITUATION 4
In a semi-open area in Kubang Kerian Mosque, Kota Bharu
Kelantan, at latitude 6.0945
N.
114220 VOLUME 10, 2022
N. H. Ariffin, N. Arsad: MEMS Gyro and Accelerometer as North-Finding System for Bulk Direction Marking
TABLE 2. Comparison in measuring geographic north between the
mpu6050 north-finder prototype and jupem’s marking.
TABLE 3. Comparison in measuring the Qibla direction between
mpu6050 north-finder prototype and JUPEM’s marking.
Representatives from the statutory bodies (JUPEM,
JAKIM, and the State Mufti Department) were present during
the field tests to check the system’s accuracy by comparing
the detected geographic north and Qibla direction with the
one they obtained, as shown in Table 2 and Table 3 below.
The prototype underwent four situations at each field test
to assess its feasibility and robustness. Table 2 and Table 3
show that the mean absolute deviation is 0.57. The prototype
achieved an average accuracy of 99% in determining the
geographic north and marking the Qibla directions with a
slight error of 0
7
0
6
00
.
At the end of the experiment, we concluded that the
MEMS gyro MPU6050 north-finder prototype has four dis-
tinct strengths. Firstly, the prototype can handle different
field situations and still give highly accurate readings due
to properly suppressed errors. Secondly, the two-module
configuration where the GPS-based transmitter module is
placed outside the building, and the MEMS gyroscope and
accelerometer-based transmitter module is placed inside the
building, allows for more flexibility in the measurement pro-
cess. Thirdly, the prototype is easy to use for non-expert as
all the computation and detection are automatically done by
the system. The user only needs to place modules and ensure
they can communicate properly. And lastly, the transmitter
module is very compact and light, while the larger receiver
module only weighs around 1.5 kg. Hence, the developed
prototype makes it easily portable for bulk direction marking
at multiple sub-locations.
V. CONCLUSION
This paper reports the development of a high-accuracy north-
finding and direction-marking system prototype consisting
of a GPS-based transmitter module and a MEMS gyroscope
and accelerometer-based receiver module. The bias stability
coefficient for the prototype’s MEMS gyroscope sensor was
found to be at 0.001241
/s, and it is smaller than the Earth’s
angular velocity at 0.0042
/s, and thus suitable for north-
finding measurement. A 4-points static rotation method for
bias compensation is introduced in this paper as an improve-
ment to the commonly used 2-points method. A digital com-
plementary filter system is also developed for the receiver
module consisting of a high pass filter that filters out the drift
error from the gyroscope and a low pass filter that filters out
the fluctuations in the accelerometer’s input data. The data
from both sensors are summed with a 0.954 coefficient value
to produce the most accurate angle. The prototype underwent
field tests in three locations throughout Malaysia with varying
geographic landscapes and four situations at each site. Based
on the field tests, the two modules could communicate at a
maximum distance of 600 meters and a maximum height of
14.58 meters. The field test results were reviewed by statutory
bodies (JUPEM, JAKIM, and the State Mufti Department).
It proved that the prototype system for determining the direc-
tion of Qibla based on true north has achieved an average
accuracy of 99% in determining the geographic north and
marking the desired directions with a slight error of 0
7
0
6
00
.
Future work will be focused on decreasing the time needed
to find the north direction and designing the receiver module
to be more compact and robust.
REFERENCES
[1] H. Kahmen and W. Faig, ‘Three-dimensional positioning, in Surveying,
vol. 6. Berlin, Germany: De Gruyter, 2012, ch. 12, sec. 12.1, pp. 455–456.
[2] A. Gonsette, J. Rasson, S. Bracke, A. Poncelet, O. Hendrickx, and
F. Humbled, ‘Fog-based automatic true north detection for absolute mag-
netic declination measurement, Geosci. Instrum., Methods Data Syst.,
vol. 6, no. 2, pp. 439–446, Oct. 2017.
[3] P. J. Teunissen and A. Kleusberg, GPS for Geodesy. Berlin, Germany:
Springer, 2012, pp. 15–17.
[4] V. M. N. Passaro, A. Cuccovillo, L. Vaiani, M. De Carlo, and
C. E. Campanella, ‘Gyroscope technology and applications: A review in
the industrial perspective, Sensors, vol. 17, no. 10, p. 2284, Oct. 2017.
[5] D. Bartlett, Essentials of Positioning and Location Technology. Cambridge,
U.K.: Cambridge Press, 2013, pp. 109–110.
[6] A. Chulliat, W. Brown, P. Alken, C. Beggan, M. Nair, and G. Cox, ‘The
U.S./U.K. World magnetic model for 2020–2025, NOAA Nat. Centres
Environ. Inf., Boulder, CO, USA, Tech. Rep., 2020.
[7] M. Sadiq, Z. Zaman, A. Jehanzeb, S. Javed, and N. Qaiser, ‘Design and
development of precision astronomical north-finding system: A software
and hardware perspective, in Proc. 14th Int. Bhurban Conf. Appl. Sci.
Technol. (IBCAST), Islamabad, Pakistan, Jan. 2017, pp. 368–376.
[8] J. Fang, H. Sun, J. Cao, X. Zhang, and Y. Tao, A novel calibration method
of magnetic compass based on ellipsoid fitting, IEEE Trans. Instrum.
Meas., vol. 60, no. 6, pp. 2053–2061, Jun. 2011.
VOLUME 10, 2022 114221
N. H. Ariffin, N. Arsad: MEMS Gyro and Accelerometer as North-Finding System for Bulk Direction Marking
[9] T. Saksono, M. A. Fulazzaky, and Z. Sari, ‘Geodetic analysis of disputed
accurate qibla direction, J. Appl. Geodesy, vol. 12, no. 2, pp. 129–138,
Apr. 2018.
[10] A. Wafiroh, Accurate the direction of Qibla mosque in the island of a
thousand mosques using theodolite, Al-IHKAM: Jurnal Hukum Keluarga
Jurusan Ahwal al-Syakhshiyyah Fakultas Syariah IAIN Mataram, vol. 11,
no. 1, pp. 41–52, Jun. 2019.
[11] F. R. Dwi, ‘IOS application for finding halal food, mosque, Qibla direction
and prayer time, Jurnal Informatika, vol. 13, no. 2, pp. 63–70, Feb. 2016.
[12] Y. Zhang, B. Zhou, M. Song, B. Hou, H. Xing, and R. Zhang, A novel
MEMS gyro north finder design based on the rotation modulation tech-
nique, Sensors, vol. 17, no. 5, p. 973, 2017.
[13] X. Li, W. Xiao, and Y. Fei, ‘Status quo and developing trend of
MEMS-gyroscope technology, in Proc. 5th Int. Conf. Instrum. Meas.,
Comput., Commun. Control (IMCCC), Qinhuangdao, China, Sep. 2015,
pp. 727–730.
[14] M. B. Kjærgaard, H. Blunck, T. Godsk, T. Toftkjær, D. L. Christensen, and
K. Grønbæk, ‘Indoor positioning using GPS revisited, in Proc. Int. Conf.
Pervasive Comput., Kassel, Germany, 2010, pp. 38–56.
[15] V. Janssen, ‘Understanding coordinate reference systems, datums and
transformations, Int. J. Geoinform., vol. 5, no. 4, pp. 41–53, 2009.
[16] D. Fedorov, A. Y. Ivoilov, and V. A. Zhmud, ‘Using of measuring system
MPU6050 for the determination of the angular velocities and linear accel-
erations, Automatics Softw. Enginery, vol. 11, no. 1, pp. 75–80, 2015.
[17] J. Bojja, J. Collin, M. Kirkko-Jaakkola, M. Payne, R. Griffiths, and
J. Takala, ‘Compact north finding system, IEEE Sensors J., vol. 16, no. 8,
pp. 2554–2563, Apr. 2016.
[18] F. Ahmed, S. M. A. Alim, and M. S. Islam, ‘433 MHz (wireless RF)
communication between two Arduino UNO, Amer. J. Eng. Res., vol. 5,
no. 10, pp. 358–362, 2016.
[19] I. P. Prikhodko, S. A. Zotov, A. A. Trusov, and A. M. Shkel, ‘What
is MEMS gyrocompassing? Comparative analysis of maytagging and
carouseling, J. Microelectromech. Syst., vol. 22, no. 6, pp. 1257–1266,
Dec. 2013.
[20] B. McCarron, ‘Low-cost IMU implementation via sensor fusion algo-
rithms in the Arduino environment, Aerosp. Eng. Dept., Cali. Poly. State
Univ., San Luis Obispo, CA, USA, Tech. Rep., Jun. 2013.
[21] A. Pascoal, I. Kaminer, and P. Oliveira, ‘Navigation system design using
time-varying complementary filters, IEEE Trans. Aerosp. Electron. Syst.,
vol. 36, no. 4, pp. 1099–1114, Oct. 2000.
[22] N. H. Ariffin, N. Arsad, and B. Bais, ‘Low cost MEMS gyroscope and
accelerometer implementation without Kalman filter for angle estimation,
in Proc. Int. Conf. Adv. Electr., Electron. Syst. Eng. (ICAEES), Putrajaya,
Malaysia, Nov. 2016, pp. 77–82.
[23] W. Stockwell, ‘Bias stability measurement: Allan variance, Crossbow
Technol., Milpitas, CA, USA, Tech. Rep., 2004.
[24] L. I. Iozan, M. Kirkko-Jaakkola, J. Collin, and J. Takala, ‘North finding
system using a MEMS gyroscope, in Proc. Eur. Navigat. Conf. Global
Navigat. Satell. Syst., Braunschweig, Germany, 2010, pp. 19–21.
[25] L. Iozan, J. Collin, O. Pekkalin, and J. Hautamäki, ‘Measuring the Earth’s
rotation rate using a low-cost MEMS gyroscope, in Proc. Symp. Gyro
Technol., Karlsruhe, Germany, 2010, pp. 1–16.
[26] L. I. Iozan, M. Kirkko-Jaakkola, J. Collin, J. Takala, and C. Rusu, ‘Using
a MEMS gyroscope to measure the earth’s rotation for gyrocompassing
applications, Meas. Sci. Technol., vol. 23, no. 2, 2012, Art. no. 025005.
NUR HAZLIZA ARIFFIN (Member, IEEE)
received the bachelor’s degree in electronics
engineering technology from the UniKL British
Malaysian Institute, in 2008, and the M.Sc. degree
in microelectronics and the Ph.D. degree in elec-
trical and electronics engineering from Universiti
Kebangsaan Malaysia (UKM), in 2015 and 2019,
respectively.
She has more than ten years of teaching
experience. She was with UCSI University,
from 2008 to 2015. She was a part-time Lecturer with Segi University,
from 2017 to 2018. She is currently a Lecturer with the Department of
Common Engineering, School of Engineering, Monash University Malaysia.
Her research interests include the IoT, embedded systems, control systems,
robotic design, and digital signal processing.
NORHANA ARSAD (Senior Member, IEEE)
received the B.Eng. degree in computer and com-
munication systems and the M.Sc. degree in pho-
tonics from Universiti Putra Malaysia (UPM),
Malaysia, in 2000 and 2003, respectively, and the
Ph.D. degree from the University of Strathclyde,
Glasgow, U.K., in 2010.
She is currently a Professor with the Center of
Advanced Electronic and Communication Engi-
neering, Faculty of Engineering and Built Envi-
ronment, Universiti Kebangsaan Malaysia. Her research interests include
the investigation and design of fiber laser systems for application in spec-
troscopy, gas sensing, and photonics technology. She is also active in engi-
neering education and entrepreneurial.
114222 VOLUME 10, 2022