SlideShare a Scribd company logo
1 of 4
Download to read offline
Turning the internet of (my) things into a remote
controlled laboratory
A. Torres∗, M. Santos†, S. Balula†, J. Fortunato†, H. Fernandes†,
∗Departamento de F´ısica, T´ecnico Lisboa, Portugal
†Instituto de Plasmas e Fus˜ao Nuclear, T´ecnico Lisboa, Portugal
Abstract—In this paper we use a locally developed adaptive
watering system as an example of a remote controlled labora-
tory (RCL) developed with standard open hardware and using
libraries taken from the e-lab. This experiment is a particular
case that could benefit from a large number of RCLs proposing
different water budget strategies, allowing the studies of the
best controller algorithm to save water. The water consumption
log can be monitored in real-time and served to any user as a
distributed remote laboratory with support of a Raspberry PI
and a web connection, using an open source Arduino board and
custom made shield. The ultimate goal of RCLs will be achieved
when anyone can easily publish their own experiment in the
WWW.
Index Terms—e-lab, remote controlled laboratories, internet of
things, arduino, raspberry pi, electrical conductivity
I. INTRODUCTION
Installed in Instituto Superior T´ecnico (IST), Lisbon, the
e-lab laboratory provides remote control of real physics ex-
periments over the internet. In this paper, we describe a plant
watering control system, with which the plant is only watered
once a day, with the adequate amount of water, making the
system as robust as possible, adapting it’s response to the
environmental conditions.
In addition to the implementation at IST, the whole project
(hardware and software) is open source and available online
[1], allowing the reproduction of the experiment by anyone.
Being open source, the user can adapt the code to cope with
the different environmental conditions: different crops, soils
and vases, that will modify the physical response produced by
the watering.
The ultimate goal is to be able to compare different control
strategies, implemented in separate installations, through the
data upload to a common database.
Unlike other e-lab experiments, which aim at demonstrating
physical phenomena, this apparatus is focused in the Internet
of Things (IoT). According to [2], the IoT will grow to 26
billion units installed in 2020 representing an almost 30-fold
increase from 0.9 billion in 2009, making it an important topic
and too large to ignore in the e-lab scope.
By making the experiment available online, we intend to
show to the e-lab target demographics, namely high school
IPFN activities received financial support from “Fundac¸˜ao para a Ciˆencia
e Tecnologia” through project UID/FIS/50010/2013.
Corresponding author: A. Torres (email: andregtorres@tecnico.ulisboa.pt)
Fig. 1. Experimental setup: vases with probes attached and watering system.
teachers and students, that the Internet nowadays is, and will
continue to be integrated in more devices. It is important for
the next generations, of both engineering students and common
tech-aware people, to have the sensibility and understanding
of the implications of this increasing connectivity. With this
mission in mind, the experiment aims to raise the user’s
awareness to the IoT and how the internet could be used not
only in the more conventional and historical uses (scientific
and academic, finance and banking, social media, etc.), but
also in their things, like watering their plants.
II. EXPERIMENTAL SETUP
The main objective of the experiment is to monitor and
control the amount of water supplied to two vases containing
plants (figure 1). To achieve this, the soil’s temperature, the
soil’s conductivity and ambient luminosity are measured and
logged.
As for the hardware used in the experiment, the microcon-
troller chosen was the Arduino Uno board which provides an
easy to build and understand open source approach, which
in the scope of the experiment, is favorable when comparing
to more professional micro controllers, such as Microchip or
even other Atmel boards.
Since there is a need to measure several frequency signals,
and the Arduino Uno only has one Input Capture (IC) module,
a shield containing a multiplexer (MUX) and a driver for the
water valve was devised, taking into account that:
978-1-4673-8246-5/16/$31.00 ©2016 IEEE 24-26 February 2016, UNED, Madrid, Spain
2016 13th International Conference on Remote Engineering and Virtual Instrumentation (REV)
Page 371
Fig. 2. Example of the output of a probe, measured on an oscilloscope: In
yellow (CH1) - temperature signal; In blue (CH2)- impedance signal.
TABLE I
CONDUCTIVITY PROBE CALIBRATION.
ρ (g dm−3
) κ (μS cm−1) T (μs)
1 2.2 515
10 21.4 431
100 210 58
1000 1990 6
• As there is only one IC pin, all the probe contacts should
be multiplexed there. Digital pins of the Arduino can be
used to select the MUX entry.
• Since there is the need to control the water admission
valve, measure the amount of water fed to the plants and
read the luminosity sensor, the necessary pins for these
functions must be accessible.
• The peripherals and chips used have different operating
voltages, as the probes, luminosity sensor and the the
valve control driver need a 12V DC tension but the MUX
and pull-up resistors associated with the probes must be
supplied 5V DC.
• To prevent power surges, there is the need for decoupling
capacitors in the power lines.
III. PROBE SIGNAL AND CALIBRATION
The used probe provides two outputs: the temperature and
the impedance between it’s two contacts. These signals are
square waves of varying frequency as pictured in figure 2. As
both the temperature and conductivity increase, the frequency
of the respective signals will also increase. These variations are
nonlinear, thus each probe must be calibrated and the signal
frequency compared in a look-up table in the memory of the
Arduino.
As an example of a calibration, for the conductivity, the
probes were submerged in four solutions of NaCl with known
conductivities [3]. As for the temperature, the probe was
immersed in running water under agitation to ensure homo-
geneity at different temperatures, measured by a thermocouple.
TABLE II
TEMPERATURE PROBE CALIBRATION.
θ (oC) T (μs) θ (oC) T (μs)
13,7 501 28,1 298
16,3 472 29,9 287
18,4 416 31,9 266
20,2 392 34,2 239
22,0 372 35,8 223
24,1 347 37,3 219
26,0 326 39,7 158
Hardware server
Initialization
Data
aquisition
Data output
Time to
initiate
control?
Control code
Compute
responce
Actuation
Sleep
until next
aquisition
Y
N
Fig. 3. Simplified block diagram of the Arduino program.
IV. ARDUINO PROGRAMMING
The microcontroller used is an Arduino Uno, which is
fitted with an ATmega328 microprocessor. Figure 3 shows a
simplified block diagram of the Arduino’s programming. In
the data acquisition phase, the proceeding is the following:
(i) Enables the multiplexer inputs and selects one of the
probes. (ii) Averages 30 consecutive measurements for the two
signals, thus preventing some unwanted signal fluctuations.
This process is (iii) repeated for all probes before the code
compares the measured values in the lookup tables and inter-
polate/extrapolates the values in scaled SI units. Along with
a time-stamp and the luminosity measured through an array
of photo-sensitive diodes, these values are sent through the
serial UART (Universal Asynchronous Receiver/Transmitter)
port to a Raspberry Pi (RPi) connected to the internet, which
saves them in a database, allowing the remote querying of
the said data. Since the total experiment time has a span of
days, and since there is no need for a high sampling frequency,
the Arduino enters sleep mode, which keeps only one timer
powered, which is set to wake the board up at a pre-set time
interval.
Another component of the implemented code is the control
cycle. Unlike the data acquisition process, which runs at
a user-set frequency, 30 minutes, for instance, the control
978-1-4673-8246-5/16/$31.00 ©2016 IEEE 24-26 February 2016, UNED, Madrid, Spain
2016 13th International Conference on Remote Engineering and Virtual Instrumentation (REV)
Page 372
Fig. 4. Serial port result for a sampling time of 4s in an one probe system.
cycle runs daily. This function(s) are defined by the user
connecting to the experiment. There is however a sample
code with a Proportional-Integral-Derivative (PID) controller
implemented, that may serve as a model for the user to
base its controller. In this sample code, the microprocessor
computes the mean conductivity, which, in the assumption
that the conductivity is proportional to the soil hydration,
is in turn representative of the water consumed. This value
is then compared with a setpoint, obtaining the error (e(t))
conductivity and the adequate response u(t) is calculated
through the PID controller equation (1).
u(t) = kP · e(t) + kI
t
0
e(t)dt + kD
de(t)
dt
(1)
All the proportional, integral and differential dependencies
are absorbed by the kP , kI and kD, respectively. These factors
can be determined by the methods of Control Theory, but
since the actuation time for this particular system is so long, a
theoretical model was devised to be able to computer simulate
the control system and thus obtaining the said coefficients.
V. RESULTS AND THEORETICAL MODEL FOR THE WATER
CONSUMPTION
Figure 4 illustrates an example of the sensor output through
the serial port with only one probe and no luminosity sensor.
In order to output integer values, the units used were sub-
multiples of the conventional units in pedology: do
C and
μSm−1
for temperature and conductivity, respectively.
Figure 5 shows the output of this sensor over one acquisition
to serve as reference, using a small vase with a plant. The
plant was watered in the beginning of the time scale (t = 0
corresponding to 12 June 2015, 00:15), with enough water to
ensure the soil is wet and uniformly irrigated.
The second day data 5b was used to generate a mathematical
model of the conductivity response over time (σ(t)) to com-
(a)
(b)
Fig. 5. Reference acquisition 5a: Three days scope; 5b: Second day scope.
pute the optimal PID coefficients for the sample code. This
model has the following expression, on equation (2):
σ(t) = σ0 − α (1 + βl(t) + γT(t)) dt (2)
where l(t) is the simulation of the light intensity as in equation
(3) and T(t) the temperature sensor data:
l(t) =
sin 2π
24 t − π
2 , x ∈ [6, 18]
0, , otherwise
(3)
By allowing every user to implement a different control cycle,
we will be able to engineer an efficient watering system by
comparing the plant’s response to different control algorithms.
VI. E-LAB COMMUNICATION PROTOCOLS
A generic communication protocol, common to all other
experiments at e-lab, connecting the computer and the micro-
controller board via a serial connection is used. This standard
hastens the deployment of new experiments and facilitates
debugging. It comprises a state machine with four different
states: stopped, configured, started and reseted, as well as
the corresponding transitions, ordered by the generic driver,
a program running in the host computer, which could then be
connected to the e-lab server using Remote experiment Control
978-1-4673-8246-5/16/$31.00 ©2016 IEEE 24-26 February 2016, UNED, Madrid, Spain
2016 13th International Conference on Remote Engineering and Virtual Instrumentation (REV)
Page 373
Fig. 6. Experimental data and theoretical model
Fig. 7. e-lab infrastructure overview
(ReC) [4]. The open-source library for arduino is available at
[5].
The hardware server used is a Raspberry Pi (RPi), which
has been successfully implemented in previous experiments in
the e-lab, bringing improvements in power consumption and
overall cost, not compromising the performance [6].
The general structure [7]of e-lab is shown in figure 7.
VII. REMOTE ACCESS AND LIVE VIDEO STREAM
As the apparatus will be installed in a remote location,
without a static external ip address, open-vpn [8], a reliable
open source VPN implementation, was used. It provides plug
and play functionality (i.e. the remote apparatus can be moved
without any further configuration), can overcome restrictive
networks and allows remote programming, control and data
transmission.
As in [6], video streaming is performed using RPi’s pro-
prietary camera, at a maximum 1080p30 (H.264 encoding),
although resolution is reduced given the limited resources of
the clients’ networks.
VIII. ONLINE INTERFACE
The user will be able to interact with the ongoing experi-
ment in two different ways:
• First, by inputing the control algorithm, either setting
it up from scratch or by modifying the suggested PID
controller, tuning the parameters and the setpoint or the
observables used definition of the error (1) from the
measured data.
• In order for data to be accessible to both the user who set
up the experiment and other users to compare the results
of the different configurations, it is periodically uploaded
to a SQL database in the e-lab servers. In the case of this
experiment, the measured quantities are plotted using the
free JpGraph [9] library for PHP.
This implementation ensures that the experiment is reusable,
as this system and code for the control and data acquisition
can be used and modified by anyone, whilst merging the data
in a common database.
IX. CONCLUSIONS
The experiment was successfully implemented at IST, prov-
ing the concept. The data was continuously logged to the
database, allowing the monitoring of the watering effect on
conductivity, and indirectly the soil moisture.
The use of this experiment shows great potential, if used in
large scale, in achieving the main goal of comparing different
watering user solutions.
REFERENCES
[1] A. Torres, “Collaborative-smart-watering-repository,” 2015, [Online;
accessed-27-December-2015]. [Online]. Available: https://github.com/
e-lab-tecnico-ulisboa-pt/Collaborative-smart-watering
[2] Gartner, “Gartner says the internet of things installed base will grow to
26 billion units by 2020,” 2013, [Online; accessed 04-November-2015].
[Online]. Available: http://www.gartner.com/newsroom/id/2636073
[3] Foxboro, “Conductivity ordering guide,” 1999, [Online; accessed
June-2015]. [Online]. Available: https://www.grc.com/dev/ces/tns/
Conductivity v Concentration.pdf
[4] R. B. Henriques, A. S. Duarte, H. Fernandes, T. Pereira, J. Fortunato, and
J. Pereira, “Generic protocol for hardware control,” in 1st Experiment@
International Conference, 2011.
[5] S. Balula, “e-lab’s rec generic driver for arduino,” 2015, [Online;
accessed 11-November-2015]. [Online]. Available: https://github.com/
sbalula/rec-arduino
[6] S. Balula, R. Henriques, J. Fortunato, T. Pereira, H. Borges, G. S.
Amarante-Segundo, and H. Fernandes, “Distributed e-lab setup based
on the raspberry pi: the hydrostatic experiment case study,” in 3rd
Experiment@International Conference - exp.at’15, 2015.
[7] R. Neto, H. Fernandes, J. Pereira, and A. Duarte, “E-lab remote laboratory
integrated overview,” in Remote Engineering and Virtual Instrumentation
(REV), 2012 9th International Conference on. IEEE, 2012, pp. 1–7.
[8] D. Wiki, “Openvpn,” 2014, [Online; accessed 15-December-2014].
[Online]. Available: https://wiki.debian.org/OpenVPN
[9] JpGraph, “Graph creating library for php,” 2016, [Online; accessed
4-January-2016]. [Online]. Available: http://http://jpgraph.net/
978-1-4673-8246-5/16/$31.00 ©2016 IEEE 24-26 February 2016, UNED, Madrid, Spain
2016 13th International Conference on Remote Engineering and Virtual Instrumentation (REV)
Page 374

