Hardware Design and Software Development for a ... - IEEE Xplore

11 downloads 9845 Views 3MB Size Report
Mar 22, 2017 - Hardware Design and Software Development for a White LED-Based Experimental. Spectrophotometer Managed by a PIC-Based Control ...
IEEE SENSORS JOURNAL, VOL. 17, NO. 8, APRIL 15, 2017

2507

Hardware Design and Software Development for a White LED-Based Experimental Spectrophotometer Managed by a PIC-Based Control System Paolo Visconti, Member, IEEE, Aimé Lay-Ekuakille, Senior Member, IEEE, Patrizio Primiceri, Giuseppe Ciccarese, and Roberto de Fazio

Abstract— In this paper, the design and testing of a PC-interfaced PIC-based control unit used to manage an absorption spectrophotometer, employing a white LED as light source, are described. LED technology allows to perform the absorption measurements reducing the analyte temperature variations and thus noise generation, which occur if a Xenon light source, usually employed, is used; also thanks to LED technology, the system results low cost, easy to use and with a low power consumption. The realized spectrophotometer can be used for atmospheric and industrial pollutant detection or for indoor air monitoring (e.g., in hospital rooms), being able to detect particulate matter, pesticides, volatile organic compounds as well as pollution produced by heavy metals. The realized system manages the different required functionalities, such as acquisition and processing, via firmware, of raw data provided by sensors, actuation of mechanical devices (stepper motor and solenoid valve), and synchronizing and controlling the data exchange between hardware sections, microcontroller, and PC. Both hardware and software sections were designed carrying out the appropriate tests to verify their proper operation. Results confirm the correct system functioning and interaction, via PC terminal, between user and the realized control unit. Index Terms— Absorption, digital sensors, light emitting diode, microcontroller, spectroscopy, firmware.

I. I NTRODUCTION IM of this paper is the design and realization of an electronic control system for spectrophotometric measurements using LED-technology as radiation source [1]–[4]. This type of light source was chosen for its features of high luminous efficiency, reliability, operating duration, lower maintenance, low replacement costs and safety operation. Furthermore, a LED light source due to absence of IR component, allows to reduce the gas temperature variations caused by the radiation absortpion, which instead occurs using a broadspectrum light source (e.g a Xenon lamp) with consequently noise generation in the measurements [4], [5].

A

Manuscript received January 19, 2017; accepted February 2, 2017. Date of publication February 15, 2017; date of current version March 22, 2017. The associate editor coordinating the review of this paper and approving it for publication was Prof. Kazuaki Sawada. The authors are with the Department of Innovation Engineering, University of Salento, 73100 Lecce, Italy (e-mail: paolo. [email protected]; [email protected]; patrizio.primiceri@ unisalento.it; [email protected]; roberto.defazio@ studenti.unisalento.it). Digital Object Identifier 10.1109/JSEN.2017.2669529

The operation principle of absorption spectrophotometer is to identify and characterize the gaseous or liquid analytes depending on their different interaction with used luminous radiation. There are several possible application fields of designed spectrophotometer, from gaseous pollutants detection, indoor air quality monitoring in particular environments as surgery rooms (where presence control of some gaseous components or dust is mandatory), detection of possible leaks and room climate deterioration, up to food quality control whose characteristics depend on numerous components such as water, fat, proteins and carbohydrates [1]–[4], [6], [7]. Furthermore, it can be used to detect the pollution caused by many heavy metals (such as Co2+ , Ni2+ , Cd2+ , Zn2+ and Cu2+ ions), added to a methanol solution resulting in an UV/VIS absorption change detectable by the spectrophotometer. These heavy metals are used in different typologies of industries like electroplating, batteries manufacture, pharmaceuticals, finishing and mining of metals; these last present a permissible limit to ingestion beyond which become generally toxic and dangerous [8]. In order to determine gas absorption in different UV/VIS wavelength ranges, an optical filtering system was designed [4], [9]. The realized PIC-based electronic control unit manages the filtering system motion through the actuation of a stepper motor and controls the gas loading phases in the measurement chamber [10]. This last has a cylindrical shape with a quartz window on each base for light beam input/output and with three sensors installed inside [4], [11]–[15]: a digital temperature sensor to measure gas temperature and a digital humidity sensor to measure water vapor percentage in the analyte; furthermore, an analog pressure sensor is used to detect gas pressure within of measurement chamber. PIC16F877A microcontroller, the system’s control core, interfaces with the different sensors, using proper instruction sequence as required by the relative communication protocol [11], [12]. It acquires the raw data from sensors and processes them via firmware to obtain measured quantities. In order to evaluate the light intensity value passing through the analyte in the chamber, the system includes a digital luminosity sensor interfaced with PIC. Furthermore, the designed control unit is PC-interfaced so allowing to display sensors

