The article proposes the modernization of the obsolete laboratory task Digital measurement system using GPIB  with the new one Digital Measurement System Based on Modbus Protocol Used for Indoor Environment Monitoring. It describes the new system design together with a created software.
The Laboratory exercise Digital Measurement System Based on Modbus Protocol Used for Indoor Environment Monitoring is part of laboratory exercises in Electrical Measurements and Instrumentation and laboratory exercises Sensors and Measurement. Both lectures are focused on the main principles of electrical measurements and sensors [2, 3]. The course is compulsory for students of disciplines Robotics, Sensors and Instrumentation, Control Systems and Cybernetics. Students of other disciplines may enroll as an optional subject.
Scope of Electrical Measurements and Instrumentation is focused on measurement methods of physical quantities, together with principles of their correct applications and accuracy estimation, and measurement systems. One of its laboratory exercises used to be the Digital measurement system using GPIB (Task 13) . In this task, the students had to study the program written in graphical programming language VEE (the predecessor of the LabVIEW programming language) and measure the transfer characteristic of the voltage-to-frequency converter and transfer measured data over the GPIB bus to the PC. The used application and equipment is already obsolete (more than 17 years). For the needs of a new course, the laboratory exercise was substantially upgraded with emphasis on industrially wildly used communication protocols (Modbus) and fieldbuses (RS485 and Ethernet) and smart sensors used for the measurement of indoor environment quality. Nowadays these quantities are monitored in smart buildings and passive houses to reduce the power consumption, CO2 concentration or to increase the comfort quality by setting the optimum temperature and humidity.
In the measurement task, students will measure various quantities which can be monitored in smart homes or modern offices. Students will measure temperature, humidity and CO2 concentration of the laboratory room and will also measure the change of temperature and the humidity in the box heated by the heater (in this case simulated by a hairdryer) by various types of smart sensors. During the measurement, the energy consumption of the heater will be also monitored by electronic power meter. Thanks to various types of smart sensors students acquire a wide knowledge how to communicate with sensors using different approaches.
During the measurement, students uses three different approaches for Modbus TCP communication. Firstly, smart sensors are connected through Modbus TCP / RTU gateway, behind gateway sensors are connected with RS 485 bus, and each of them must have unique Slave ID. In the second way an Ethernet concentrator is used. In this case, multiple sensors are connected with the concentrator unit. This unit has the only one Slave ID and values from particular sensor are accessible via concentrator unit registers. The last approach is direct connection of a smart sensor using Modbus TCP.
Measurement system based on the Modbus communication protocol is controlled by a PC, which provides measurement control and data acquisition and its processing. The block diagram of the laboratory task is shown in figure 1.
The task is divided into the two main parts: monitoring of the indoor environment and measurement of the temperature, humidity and power consumption in the heated box.
Smart sensors for monitoring indoor environment quality of the laboratory room is: THT2 I: Interior thermometer and hygrometer uses Modbus protocol communicating over RS485 connected to TCP2RTU converter. The converter utilize Modbus TCP protocol and Ethernet for communicating with the PC. A CO2 concentration smart sensor Papago TH CO2 ETH: CO2 with Ethernet uses the same Modbus TCP protocol and Ethernet for communicating with the PC. TCP2RTU converter is also used for a communication with power meter DVH 5261 CZ. The power meter measures the power consumption of the heater which is used for the change of the temperature in the monitored box.
Temperature and humidity in the box is measured by three different smart sensors. As a reference a resistance sensor Pt100 Sensit TR050A using four wire connection to Papago 2PT ETH: 2x thermometer for Pt100/1000 with Ethernet. The accuracy class of the TR050A is ± (0.3 + 0.005 |υ|), where υ is measured temperature in °C. For a comparison two more sensors are used. PT100B of accuracy class is ± (0.6 + 0.01 |υ|) with four wire connection connected to Ethernet concentrator and to the PC. The last sensor is Temperature and humidity sensor with measurement accuracy of ± 2 °C connected with two wire connection to Ethernet concentrator and to the PC. The more details about used sensors can be available at . The measurement system is presented in figure 2.
In a part of the task dealing with the monitoring of indoor environment quality students read the values at the beginning of the task directly from the corresponding registers of each sensor, and convert hexadecimal value from a sensor to real value of humidity, temperature and CO2 concentration. Before the end of the task, students will measure the values again directly from a smart sensor and compare both values obtained from the start and at the end of the measurement. Measured values of all quantities are then compared with the hygiene standards for temperature, humidity and CO2 concentration in a healthy indoor environment. In this part of the task, students will understand the principle of communication with sensors, how to read and convert binary data obtained directly from sensors registers and will learn about hygiene standards for the indoor environment.
In a part of the task dealing with the measurement of the temperature and the humidity in the heated box, students measure the change of both quantities during the heating of the box by the heater – hairdryer. The measured object – box changes its temperature in a range of 20 - 80 °C. The temperatures are measured by the three sensors mentioned above. From measured characteristic students have to calculate an absolute error of the two sensors related to the reference one. In this part of the task students will understand the difference between the four wire and two wire connection and how to evaluate the measurement uncertainty of the sensor.
The modernization of the task also includes two new measurement applications created in C# and .NET programming language. The first presented application, Modbus Reader (figure 3) allows students connect a smart sensor and read data directly from its registers via Modbus TCP protocol. Students fill appropriate communication parameters (such as IP Address, Port and Slave ID) and selects registers for a measured quantity. For each smart sensor is available datasheet, or supplementary document which includes detailed description of its Modbus registers. After successful connection and register reading, the values are printed into a textbox on the right side of the application. Each line represents a content of 16-bit register presented in the hexadecimal form. Therefore, students have to recalculate it to the decadic number.
The second application, Modbus Sampler (figure 4), is used for presentation of a remote automatized data acquisition using the PC. Similarly, students fill communication parameters for each sensors installed in the box to measure the changes of the temperature and the humidity in the heated box. Students have to selects sample period and number of samples. The application periodically connects the sensors and samples measured values and automatically transforms register values into decadic form, and after the end of the measurement, all the measured data are stored into CSV file.
The example of measured data using Modbus Sampler is shown in figure 5. The graph shows the temperature dependency measured by all three sensors mentioned above. The figure 6 shows the example of the change of the CO2 concentration measured during the three subsequent laboratory exercises.
The innovation of the laboratory exercises in Electrical Measurements and Instrumentation and laboratory exercises Sensors and Measurement course led to significant modernization and made the course up to date. It’s focused on industrial communication protocols and fieldbuses and also puts emphasis on modern smart sensors. Students acquire knowledge about indoor environment quality measurement which is in these days monitored especially in smart buildings and passive houses. In comparison with the previous task, the students will learn different approaches how to communicate with smart sensors. The course reflects real-life application of principles demonstrated in the course.
This research was supported by the “Energy for Smart Objects” grant provided by Electronic Components and Systems for European Leadership Joint Undertaking in collaboration with the European Union’s H2020 Framework Programme (H2020/2014-2020) and National Authorities, under grant agreement n° 692482.