More Related Content

Similar to Turning the internet of (my) things into a remote controlled laboratory

IRJET- IOT based Agriculture System using NodeMCU
IRJET- IOT based Agriculture System using NodeMCUIRJET- IOT based Agriculture System using NodeMCU
IRJET- IOT based Agriculture System using NodeMCUIRJET Journal
 
IEEE 802.15.4 based Water Quality Monitoring System
IEEE 802.15.4 based Water Quality Monitoring SystemIEEE 802.15.4 based Water Quality Monitoring System
IEEE 802.15.4 based Water Quality Monitoring SystemIJARIIE JOURNAL
 
Humidity Sensing Device for Soil, Atmosphere and Other Material with Temperat...
Humidity Sensing Device for Soil, Atmosphere and Other Material with Temperat...Humidity Sensing Device for Soil, Atmosphere and Other Material with Temperat...
Humidity Sensing Device for Soil, Atmosphere and Other Material with Temperat...paperpublications3
 
Study and Development of Temperature & Humidity monitoring system through Wir...
Study and Development of Temperature & Humidity monitoring system through Wir...Study and Development of Temperature & Humidity monitoring system through Wir...
Study and Development of Temperature & Humidity monitoring system through Wir...IJERA Editor
 
Environmental Sensor Network Paper
Environmental Sensor Network PaperEnvironmental Sensor Network Paper
Environmental Sensor Network PaperZoey Y. Kang
 