1558-1748 © 2017 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

2508

IEEE SENSORS JOURNAL, VOL. 17, NO. 8, APRIL 15, 2017

Fig. 1. Block diagram of the designed spectrophotometer with indication of the main functional blocks (electronic, optical and hydraulic).

detected data to the user for an easy system monitoring. Therefore, designed electronic system allows to control the starting and stopping of measurement cycle, to set the measurement parameters, to display on PC-terminal, in the different measurement phases, the acquired data and, in general, to follow the measurement cycle progress. II. B LOCK D IAGRAM AND R ELATED S YSTEM F UNCTIONING The spectrophotometer hardware section is handled by the microcontroller that communicates with PC by serial interface. The microcontroller performs various tasks: it generates the square wave signal for filtering system driving, it controls the solenoid valve for managing gas flux into the chamber and acquires the information from the luminosity sensor and from the other sensors located inside the measurement chamber. A detailed block diagram of the whole designed spectrophotometer is reported in Fig. 1, whereas the general operating principle and the main functional blocks are described following. A white LED luminous source is used and in order to select the desired wavelenght range, the LED emitted radiation is conditioned by an optical filtering system. This last consists of six band-pass optical filters to divide light spectrum in six different wavelength intervals, related to the chosen filter features. The Michelson interferometer represents an important tool in many applications where it is required to characterize the laser or broad-spectrum LED source. In our apparatus, it allows to determine the coherence length (Lc) of each filtered light beam (Lc ≈ tens of microns for a low-coherence light source) after the optical filtering system, thus correlating the measured analyte absorption with the radiation source characteristics. The gas o liquid to be analyzed is loaded in the measurement chamber, placed along the radiation beam path downstream the Michelson interferometer, by means of the solenoid valve (“V” in Fig. 1) controlled from MCU; during this phase, the PIC acquires steadily pressure data provided from sensor located into the chamber. The luminosity sensor is placed

in front of the chamber to detect light intensity level passing through the gas (transmitted radiation). This information allows to calculate gas absorbance value; also, varying the incident radiation wavelength range, by using optical filtering system and storing the transmitted luminous intensity value, the absorbance/ transmittance graph can be drawn as function of the selected wavelength range. An evolution of the previous block diagram is structured with two measurement chambers: one filled with a reference gas and the other containing the analyte. In this case, a second beam splitter is needed (the first is used in Michelson interferometer) in order to divide incident light radiation in two beams: one continues along its initial path and interacts with analyte, whereas the reflected beam is deviated by 90° toward the second chamber containing a reference gas with known absorbance or the vacuum (thus zero absorbance with transmitted radiation intensity (I1 ) equal to incident intensity (I0 )). In this modified setup, the used devices, sensors and other components, are doubled because they are employed for each chamber. The data provided from luminosity sensors (one placed in front of the chamber containing the analyte and the other in front of chamber with reference gas) give information on the amount of absorbed radiation. These data are sent to PIC and hence to PC for post-processing. The transmittance and absorbance values are respectively given by: I0 I1 A = − log (T ) = log( ) (1) I0 I1 By comparing data provided from the two luminosity sensors, a graph related to absorbed radiation by the analyte respect to that absorbed by reference gas can be drawn, namely normalized absorption spectrum. Instead, in single-chamber setup, same result is obtained performing measures before with no gas and then with the analyte in the chamber. T =

III. C IRCUITAL S CHEME AND U SED D EVICES IN THE E XPERIMENTAL S PECTROPHOTOMETER The circuital scheme of designed spectrophotometer is shown in Fig. 2. The main element is the PIC16F877A MCU which communicates via USART interface with PC; it also manages the synchronization of the various components of the experimental apparatus and presents features that fully satisfy the specifications required by realized system. Another important component is the radiation source, i.e. the white LED described following, chosen for its large spectral range, between [380÷750]nm, and for its high luminosity intensity. To perform the measures on different spectral intervals, the LED light-source spectrum is divided by the optical filtering system consisting of a wheel, with six different filters, actuated by a stepper motor driven by PIC. The designed system, as shown in Fig. 2, includes two digital temperature sensors, both available at low cost: the first one (model LM75A), employed to detect instantaneous temperature inside the chamber, uses I2 C communication protocol to exchange data with PIC and presents a wide measuring range. The second one (model DHT11) communicates with PIC via one-wire protocol and is used only to measure the analyte moisture, because of its long response time in the

