You are on page 1of 7

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

net/publication/326948551

A smart photovoltaic system with Internet of Thing: A case study of the smart
agricultural greenhouse

Conference Paper · January 2018


DOI: 10.1109/KST.2018.8426071

CITATIONS READS

10 438

3 authors:

Anukit Saokaew Oran Chieochan


Lampang Rajabhat University Lampang Rajabhat University
6 PUBLICATIONS   146 CITATIONS    7 PUBLICATIONS   146 CITATIONS   

SEE PROFILE SEE PROFILE

Ekkarat Boonchieng
Chiang Mai University
44 PUBLICATIONS   292 CITATIONS   

SEE PROFILE

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

Machine learning View project

LORA and IOT View project

All content following this page was uploaded by Oran Chieochan on 16 December 2020.

The user has requested enhancement of the downloaded file.


A smart photovoltaic system with Internet of Thing:
A case study of the smart agricultural greenhouse
Anukit Saokaew Oran Chieochan, Ph.D. Ekkarat Boonchieng, Ph.D.
School of Information Technology, School of Information Technology, Center of Excellence in Community
Faculty of Science, Faculty of Science, Health Informatics, Department
Lampang Rajabhat University, Lampang Rajabhat University, of Computer Science, Faculty of
Lampang, 52100, Thailand Lampang,52100, Thailand Science, Chiang Mai University
Email: Nukit@hotmail.com Email: Oran_c2515@hotmail.com Chiang Mai, 50200, Thailand
Email: ekkarat@ieee.org
(Corresponding Author)

Abstract—This research aims to prototype a portable, small, This research has a second version of internet of things for the
smart, and off-grid photovoltaic system to provide an alternative smart photovoltaic system. It has extended the work from the first
electrical supply for a smart agricultural greenhouse. This version [4]. In the first version, the internet of things technology
research applied the use of internet of things technology to was applied with voltage and current sensors to monitor the
retrieve the photovoltaic system status (photovoltaic voltage and photovoltaic system status to support the electricity for the
ampere, battery voltage, and battery current loading) from the agricultural greenhouse. However, in this research (second
MPPT charger controller. All photovoltaic system status data is version), the MPPT charger controller replaced the voltage and
processed through Blynk. Blynk has been developed as an current module sensor.
internet of things cloud service. Data is stored into Blynk and
displayed on mobile devices in real time. The status of the Internet of things technology was there to monitor the status of
battery of the device (full or empty) pushes notifications through the small off-grid photovoltaic system, which deployed as a green
inbox message on the Facebook application by IFTTT (if this and alternative energy for a prototype of a smart agricultural
then that) service. Historical data could be retrieved as CSV files. greenhouse. The status of the photovoltaic system consists of a
The equipment and tools used in this research are ESP8266 photovoltaic panel voltage, battery voltage and current loading
module, the photovoltaic system with the MPPT charger (voltage and ampere) from a battery to a water system. All status
controller, DC water pumps. The programming used is C++ on data could be monitored in real time online on computers and
ESP8266 module. A small off-grid photovoltaic system is applied.
mobile devices.
It consists of a MPPT (Maximum Power Point Tracking) charger
controller, battery, and photovoltaic panels. The internet of
things cloud used is Blynk. The results of the research show that B. Research objective
using internet of things with an MPPT charger controller This research aims to deploy an internet of things technology
enhances the prototype of smart farming as an alternative and to develop a prototype of a smart photovoltaic system (as energy
green electrical resource. for the smart agricultural greenhouse). Status of current charging,
loading photovoltaic system and capacity of a battery can be
Keywords—internet of things, Photovoltaic system, ESP8266 observed in real time online on computers and mobile devices.
module