Development of low cost TDR system for soil moisture measurement
Development of low cost TDR system for soil moisture measurementDevelopment of low cost TDR system for soil moisture measurement
Development of low cost TDR system for soil moisture measurementBhushan Patil
 
IRJET- Design and Implementation of Wireless based Water Level Monitoring Sys...
IRJET- Design and Implementation of Wireless based Water Level Monitoring Sys...IRJET- Design and Implementation of Wireless based Water Level Monitoring Sys...
IRJET- Design and Implementation of Wireless based Water Level Monitoring Sys...IRJET Journal
 
A NOVEL SYSTEM FOR AMBIENCE TRACKING AND CONTROLLING
A NOVEL SYSTEM FOR AMBIENCE TRACKING AND CONTROLLINGA NOVEL SYSTEM FOR AMBIENCE TRACKING AND CONTROLLING
A NOVEL SYSTEM FOR AMBIENCE TRACKING AND CONTROLLINGIRJET Journal
 
Rwh control system poster
Rwh control system posterRwh control system poster
Rwh control system posterDeval Dixit
 
IRJET- Multi-Sensor based Water Quality Monitoring in IoT Environment
IRJET-  	  Multi-Sensor based Water Quality Monitoring in IoT EnvironmentIRJET-  	  Multi-Sensor based Water Quality Monitoring in IoT Environment
IRJET- Multi-Sensor based Water Quality Monitoring in IoT EnvironmentIRJET Journal
 