VISCONTI et al.: HARDWARE DESIGN AND SOFTWARE DEVELOPMENT FOR A WHITE LED-BASED EXPERIMENTAL SPECTROPHOTOMETER

2509

Fig. 2. Detailed circuital scheme of the designed spectrophotometer indicating the different sections controlled by the PIC16F877A.

temperature measurement. Futhermore, into the measurement chamber, an analog pressure sensor (MPX6250), for acquiring the gas pressure, is placed. For measuring of the luminosity intensity, the digital luminosity sensor (model TSL2561) is used, located externally front of the chamber. It communicates via I2 C with PIC and allows to perform measurements in a wide spectral range. Besides to managing and synchronizing of sensors and the optical filtering system, the PIC drives the solenoid valve opening and closing, to allow the measurement chamber filling. The system operation is the following: initially a verification of chamber conditions (detecting temperature, pressure and humidity values) is performed. The revealed data are sent from MCU to PC and displayed on PC terminal. Afterwards an illuminance measure for each optical filter is carried out with no gas in the chamber and acquired data are displayed on PC to be compared later with those acquired in presence of the analyte. After this phase, MCU drives the opening of solenoid valve for loading the analyte in the chamber until its pressure is equal to the reference pressure value. At this point, once checked that that chamber conditions respect the set parameters, the illuminance measures are performed, detecting also, in this case, gas pressure and temperature, for each optical filter. Thus, the acquired data are shown on PC terminal allowing a real time monitoring of the system by the user. A. Used Light Source, Sensors and Stepper Motor Driver: Characteristics and Operational Modes The chosen light radiation source is shown in Fig. 3a; it integrates a white LED, model XLamp XM-L T6 produced by CREE (Fig. 3b), presents a small size and high output luminous flux (> 1000 lm, with a light beam collimated by a proper lenses system); its emission spectrum is reported in Fig. 3c (in blue color) [16]. Thus a luminous power density equal to 205mW/cm2 (referred to area of ∼1,7cm2) was measured. In order to adjust the radiation beam intensity, depending on the different analyzed gas typology, neutral filters (model Thorlabs ND01B or ND03B or ND05B as function of the desired attenuation) can be used. They can be located just ahead the LED-based light source (as shown in Fig. 1).

Fig. 3. Light source with assembled the white LED XLamp XM-L T6 (a), view of the white LED XLamp XM-L T6 (b) and its emission spectrum with the color temperature as paramenter (5000K is used in this work) (c).

Fig. 4. Luminosity sensor TSL2561 mounted on its small PCB (a), simplified sensor’s internal block diagram (b) and the spectral responsivity of the two photodiodes integrated in the TSL2561 sensor.

To detect transmitted light intensity for each wavelength range, the Light to digital Converter TSL2561 produced by TAOS, is used (Fig. 4a). It detects infrared and visible radiation using two photodiodes, providing a response like that of the human eye. It converts the two photocurrents in digital format using two integrated analog to digital converters (Fig. 4b) and it stores data in two 16 bit buffer registers named Channel0 and Channel1 [17]. Therefore, it’s a digital sensor with 16bit resolution able to measure light intensity between 0.1 and 40kLux; its spectral response covers the interest wavelenght range [380÷750nm] as shown in Fig. 4c [17]. The digital output signal is available using I2 C protocol; the MCU (master) sends a proper command

2510

IEEE SENSORS JOURNAL, VOL. 17, NO. 8, APRIL 15, 2017

Fig. 7. Front view of the DHT11 Temperature and Humidity sensor (a) and circuital scheme for connection to the PIC with the 5k pull-up resistor (b).

Fig. 5. View of the analog pressure sensor MPX6250 (a), typical application circuit (b) and its transfer function Output voltage [V] vs Pressure [kPa] (c).

Fig. 8. Stepper motor driver A4988 on its small PCB (a) and its circuital configuration where the MCU drives the stepper motor A4988 (b).

