Arduino-Uno Based Mobile Data Logger with GPS Feature

Lightning activity correlates with the formation of thunderclouds which increase the atmospheric electric field (AEF) between the cloud and the earth. Observations of the development of the AEF will allow the prediction of lightning activities close to a particular location. In research and development, the data logger plays an important role to observe and collect data from AEF sensors. The data logger must be reliable and effective. High investment costs are involved in acquiring a data logger, and choosing a suitable data logger is not easy. Institut Voltan dan Arus Tinggi (IVAT) is develeloping AEF sensor. Along with that sensor development a data logger development is also required. In this paper, a mobile data logger is developed by using Arduino-Uno. This mobile data logger is equipped with a GPS module, which provides accurate positioning in the collection of data. Laboratory and field tests were carried out to observe the performance of the mobile data logger system. The results showed that the developed data logger works properly.


Introduction
Much research has focused on the application of sensors and data logger systems in many fields of science and engineering, such as meteorology, geoscience, geophysics, aeronautics, and aerospace. In obtaining accurate data for performing analyses, the process of data recording is critical in the application of a data logger system.
Recent studies have measured temperature and humidity levels. Gasparesc utilised an Arduino Uno board that was connected to a PC with a graphical user interface (GUI) to monitor the desired parameters [1], and Khairi et al. developed a wireless temperature monitoring system [2]. The data were sent through a wireless network in which the data could be observed by using an LCD and portable computer. Similar studies were also presented by Goswami et al., Ibrahim, Kumar et al., and Sigh and Sud. [3]- [6]. However, applications of portable and mobile data logging with sensors are also in demand [7]- [9].
Generally, any mobile application is equipped with a global positioning system (GPS) in order to provide the coordinates, time, speed and distance. The GPS has been utilised widely in both scientific research and business, such as navigating for the accurate prediction of traffic flow information, surveying for errors in highway measurements, tracking and surveillance of high altitude UAVs, mobile phone operations, interfacing with GPRS as an outdoor remote wireless data collection, a portable, wearable system that enhances athletes' performances [10]- [14], and many more.
Furthermore, in outdoor activities, lightning is a natural phenomenon of which people should be aware. Lightning activity correlates with the formation of thunderclouds, which increase the atmospheric electric field (AEF) between the cloud and the earth. Observations of the development of the AEF will allow the prediction of lightning activities close to a particular location. These observations are particularly important in countries with high isokeraunic levels [15]- [17].
With regard to AEF, a study using an electric field mill was carried out to develop a thunderstorm warning alarm system [18]. It was based on the measurement of variations in the However, the construction of a stationary observation unit has required a high investment in equipment and installations, including land, tower, antenna, data acquisition, and computer. However, rapid developments in technology have made it possible to develop an effective mobile data logger system at a much lower cost. Interestingly, little research has investigated mobile data logging related to AEF measurement. This paper presents the development of a low-cost mobile data logger device to record temperature, humidity, AEF magnitude, and location coordinates. The system is developed by using the Arduino-Uno board environment (Arduio-Uno) and Arduino 1.0.5 open project software. In the next study, a low-cost online data logging system integrated with mobile observation stations will be developed.

Development process
The development process consists of two parts: the selection of components and the programming code. The harmonization of the two parts will determine the overall performance of the device.

Components overview
The performance of a mobile data logger device is determined by the selection of components. Our review of previous studies showed that Arduino-Uno is suitable for application in a mobile data logger. Several applications have been developed by using Arduino-Uno, such as in motion, sound, and respond control. The application has been widely used in environmental monitoring, such as observing climate change, green house monitoring, gas sensors and so on [18]- [21].
Arduino-Uno uses the Atmega328 programmable integrated circuit with 6 analogue inputs and 14 digital i/o pins. Arduino-Uno operates at 5 V, which is acceptable in most sensor devices. In this current work, five analogue inputs were used to receive input signals from a temperature and humidity sensor. In addition, the digital i/o was used for the GPS module, LEDs, LCD module, and SD Card module. Figure 1 presents all components of the design. A NTC thermistor-based temperature module (NTC-module) was selected to observe and collect temperature data from the surroundings. The NTC-module is suitable for mobile applications, and its sensitivity fulfils the design requirements of the current work. Compared with the LM35 temperature sensor, the NTC-module is more sensitive and makes fewer reading errors. It comes with two outputs: analogue and digital. Because its power supply ranges from 3.3 V to 5 V DC, the NTC-module can be used immediately. Furthermore, because of its small size (3 cm x 1.6 cm) the NTC-module is easily put into position, which reduces the development cost [22].