Smart system for maintaining aquascape environment using internet of things b...
Smart system for maintaining aquascape environment using internet of things b...Smart system for maintaining aquascape environment using internet of things b...
Smart system for maintaining aquascape environment using internet of things b...IJECEIAES
 
Smart real time embedded arduino based data acquisition system
Smart real time embedded arduino based data acquisition systemSmart real time embedded arduino based data acquisition system
Smart real time embedded arduino based data acquisition systemeSAT Journals
 
GREENMON:An Efficient Wireless Sensor Network Monitoring Solution For Greenho...
GREENMON:An Efficient Wireless Sensor Network Monitoring Solution For Greenho...GREENMON:An Efficient Wireless Sensor Network Monitoring Solution For Greenho...
GREENMON:An Efficient Wireless Sensor Network Monitoring Solution For Greenho...aswathy v
 
Centralized environment and battery monitoring system for server
Centralized environment and battery monitoring system for serverCentralized environment and battery monitoring system for server
Centralized environment and battery monitoring system for serverAazim Rasool
 
CMOS Temperature Sensor with Programmable Temperature Range for Biomedical Ap...
CMOS Temperature Sensor with Programmable Temperature Range for Biomedical Ap...CMOS Temperature Sensor with Programmable Temperature Range for Biomedical Ap...
CMOS Temperature Sensor with Programmable Temperature Range for Biomedical Ap...IJECEIAES
 
IRJET- Implementation of Wireless Sensor in Coal Mine Safety System using Zigbee
IRJET- Implementation of Wireless Sensor in Coal Mine Safety System using ZigbeeIRJET- Implementation of Wireless Sensor in Coal Mine Safety System using Zigbee
IRJET- Implementation of Wireless Sensor in Coal Mine Safety System using ZigbeeIRJET Journal
 