Fig. 6. LM75A temperature sensor placed on its specific small PCB (a) and the simplified internal block diagram (b).

sequence to read the stored value in the sensor buffer registers. Received the raw data, PIC extracts illuminance values using a suitable conversion function implemented in the installed firmware. To measure the gas pressure value, an analog pressure sensor, model MPX6250 produced by NPX Semiconductors and shown in Fig. 5a, is used. It is a piezoresistive pressure sensor realized in monolithic silicon designed for microcontroller applications. It allows to measure pressure values in the range [0 ÷ 250] KPa, with a response time of 1ms and with accuracy of ±1.4%VFSS . The Fig. 5b shows the typical circuital configuration; in this work, output signal is acquired by PIC’s A/D conversion module [18]. Then, the acquired value is processed via firmware to extract the chamber pressure value, operation very simple since sensor presents a linear transfer function as shown in Fig. 5c [18]. To detect the gas temperature within the chamber, the LM75A digital temperature sensor is used (Fig. 6a). It’s a temperature to digital converter with a resolution

of 0.125° C and integrates an  A/D converter (Fig. 6b) with 11-bit resolution [19]. The temperature digital data are stored in a buffer register (Temp) with an 11-bit 2’complement format. The sensor operates in normal mode as defined in the datasheet, namely the reading is performed and updated in the Temp register every 100ms. The reading process doesn’t affect on the temperature to digital conversion. To read the detected temperature value, the MCU sends the proper command sequence to the sensor using I2 C comunication protocol, as expected by datasheet. The moisture reading within the measurement chamber is performed by the DHT11 temperature-humidity sensor (Fig. 7a). The sensor can acquire humidity values in the range [20 ÷ 90]% with a 1% resolution. It provides the output digital signal using one-wire comunication protocol. Therefore, once MCU sends the reading request, the sensor responds sending the data packet. It’s constituted of 40 bits, divided in the following way: Data = 8bit humidity integer data + 8bit humidity decimal data + 8bit temperature integer data + 8bit fractional temperature data + 8bit parity bit The time duration of the whole comunication cycle is 4ms. The Fig. 7b shows the typical circuital configuration used to acquire the data by the microcontroller. The stepper motor, used to drive the filtering system, is driven by the bipolar stepper motor driver A4988 (Figs. 8a and 8b). It’s featured by adjustable current limit,

VISCONTI et al.: HARDWARE DESIGN AND SOFTWARE DEVELOPMENT FOR A WHITE LED-BASED EXPERIMENTAL SPECTROPHOTOMETER

2511

Fig. 9. Basic operating principle of the optical filtering system (a) and view of the realized system actuated by a stepper motor (Nema 17) (b).

Fig. 11. Semplified flow-chart of the developed firmware, that indicates the tasks sequence performed by the system.

Fig. 10. Lenses optical configuration used to collimate the light beam before the optical filtering system.

over current and over temperature protections. It has 5 different step resolutions (down to 1/16 step), operates from 8V to 35V and it can deliver up 1A current value for each phase. B. Selection of Light Wavelength Range and Optical Lenses The filtering system (Fig. 9a) is used to select different wavelength range of emission spectrum [380÷750nm] of the white-LED light source, as reported in [4]. It is placed just after the radiation source and it’s composed by an aluminum wheel with 130mm diameter and six holes (21mm diameter) as shown in Fig. 9b; to perform filtering, a bandpass optical filter (25mm diameter) is mounted on each hole. The chosen optical filters are produced by Thorlabs (FGB25, FGB7, FGV9, FB650-40) and Andover (600FS80, 700FS80). The filter wheel is mounted on an aluminum vertical structure in order to be perpendicular to the luminous beam; it is actuated by a stepper motor (Nema 17) driven by PIC through the A4988 motor driver. The PIC manages accurately the wheel progress so that the optical filters sequentially pass in front of the white LED, thus selecting the different wavelength ranges. To collimate the radiation beam and reduce its size, the cascade of two lenses is used, one with focal length double than the other; they are placed just ahead the LED radiation source (Fig. 10). The chosen lenses are: LA1979 (focal length equal to 20cm) andLA1050 (focal length = 10cm). They are positioned to a distance, between them, equal to the sum of the two focal lengths (30cm).