Humidity Sensor
In addition to the temperature, an important parameter for observation is the surrounding humidity. Temperature and humidity have a relative correlation, and both parameters will be used to describe the weather conditions. A humidity sensor module with a pre-mounted HR202 humidity sensor was utilized to observe variations in humidity. It operates at 3.3 V to 5 V DC, and it can be used immediately to measure humidity. Operating in 20-95% RH with accuracy of ±5% RH, it is suitable for many applications [13].
Furthermore, a SKM53 GPS Starter Kit (GPS-module) was utilized to acquire the position of the data being collected. The GPS module is equipped with an embedded patch GPS antenna 18.2 x 18.2 x 4.0 mm 3 . It provides a solid fix, even in harsh GPS visibility environments, as well as high-performance navigation in stringent applications. It includes an ultra-high sensitivity (-165 dBm) receiver and an internal back-up battery. Its entire dimensions are 39 x 50 mm 2 . In addition to the position data, the GPS-module also provides information regarding altitude, time, date, and speed. The almanac data is provided by satellites. The position is obtained by determining its distance from visible satellites and by using the triangulation method to calculate it. GPS data is configured according to standards set by the National Marine Electronics Association (NMEA). In the current study, the information taken from the GPS module included the position, date, and time.
All data were saved in a secure digital (SD) card, which is a typical flash-based memory card designed specifically to meet the security, performance, and environmental requirements of this study. The SD card was secured in the SD card module BB-SD-0071 SD card breakout board. It very compatible with Arduino and can be operated with a power supply of only 3 V or 5 V DC. The module also has a built in logic-level shifter, so for the data interface, it can be connected directly to the Arduino Uno board without an external circuit.
Finally, a 20 x 4 character LCD was used for instant display during the data logging. The LCD 20x4 was selected because its size is adequate and it is able to display a great amount of data. The components and devices connected to Arduino are shown in Table 1.

Programming flowchart
Arduino provides the "Aduino.exe" freeware for users developing programming codes. An extensive reference library of components is included with the freeware, which was developed by various supportive Arduino communities. C language was used to write the programming code in the Arduino freeware environment. It consists of main a programme and a subroutine programme. As shown in Figure 2, the code starts by importing all related library items to the main programme, which configure the Arduino microcontroller and sensor modules. Subsequently, the global variables are declared. The output-and input-direction ports of the microcontroller are based on the GPS module, the LCD, the temperature and humidity sensor module, as well as other sensors.
The subroutine flowchart is shown in Figure 3. In a normal condition, the subroutine would operate in a loop continuously, unless it was stopped by the observer. In the first step, the microcontroller would be requested to detect the sensors' availability. If the sensors were not found, an error message then would appear. Otherwise, the next command would be executed.

Results and discussion
The assembled components are shown in Figure 4. This prototype is utilised in the testing process. A proper casing design will be carried out after the results of the testing are confirmed. The testing was carried out both inside and outside the laboratory (field-testing). All tests were carried out to examine the harmonization of all components of the device.

Laboratory Experiment
Testing inside the laboratory was carried out first. The testing included observations of the surrounding temperature and humidity. The experiment was carried out in the Actuator and System Laboratory, Universiti Teknologi Malaysia, UTM Johor Bahru. It was conducted on 20 March 2014 at 12:05 pm. Based on the GPS data, the latitude and longitude of the location were 1.559380 N and 103.642433 E, respectively. The observation was carried out for a duration of one minute with 500 data retrieved; therefore, the data intervals were approximately 0.12 second. In other words, the speed of the data collection was 8.33 data per second. Figure  5 and Figure 6 illustrate the results of temperature and humidity observations, respectively. The results showed that in the first 5 seconds, the data oscillated before reaching a steady state. This instability was related to the energising process of the Arduino Uno board.

