Literature DB >> 35607688

Portable low-cost IoT hyperspectral acquisition device for indoor/outdoor applications.

J S Botero-Valencia1, J Valencia-Aguirre1.   

Abstract

In lighting engineering, it has become necessary to develop new acquisition devices aligned with today's technological needs, so that they can be easily integrated with IoT (Internet of things) systems. This allows recording lighting data in real-time either to perform analysis, estimate lighting quality measurements, or interact with intelligent lighting systems. Here a portable low-cost IoT hyperspectral acquisition device is presented, which can be used to perform measurements both indoors and outdoors. Since the device is part of IoT technologies, it has wireless communication and allows raw data to be sent to the cloud or to perform calculations directly within the device to be transmitted later. In addition, information on the hardware general design is provided and the device measurements uniformity is validated using the ASTM G-173-03 solar spectra. The proposed device can be used outdoors since its container is IP67 and it can simultaneously measure incident and diffuse radiation. On the other hand, the recorded data can be used for light source spectrum recovery, and to calculate light quality measurements. The hardware and software are customizable, which is an advantage over commercially available devices. The final cost of the device is 271.95 USD.
© 2021 The Authors.

Entities:  

Keywords:  Hyperspectral sensor; Internet of things; IoT deployment; Spectral analysis; Spectrum measurement

Year:  2021        PMID: 35607688      PMCID: PMC9123436          DOI: 10.1016/j.ohx.2021.e00216

Source DB:  PubMed          Journal:  HardwareX        ISSN: 2468-0672


Engineering Instrumentation Colorimetric measures Internet of things Measuring physical properties and in-lab sensors Field measurements and sensors Electrical engineering and computer science

Hardware in context

In general, for lighting engineering, knowing the light sources spectral power distribution (SPD) is essential since all calculations related to color and light sources quality are SPD based. However, to obtain the SPD of a light source it is necessary to use specialized and usually high-cost elements, such as spectroradiometers. To cope with this issue, lower-cost portable spectroradiometres have been developed. These elements represent an alternative to lab-grade spectroradiometers, with the caveat of a trade-off between precision and cost. Currently, the prices of commercial spectroradiometers can be found around tens of thousands of dollars, while portable spectrometers are sold around a couple of thousand dollars [1], [2], [3]. Among the low-cost alternatives, there are options as inexpensive as those offered by Public Lab [4], [5], whose advantage is that it allows taking measurements easily. However, these inexpensive and simple options have consequences in terms of limited measurement ranges or low levels of precision. On the other hand, it is important to consider that with the fourth industrial revolution the development of devices classified as IoT has gained interest by the scientific community and has opened the doors to a wide range of applications, including intelligent lighting systems. IoT devices are characterized by being low cost, having connectivity to a global network, being identifiable, locatable, and programmable, as well as being autonomous and having sensing/actuation capability. Today, IoT devices are being of great interest in lighting systems. In architectural engineering and intelligent lighting systems, it would be very useful to know the SPD of the light sources in real-time, since it would be possible to carry out monitoring either to control the appearance of objects or to reduce energy consumption. Applications could be made to improve productivity in workspaces or improve the feeling of well-being in places of rest by analyzing and monitoring the quality of lighting in real-time,. It would even be possible to detect infrared radiation from light sources, which would help prevent health problems and even preserve artwork in museums and art galleries [6]. Here it is proposed a device that makes it possible to recover the SPD from the light sources, and then colorimetric measurements or light quality measures could be carried out. A similar device was proposed in [7], however, the authors employed an Arduino that does not have an Internet connection. This connection could be done by adding a gateway device between the Bluetooth network and the Internet but this would imply including an extra element in the project to carry out communication with the cloud. Although the construction price is almost identical to the hardware proposed in this work, our device presents the possibility of being used outdoors and sending data to the cloud according to the user needs. Additionally, it should be mentioned that the MCU used in our development also has BLE (Bluetooth Low Energy). An additional benefit of developing your own spectral-recovery device is that it can be scaled and made compatible with other IoT devices. The portable low-cost IoT hyperspectral acquisition device can also be adapted for home automation protocols (such as if this, then that - IFTTT) or adapted to network (e.g., message queue telemetry transport - MQTT).

Hardware description