Similar to Turning the internet of (my) things into a remote controlled laboratory (20)

P21_1274
P21_1274P21_1274
P21_1274
 
IRJET- IOT based Agriculture System using NodeMCU
IRJET- IOT based Agriculture System using NodeMCUIRJET- IOT based Agriculture System using NodeMCU
IRJET- IOT based Agriculture System using NodeMCU
 
IEEE 802.15.4 based Water Quality Monitoring System
IEEE 802.15.4 based Water Quality Monitoring SystemIEEE 802.15.4 based Water Quality Monitoring System
IEEE 802.15.4 based Water Quality Monitoring System
 
Humidity Sensing Device for Soil, Atmosphere and Other Material with Temperat...
Humidity Sensing Device for Soil, Atmosphere and Other Material with Temperat...Humidity Sensing Device for Soil, Atmosphere and Other Material with Temperat...
Humidity Sensing Device for Soil, Atmosphere and Other Material with Temperat...
 
Study and Development of Temperature & Humidity monitoring system through Wir...
Study and Development of Temperature & Humidity monitoring system through Wir...Study and Development of Temperature & Humidity monitoring system through Wir...
Study and Development of Temperature & Humidity monitoring system through Wir...
 
Environmental Sensor Network Paper
Environmental Sensor Network PaperEnvironmental Sensor Network Paper
Environmental Sensor Network Paper
 
Development of low cost TDR system for soil moisture measurement
Development of low cost TDR system for soil moisture measurementDevelopment of low cost TDR system for soil moisture measurement
Development of low cost TDR system for soil moisture measurement
 
IRJET- Design and Implementation of Wireless based Water Level Monitoring Sys...
IRJET- Design and Implementation of Wireless based Water Level Monitoring Sys...IRJET- Design and Implementation of Wireless based Water Level Monitoring Sys...
IRJET- Design and Implementation of Wireless based Water Level Monitoring Sys...
 
A NOVEL SYSTEM FOR AMBIENCE TRACKING AND CONTROLLING
A NOVEL SYSTEM FOR AMBIENCE TRACKING AND CONTROLLINGA NOVEL SYSTEM FOR AMBIENCE TRACKING AND CONTROLLING
A NOVEL SYSTEM FOR AMBIENCE TRACKING AND CONTROLLING
 
Rwh control system poster
Rwh control system posterRwh control system poster
Rwh control system poster
 
IRJET- Multi-Sensor based Water Quality Monitoring in IoT Environment
IRJET-  	  Multi-Sensor based Water Quality Monitoring in IoT EnvironmentIRJET-  	  Multi-Sensor based Water Quality Monitoring in IoT Environment
IRJET- Multi-Sensor based Water Quality Monitoring in IoT Environment
 
Smart system for maintaining aquascape environment using internet of things b...
Smart system for maintaining aquascape environment using internet of things b...Smart system for maintaining aquascape environment using internet of things b...
Smart system for maintaining aquascape environment using internet of things b...
 
Smart real time embedded arduino based data acquisition system
Smart real time embedded arduino based data acquisition systemSmart real time embedded arduino based data acquisition system
Smart real time embedded arduino based data acquisition system
 
A REVIEW ON GREENHOUSE ENVIRONMENT CONTROLLING ROBOT
A REVIEW ON GREENHOUSE ENVIRONMENT CONTROLLING ROBOTA REVIEW ON GREENHOUSE ENVIRONMENT CONTROLLING ROBOT
A REVIEW ON GREENHOUSE ENVIRONMENT CONTROLLING ROBOT
 
ise sensor
ise sensorise sensor
ise sensor
 
GREENMON:An Efficient Wireless Sensor Network Monitoring Solution For Greenho...
GREENMON:An Efficient Wireless Sensor Network Monitoring Solution For Greenho...GREENMON:An Efficient Wireless Sensor Network Monitoring Solution For Greenho...
GREENMON:An Efficient Wireless Sensor Network Monitoring Solution For Greenho...
 
Centralized environment and battery monitoring system for server
Centralized environment and battery monitoring system for serverCentralized environment and battery monitoring system for server
Centralized environment and battery monitoring system for server
 
CMOS Temperature Sensor with Programmable Temperature Range for Biomedical Ap...
CMOS Temperature Sensor with Programmable Temperature Range for Biomedical Ap...CMOS Temperature Sensor with Programmable Temperature Range for Biomedical Ap...
CMOS Temperature Sensor with Programmable Temperature Range for Biomedical Ap...
 