Field testing
In the field-testing, the humidity and temperature sensors were located on the roof of a car, as shown in Figure 7, and the prototype data logger, equipped with the GPS system, was placed inside the vehicle. The vehicle moved for about 1 hour, 9 minutes, and 30 seconds (i.e., from 14:26:31 to 15:36:01), collecting the surrounding temperature and humidity levels, as well as the date, time, latitude and longitude. The data were collected at intervals of 1 second. There were 1,092 data logged during the data collection. A part of the collected data, which was retrieved from SD cards by using Microsoft Excel, is shown in Figure 8.

Figure 8. Snapshot data from MS Excel
The data sample is presented in Figure 9, which indicates that at first, the temperature increased greatly when the sensor was positioned at the beginning of the observation. After about 3 minutes, the temperature tended to stabilize and slowly increased to more than 40 C. A light rain started when the car had been moving for about 15 minutes, which caused the temperature to drop sharply. However, the observed humidity level was constant, indicating that the humidity sensor did not respond to the change in the surrounding conditions. In order to verify the operation of the temperature and humidity sensors, a test was conducted by comparing the temperature and humidity data from the prototype device with a device certified by SIRIM Berhad. The devices were positioned close together for 10 minutes prior to the data collection to ensure that all sensors were adapted to the surrounding conditions. Table 2 shows that the two devices had different readings. The trend of the temperature was similar, with an average discrepancy of 3.18 C. Further calibration work could be carried out to solve this problem.
The discrepancies in the humidity data between the two devices were extreme. Hence, further investigations of the capacity of the HR202 humidity sensor applied in the mobile data logger will be conducted. In addition, to validate the GPS data, the GPS data was transferred to the Google maps tracking software. The results illustrated in Figure 10 show that the GPS collected the coordinate data accurately; thus, its performance was satisfactory. The prototype device was designed to be as compact as possible so that it could be carried and positioned easily. It can be powered by using the USB port of computer notebook or a cigarette lighter inside an automobile. It also could be powered through a DC barrel-type power connector.
The total amount of space used by the programming code was 24.24 kbytes of 32 kbytes in Atmega32's flash memory. However, a problem was found regarding the data collection from sensors, in which the microprocessor (Atmega32) could not read the sensors concurrently. Consequently, when data from the first sensor was stored inside the flash 258 memory, the data would not merge with new data from another sensor. In order to address this problem, time delay and memory discharging commands also should be added to the programming section. The command code should be placed before the next sensor was accessed.
In addition to the temperature and humidity sensor port, the prototype device is also equipped with a port for rotating the electric field mill (REFM). Usually, the REFM is utilised to observe the AEF magnitude. Because the output of the REFM is a DC signal, it can be attached to the prototype device. Figure 11 shows a typical output signal from a developing REFM. However, because the development of REFM for mobile applications is ongoing, the current paper could not present a result related to the mobile data logger. Figure 11. Typical output signal from developing REFM Another important component of the mobile device is the GPS module. The GPS module utilises satellite information to provide output data. Information about the time and date provided by satellites is very accurate. In the current study, the GPS module needed at least a 10-minute start-up before reliable data was obtained because the module needed to search for and read the signals from satellites. The distance of the module from the satellites also affected the duration of the start-up.
Currently, the device developed here is only used offline. The collected data, which were automatically saved in the SD card, were retrieved and analysed using a PC. However, an online system will be developed in the future [23]- [25]. In the meantime, the SD Card can be still utilised as back-up storage if the online system presents problems.

Conclusion
The design and development of a low-cost mobile data logger was successfully carried out. The laboratory and outdoor testing results showed that the developed device satisfactorily performed the required observations and data logging. All components worked properly at an acceptable speed. The device performed well when applied with a DC input signal.