II. LITERATURE
I. INTRODUCTION
Internet of Things is an internet application which involves
A. Background three kinds of technologies; 1) perception, 2) transmission and 3)
intelligent processing [5]. Internet of Things combines sensor
The Thai government would like to promote Thailand 4.0 to
technology, communication networks, internet technology and
use new technology for Thai agriculture. Therefore, researchers
intelligent computing technology to achieve reliable intelligent
have a plan to develop a prototype of a smart agricultural
processing [6]. The protocol commonly used for the Internet of
greenhouse by using Internet of Thing as a current information
Things is MQTT. MQTT (Message Queuing Telemetry
technology to control the environment. The reason for developing
Transport) is a broker-based publishing/subscribing, instant
the smart agricultural greenhouse is to promote a new modern
messaging protocol. It’s designed to be open, simple, lightweight,
agricultural technique to Thai farmers. Controlling the environment
and easy to implement. The advantage of the MQTT protocol is
of plant light, temperature, humidity and air flow are all needed [1].
that it can send various messages from the server to multiple
The previous research applied the use of internet of things with the
mobile devices at the same time. ESP8266 module is an open
humidity sensor to measure and monitor the humidity in the
source internet of things platform. It includes firmware which runs
agricultural greenhouse as well as control the water system
on the ESP8266 WI-FI SoC (System-on-chip) from Espressif
automatically [2, 3].
Systems Company (from Shanghai, China). It is a 32 bit
978-1-5386-4015-9/18/$31.00 @2018 IEEE Microcontroller. In this research ESP8266 module used an ESP-
12 module or ESP8266 module version 2. ESP8266 module is photovoltaic system consisted of the photovoltaic system current
similar to the Arduino which has built in input and output ports. charging from photovoltaic panels to the battery and the loading
ESP8266 module is compatible with Arduino IDE where from battery to water systems. All the data from the photovoltaic
programming C++ can be written. Compiling and flashing system status were preceded into a Blynk as an internet of things
programming codes can be done using a microB-USB. ESP8266 cloud service. All data could be monitored in real time on mobile
module is smaller and can connect to WIFI, which can be devices [4]
advantageous over Arduino [7].
In this research, researchers would like to improve the
Blynk is a platform service that connects the ESP8266 module previous work mentioned above. Voltage and current modules
and the mobile app [8]. There are 3 main services of Blynk. 1) The were replaced with a commercial MPPT charge controller.
Mobile app is used to monitor data from ESP8266 module. In this Internet of things with a MPPT (Maximum Power Point
research, the data from the photovoltaic system charger and Tracking) charge controller was applied. However, the protocol
photovoltaic system loader can be monitored in real-time on the used in the MPPT charge controller is MODBUS RTU (Remote
mobile app. 2) Cloud service, is used to store the data from the Terminal Unit). MODBUS RTU data format was needed to be
ESP8266 module and historical information can be retrieved on the concerned. ESP8266 module is also applied to transfer data
mobile app as a CSV. In this research, historical data of the (status of the photovoltaic system) to the internet of things cloud
photovoltaic system charger and photovoltaic system loader can be service.
retrieved as a CSV. A CSV is used to analyze the photovoltaic
system to management. 3) Library, it provides a connection for III. RESEARCH METHODOLOGY
ESP8266 module and Blynk cloud services.
This research followed the waterfall model of the system
IFTTT (if this then that) is a free web-based service to create development life cycle (SDLC) as a research methodology.
chains of simple conditional statements, called applets. An applet is There are 5 steps in this research. These steps are the
triggered by changes that occur within other web services such as requirement and feasibility study, system analysis and
Gmail and Facebook [9]. In this research, this service is used to design, implementation, system validation, and maintenance.
send the notification of battery status to Facebook.
Photovoltaic system (PV) or solar cell system is a device that A Requirement and Feasibility
converts sunlight directly into electricity [10]. In this research, 2 The requirement of this research was to prototype a portable
photovoltaic panels with 40 watts are connected together in parallel photovoltaic system as an alternative energy source for the smart
for the purpose of increasing the output current. The photovoltaic agricultural greenhouse. Hence, famers can apply this
system consists of photovoltaic panels, a photovoltaic charger, and photovoltaic system in isolated farm areas. The status of the
a battery. Photovoltaic system produces direct current (DC). photovoltaic system can be monitored on mobile devices at any
Therefore, in this research DC water systems are used. time. The tools, software and protocol used are shown in table 2-4.
MODBUS is an open serial (RS-232 or RS-485)
communication protocol for connecting industrial TABLE I. HARDWARE AND PURPOSES OF THE USE
electronic devices [11]. In simple terms, it is a method
Hardware Purposes of use
used for transmitting information over serial lines 2 x photovoltaic Panels 40 watts 12V Convert light into
between electronic devices. The device requesting the Mono-crystalline electricity
information is called the Modbus Master and the devices Store photovoltaic
45Ah Lead acid Battery
supplying information are Modbus Slaves. In this research, energy
ESP8266 module was applied as a master, sending requests to ESP8266 module (V2-12E) + Expansion Control devices and send
get the status of the photovoltaic system from the MPPT Board data of photovoltaic system
status into internet via WIFI
charger controller, as a slave. connection
20 A MPPT charger controller brand
Charger controller
Previous research SRNE model SR-ML2430
2ch Step-Down Voltage
Previous research aimed to prototype a smart agricultural ET-NINI PWR5/ADJ-3A
Regulator
greenhouse [2, 3]. The research applied the use of internet of things
Water pump (DC) Watering system
with a sensor to measure and monitors the humidity in the
agricultural greenhouse. The humidity data is processed through LCD screen Display information
NETPIE, which was developed and provided by NECTEC as a
free service for the internet of things cloud. That research also TABLE II. SOFTWARE AND PURPOSES OF THE USE
controlled the water system automatically and the functional status
(switching on and off for periods of time) and pushes notifications Software Purposes of use
through the LINE API on the LINE Application. Programming language on ESP8266
C++ on Arduino IDE
module
In addition, another previous research expended the use of the Solar Station Monitor
Monitoring photovoltaic system status
photovoltaic system for the smart agricultural greenhouse as an software
alternative and green energy resource. The internet of things with Free serial port RS232 data monitor between computer and
monitor devices
voltage and current module sensors were applied to measure and Social media software, receive and post
monitor the status of photovoltaic energy. The status of the Facebook
notification of the status of the battery
TABLE III. SERVICE AND PROTOCOL AND PURPOSES OF THE USE B. System Analysis and Design
Service and Protocol Purposes of use The average amount of time it takes to charge a photovoltaic
Blynk App Internet of things cloud service system in Thailand is approximately 5 hours [12]. In this research,
IFTTT (If this then that)
Internet of things cloud service for a small off grid system was used along with DC water pumps.
sending notifications to Facebook The photovoltaic system was able to support the irrigation for the
smart farm for 2 days without the sun or charging. The battery
Concept diagram was 45 Ah, which means that the battery was able to provide 12
In this research, internet of things was applied with the MPPT volts X 45 Ah = 540 watts and the daily maximum irrigation
charger controller, to monitor the status of the photovoltaic system usage is 225.6 watts.
from the photovoltaic panel and current output from the battery and
battery status. The MPPT charger controller commercial branded SRNE
ESP8266 module was applied as the hardware with WIFI, and model SR-ML2430, provided the software to monitor the status of
C++ as a programming, for the internet of things to connect with the photovoltaic system (on a computer) such as charging, battery,
access point. This allows it to be able to connect to the internet. DC load, and temperature of charger controller information.
ESP8266 module was considered as the master, to request and However, in this research, the temperature was not a concern.
retrieve the status of the photovoltaic system from the MPPT
charger controller. In addition, ESP8266 module was considered as
an internet of things to send the status of the photovoltaic system
from MPPT to the internet. A service used to send the photovoltaic
system status data to the internet is Blynk. Blynk allows the data to
be displayed in real time on smart phones and computers. The
historical data of the photovoltaic system status retrieval used was
in CSV format. Notification of the battery status was sent by a
message in the Facebook application by IFTTT service.
For more details of internet of things for photovoltaic system
(figure 1), the MPPT charge controller measured the status of the
photovoltaic system data (charging voltage and ampere, battery
loading voltage and ampere) and presented it into the MODBUS
RTU format. The water pump is the output of this diagram. Solar
Station Monitor software (running on Windows operating system)
was used to monitor the photovoltaic system status. The DC (direct Figure 2: The solar station monitor software used to
current) step down voltage 12 VDC to 5 VDC was used as monitor photovoltaic system status
ESP8266 module consumed 5 volts and the battery was 12 volts.
The ESP8266 module with a WIFI connection was deployed for
sending the data of the photovoltaic system status to the internet of In order to retrieve information of the photovoltaic
things cloud service, Blynk. In addition when the battery voltage system status from the MPPT charger controller, MODBUS
reaches 30%, 50%, and 70% and inbox notification is sent to RTU request had to be sent from ESP8266 module. The
Facebook (can be seen on figure 4). example was, 01 03 01 00 00 23 05 EF as requested.

