You are on page 1of 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/316249731

Design and development of an arduino based data logger for photovoltaic


monitoring system

Article · January 2017


DOI: 10.5013/IJSSST.a.17.41.15

CITATIONS READS

12 3,690

5 authors, including:

Ahmad Maliki Omar Siti zaliha mohammad noor


Universiti Teknologi MARA Universiti Teknologi MARA
98 PUBLICATIONS   580 CITATIONS    35 PUBLICATIONS   236 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Grid connected and Off grid PV system View project

Power Electronics applications View project

All content following this page was uploaded by Siti zaliha mohammad noor on 03 November 2017.

The user has requested enhancement of the downloaded file.


N N MAHZAN et al: DESIGN AND DEVELOPMENT OF AN ARDUINO BASED DATA LOGGER FOR …

Design and Development of an Arduino Based Data Logger for Photovoltaic


Monitoring System

N. N. Mahzan, A. M. Omar, L.Rimon, S. Z. Mohammad Noor, M. Z. Rosselan

Faculty of Electrical Engineering


University Teknologi MARA (UITM) Shah Alam
Selangor, Malaysia
najwa.mahzan@gmail.com

Abstract — This paper describes the design of a general data logger for Photovoltaic (PV) monitoring system that can store bulk
data from input channels in large memory storage. It utilizes Arduino Mega 2560 board in conjunction with ATmega2560 chip.
For monitoring the related parameters, a 240-W PV system is used where electrical parameters are tapped into the input channels
of the data logger. The system will convert the acquired raw data to digital input for data acquisition and will store the data onto
SD card. The data logger is also equipped with DS1307 Real Time Clock (RTC) chip for data stamping in the SD card every at the
occurrence of the logging process. Results and findings are recorded and compared with the data that was taken by one
commercial data logger DataTaker DT80 during the testing stage. This is to test the data reliability as well as to examine the
performance of the proposed data logger throughout the testing process.

Keywords - Arduino; data logger; PV monitoring system; microcontroller based monitoring system

I. INTRODUCTION system demands. Everything has its own flaws including the
data logger itself. In a bright side, the flaws are covered by
Data logger has been used widely not only in electronic other advantages presented in the data logger produced. For
worlds but in all systems which relates to technology [1]. example, some of them are having large data storage system
Due to its capability in storing information for a long time, but lack in input channels [2-8] and some of them are
it is often being used to collect data for a system which having lots of data input but shortage in memory storage [2,
relates to electrical parameters and meteorological 4, 8-14]. Many high quality data logger are equipped with
parameters. Speaking of that, data logger has been used sophisticated communication unit where sometime it is not
distinctly in monitoring both parameters especially in really necessary for monitoring PV system [8, 15-19]. And
Photovoltaic (PV) system field. It is very useful for PV what is more to be bothered is the price which is a little bit
system because it has the ability to store a variety of data expensive [1, 8, 9, 19, 20] suitable with the extra features it
over an extended long time without fully inspection by a has. There are some parameters which are not related to PV
user. As an example, for an Off-Grid PV system, data logger systems and happen to be embedded together with the data
plays important role in logging all the data since the system logger [21].
is located in remote area which is most of the time the place Few existing data loggers in market are able to cater
is far from the utility grid. Thus the constant supervision is all the parameters in PV system. One of the problems is they
not worthwhile for a user just to collect the data for have limited memory size. For instance DataTaker DT80
observation purposes. where the internal memory size is only 128MB [22]. With
regards to that, the limitation of data that can be stored into
PV system and data logger have been a great companion the data logger will be decreased in number provided that the
together as data loggers’ capability to store data over a sampling time and logging time are as low as 1 second. As
period of time without regular supervision. These days, PV per stated in the DataTaker DT80 manual, for 1 second scan
system has been accepted by the higher authorities in rate of data, the storage can fill up to 9 hours of reading the
whole data [22]. Any other example of existing data loggers
Malaysia and few environmental association as well as
in market is Squirrel SQ2020 Data Logger which has 128
industrial organization. Its technology has the possibility in MB for internal memory where can store up to 14 million of
supplying the world’s energy needs in a sustainable and readings [23] and it has external memory too which is up to
renewable method. Due to that, the PV system needs a 1 GB that merely works for transferring data from internal
reliable of method for logging data to store all the electrical memory and anything related to storing setups only.
and meteorological data for observing and monitoring
purpose; a data logger seems to be necessitated in this field.

There are lots of data loggers produced in many electrical


and electronics company and researchers to cater the PV

DOI 10.5013/IJSSST.a.17.41.15 15.1 ISSN: 1473-804x online, 1473-8031 print


N N MAHZAN et al: DESIGN AND DEVELOPMENT OF AN ARDUINO BASED DATA LOGGER FOR …