The proposed device employs two AS7265x Smart Spectral Sensors, whose spectral response is defined in a range from 410 nm to 940 nm, that is, allows to acquire channels from both the visible and the near infrared (NIR) spectrum. The AS7265x is made up of three sensors, the AS72651, the AS72652, and the AS72653, which are able to detect the light in the following 18 bands: 410 nm, 435 nm, 460 nm, 485 nm, 510 nm, 535 nm, 560 nm, 585 nm, 610 nm, 645 nm, 680 nm, 705 nm, 730 nm, 760 nm, 810 nm, 860 nm, 900 nm and 940 nm. The sensors’ data is recorded by an Argon development board from Particle, which is responsible for sending the data to the Internet through a WiFi connection. To receive the data properly in the Argon it is necessary to use a multiplexer (MUX) since the AS7265x sensors have the same address. In this way, the sensors are connected to the MUX and then, the MUX is connected to the Argon development board. The proposed device has a Nano Power Timer - TPL5110 that is responsible for turning off the power for the Argon development board. This possibility is important since the WiFi connection consumes a lot of energy, so the TPL5110 function is turning on the power only when the data is being sent to the Internet. In this way, it is possible to significantly extend the autonomy of the device. The Nano Power timer is connected in series between the battery and the Argon development board and it is programmed with a specific sampling time. This is how the Argon is turned on, and once the data is sent to the Internet the power is turned off, and the timer restarts. The battery has a 6Ah capacity and a nominal voltage of 3.7 V. An aspect that is worth highlighting is that by acquiring several channels the resolution is improved and the possibility of presenting metamerism is reduced. Which is considered an advantage over other elements such as spectrometers that generally work with a single band. Another main feature is the device’s versatility. The measurements taken by the sensors can be used for different applications and fields. For example, data obtained in real-time can be used for interacting with lighting control systems, and it can detect individual wavelengths from polychromatic sources. The data can also provide information on color rendering or other lighting quality measures since they can be used to estimate the ANSI/IES TM-30–18 fidelity and gamut indexes (), the color rendering index (CRI) (), the luminous efficacy of radiation (LER), correlated color temperature (CCT), etc. On the other hand, the Argon development board not only allows to send data to the Internet but to perform internal computations, which could be sent to a local device or directly to the cloud. Regarding autonomy, the battery provides 24 h for a sampling time of 4 s. If you want to increase autonomy, you must extend the period of time in which the sampling is carried out, for example, for 10 min it is around 10 days. Of course, this is possible thanks to the Nano Power timer. The device has also the possibility to be connected directly to power. Finally, the physical design was made by using computer-aided design tools (NX design) and Acrylonitrile butadienestyrene (ABS) was employed to print the parts. All the elements were then placed in a box, which, in addition to being commercial, has IP67 certification, that makes it suitable for use outdoors. The final device is displayed in Fig. 3-b. To reach the sensors, the light must go through the Caps. In this case, the caps allow to be able to record incident and diffuse lightning. The following are the advantages of the proposed hardware:
Fig. 3

a) 3D printed and electronic elements, b) The device in the final container.

Due to the design of the device and the chosen enclosure, it can be used outdoors. The device facilitates data collection and analysis for different applications, including architectural engineering, lighting control, occupational health, art work preservation, among others. The proposed hardware would allow the development of systems to make decisions in real time. Which could be used to improve visual performance and occupant satisfaction It can be integrated with intelligent building and lighting systems to perform tasks such as energy monitoring and polychromatic light control. The acquired data allows SPD recovery and detection of infrared radiation, that could be potentially harmful for humans.

Design files

Design Files Summary

Fig. 1 shows the wiring between the device electronic elements. The main components are the Particle Argon, the battery, Nano Power TPL5110, the Gravity Mux and the multi-espectral sensors AS7265x.
Fig. 1

Schematic.

The AssembledDevice displays a video of the finished device showing it from different perspectives. The BatteryCover aims to fix the battery. The SensorBox aims to hold the sensor and prevent it from moving. For this device, there are two sensors and consequently, two SensorBox pieces. The SensorSupport is the base on which the sensors are placed, and then fixed by the SensorBox. The SquareBase its the base that allows assembling the other parts of the device. The TopBase it’s the element on which the microcontroller and the battery are positioned. In the Basic_AS7265 file there is a C code to read the sensors and send the information to the cloud. The code can be changed for customization. The Schematic shows the electronic schematic of the device, the main components and their connections. Schematic.

Bill of materials

Build instructions

To begin with, a 3D printer is used to build the following elements: TopBase, SquareBase, SensorSupport, SensorBox, and BatteryCover. Both Polylactic acid (PLA) and Acrylonitrile butadiene styrene (ABS) are valid materials to generate the pieces, but in this case, ABS was employed. At this point, it is important to be careful with the printer resolution for the elements to fit perfectly. Once the pieces are printed, they must be located and fixed in the proper order. As it is possible to observe in Fig. 2 all the elements have holes specifically aligned to be able to assemble the entire device. For this purpose, stainless steel nuts and bolts are used. This material is chosen because it prevents corrosion and deterioration due to air humidity.
Fig. 2