TABLE IV. The MODBUS RTU request from ESP8266 module


Mark Bits Sample detail
1 8 01 device address (0-255)
2 8 03 The function code 3 (read analog output
holding registers)
3 16 01 00 The data address of the first register
requested.
4 16 00 23 The total number of registers requested.
5 16 05 EF The CRC (cyclic redundancy check) for
error checking.

The retrieval information of photovoltaic system from a


Figure 1: The concept diagram of internet of things for photovoltaic MPPT charger controller was in the Modbus protocol format
system with Blynk with a hexadecimal number. It can be seen on figure 3. The
Free serial port monitor software was used to monitor the
information via RS232 on the computer.
C. Implementation
All electronic devices were put in waterproof control boxes.
The photovoltaic panel and battery were put in a portable stand.
The photo of the internet of things photovoltaic system is shown
in figure 5. ESP8266 module with an expansion board, and step
down voltage regulator were put together in a small waterproof
box. The MPPT charger controller was put in a big waterproof
box.

Figure 3. Photovoltaic system status from a MPPT charger controller was


hexadecimal

The underline numbers shown on figure 3 were a status of the


photovoltaic system, for example, the second last number was 00
79 in a hexadecimal number. The hexadecimal was converted to
121 in the decimal number and the software displays 12.1 in the
array value. (12.1 array voltages) (figure 2). This research
Figure 5. All electronic devices are put in a waterproof control box.
monitored the status of the photovoltaic system using only
photovoltaic voltage and amp, battery voltage and amp.
The portable stand was designed to be easily moved if
ESP8266 module with WIFI connection was applied to famers would like to use it in an isolated area. The photovoltaic
send the status information of the photovoltaic system to the panels were also designed to move up and down, up to a 45
internet of things cloud service (Blynk). The flow chart from degree angle. On the bottom of the stand there is space for more
figure 4 shows the condition of checking the battery status batteries to be stored. All electrical lines can be stored neatly on
(30% meant low, 50% meant half full, and 70% meant nearly the stand.
full). This information was sent as a Facebook notification to
the inbox as a message. D. Internet of things photovoltaic system Validation
In order to make sure that the ESP8266 module could retrieve
the information of the photovoltaic system status from the MPPT
charger control correctly, the LCD screen on ESP8266 module
was used for the validation with the LCD screen on the MPPT
charger control. In addition, it was also to check the software
coding error (C++ written on ESP8266 module).