IV. F LOWCHART D ESCRIPTION AND F IRMWARE D EVELOPMENT The spectrophotometer operation is reported in the simplified flowchart shown in Fig. 11. Once started the PC-MCU communication, the user can set by terminal the measure parameters (maximun and minimun temperature and reference pressure) or to use the default parameters (T = [20 - 40]°C, P = 200kPa). Then, the user can command by terminal, the measurement cycle starting; the system acquires chamber pressure, temperature and humidity values and displays them on PC terminal. If the chamber already contains gas, the user can decide to stop or to proceed with the measurement cycle. In this last case, the luminous intensity value, for each wavelength range selected by proper optical filter, is acquired. Otherwise, if the chamber is empty, the system measures luminous intensity as function of the wavelength, varying optical filters, for the next normalization step. Then, it loads the gas in the chamber, opening the solenoid valve, until the pressure reaches the reference value; at the end of this phase, a temperature check is performed. If it’s out of the setting range, the system stops the measurement cycle and it displays a warning message on PC terminal. Otherwise, the system proceeds measuring the luminosity intensity of the transmitted radiation, but also acquiring the pressure and temperature values, for each wavelength range. These values are displayed on PC distinguishing them for each wavelength range. By comparing intensity radiation values, in a certain wavelength range, with and without gas in the chamber, the gas absorption spectrum can be extracted. The firmware is structured by a set of functions, which perform operations such as sensor readings and motor driving. They are called up in the main function to achieve the

2512

Fig. 12. Firmware section for I2 C communication between PIC and LM75A sensor with data conversion in the temperature value, highlighted (red line).

Fig. 13. Firmware section, with functions sequence to perform the required operations, related to the measurement cycle with no gas in the chamber.

aforementioned behaviour. Fig. 12 shows the firmware section related to temperature() function for reading 11-bit 2’s complement data from LM75A Temp register. The communication with sensor is articulated according to the phases defined by producer in compliance with I2 C standard. Essential to system operation is the luminosity sensor; also it uses the I2 C protocol. Data acquisition from light sensor is performed by the functions read_TSL25Channel0() and read_TSL25Channel1() for reading data from two only-IR and IR/VIS photodiodes; these functions access to the two 8-bit buffer registers of each acquisition channel. They contain the most and less significative bytes related to each channel data obtained from 16bit A/D conversion. Next, data are processed by function Calcola_lux() to convert them in the luminosity value (lux) (see Fig. 13). Another used digital sensor is the DHT11 temperaturehumidity sensor; its communication with PIC occurs via “one wire” protocol. Through a suitable function, MCU can

IEEE SENSORS JOURNAL, VOL. 17, NO. 8, APRIL 15, 2017

Fig. 14. Detailed flow chart section related to the performed measures with the gas present in the measurement chamber.

acquire the humidity value: it sends to sensor (slave) the proper logic levels sequence to address it, then the sensor responds sending the data packet, containing the humidity data. Another function is implemented to acquire the analog signal level from the pressure sensor, using the analog-to-digital conversion module embeddded into the PIC. Other two functions provide signals for stepper motor driving: function ruota60_gradi() generates signal to rotate the motor axis of 59.4° (33 steps each of 1.8°), whereas the function compensa_err_step() is used to compensate the angular error accumulated after a complete round of the filter wheel. The last firmware section is relative to the main part, where the previously defined and described functions to acquire data from sensors and to synchronize and manage the different system operations, are called up. In particular, the firmware implementation of measurements cycle with no gas in the chamber is shown in Fig. 13. It performs, for each optical filter (wavelength range), a luminosity measure by TSL2561 sensor. Also, for each iteration, PIC sends detected data to PC to display them on terminal and drives motor to rotate the filter holder wheel by 60° for the next iteration. Then, the system manages the chamber filling by opening the solenoid valve until measured pressure is equal to the reference pressure. Next, once verified that the gas temperature falls within set reference range, the firmware performs another measurements cycle with the analyte within the chamber: it’s similar to the previous one, but as well as a luminosity measure for each optical filter, it also performs gas temperature and pressure measurements (as shown in the detailed flow chart of Fig. 14). Then, similar to the previous one, the PIC sends the information to the PC, which displays them on terminal, and drives the motor to rotate the filter holder wheel by 60° for the next iteration. Finally, normalizing the obtained data with those got with no gas, for each selected wavelength range, the analyte absorption coefficient can be extracted.

VISCONTI et al.: HARDWARE DESIGN AND SOFTWARE DEVELOPMENT FOR A WHITE LED-BASED EXPERIMENTAL SPECTROPHOTOMETER