II. DEVELOPMENT OF THE DATA LOGGER 32.768 kHz is utilized in allowing timing pulses to the RTC
Fig. 1 shows the block diagram for the proposed data chip.
logger where it consists of microcontroller, SD card, RTC C. Data storage
and sensors. Two 4GB size of SD cards are used to store all data
received from sensors. The reason of choosing only two SD
cards are because to test the ability of the memory storage of
the data logger can cater throughout logging and storing
process. Certainly the SD card can be placed in the data
logger as many as possible due to its Serial Peripheral
Interface (SPI) pins which can be shared to many slaves;
provided that the digital pin for Chip Select (CS/SS) is
sufficient in the microcontroller.
Figure 1. Block diagram for the proposed data logger.
D. Proposed data logger
A. Microcontroller The complete proposed data logger is shown in Fig. 2.
While the schematic diagram of the data logger connected to
In this proposed data logger, Atmel ATmega 2560 has the PV system during testing session is presented in Fig. 3.
been chosen to be the main microcontroller by referring to
the past reviews by other researchers. According to [24, 25],
a high performance and a low usage of power of
microcontroller is needed to build a fast as well as little cost
used and it was chosen by many for their researches. The
important elements that the microcontroller has are a stable
of analog to digital converter (ADC) and universal
synchronous and asynchronous serial receiver and
transmitter (USART). Besides, the bigger number in
input/output (I/O) that ATmega 2560 had made many
researchers choose it over other boards. As per written by
[26], ATmega 2560 contributes incredibly in electronics
control applications such as data logging, data acquisition
system and many more as it is well known for its
economical and greatly-flexible chip amongst electrical
circuit designer. Apart from that, the chip is always referred
as a high performance microcontroller and it was totally
seconded by many other researchers to have a great Figure 2. Complete proposed data logger
performance microcontroller in their researches [2, 10, 17,
27-31]. Furthermore, by performing powerful instruction in
a single cycle, the chip manages throughputs approximating
1 MIPS per MHz, thus will balance the power consumption
and the processing speed [27, 32].
B. Time stamp
For this prototype data logger, real time clock (RTC)
PROTO board has been chosen for time stamping purpose.
The product was produced by MikroElektronika© and it
includes PCF8583 which is a calendar and clock chip with
I2C interface. One of the features that the chip offers is able
to manage the current time even when the microcontroller is Figure 3. The schematic diagram of the proposed data logger connected to
not operating. The real-time clock is operated by one the PV system for testing.
particular battery which is not linked to the power supply.
Thus, the date and time for each data will not be affected III. SOFTWARE DEVELOPMENT
whenever power is disconnected from the circuit. Two
Arduino Integrated Development Environment (IDE)
pieces of 10K pull-up resistors are placed in between the
is chosen for constructing the codes for the proposed data
connection of SCL and SDA from PCF8583 to the pins
logger. Fig. 4 shows a brief of software procedure to be
from ATmega 2560. The pull up resistors are needed for a
referred at before constructing code in the Arduino IDE.
smooth process in the I2C bus [7]. In addition, a crystal of

DOI 10.5013/IJSSST.a.17.41.15 15.2 ISSN: 1473-804x online, 1473-8031 print


N N MAHZAN et al: DESIGN AND DEVELOPMENT OF AN ARDUINO BASED DATA LOGGER FOR …

check the size of each cell involved during the logging


process. For one cell of date and time, the size was
constantly showed 19 bytes while other cells each
contributes 7 bytes. Thus, the formula is as follows,

(1)
37 7 19 24 60 60

where m = logging time [sec]


n = number of channel.

IV. RESULTS AND DISCUSSION

Electrical parameters for one small PV system of 240W


power were measured synchronizes with measurement from
existing commercial data logger, DataTaker DT80 at the
same system. This is to test the reliability of the data logged
by the proposed data logger as well to check its performance
during logging process. The results were shown in Fig. 5-8.

Figure 4. A brief coding for the proposed data logger

In the beginning of the code, after every variable is


initialized, the program will receive a choice from users to
pick either logging mode or downloading mode. Logging
mode is where the data logging process occurs and the latter
one is for downloading existing data in the data storage; i.e
SD card. If users chose for downloading data, the logging
process will stop for a while and if the logging mode is
selected, then the program will ask users to write input for
the next options such as number of channel that is going to
use and logging time. An estimated days for data logger can
log the data will be calculated and displayed by using the Figure 5. Time profile of battery output voltage
following formula [8]. The program will then check the
availability of SD card 1. If the first SD card is available
which means not in faulty mode and exists in the SD slot,
then the program will check either the size of the SD card is
acceptable for storing data. If both conditions are true, then
the program will check either the filename based on current
date in the SD card existed, if it is not true, the program will
quickly make a new filename so that all data can be stored
inside the new file. Later, the program will then recheck the
availability of the SD card and the free space that it holds
before reading sensors stage occurs. After the program reads
the sensors, all the data received will directly send to the
memory storage for storing purpose. If any of these
conditions are not fulfilled, the program will instantly check
for another SD card; which is SD card 2 to be activated. The
data logging process will take place until the free space in
Figure 6. Time profile of inverter output voltage
each of the SD cards is full, faulty or brought out.
For getting the formula to calculate estimated days for
data logger to logging, one test had been done purposely to