View of the 3D printed elements. Blue: SquareBase, green: Topbase, yellow: SensorSupport, gray: BatteryCover, and red: SensorBox.

View of the 3D printed elements. Blue: SquareBase, green: Topbase, yellow: SensorSupport, gray: BatteryCover, and red: SensorBox. The first step to fit together all the parts is to assemble the Terminal and the Argon development board to the TopBase, and then fix the Mux to the wall at the extreme of this element. Attached to the Topbase is also the battery, which is located on the opposite side of the Mux. After these elements are positioned, it is possible to join the TopBase and the BaterryCover to the SquareBase and the Box, which is the final device enclosure. The next step is to place the sensors on the SensorSupport and secure each one with its corresponding SensorBox. The latter elements allow keeping the sensors in a fixed position and also allow the use of the different caps for the sensors. The AS7265 sensors are connected to a multiplexer (Mux) using Qwiic cables, then, the Mux is connected to the terminal block that holds the Argon development board. The Mux is required because the sensors have the same address, and they do not present the option to change it like other products on the market. After assembling the SensorBox to the SensorSupport, it is now possible to fix the SensorSupport to the SquareBase and to the Box. As shown in Fig. 2, the SquareBase has 4 holes, two of them allow to secure the TopBase and two allow to secure the SensorSupport. The Argon development board is connected to the terminal block, whose only purpose is to serve as its physical support and receive the signals provided by the sensors. The one chosen for the device is from Adafruit, nonetheless, it is possible to use a Feather one, because it has the same pin configuration and it has ports, Qwiic type connectors. In case of not having a terminal block, the cables from the MUX would be connected directly to the Argon. Finally, the nanopower is connected in series between the battery and the terminal block. Unlike the other elements, it is not attached to the Box or the other parts of the device. The complete enclosure assembly can be seen in the Fig. 3. a) 3D printed and electronic elements, b) The device in the final container.

Operation instructions