2513

Fig. 17. Oscilloscope screenshot with the digital data exchanged between PIC and LM75A sensor (SDA blue trace, SCL yellow trace); the different communication sequences are highlighted (red line).

Fig. 15. Designed control unit realized on protoboard for testing the proper circuit operation, with the main circuital components highlighted.

Fig. 16. Experimental setup for testing the realized prototype with indication of the different devices and used laboratory instruments.

V. C HARACTERIZATION AND F UNCTIONAL T ESTING OF THE R EALIZED S YSTEM Finally, in this paragraph, we report on the implementation and testing of the designed system. To carry out experimental tests, a prototype board of control unit with sensors embedded has been realized, as shown in Fig. 15 where the different circuital sections are highlighted. The pressure sensor was replaced by a potentiometer, connected in voltage divider configuration, due to unavailability of the measurement chamber, so allowing to simulate the chamber filling by varying the cursor position in order to adjust the analog signal value acquired by PIC. Also, Fig. 15 shows the DHT11 temperature-humidity sensor connected to any PIC pin for one-wire communication mode, using a 4.7k pull-up resistor as expected by the producer. Similarly, the TSL2561 luminosity and the LM75A temperature sensors are both connected to SCL and SDA PIC pins, using a 10k pull-up resistor to allow communication by using the I2 C protocol. In Fig. 15, the USB-RS232 adapter cable is shown; it’s used to connect the PIC USART module pins (TX and RX) to the PC allowing the data exchange between them. The experimental setup realized to test the system operation is reported in Fig. 16; 5V supply voltage, provided by the

Fig. 18. Oscilloscope screenshot with indication of the PIC-TSL2561 I2 C communication sequence (SDA blue trace, SCL yellow trace); the different instructions are highlighted with the red line.

Fig. 19. Oscilloscope screenshot related to the communication between DHT11 sensor and the PIC by 1-Wire technology; in detail, the transmission of the first byte relative to sensor response is shown (in the red circle).

DC power supply (Agilent E3631A), is used for feeding the control unit. The microcontroller was programmed using a Microchip programmer (PICKIT 3). At first, the PIC-sensors communication was tested employing a digital oscilloscope (Tektronix TDS2024D) in order to detect and then verify the correctness of the instructions and data exchanged between them. In Fig. 17 the oscilloscope traces related to the two I2 C dedicated wires, namely SDA (blue trace) and SCL (yellow trace) during reading process from the LM75A temperature sensor

2514

Fig. 20. Signals related to firmware function ruota60_gradi(): logic signal (in yellow) provided to stepper motor for wheel rotation (with indication of time duration) and the direction signal (0V ≡ clockwise) in blue.

IEEE SENSORS JOURNAL, VOL. 17, NO. 8, APRIL 15, 2017

verification of the time synchronization between PIC reading request signal and sensor response are highlighted. The two driving signals provided by PIC to the stepper motor driver (A4988) are reported in Fig. 20. As discussed in paragraph 4, in order to manage the motor movement, two firmware functions were implemented. One of these generates a logic signal consisting of 33 pulses (f = 250Hz) in order to rotate the motor axis of 59.4° (as shown in Fig. 20). The other one is used to compensate 3.6° error accumulated at the end of a complete rotation of the filter wheel. Finally, the whole system’s operation was tested in order to verify the proper execution and synchronization of the different firmware sections, by viewing on PC terminal the data sent from the system to PC. In fact, the system sends, through the serial communication, the measures performed during the measurement cycle and the information related to the firmware section in progress. In addition, the system-user interaction, by sending starting or stopping commands or by setting the parameters, was verified. In Fig. 21a, the terminal picture during the measurement cycle is reported, whereas in Fig 21b the terminal image during the setting parameters phase is shown. VI. C ONCLUSIONS This research work led to the design of a PIC-based control system to manage the electronic and mechanical sections of a absorption spectrophotometer based on a white power LED. The hardware and software sections for acquiring information from different sensors (temperature, humidity, luminosity, pressure) and to exchange sensors data and commands with the PC, were designed together with driving unit for the actuating of various mechanical devices. Afterwards, a prototype of the designed system was realized and both hardware and software sections were tested. Obtained results have confirmed proper system operation; in fact, the different functionalities such as the communication sensors-PIC and control unit-PC but also the actuating of the stepper motor and solenoid valve worked properly. Therefore, a full verification of the realized system operation was performed successfully. R EFERENCES