Figure 6. The comparison of the information retrieved between MPPT


charger controller and the ESP8266 module

The comparison of the results of the voltages read by


internet of things (ESP8266 module) and the MPPT charger
controller from photovoltaic panels were taken into account.
The samples of the data were at 10.00 to 12.00 o’clock. The
Figure 4. The flow chart of the condition of the notification of the battery data showed that they went the same direction and were very
status on Blynk similar. However, ESP8266 module was delayed by 10
seconds. It was considered that software coding with C++ was stored in a cloud computing service by Blynk. Information
written on ESP8266 module was working well and was able could be displayed in a time series graph to monitor the change of
to retrieve photovoltaic system status, particularly voltage. the voltage and amp. Historical information of the voltage and
amp of the photovoltaic system can also be retrieved.

Figure 7. The comparison of voltages between MPPT


charger controller and Module ESP 8266

IV. Results
The information of the photovoltaic system read from MPPT
charger controller can be displayed in real time online. The
information consisted of photovoltaic system voltage and current
and battery voltage and current. It could be shown on mobile
devices via the Blynk services (app). Furthermore, this data could Figure 9. CSV files of photovoltaic system data was sent to email
be shown by the historical time series.
In addition, the historical photovoltaic system data was stored
The status of the battery (30% meant low, 50% meant half full,
in a service by Blynk which could be retrieved by using function
and 70% meant nearly full) was automatically sent as a Facebook
message to the inbox. The internet of things service used to send exporting data as CSV (coma separate value files). Those CSV
the status of the battery was IFTTT service (If this then that). files would send an email to the farmers’ email address. In this
research, 4 CSV files consist of photovoltaic voltage, photovoltaic
current, battery voltage and battery current, data were separated.
For example, the data shows the voltage data and time stamps
separately. The time was shown as GMT UNIX Timestamp
(milliseconds). As a Thailand time, UTC + 7 was needed to be
added. According to fig. 10, the UNIX Stamp was
1506748440000 and was converted to Thai time as Saturday 30
September 2017 at 12:40:00 PM (UTC).