To use the proposed device first it is necessary registering on the Particle website and download its application. This app allows adding the device and setting it up, so the Argon development board is ready to receive instructions. For sending the program code it is available the Particle Build IDE, which is an online, browser-based portal where the code can be edited and send (https://build.particle.io/). Once the code is downloaded in the MCU, the WiFi credentials should be updated. There are two options to do this procedure, one is using the above mentioned app and the other option is to change the credentials by console. An important aspect to use the device is the cloud service to send the data. There are a lot of companies that offer this service, in this case, Ubidots was selected. However, if you want to change the company you must update the code and libraries according to the cloud service. In the case of choosing Ubidots as well, the token must be updated and ”ubienable” must be at 1 in the compilation directives (otherwise it must be at 0). Furthermore, for the data to be transmitted through the serial port, ”printenable” must be at 1. Regarding the transmission of the data, it is important to consider that having two sensors generates two data lines. For this reason, the data is sent as follows: In the first place, a number 01 or 02 is sent to specify which sensor the data corresponds to, secondly a timestamp is transmitted (milliseconds and UTC unix), next the 18 sensed bands are transmitted, and finally, two values of temperature are given (each AS7265 sensor has two temperature sensors). In the file AS7265_data_line_example.txt, an example of a data line is presented. It is important to keep in mind that the device works autonomously if necessary or can be connected directly to the energy. Once the device is connected to a WiFi network, and is properly located to acquire the data, it is only a matter to check the information on the web and using the data according to the application. In case the user wants to make calculations directly in the Argon development board, the program code should be customized.

Validation and characterization

In order to validate the uniformity of the measurements taken by the proposed device, one of the ASTM G-173–03 solar spectra was used [8]. This is a reference standard developed by the photovoltaic industry in conjunction with the American Society for Testing and Materials (ASTM). The solar spectrum varies for different aspects such as geographic location and time of day. However, the ASTM spectra have become an important reference as it provides appropriate standard spectral irradiance distributions for determining the relative optical performance of materials, solar thermal, solar photovoltaic, and other systems. Data were collected with the proposed Portable low-cost IoT hyperspectral acquisition device, for which it was placed in the sun for 4 full days. The device recorded data from 6 am to 6 pm, with a sampling frequency of 4 s, and were acquired using two types of caps, a flat (Cap1 - Sekonic Lumidisc) and a spherical one (Cap2 - Sekonic Lumisphere), for measuring diffuse and incident illumination. Once you have the data recorded by the device, the maximum is found and a normalization is performed. This procedure is carried out for each day. Then, the goal is to find the coefficients that allow the recorded and normalized data to fit the ASTM spectrum. The calculated coefficients are presented in Table 1. The estimation of the coefficients was carried out independently for each day, as it can be seen in the Table. Nevertheless, the coefficients are very similar between days, and consequently, it would be possible to estimate the coefficients employing a single day data. In Table 1 the column represents each of the 18 bands available in the AS7265, and to estimate the scale factor the value of the ASTM curve was interpolated in the central wavelengths of each of those bands.
Table 1

Coefficients. The colors are associated to each of the AS7265x internal sensors.

Coefficients. The colors are associated to each of the AS7265x internal sensors. It is important to note that in Table 1, only diffuse lighting data were used and therefore the coefficients were calculated to fit the diffuse ASTM spectrum. This was due to the location of the device, since it was not possible to record the incident lighting throughout the day, and therefore the complete data was not available to make an adequate validation. In Fig. 4 there are two examples. In this case, the Figure displays the signal from the ASTM spectrum (), the bands registered by each of the AS7265x internal sensors and the signal estimated with the coefficients from the bands obtained with the device (). it is also the interpolated value of the curve but in the bands available in the AS7265.
Fig. 4

Comparison of the photodetector response with the ASTM Sun.

Comparison of the photodetector response with the ASTM Sun. As mentioned, the AS7265x is composed of three internal sensors (AS72651, AS72652, AS72653) with different spectral responses. In Fig. 4 the response of each internal sensor is shown in blue, red, and green respectively. In this sense, it should be noted that the second and third sensors have overlapping channels. Sensor AS72652 detects 560 nm, 585 nm, 645 nm, 705 nm, 900 nm, and 940 nm bands; while the AS72653 acquires 610 nm, 680 nm, 730 nm, 760 nm, 810 nm, and 860 nm. Furthermore, in the figure it can be seen that each photodetector has a trend in its response. On the other hand, in Table 1 it is observed that the gain or the scale factor for the adjustment has a trend for each photodetector. The relevance of finding the scale factor for each band of a source like the Sun is that it is one of the best (or the best) source as a spectral component since it has power in as many bands as possible. The scale factors found in this preliminary test can be retained for the measurement or estimation of spectra from other types of sources. Finally, in Fig. 5 the progress of the spectrum in two days is presented. The values for each band were adjusted with the respective scale factors in Table 1. The curves are presented between 6 in the morning and 6 in the afternoon, where the strong changes are due that the device was located inside, facing west, and therefore the radiation increases significantly with the afternoon Sun. An important observation of the graphs is that the stability of the detectors response is observed, the curve is smooth and the Sun’s profile is maintained throughout the day. Observing a source like the Sun in spectral bands is very useful since it allows to know specific changes and not only measure the total power as it is done with a pyranometer. This information is relevant to estimate with greater precision the generation of photovoltaic systems, estimate radiation indices that affect life, among others.
Fig. 5

Evolution of the weighted response of the sensor over the course of the day.

Evolution of the weighted response of the sensor over the course of the day.

Energy consumption

As is well known, one of the most important aspects of IoT devices is related to their autonomy, which in turn is linked to energy consumption. The greatest energy absorption occurs when making the WiFi connection so that the Argon can transmit the data to the Internet. Usually, the WiFi connection is the one that takes the longest time, after having the connection the data is acquired and sent to the cloud. In this sense, the consumption peak is at an average value of 450mW, as can be seen in Fig. 6. The approximate time for WiFi attaching, sensors reading, and sending data to the cloud, including confirmation, is 15 s, however this time may vary according to the quality of the Internet connection.
Fig. 6

Device power consumption.

Device power consumption. For energy management it was necessary to take into account that the Argon Particle does not have an efficient low power consumption system. This MCU cannot be pulled out of SLEEP MODE DEEP with a timer, it can only be woken up from SLEEP MODE DEEP with a high level on pin D8. For this reason, it was decided to include the Nano power TPL5110 device, which is basically a timer coupled to Mosfet that allows controlling an output load, which in this case corresponds to the proposed device, as can be seen in Fig. 1. The Nano power timer is configured with the deep switch for different time values that would affect the sampling of our system. The time values can be found in [9]. Additionally, Fig. 6 shows an example of consumption when switch B is on for a 1 m timer. The proposed system can be used in two different ways, sending the data to the cloud or sending the data directly through the USB port. Mode 1 corresponds to USB transmission, while Mode 2 corresponds to data transmission via WiFi. In practice, evaluating battery power consumption only makes sense in wireless mode (WiFi), since the Argon requires connectivity to the Particle cloud and attachment to the router. The amount of time that the device is on also depends on the network and the web services quality. Once the data transmission is finished, in any of the modes, the Argon sends a signal to the Nano power to deactivate the device. The main features and limitations of the proposed device are: The device must be charged periodically. Its autonomy depends on the sampling time, e.g. for 4 s the autonomy is 24 h, for 5 min it is around 465 h, this due to the use of Nano power. The number of measured channels is limited and they are not evenly distributed. This feature depends on the detectors available on the market. The device can be used to make power measurements in the visible spectrum, according to the channels allowed by the sensors. The device can simultaneously measure incident and diffuse radiation using two different caps. This allows to obtain more information from the evaluated source. The device has the possibility to be integrated to other systems (for monitoring or control) through the WiFi connection. The device integration to the cloud implies that the program can be transferred by OTA (Over-The Air), which allows making adjustments without having to uninstall it or going to the measurement site. The updates could be done remotely and from anywhere in the world where there is an Internet connection.

Human and animal rights

No human or animal studies were conducted in this work.

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Hardware namePortable low-cost IoT hyperspectral acquisition device
Subject area

Engineering

Instrumentation

Colorimetric measures

Internet of things

Hardware type

Measuring physical properties and in-lab sensors

Field measurements and sensors

Electrical engineering and computer science

Open source licenseCreative Commons Attribution-ShareAlike license
Cost of hardware271.95 USD
Source file repositoryhttps://doi.org/10.17605/OSF.IO/WVUQ9
Design file nameFile typeOpen source licenseLocation file
AssembledDevice.mp4GNU General Public License (GPL) 3.0https://osf.io/5n8gq/
BatteryCover.stlGNU General Public License (GPL) 3.0https://osf.io/g5mdy/
SensorBox.stlGNU General Public License (GPL) 3.0https://osf.io/n8zfv/
SensorSupport.stlGNU General Public License (GPL) 3.0https://osf.io/hnqb9/
SquareBase.stlGNU General Public License (GPL) 3.0https://osf.io/rcde5/
TopBase.stlGNU General Public License (GPL) 3.0https://osf.io/wmh6p/
Assemble.stepGNU General Public License (GPL) 3.0https://osf.io/v67au/
Basic_AS7265.inoGNU General Public License (GPL) 3.0https://osf.io/jgm67/
Schematic.epsGNU General Public License (GPL) 3.0https://osf.io/vskcg/
DesignatorComponentQtyUnit costTotal costSource of MaterialsMaterial type
AS7265Spectral sensor2$64.95 USD$129.9 USDwww.sparkfun.com/Other
ArgonArgon Particle1$27.92 USD$27.92 USDhttps://store.particle.io/products/argon/Other
TerminalTerminal Block1$14.95 USD$14.95 USDhttps://www.adafruit.com/product/2926Other
MuxGravity1$6.9 USD$6.9 USDhttps://tinyurl.com/yfjwxyklOther
CableQwiic cable2$1.5 USD$3 USDwww.sparkfun.com/Other
NanopowerNano Power Timer - TPL51101$5.95 USD$5.95 USDwww.sparkfun.com/Other
Cap 1Sekonic Lumidisc1$12.49 USD$12.49 USDhttps://www.bhphotovideo.comOther
Cap 2Sekonic Lumisphere1$11.95 USD$11.95 USDhttps://www.bhphotovideo.comOther
Cap 3Sekonic Lumigrid1$11.95 USD$11.95 USDhttps://www.bhphotovideo.comOther
BatteryLithium Ion Battery(6Ah)1$29.95 USD$29.95 USDwww.sparkfun.com/Other
BoxDevice enclosure1$16.99 USD$16.99 USDwww.amazon.com/Other
  1 in total

1.  Portable low-cost open-source wireless spectrophotometer for fast and reliable measurements.

Authors:  Katrina Laganovska; Aleksejs Zolotarjovs; Mercedes Vázquez; Kirsty Mc Donnell; Janis Liepins; Hadar Ben-Yoav; Varis Karitans; Krisjanis Smits
Journal:  HardwareX       Date:  2020-04-18
  1 in total
  1 in total

1.  A Low-Cost Luxometer Benchmark for Solar Illuminance Measurement System Based on the Internet of Things.

Authors:  Omar Guillán Lorenzo; Andrés Suárez-García; David González Peña; Manuel García Fuente; Diego Granados-López
Journal:  Sensors (Basel)       Date:  2022-09-20       Impact factor: 3.847

  1 in total

北京卡尤迪生物科技股份有限公司 © 2022-2023.