Fig. 21. Terminal screenshot during a generic measurement cycle (a) and PC terminal screenshot during the setting parameters phase (b).

are reported. Also, in Fig. 17, the different instructions sent by PIC (master) to sensor (slave) and the data sent back from sensor to PIC are highlighted (red line). The Fig. 18, instead, shows the oscilloscope traces related to the two I2 C dedicated wires, SDA (blue trace) and SCL (yellow trace), during the reading process from one of the acquisition channels (Channel 0) of the TSL2561 luminosity sensor. Similarly, in Fig. 18, the different instructions sent by the PIC (master) to sensor (slave) and data sent back from sensor (slave) to PIC are highlighted (red line). Fig. 19 reports the oscilloscope trace related to the PIC-DHT11 sensor communication; the transmission of data and commands is performed by using a single communication line (1-Wire technology). In particular, the reading process and

[1] Q. Li et al., “Automated spectrophotometric analyzer for rapid singlepoint titration of seawater total alkalinity,” Environ. Sci. Technol.-ACS, vol. 47, pp. 11139–11146, Aug. 2013. [2] A. Lay-Ekuakille, P. Vergallo, R. Morello, and C. de Capua, “Indoor air pollution system based on LED technology,” Measurement, vol. 47, pp. 749–755, Jan. 2014. [3] A. Lay-Ekuakille, I. Palamara, D. Caratelli, and F. C. Morabito, “Experimental infrared measurements for hydrocarbon pollutant determination in subterranean waters,” Rev. Sci. Instrum., vol. 85, pp. 015103-1–015103-8, Jan. 2013. [4] A. Lay-Ekuakille, G. Vendramin, and A. Trotta, “LED-based sensing system for biomedical gas monitoring: Design and experimentation of a photoacoustic chamber,” Sens. Actuators B, Chem., vol. 135, pp. 411–419, Jan. 2009. [5] K. Laqua, W. H. Melhuish, and M. Zander, “Molecular absorption spectroscopy, ultraviolet and visible (UV/VIS),” Pure Appl. Chem., vol. 60, no. 9, pp. 1449–1460, 1988. [6] A. Nawrocka and J. Lamorska, “Determination of food quality by using spectroscopic methods,” in Proc. Adv. Agrophys. Res., Jul. 2013, pp. 347–367, doi: 10.5772/52722. [7] C. Alippi, R. Camplani, C. Galperti, and M. Roveri, “A robust, adaptive, solar-powered WSN framework for aquatic environmental monitoring,” IEEE Sensors J., vol. 11, no. 1, pp. 45–55, Jan. 2011.

VISCONTI et al.: HARDWARE DESIGN AND SOFTWARE DEVELOPMENT FOR A WHITE LED-BASED EXPERIMENTAL SPECTROPHOTOMETER