DOI 10.5013/IJSSST.a.17.41.15 15.3 ISSN: 1473-804x online, 1473-8031 print


N N MAHZAN et al: DESIGN AND DEVELOPMENT OF AN ARDUINO BASED DATA LOGGER FOR …

REFERENCES

[1] J. Rajmond and D. Pitica, "Data logger for signal analysis and failure
prediction," in Design and Technology in Electronic Packaging
(SIITME), 2010 IEEE 16th International Symposium, 2010, pp. 263-
266.
[2] J. Rajmond and D. Pitica, "8 channel configurable data logger for
reliability testing and quality assurance," in Electronics Technology
(ISSE), 2010 33rd International Spring Seminar on, 2010, pp. 255-
258.
[3] A. Suzdalenko, A. Lazdans, and I. Galkin, "Development of multi-
Figure 7. Time profile of battery output current channel analogue signal data logger based on MSP430," in
Education and Research Conference (EDERC), 2012 5th European
DSP, 2012, pp. 40-43.
[4] B. Nkom and H. Musa, "Development of a Novel Microcontroller-
based data logger," in Adaptive Science & Technology, 2009. ICAST
2009. 2nd International Conference on, 2009, pp. 314-324.
[5] L. Ning and S. Zhong, "Research and implementation of new type
multi-channel data logger," in Computer Application and System
Modeling (ICCASM), 2010 International Conference on, 2010, pp.
V2-102-V2-105.
[6] D. P. N. C. S. Sagarkumar, B. V. Wakode, "Data Logger System: A
Survey," International Journal of Computer Technology and
Electronics Engineering (IJCTEE), pp. pp. 24-26, 2011.
[7] D. Ibrahim. (2008) Microcontroller And SD-Card Based
Multichannel Data Logger. Electronics World. 26-31. Available:
www.electronicsworld.co.uk
Figure 8. Time profile of inverter output current [8] N. N. Mahzan, Omar, A. M., Mohammad Noor, S. Z., Mohd Rodzi,
M. Z., "Design of data logger with multiple SD cards," in 2013 IEEE
Based on the graphs, the red lines are showing the International Conference on Clean Energy & Technologies,
data obtained from DT80 while the blue lines are from the Langkawi, Malaysia, 2013.
[9] M. U. Rafique, "A Novel Wireless Data Logging and Retrieving
proposed data logger. The acquired data from the proposed System for Industrial Applications," in Bahria University Journal of
data logger are seemed almost the same like what DT80 has Information & Communication Technologies (BUJICT 2014),
been recorded. The percentage error for each graph by Pakistan, 2014.
comparing the average data taken from both data loggers are [10] A. H. Kioumars and L. Tang, "ATmega and XBee-based wireless
sensing," in Automation, Robotics and Applications (ICARA), 2011
in the range of 0% to 1.4%. 5th International Conference on, 2011, pp. 351-356.
[11] M. Johnson, A. Fabregas, W. Zhenyu, S. Katkoori, and L. Pei-Sung,
"Embedded system design of an advanced illumination measurement
V. CONCLUSION system for highways," in Systems Conference (SysCon), 2014 8th
Annual IEEE, 2014, pp. 579-586.
[12] H. Kemis, N. Bruce, P. Wang, T. Antonio, G. Lee Byung, and L.
The purpose of the study was to design a workable and Hoon Jae, "Healthcare monitoring application in ubiquitous sensor
reliable data logger with its performance is synchronized network: Design and implementation based on pulse sensor with
with other existing data logger in the market. The arduino," in Information Science and Service Science and Data
Mining (ISSDM), 2012 6th International Conference on New Trends
development of the proposed data logger with Arduino- in, 2012, pp. 34-38.
based microcontroller is justified reliable in monitoring the [13] C. Coopmans and C. YangQuan, "A general-purpose low-cost
PV system according to the results obtained. Besides, the compact spatial-temporal data logger and its applications," in
proposed data logger was able to get nearly ±0.5% accuracy AUTOTESTCON, 2008 IEEE, 2008, pp. 64-68.
[14] S. Chaudhary, P. Ghimire, P. B. Thogersen, and P. de Place Rimmen,
by comparing the data obtained from the proposed data "Field Data logger prototype for power converters," in Power
logger with the data acquired from existing data logger in Electronics, Drives and Energy Systems (PEDES), 2014 IEEE
market, DT80. International Conference on, 2014, pp. 1-4.
[15] X. F. C. C. Kamunda, M. Mathuthu, A. Makarau, "Design and
ACKNOWLEDGMENT construction of microclimate monitoring system," presented at the
Review of Scientific Instruments, 2007.
[16] M. Fuentes, M. Vivar, J. M. Burgos, J. Aguilera, and J. A. Vacas,
Authors gratefully acknowledge the support of all "Design of an accurate, low-cost autonomous data logger for PV
members in Green Energy Research Centre (GERC) UiTM system monitoring using Arduino™ that complies with IEC
standards," Solar Energy Materials and Solar Cells, vol. 130, pp.
Shah Alam that assisted in making the project successful.
529-543, 2014.
[17] A. Purwadi, Y. Haroen, F. Y. Ali, N. Heryana, D. Nurafiat, and A.
Assegaf, "Prototype development of a Low Cost data logger for PV
based LED Street Lighting System," in Electrical Engineering and
Informatics (ICEEI), 2011 International Conference on, 2011, pp. 1-
5.