IRJET- Implementation of Wireless Sensor in Coal Mine Safety System using Zigbee
IRJET- Implementation of Wireless Sensor in Coal Mine Safety System using ZigbeeIRJET- Implementation of Wireless Sensor in Coal Mine Safety System using Zigbee
IRJET- Implementation of Wireless Sensor in Coal Mine Safety System using Zigbee
 
ITEM9.pdf
ITEM9.pdfITEM9.pdf
ITEM9.pdf
 

Recently uploaded

Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 

Recently uploaded (20)

Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 

Turning the internet of (my) things into a remote controlled laboratory

  • 1. Turning the internet of (my) things into a remote controlled laboratory A. Torres∗, M. Santos†, S. Balula†, J. Fortunato†, H. Fernandes†, ∗Departamento de F´ısica, T´ecnico Lisboa, Portugal †Instituto de Plasmas e Fus˜ao Nuclear, T´ecnico Lisboa, Portugal Abstract—In this paper we use a locally developed adaptive watering system as an example of a remote controlled labora- tory (RCL) developed with standard open hardware and using libraries taken from the e-lab. This experiment is a particular case that could benefit from a large number of RCLs proposing different water budget strategies, allowing the studies of the best controller algorithm to save water. The water consumption log can be monitored in real-time and served to any user as a distributed remote laboratory with support of a Raspberry PI and a web connection, using an open source Arduino board and custom made shield. The ultimate goal of RCLs will be achieved when anyone can easily publish their own experiment in the WWW. Index Terms—e-lab, remote controlled laboratories, internet of things, arduino, raspberry pi, electrical conductivity I. INTRODUCTION Installed in Instituto Superior T´ecnico (IST), Lisbon, the e-lab laboratory provides remote control of real physics ex- periments over the internet. In this paper, we describe a plant watering control system, with which the plant is only watered once a day, with the adequate amount of water, making the system as robust as possible, adapting it’s response to the environmental conditions. In addition to the implementation at IST, the whole project (hardware and software) is open source and available online [1], allowing the reproduction of the experiment by anyone. Being open source, the user can adapt the code to cope with the different environmental conditions: different crops, soils and vases, that will modify the physical response produced by the watering. The ultimate goal is to be able to compare different control strategies, implemented in separate installations, through the data upload to a common database. Unlike other e-lab experiments, which aim at demonstrating physical phenomena, this apparatus is focused in the Internet of Things (IoT). According to [2], the IoT will grow to 26 billion units installed in 2020 representing an almost 30-fold increase from 0.9 billion in 2009, making it an important topic and too large to ignore in the e-lab scope. By making the experiment available online, we intend to show to the e-lab target demographics, namely high school IPFN activities received financial support from “Fundac¸˜ao para a Ciˆencia e Tecnologia” through project UID/FIS/50010/2013. Corresponding author: A. Torres (email: andregtorres@tecnico.ulisboa.pt) Fig. 1. Experimental setup: vases with probes attached and watering system. teachers and students, that the Internet nowadays is, and will continue to be integrated in more devices. It is important for the next generations, of both engineering students and common tech-aware people, to have the sensibility and understanding of the implications of this increasing connectivity. With this mission in mind, the experiment aims to raise the user’s awareness to the IoT and how the internet could be used not only in the more conventional and historical uses (scientific and academic, finance and banking, social media, etc.), but also in their things, like watering their plants. II. EXPERIMENTAL SETUP The main objective of the experiment is to monitor and control the amount of water supplied to two vases containing plants (figure 1). To achieve this, the soil’s temperature, the soil’s conductivity and ambient luminosity are measured and logged. As for the hardware used in the experiment, the microcon- troller chosen was the Arduino Uno board which provides an easy to build and understand open source approach, which in the scope of the experiment, is favorable when comparing to more professional micro controllers, such as Microchip or even other Atmel boards. Since there is a need to measure several frequency signals, and the Arduino Uno only has one Input Capture (IC) module, a shield containing a multiplexer (MUX) and a driver for the water valve was devised, taking into account that: 978-1-4673-8246-5/16/$31.00 ©2016 IEEE 24-26 February 2016, UNED, Madrid, Spain 2016 13th International Conference on Remote Engineering and Virtual Instrumentation (REV) Page 371
  • 2. Fig. 2. Example of the output of a probe, measured on an oscilloscope: In yellow (CH1) - temperature signal; In blue (CH2)- impedance signal. TABLE I CONDUCTIVITY PROBE CALIBRATION. ρ (g dm−3 ) κ (μS cm−1) T (μs) 1 2.2 515 10 21.4 431 100 210 58 1000 1990 6 • As there is only one IC pin, all the probe contacts should be multiplexed there. Digital pins of the Arduino can be used to select the MUX entry. • Since there is the need to control the water admission valve, measure the amount of water fed to the plants and read the luminosity sensor, the necessary pins for these functions must be accessible. • The peripherals and chips used have different operating voltages, as the probes, luminosity sensor and the the valve control driver need a 12V DC tension but the MUX and pull-up resistors associated with the probes must be supplied 5V DC. • To prevent power surges, there is the need for decoupling capacitors in the power lines. III. PROBE SIGNAL AND CALIBRATION The used probe provides two outputs: the temperature and the impedance between it’s two contacts. These signals are square waves of varying frequency as pictured in figure 2. As both the temperature and conductivity increase, the frequency of the respective signals will also increase. These variations are nonlinear, thus each probe must be calibrated and the signal frequency compared in a look-up table in the memory of the Arduino. As an example of a calibration, for the conductivity, the probes were submerged in four solutions of NaCl with known conductivities [3]. As for the temperature, the probe was immersed in running water under agitation to ensure homo- geneity at different temperatures, measured by a thermocouple. TABLE II TEMPERATURE PROBE CALIBRATION. θ (oC) T (μs) θ (oC) T (μs) 13,7 501 28,1 298 16,3 472 29,9 287 18,4 416 31,9 266 20,2 392 34,2 239 22,0 372 35,8 223 24,1 347 37,3 219 26,0 326 39,7 158 Hardware server Initialization Data aquisition Data output Time to initiate control? Control code Compute responce Actuation Sleep until next aquisition Y N Fig. 3. Simplified block diagram of the Arduino program. IV. ARDUINO PROGRAMMING The microcontroller used is an Arduino Uno, which is fitted with an ATmega328 microprocessor. Figure 3 shows a simplified block diagram of the Arduino’s programming. In the data acquisition phase, the proceeding is the following: (i) Enables the multiplexer inputs and selects one of the probes. (ii) Averages 30 consecutive measurements for the two signals, thus preventing some unwanted signal fluctuations. This process is (iii) repeated for all probes before the code compares the measured values in the lookup tables and inter- polate/extrapolates the values in scaled SI units. Along with a time-stamp and the luminosity measured through an array of photo-sensitive diodes, these values are sent through the serial UART (Universal Asynchronous Receiver/Transmitter) port to a Raspberry Pi (RPi) connected to the internet, which saves them in a database, allowing the remote querying of the said data. Since the total experiment time has a span of days, and since there is no need for a high sampling frequency, the Arduino enters sleep mode, which keeps only one timer powered, which is set to wake the board up at a pre-set time interval. Another component of the implemented code is the control cycle. Unlike the data acquisition process, which runs at a user-set frequency, 30 minutes, for instance, the control 978-1-4673-8246-5/16/$31.00 ©2016 IEEE 24-26 February 2016, UNED, Madrid, Spain 2016 13th International Conference on Remote Engineering and Virtual Instrumentation (REV) Page 372
  • 3. Fig. 4. Serial port result for a sampling time of 4s in an one probe system. cycle runs daily. This function(s) are defined by the user connecting to the experiment. There is however a sample code with a Proportional-Integral-Derivative (PID) controller implemented, that may serve as a model for the user to base its controller. In this sample code, the microprocessor computes the mean conductivity, which, in the assumption that the conductivity is proportional to the soil hydration, is in turn representative of the water consumed. This value is then compared with a setpoint, obtaining the error (e(t)) conductivity and the adequate response u(t) is calculated through the PID controller equation (1). u(t) = kP · e(t) + kI t 0 e(t)dt + kD de(t) dt (1) All the proportional, integral and differential dependencies are absorbed by the kP , kI and kD, respectively. These factors can be determined by the methods of Control Theory, but since the actuation time for this particular system is so long, a theoretical model was devised to be able to computer simulate the control system and thus obtaining the said coefficients. V. RESULTS AND THEORETICAL MODEL FOR THE WATER CONSUMPTION Figure 4 illustrates an example of the sensor output through the serial port with only one probe and no luminosity sensor. In order to output integer values, the units used were sub- multiples of the conventional units in pedology: do C and μSm−1 for temperature and conductivity, respectively. Figure 5 shows the output of this sensor over one acquisition to serve as reference, using a small vase with a plant. The plant was watered in the beginning of the time scale (t = 0 corresponding to 12 June 2015, 00:15), with enough water to ensure the soil is wet and uniformly irrigated. The second day data 5b was used to generate a mathematical model of the conductivity response over time (σ(t)) to com- (a) (b) Fig. 5. Reference acquisition 5a: Three days scope; 5b: Second day scope. pute the optimal PID coefficients for the sample code. This model has the following expression, on equation (2): σ(t) = σ0 − α (1 + βl(t) + γT(t)) dt (2) where l(t) is the simulation of the light intensity as in equation (3) and T(t) the temperature sensor data: l(t) = sin 2π 24 t − π 2 , x ∈ [6, 18] 0, , otherwise (3) By allowing every user to implement a different control cycle, we will be able to engineer an efficient watering system by comparing the plant’s response to different control algorithms. VI. E-LAB COMMUNICATION PROTOCOLS A generic communication protocol, common to all other experiments at e-lab, connecting the computer and the micro- controller board via a serial connection is used. This standard hastens the deployment of new experiments and facilitates debugging. It comprises a state machine with four different states: stopped, configured, started and reseted, as well as the corresponding transitions, ordered by the generic driver, a program running in the host computer, which could then be connected to the e-lab server using Remote experiment Control 978-1-4673-8246-5/16/$31.00 ©2016 IEEE 24-26 February 2016, UNED, Madrid, Spain 2016 13th International Conference on Remote Engineering and Virtual Instrumentation (REV) Page 373
  • 4. Fig. 6. Experimental data and theoretical model Fig. 7. e-lab infrastructure overview (ReC) [4]. The open-source library for arduino is available at [5]. The hardware server used is a Raspberry Pi (RPi), which has been successfully implemented in previous experiments in the e-lab, bringing improvements in power consumption and overall cost, not compromising the performance [6]. The general structure [7]of e-lab is shown in figure 7. VII. REMOTE ACCESS AND LIVE VIDEO STREAM As the apparatus will be installed in a remote location, without a static external ip address, open-vpn [8], a reliable open source VPN implementation, was used. It provides plug and play functionality (i.e. the remote apparatus can be moved without any further configuration), can overcome restrictive networks and allows remote programming, control and data transmission. As in [6], video streaming is performed using RPi’s pro- prietary camera, at a maximum 1080p30 (H.264 encoding), although resolution is reduced given the limited resources of the clients’ networks. VIII. ONLINE INTERFACE The user will be able to interact with the ongoing experi- ment in two different ways: • First, by inputing the control algorithm, either setting it up from scratch or by modifying the suggested PID controller, tuning the parameters and the setpoint or the observables used definition of the error (1) from the measured data. • In order for data to be accessible to both the user who set up the experiment and other users to compare the results of the different configurations, it is periodically uploaded to a SQL database in the e-lab servers. In the case of this experiment, the measured quantities are plotted using the free JpGraph [9] library for PHP. This implementation ensures that the experiment is reusable, as this system and code for the control and data acquisition can be used and modified by anyone, whilst merging the data in a common database. IX. CONCLUSIONS The experiment was successfully implemented at IST, prov- ing the concept. The data was continuously logged to the database, allowing the monitoring of the watering effect on conductivity, and indirectly the soil moisture. The use of this experiment shows great potential, if used in large scale, in achieving the main goal of comparing different watering user solutions. REFERENCES [1] A. Torres, “Collaborative-smart-watering-repository,” 2015, [Online; accessed-27-December-2015]. [Online]. Available: https://github.com/ e-lab-tecnico-ulisboa-pt/Collaborative-smart-watering [2] Gartner, “Gartner says the internet of things installed base will grow to 26 billion units by 2020,” 2013, [Online; accessed 04-November-2015]. [Online]. Available: http://www.gartner.com/newsroom/id/2636073 [3] Foxboro, “Conductivity ordering guide,” 1999, [Online; accessed June-2015]. [Online]. Available: https://www.grc.com/dev/ces/tns/ Conductivity v Concentration.pdf [4] R. B. Henriques, A. S. Duarte, H. Fernandes, T. Pereira, J. Fortunato, and J. Pereira, “Generic protocol for hardware control,” in 1st Experiment@ International Conference, 2011. [5] S. Balula, “e-lab’s rec generic driver for arduino,” 2015, [Online; accessed 11-November-2015]. [Online]. Available: https://github.com/ sbalula/rec-arduino [6] S. Balula, R. Henriques, J. Fortunato, T. Pereira, H. Borges, G. S. Amarante-Segundo, and H. Fernandes, “Distributed e-lab setup based on the raspberry pi: the hydrostatic experiment case study,” in 3rd Experiment@International Conference - exp.at’15, 2015. [7] R. Neto, H. Fernandes, J. Pereira, and A. Duarte, “E-lab remote laboratory integrated overview,” in Remote Engineering and Virtual Instrumentation (REV), 2012 9th International Conference on. IEEE, 2012, pp. 1–7. [8] D. Wiki, “Openvpn,” 2014, [Online; accessed 15-December-2014]. [Online]. Available: https://wiki.debian.org/OpenVPN [9] JpGraph, “Graph creating library for php,” 2016, [Online; accessed 4-January-2016]. [Online]. Available: http://http://jpgraph.net/ 978-1-4673-8246-5/16/$31.00 ©2016 IEEE 24-26 February 2016, UNED, Madrid, Spain 2016 13th International Conference on Remote Engineering and Virtual Instrumentation (REV) Page 374