[8] V. K. Guptaa, A. K. Singha, M. R. Ganjalic, P. Norouzic, F. Faridbodc, and N. Mergua, “Comparative study of colorimetric sensors based on newly synthesized Schiff bases,” Sens. Actuators B, Chem., vol. 182, pp. 642–651, Mar. 2013. [9] M. Lepot et al., “Calibration of UV/Vis spectrophotometers: A review and comparison of different methods to estimate TSS and total and dissolved COD concentrations in sewers, WWTPs and rivers,” Water Res., vol. 101, pp. 519–534, Sep. 2016. [10] P. Primiceri, P. Visconti, A. Melpignano, and A. G. M. V. Colleoni, “Hardware and software solution developed in ARM mbed environment for driving and controlling DC brushless motors based on ST X-NUCLEO development boards,” Int. J. Smart Sens. Intell. Syst., vol. 9, no. 3, pp. 1534–1562, Sep. 2016. [11] E. Lunca, S. Ursache, and A. Vasniuc, “Temperature monitoring system based on multiple TMP75 digital sensors and the PC’s parallel port,” in Proc. 9th Int. Symp. Adv. Topics Elect. Eng., May 2015, pp. 15–18, doi: 10.1109/ATEE.2015.7133668. [12] P. Visconti, C. Orlando, and P. Primiceri, “Solar powered WSN for monitoring environment and soil parameters by specific app for mobile devices usable for early flood prediction or water savings,” in Proc. IEEE 16th Int. Conf. Environ. Elect. Eng., Sep. 2016, pp. 1–6, doi: 10.1109/EEEIC.2016.7555638. [13] M. Jankovec et al., “In-situ monitoring of moisture ingress in PV modules using digital humidity sensor,” IEEE J. Photovolt., vol. 6, no. 5, pp. 1152–1159, Sep. 2016. [14] P. Visconti, P. Primiceri, and G. Cavalera, “Wireless monitoring and driving system of household facilities for power consumption savings remotely controlled by Internet,” in Proc. IEEE Workshop Environ., Energy Struct. Monitor. Syst. (EESMS), Jul. 2016, pp. 1–6, doi: 10.1109/EESMS.2016.7504805. [15] S. Sinha, D. Banerjee, N. Mandal, R. Sarkar, and S. C. Bera, “Design and implementation of real-time flow measurement system using Hall probe sensor and PC-based SCADA,” IEEE Sensors J., vol. 15, no. 10, pp. 5592–5600, Oct. 2015. [16] Cree Inc. XLamp XM-L LEDs Data Sheet, accessed on 2015. [Online]. Available: http://www.cree.com/~/media/Files/Cree/LED-Componentsand-Modules/XLamp/Data-and-Binning/XLampXML.pdf [17] Texas Advanced Optoelectronic Solutions Inc. (Mar. 2009). TAOS059N– TSL2560, TSL2561 Light-to-Digital Converter. [Online]. Available: https://cdn-shop.adafruit.com/datasheets/TSL2561.pdf [18] Freescale Semiconductor Inc. (Sep. 2005). MPXHZ6250A Data Sheet. [Online]. Available: http://www.nxp.com/assets/documents/data/en/datasheets/MPXHZ6250A.pdf [19] NXP Semiconductors. (Jul. 2007). LM75A Data Sheet. [Online]. Available: http://www.nxp.com/documents/data_sheet/LM75A.pdf Paolo Visconti received the M.S. degree in electronic engineering and the Ph.D. degree in photonic and electronic nanodevices from the University of Lecce, in 1996 and 2000, respectively. In 2001, he was a Visiting Scientist with Virginia University, USA, where he was involved in fabrication and characterization of GaN devices. Since 2001, he has been with the Department of Innovation Engineering, University of Salento, Italy, where he is involved in research and teaching activity in electronics. He has authored about 100 papers in international journals, books, and conference proceedings. His research interests include design of PIC-based boards for monitoring/data-acquisition, remote control of complex facilities, and electronic systems for automation and automotive.

2515

Aimé Lay-Ekuakille received the M.S. degree in electronic engineering from the University of Bari, Italy, in 1988, the M.S. degree in clinical engineering from the University of L’Aquila in 2003, and the Ph.D. degree in electronic engineering from the University of Bari in 2001. From 1993 to 2001, he was an Adjunct Professor of Measurements and Control Systems with the University of Calabria, University of Basilicata, and the Polytechnic of Bari. He joined the Measurement and Instrumentation Group, Department of Innovation Engineering, University of Salento, in 2000. Since 2003, he has been a Coordinator of the Measurement and Instrumentation Laboratory. He has authored and co-authored about 135 papers published in international journals, books, and conference proceedings. He is currently an Associate Editor of the IEEE S ENSORS J OURNAL and the IEEE T RANSACTIONS ON I NSTRUMENTATION AND M EASUREMENT AND M EASUREMENT-IMEKO J OURNAL.

Patrizio Primiceri received the M.S. degree in telecommunication engineering from University of Salento in 2010, where he is currently pursuing the Ph.D. degree in engineering of complex systems. His research interests include analog/digital circuit design, SMT PCB design, and firmware programming for PIC-based data-acquisition systems. In 2010, he received a research grant from MilanoBicocca University as a Microelectronic Designer and a scholarship from the Italian National Institute of Nuclear Physics in 2012.

Giuseppe Ciccarese received the bachelor’s degree in information engineering from the University of Salento in 2016. He is currently pursuing the master’s degree in electronic engineering with the University of Bari. His research interests include design and testing of PIC-based electronic control boards interfaced with sensors.

Roberto de Fazio received the bachelor’s degree in information engineering from the University of Salento in 2011, where he is currently pursuing the master’s degree in communication engineering. His research interests include design and testing of electronic boards and on firmware programming for PIC-based systems.