DOI 10.5013/IJSSST.a.17.41.15 15.4 ISSN: 1473-804x online, 1473-8031 print


N N MAHZAN et al: DESIGN AND DEVELOPMENT OF AN ARDUINO BASED DATA LOGGER FOR …

[18] M. Beghanem, "Low cost management for photovoltaic systems in [26] N. K. Lakooju, S. Gudla, and B. S. Mantravadi, "AVR-USB Data
isolated site with new IV characterization model proposed," Acquisition," 2nd National Conference on Information and
presented at the Energy Conversion and Management, 2009. Communication Technology, vol. 3, pp. 35 - 39, 2011.
[19] Perez S. J., Calva M.A , and C. R., "A microcontroller-based data [27] G. Fertitta, A. Di Stefano, G. Fiscelli, and C. G. Giaconia, "An
logging system," Journal of the Mexican Society of Instrumentation: embedded datalogger with a fast acquisition rate for in-vehicle
Revista de la Sociedad Mexicana de Instrumentacion, A.C, 1996. testing and monitoring," in Intelligent solutions in Embedded
[20] R. Ambar, M. Ahmad, and M. Abdul Jamil, "Design and Systems, 2009 Seventh Workshop on, 2009, pp. 105-110.
Development of a Multi-sensor Monitoring Device for Arm [28] S. Pop, V. Bande, and D. Pitica, "Six channel AC/DC current data
Rehabilitation," International journal of integrated engineering, vol. logger used in industrial application," in Design and Technology in
3, 2011. Electronic Packaging (SIITME), 2013 IEEE 19th International
[21] N.A, "Product Catalog: Onset HOBO Data Logger," ed. United Symposium for, 2013, pp. 223-226.
States of America: Onset HOBO, 2012. [29] P. Jonke, C. Eder, J. Stockl, and M. Schwark, "Development of a
[22] N.A, "DT80 Series 2 Data Logger; DataTaker," ed. Australia: module integrated photovoltaic monitoring system," in Industrial
Thermo Fisher Scientific Australia Pty Ltd, 2011. Electronics Society, IECON 2013 - 39th Annual Conference of the
[23] N.A, "Grant Data Acquisition: Squirrel Portable Data Loggers," ed. IEEE, 2013, pp. 8080-8084.
United Kingdom: Grant Instruments (Cambridge) Ltd, 2012. [30] J. Lashley. (2010, The Radio Sky and How to Observe It,
[24] Y. Zhuge and C. Che, "Remote image sensing platform based on Astronomers' Observing Guides: Chapter 13: Data Logging & Data
Arduino," in Computer Science and Electronic Engineering Processing.
Conference (CEEC), 2014 6th, 2014, pp. 29-34. [31] N. H. M. Yusoff, "Design An Automated Building Maintenance
[25] P. Santos, V. Almeida, J. Cardoso, and C. Correia, System Scheduling for Energy Saving," Faculty of Electrical
"Photoplethysmographic logger with contact force and hydrostatic Engineering, Universiti Teknologi Malaysia, Malaysia, 2012.
pressure monitoring," in Bioengineering (ENBENG), 2013 IEEE 3rd [32] (N.A). Available:
Portuguese Meeting in, 2013, pp. 1-6. http://www.atmel.com/devices/atmega328.aspx?tab=overview

DOI 10.5013/IJSSST.a.17.41.15 15.5 ISSN: 1473-804x online, 1473-8031 print

View publication stats

You might also like