V. Discussion
There were 2 points to discuss in this research. One was on the
economic perspective using an internet of things to monitor if the
photovoltaic system was worth the investment. Second, was on
the limitation of using the Blynk internet of things cloud service.
Figure 8. The information of the photovoltaic system was shown Firstly, for economic perspective, a newly developed internet
in real time on mobile devices on Blynk and the status of the of things for the small smart photovoltaic system was considered
battery was shown on Facebook (inbox)
not worth the investment. However, it was worth the investment
Blynk app is an internet of things cloud service. It is supported in the isolated area where there was no line electrical supply. The
by Android and IOS. In this research, the photovoltaic system electronic equipment cost approximately 1,000 Baht including
status data could be displayed every 5 minutes or when activities ESP8266 module V2, step down voltage regulator. The DC water
happen such as water pumps turn on (amp used) or photovoltaic systems (water pumps) cost approximately 2,000 Baht. The small
panel charge into a battery. The photovoltaic system status data off grid photovoltaic system cost approximately 20,000 Baht
including photovoltaic panels, an MPPT charger controller, lead VIII. REFERENCES
acid battery, stand, and waterproof and control boxes. [1] Smart farm Thailand , “Precision Farming”
http://smartfarmthailand.com/precisionfarming/index.php/product/micro-climate-
The traditional smart small agricultural greenhouse with 3,500 monitoring/72-i-sense-technology (Thai translation)
plants consumed around 20 units of electricity per month. Due to
[2] O. Chieochan, A. Saokaw, and E. Boonchieng, “IOT for smart farm: A case
the fact that there is no fee for electricity usage under 50 units, the study of the Lingzhi mushroom farm at Maejo Univrsity” The 14th International
bill was free of charge in Thailand [13]. Joint Conference on Computer and Software Engineering (JCSSE 2017).
(forthcoming)
Secondly, the Blynk internet of things cloud service used in this
[3] E. Boonchieng, O. Chieochan, and A. Saokaw, “Smart Farm: Applying the use
research was available free for users. Data of photovoltaic system of ESP8266 module, IOT, NETPIE and LINE API for a Lingzhi mushroom farm in
status cannot send more than 100 values per second. It may cause a Thailand. IEICE transactions of Communications
http://doi.org/10.1587/transcom.2017ITI0002 (forthcoming)
flood error and internet of things photovoltaic system will be
[4] O. Chieochan, A. Saokaw, and E. Boonchieng, Internet of things (IOT) for smart
automatically disconnected from the Blynk server. In addition, solar energy: A case study of the smart farm at Maejo University. International
Blynk internet of things cloud accepts 1 message per minute per Conference on Control, Automation and Information Sciences (ICCAIS2017).
(forthcoming)
pin. In case the internet of things photovoltaic system sends voltage
and current data more frequently, data values will be averaged. For [5] L.Wei, and Z. Gao, “Study on IOT based architecture of logistics service
supply chain.” International Journal of Grid and Distributed Computing 7.1, pp. 169-
example, the current value of charging at 12:12:05 was 2.38 volts 178, 2014.
and then again at 12:12:45 was 12.40 volts. As a result in the [6] X. L. Xu, et al, “Intelligent fault prediction system based on internet of things.”
history graph you’ll see the value of charging at 12:12 was 12.39 Computers and Mathematics with Application, vol. 64, pp. 833-839, 2012.
volts. [7] GitHub, “ ESP8266 module,” https://github.com/ ESP8266 module (access on
25/02/2017)

VI. Conclusion [8] Blynk, “Blynk Docs” http://docs.blynk.cc/ (access on 20/07/2017)


The internet of things technology was applied for the smart [9] Wikipedia, “IFTTT” https://en.wikipedia.org/wiki/IFTTT (access on 20/07/2017)
agricultural greenhouse in the previous research, to measure the [10] Wikipedia, “Solar Cell” https://en.wikipedia.org/wiki/Solar_cell (access on
humidity and control the irrigation automatically. Humidity data 20/07/2017)
and status of water pumps (on and off) processed through NETPIE [11] Wikipedia, “Modbus” https://en.wikipedia.org/wiki/Modbus (access on
and LINE API consequently. Moreover, internet of things 20/07/2017)
technology was applied for the photovoltaic system as the [12] Solar Cell Thailand 96 How to calculate your solar power requirement
alternative energy resource for a smart agricultural greenhouse. http://solarcellthailand96.com/design-calculator/easy-formula/
The Blynk internet of things cloud service was applied. Voltage [13] Metropolitan Electricity Authority of Thailand, “Various types of electronic
and current (in and out) data was considered reliable and accurate bills’, http://www.mea.or.th/aboutelectric/116/280/form/11 (access on 25/07/2017)
(if compared to the information done manually by using multi- (Thai translation)
meter). The functional status of water pumps were done correctly.
In this research, the improvement of the internet of things
technology was applied for the second version of the photovoltaic
system. Voltage and current module sensors were replaced with the
MPPT charger controller. Blynk was still deployed as an internet
of things could service. In addition, IFTTT and Facebook
application as social media were applied for the notification of the
battery status.

VII. Future research

Future research could be done for the improvement of the


internet of things system, Module GSM should be applied to
replace ESP8266 module, in case the agricultural greenhouse
and photovoltaic system have no WIFI, GSM would be an
option. Furthermore, LoRa or Xbee was another optional
channel for communication. Internet of things cloud service
such as NETPIE and ThinkSpeak would be applied. For
farmers, the comparison of the growth of the plant between
the agricultural greenhouse using the internet of things system
and using traditional data collection needs to be taken.

View publication stats

You might also like