Next Article in Journal
Physiological Comparison of Wheat and Maize Seedlings Responses to Water Stresses
Previous Article in Journal
Multi-Decadal Mapping and Climate Modelling Indicates Eastward Rubber Plantation Expansion in India
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Toward Sustainable Gentle Awakenings and Sleep Inertia Mitigation: A Low-Cost IoT-Based Adaptable Lighting and Temperature Control Approach

Department of Electrical Engineering, Chung-Yuan Christian University, 200 Chung-Pei Road, Chung-Li District, Taoyuan 32023, Taiwan
*
Author to whom correspondence should be addressed.
Sustainability 2022, 14(13), 7928; https://doi.org/10.3390/su14137928
Submission received: 5 May 2022 / Revised: 24 June 2022 / Accepted: 24 June 2022 / Published: 29 June 2022
(This article belongs to the Section Sustainable Engineering and Science)

Abstract

:
In this paper, our design aims to assist in sleep inertia reduction and avoid the startle response and irritation caused by alarm-made unpleasant wakeup stimuli. Thus, we propose an approach that employs a soft and alerting sunrise simulation, conditionally utilizes natural light, and appropriately lowers the bedroom temperature for awakening a sleeper tenderly and gradually to gain full alertness. This approach is inspired by known scientific implications confirming the effectiveness of lights and temperatures on wakefulness. In this regard, we present an economical do-it-yourself digital tech-assisted system for bedroom lighting and temperature control. The system design is based on the smartphone and Internet of Things (IoT) technology. We develop the hardware and software in the system for implementing three IoT-based control tasks. One is the tuning of artificial light brightness using the pulse width modulation technique. Another is the opening of the window curtain using stepper motor control and light detection. The other is the activation of the air-conditioning setting using an infrared remote control and temperature detection. We construct a testbed for conducting experiments. Experimental results demonstrate that the proposed system can execute task requirements satisfactorily. The proposed system is promising for achieving our goal. It embodies features of sustainability.

1. Introduction

In our daily experience, having a comfortable and relaxing morning awakening can usually make us feel refreshed. Consequently, it may in turn enhance work/study efficiency throughout the day. However, a lot of people may complain and feel irritated and drowsy if they are awakened by means of undesirable stimuli (e.g., the loud sound of traditional alarm clocks). More unpleasant experiences (e.g., behavior and safety problems) are likely to occur among adolescents and students with deep sleep and being suddenly shocked into awakening. Alerstedt et al. [1] indicated that sleep and wakefulness are two distinct behavior states that differ in terms of muscular and neuronal activity and consciousness. In addition, the transition from sleep to waking involves physiological operations that yield a new behavior state although wakeups intrinsically change as a function of several factors such as circadian phase, age, and sleep quality. This indication, together with the aforementioned experiences, suggests that sudden awakenings essentially lead to abrupt changes in melatonin and cortisol levels and neurotransmission rates that could cause agitating feelings and sleep inertia. Accordingly, our daily morning awakening ritual is a vital event that potentially has a great impact on wellbeing and work performance. It is logical to support the idea of gentle awakenings closer to wakefulness.
Light can enter the eyes even though eyelids are closed during sleep. It stimulates the retina to send a signal down to a nerve tract to the circadian clock in the brain. In this regard, numerous studies (e.g., [2,3,4] and references in [5]) have shown that light plays a crucial role in affecting circadian rhythm and human health. Boivin et al. [2] demonstrated that humans are quite sensitive to light, and even dim indoor room light can significantly influence the circadian clock. Czeisler et al. [3] showed that bright light can reset the human circadian pacemaker. Blume et al. [4] indicated that light has an effect on sleep and mood, which in turn affects health. Moreover, early morning exposure to light was found to decrease the secretion of melatonin (e.g., [2]) and increase cortisol levels (e.g., [6,7]), thus mitigating morning drowsiness. Similarly, artificial dawn awakenings in healthy persons can result in enhancing wakefulness, which reduces sleep inertia complaints (e.g., [8,9,10]). Hilditch et al. [11] also indicated that light can be utilized as a countermeasure to sleepiness. These findings imply that artificial/natural light makes awakening and wakefulness easy.
Krauchi et al. [12] showed that thermoregulation has an impact on the decay of sleepiness. Thus, some studies (e.g., [11,12]) have suggested that the regulation of ambient temperature may be useful for counteracting sleep inertia. Heat tends to make people feel fatigued and drowsy. In contrast, when you are cold, your body needs to work harder to retain its warmth, which keeps you more alert. Therefore, it is plausible that an adequate drop in the bedroom temperature within a short period of time may effectively trigger gentle awakenings and expedite the dissipation of sleepiness.
In this paper, our design aims to assist in sleep inertia mitigation and avoid the startle response and annoyance caused by alarm-made unpleasant wakeup stimuli. To tackle the problem, the innovation of a gentle and inexpensive awakening scheme that can enhance one’s wellbeing is vital. Thus, we propose an approach that employs a soft and alerting sunrise simulation, utilizes natural light if applicable, and appropriately lowers the bedroom temperature for awakening a sleeper tenderly and gradually to gain full alertness. This approach is inspired by the abovementioned scientific implications and the advice in [13,14,15] that lighting design in rooms and buildings has to take health issues into account. Moreover, this approach is proposed herein because it seems promising for achieving the design goal and improving one’s wellbeing. In this regard, we present an economical digital tech-assisted system for adaptable bedroom lighting and temperature control. We herein make the overall design process of the proposed system accessible to everyone for do-it-yourself (DIY) implementation. The proposed system design is focused on simplicity, low-cost implementation, easy maintenance, high reliability, and convenient personalization and expandability.
In recent years, many research and development efforts have already been made on enabling technologies for Internet of Things (IoT) (e.g., [16,17]) to support various applications, including the improvement of the quality of life (e.g., home services in [18,19,20] and parking systems in [21]), the enhancement of economic growth (e.g., irrigation systems in [22] and supply chains in [23,24]), and the advancement of environmental sustainability (e.g., big data analytics in [25]). Moreover, the integration of wireless sensor networks and IoT has been proposed for environmental condition sensing and monitoring (e.g., [26,27,28]). In particular, a smartphone has been integrated with an IoT platform for providing personalized services (e.g., [29]) because it has been a common personal mobile communication device. In addition, a smartphone has a built-in function of playing relaxing music. This function can be set up and activated at the alarm time as pleasant noise to lower the stress level of the user after an awakening, which may help reduce sleep inertia. Hence, the advantages of the aforementioned practices motivate us to achieve our design goal using the smartphone and IoT technology.
In this study, we employ the Node MicroController Unit (NodeMCU) [30], equipped with inexpensive and powerful IoT-enabling digital technologies, for connecting to a smartphone through Wi-Fi and performing lighting and temperature control. This choice is made because the NodeMCU is suitable for our system design and much cheaper than other microcontrollers available in the market (e.g., the Raspberry Pi used in [29]). Bluetooth devices are not used herein because they can be easily disconnected with the interference of environmental noise. Although a feedback control approach for adjusting lighting levels in buildings has been proposed in [31], its performance, however, depends on the quality of a photodetector used in the feedback loop of the lighting output. To avoid this drawback, we utilize an open-loop pulse width modulation (PWM) technique for a dawn simulation. This simulation starts with stably tuning one yellow color light tube to mimic the gradual transition of yellow light color and intensity of sunrise and then turns on one white color light tube as soon the yellow color light tube is switched off. The tender yellow light stimulus from a simulated dawn can help a sleeper prepare the body out of deeper sleep stages and closer to wakefulness. Hence, this artificial process is scheduled to take place in an adjustable span of 5–15 min prior to the alarm time that the white color light tube is turned on and the smartphone plays relaxing music. Unlike [29,32,33], the bright white light is also adopted in our design as an awakening stimulus because it has alerting attributes and can subdue any ongoing melatonin production. Based on findings, waking up to natural light is the best. This condition together with the idea of climate-based daylight utilization in the interior room design in [34] motivates us to incorporate stepper motor control and light detection into our design for opening window coverings at the alarm time. To appropriately drop the bedroom temperature during the dawn simulation, we choose air conditioning because air conditioners are among the most common electrical appliances in homes within many countries and can effectively cool down a room. We first utilize a sensor for reading the ambient temperature at the beginning of the dawn simulation as a referenced value. Then, a desired temperature is the result of subtraction of a prescribed degree of temperature drop from the referenced value. Subsequently, the air conditioner is activated and associated with the desired temperature setting using an infrared remote control.
We build a testbed for conducting experiments. The total cost of the testbed (excluding the smartphone and the air conditioner) is no more than USD 32.00. The experimental results substantiate the consistency between the quantitative data and qualitative observations of the proposed system for performing a sunrise simulation, curtain opening, and bedroom temperature drop. The outcomes confirm that the system performance can reliably satisfy our design requirements.
Overall, the proposed system is promising for achieving our design goal. In addition, it embodies the environmental, economic, and social aspects of sustainability (e.g., [35]). Specifically, the proposed system is eco-friendly. It is sustainable from the economic perspective since it is affordable and can be easily maintained. In the social aspect, the proposed system promotes health, and the system construction is inexpensive and accessible to everyone, which implies equity in the opportunity of DIY implementation.
In comparison with the existing lighting systems that are closely related to our work, the advantages and disadvantages of the proposed system are given as follows. Distinct from other existing lighting systems, the proposed system performs lighting regulation and temperature control. In this way, the proposed system can help achieve our design goal more effectively. Our system design can yield a high-quality dawn simulation superior to the method for a sleep care system in [29] in which light brightness is only partitioned into five prespecified levels. The proposed DIY design and various sunrise alarm clocks available commercially in [30] have the same purpose of performing an excellent dawn simulation. They are more sophisticated than the awakening stimulus control system in [33]. The proposed design is distinct in many aspects from those in [32,33] in accordance with the design method and system functions. For instance, sunrise alarms in [32] and the system in [33] were standalone and lacked expandable features for home automation, so they cannot incorporate the utilization of natural light. The proposed design is also distinguished from the methods in [36,37], which only control the on/off switch of lighting equipment. Because the proposed system employs the HTTP protocol for the internet connection, its drawback is that no internet security protection is applied. As such, the proposed system may break down due to cyberattacks. To cope with the problem, plausible approaches may include the incorporation of cryptographic techniques or attack-resilient control methods into the software design of the proposed system.
We summarize our contribution in the following.
  • We develop a new low-cost adaptable bedroom lighting and temperature control system based on the smartphone and IoT technology.
  • The proposed system performs a soft and alerting dawn simulation, conditionally makes use of natural light, and adequately cools the bedroom down.
  • The proposed system is promising for effectively achieving sustainable gentle awakenings and assisting in sleep inertia reduction.
  • The proposed system aligns with the values of sustainability, such as environmental friendliness, economic viability, and positive social development.
The rest of the paper is organized as follows. In Section 2, we present the proposed system and the design of hardware and software. In Section 3, we describe the experimental setup and provide experimental evaluations of the proposed system on performance reliability. In Section 4, we discuss the results, findings and future works.

2. Materials and Methods

We briefly recapitulate our design goal, proposed approach, rationale, and implementation method as follows. Our design aims to awaken a sleeper gently and help to reduce sleep inertia. In this respect, we propose an approach that conducts a soft and alerting dawn simulation, conditionally utilizes natural light, and moderately cools the bedroom down for awakening a sleeper progressively to be alert. This approach is promising for attaining our design goal because it is proposed in accordance with known scientific findings confirming the effectiveness of lights and temperature on human wakefulness. As mentioned previously, IoT plays an important role in sustainability. So, to implement the proposed approach, we present an IoT-based adaptable bedroom lighting and temperature control system.
In the sequel, we introduce the main function, hardware and software development of each unit in the proposed system.

2.1. Functional System Structure

The proposed system framework is composed of a sunrise simulation and temperature control alarm app (SSTCAA), SSTCAA database, NodeMCU, real-time clock (RTC), controllable lamp illuminance (CLI) unit, controllable daylight utilization (CDU) unit, and temperature control (TC) unit. The interconnection between functional units is illustrated in Figure 1.
The SSTCAA on the smartphone is created for setting up the on/off status of the alarm, alarm time, sunrise simulation duration in the CLI unit, the on/off status of the window curtain opening in the CDU unit, and the on/off status of the air conditioner and the degree of temperature drop in the TC unit. As soon as the data on the SSTAA are submitted, they are stored in the NodeMCU and the SSTCAA database.
The SSTCAA database is created for information storage and retrieval. It is useful for the analysis of stored data.
The NodeMCU serves as the central control center for the proposed system. It provides very low-price and powerful IoT-enabled digital technologies consisting of an open-source software and hardware development environment and a system-on-a-chip called the ESP8266. It has built-in support for Wi-Fi connectivity, output pins for general purpose input/output (GPIO) and PWM, and an input pin for analog-to-digital conversion (ADC). Because the NodeMCU is equipped with those functions, it can be programmed to connect to the app and RTC, activate the CLI unit, optionally turn on the CDU unit, and switch on the TC unit.
The RTC is the DS1302 timekeeping chip. It provides the time information for the NodeMCU to access constantly so as to perform tasks timely based on the SSTCAA data. In this manner, the operations of the proposed system can continue even if the smartphone is powered off or set in airplane mode.
The main function of the proposed CLI unit is the sunrise illuminance simulation. The CLI unit gives off a yellow light color from dim to bright, and finally yields the bright white light color. The activation of the CLI unit is mandatory if the alarm is set “ON.”
The main function of the proposed CDU unit is to optionally make use of natural lights. The CDU unit detects the outdoor daylight illuminance and conditionally opens window coverings using stepper motor control.
The main function of the proposed TC unit is to lower the bedroom temperature. The TC unit detects the ambient temperature and switches on the air conditioner using an infrared remote control to yield a prescribed degree of the bedroom temperature fall.

2.2. Creation of the SSTCAA and SSTCAA Database

We employ MIT App Inventor [38], a cloud-based web application integrated development environment (IDE), for creating the SSTCAA that can run on a smartphone. Once the SSTCAA is built, the SSTCAA database is automatically created on the smartphone.
The web editor of MIT App Inventor uses a graphical user interface that allows us to drag and drop visual objects to build our functional app. As such, it makes the app development easy. We access the MIT App Inventor on a computer and smartphone using the same user account. Once the app is built or modified on the computer, it is updated in the cloud and on the smartphone simultaneously.
We utilize visual tools on the web editor for the display design of the label, button, time picker, textbox, and background color of the app. Thus, the appearance layout of the SSTCAA is depicted in Figure 2. It is intuitive to use the SSTCAA.
We use visual programming items on the web editor for the functional development of the SSTCAA. The functional tasks of the SSTCAA are listed as follows.
  • Store the data displayed on the SSTCAA and internet protocol (IP) address of the NodeMCU.
  • Calculate the starting time of the sunrise simulation as
    S t a r t i n g   t i m e   o f   s u n r i s e   s i m u l a t i o n = A l a r m   T i m e T i m e   s p a n   o f   s u n r i s e .
  • As soon as the “Submit” button is pressed, data displayed on the SSTCAA, the time stamp, and the result of (1) are sent to and stored in the NodeMCU via the Wi-Fi IP address of the NodeMCU. They are also stored in the SSTCAA database.

2.3. Hardware Implementation in the CLI Unit

The hardware in the CLI unit of this study consists of two Tube LED 5630 (one yellow light and one white light) and two negative impedance converters (NICs). The connected hardware in the CLI unit is shown in Figure 3.
As shown in Figure 3, the two NICs are constructed based on the selected resistors and HA17458 series dual operational amplifiers. An NIC is employed due to the following reasons: The “ON” output signal voltage of a PWM pin of the NodeMCU is 3.3 V, whereas the “ON” input signal voltage of the Tube LED 5630 requires 8.65 V. Therefore, the control of each Tube LED from the NodeMCU needs an NIC to perform the voltage conversion from 3.3 V to 8.65 V herein.

2.4. Hardware Implementation in the CDU Unit

The hardware in the CDU unit of this study consists of one stepper motor 28-BYJ, one stepper motor driver ULN2003, one window curtain, and one photoresistor TEMT6000. The connected hardware in the CDU unit is shown in Figure 4.
As shown in Figure 4, the stepper motor has four input connections, each of which needs a signal of 12 V to activate the motor. The outputs of the stepper motor are constant steps for opening a window curtain. A GPIO pin of the NodeMCU can only output an “ON” signal of 3.3 V. Therefore, the control of the stepper motor from the NodeMCU requires a stepper motor driver, which has four pairs of input–output connections, with each pair performing a signal voltage conversion from 3.3 V to 12 V. The photoresistor constantly provides analog data for the NodeMCU on the amount of outdoor light. Since the NodeMCU can only use digital data for light illuminance detection, the output of the photoresistor is connected to the ADC pin of the NodeMCU.

2.5. Hardware Implementation in the TC Unit

The hardware in the TC unit of this study consists of one infrared transmitter KY-005, one air conditioner Ho-562N/HI-56B, and one temp-humidity sensor DHT-22. The connected hardware in the TC unit is shown in Figure 5. The air conditioner is chosen herein because it is among the most common electrical appliances in homes within many countries and can cool down a room fast.
As shown in Figure 5, the infrared transmitter has one input connection with a GPIO pin of the NodeMCU. Its outputs are PWM signals for commanding the activation and the temperature setting of the air conditioner. The temp-humidity sensor constantly provides the amount of the bedroom temperature for the NodeMCU. In this study, we only use the detected temperature at the starting time of sunrise simulation (i.e., the result of (1)).

2.6. Software Implementation in the NodeMCU

The NodeMCU is programmed to connect to the SSTCAA and RTC and control the CLI, CDU, and TC units. In this respect, we write code in the open-source Arduino IDE [39]. The source code for connecting the RTC and controlling the CLI, CDU, and TC units is subsequently uploaded to the NodeMCU.

2.6.1. Wi-Fi Connection Setup

The initial task of the NodeMCU is to build its Wi-Fi connectivity. To do so, we incorporate the name and password of the Wi-Fi used on the smartphone and the utilization of the ESP8266Wi-Fi library into our source code. Once the code is run in the Arduino IDE, the NodeMCU is connected via Wi-Fi and its IP address is generated. Then, we store the IP address of the NodeMCU in the SSTCAA previously created. This function enables the NodeMCU to receive data from and send acknowledgments to the SSTCAA via Wi-Fi.

2.6.2. RTC-Enabled Task Execution Procedure

The NodeMCU is programmed to access the time from the RTC constantly. Meanwhile, if the alarm is set “On”, then the sunrise simulation algorithm for controlling the CLI unit and the temperature control algorithm for controlling the TC unit are enabled when the RTC time matches with the starting time of sunrise simulation given by (1), and the window curtain opening algorithm for controlling the CDU unit is enabled when the RTC time coincides with the alarm time. We summarize the RTC-enabled task execution procedure as the flowchart and pseudocode shown in Figure 6.

2.6.3. Program-Controlled CLI Unit

The sunrise simulation mimics yellow and white sunlight colors. A range of soft yellow lights can gently stimulate the body out of deeper sleep stages, whereas bright white light has alerting properties and can suppress any remaining melatonin production. Thus, the sunrise simulation starts with a gradual yellow light transition from dim until the bedroom is filled with soft bright yellow LED lights in the time span of sunrise of 5–15 min prior to the wakeup time. Henceforth, it disconnects the bright yellow LED light and turns on the bright white LED light. The white LED light stays on until the user switches it off.
To conduct the sunrise simulation, we control the CLI unit using the PWM technique. In this regard, the NodeMCU is programmed in the following way to send PWM signals via PWM pins to control the yellow and white LED lights.
  • Based on the default 8-bit time period of the PWM signal of the NodeMCU, the range of yellow lights is partitioned into 0–255 levels. Given the time span of sunrise (min), the time duration of each yellow light level is given by
    T i m e   d u r a t i o n   o f   e a c h   y e l l o w   l i g h t   l e v e l   ( m s ) = T i m e   s p a n   o f   s u n r i s e   ( min ) × 60 × 1000 255 .
The duty cycle of the PWM signal (i.e., the “ON” time percentage) for the i th yellow light level, i = 0 , 1 , , 255 , is given by
D u t y c y c l e _ i   ( p e r c e n t a g e ) = i 255 × 100 .
The value of each duty cycle in (3) holds for the time duration in (2). After the time duration of the 255 th light level expires, the yellow light is turned off as no PWM signal is generated.
As soon as the yellow LED light is switched off, the white light level is set as 255, which implies the corresponding duty cycle of the PWM signal is 100. The value of the light level holds until the user issues an “OFF”command to the NodeMCU via the smartphone. The overall yellow and white LED light levels are illustrated in Figure 7.
Accordingly, the sunrise simulation is carried out as follows. The yellow LED light is turned on at the time given by (1). The intensity of the yellow light is gradually increased based on (2) and (3) until it reaches the maximum at the alarm time. The white light is turned on when the yellow light is turned off immediately right after the alarm time. We summarize the sunrise simulation algorithm as the flowchart and pseudocode shown in Figure 8.

2.6.4. Program-Controlled CDU Unit

To utilize natural lights as additional assistance for morning awakenings, we control the stepper motor in the CDU unit. Instead of employing the sophisticated control strategy in [40], the NodeMCU is programmed in the following way:
  • If the status of Open Curtain is “ON”, and the detected outdoor illuminance received from the ADC pin exceeds a predefined threshold at the alarm time, then the NodeMCU issues signals via four GPIO pins to control the steps of the stepper motor. Specifically, the stepper motor driver receives four pulses sequentially in each periodic interval (i.e., 16ms), as shown in Figure 9, each of which holds for 4 ms and is sent from a distinct GPIO pin of the NodeMCU. The total number of motor steps (or periodic intervals) is predefined for fully opening the window curtain.
Based on the abovementioned operations of stepper motor control and outdoor light detection, we summarize the window curtain opening algorithm as the flowchart and pseudocode shown in Figure 10.

2.6.5. Program-Controlled TC Unit

To lower the bedroom temperature, the NodeMCU is programmed in the following way:
  • If the status of Air Conditioner is set “ON”, then we get the ambient temperature from the temp-humidity sensor denoted as “Detected temp”. Then, a desired temperature denoted as “Desired temp” is the result of subtraction of a prescribed degree of temperature drop denoted as “Degree of temp drop” from “Detected temp”, namely,
    D e s i r e d   t e m p = D e t e c t e d   t e m p D e g r e e   o f   t e m p   d r o p .
Next, the air conditioner is activated and associated with the desired temperature setting “Desired temp” using an infrared remote control.
Based on the abovementioned operations, we summarize the temperature control algorithm as the flowchart and pseudocode shown in Figure 11.

3. Results

Based on the proposed system development in Section 2, we build the testbed in a laboratory environment shown in Figure 12 for experimental purposes. We demonstrate that the CLI, CDU, and TC units yield desirable performance.

3.1. Experiment Setup

We consider the SSTCAA settings listed in Table 1 and illustrate their effects on the sunrise simulation in the CLI unit and the bedroom temperature regulation in the TC unit. These settings and the photoresistor detection output at the alarm time can be used to show their effects on the activation of the curtain opening in the CDU unit.
We have the following arrangement to undertake a quantitative analysis for characterizing the qualitative performance of the CLI, CDU, and TC units.
To stand for a light level in the CLI unit within the time duration given by (2), we use its corresponding average current in the Tube LED. To obtain the average current, we connect the negative terminal of the Tube LED to a 1 Ω resistor whose negative terminal is attached to the ground and then measure the voltage of the resistor using the Instek GDS-1072A-U 2-channel digital storage oscilloscope.
To identify the opening of the window curtain in the CDU unit, we use the total number of motor steps that the stepper motor takes. The predefined total number of motor steps that the stepper motor can fully open the window curtain is 1517.

3.2. Performance of the CLI Unit

For Case A in Table 1, the sunrise simulation in the CLI unit is properly conducted. Figure 13 shows the quantitative data of the CLI unit for Case A. The average current in the Tube LED (yellow light) in Figure 13a increases linearly starting at 5:50 (i.e., starting time of the sunrise simulation) until 6:00. Moreover, the average current in the Tube LED (white light) in Figure 13b makes an abrupt change from zero to the maximum at 6:00. The outcome in Figure 13a coincides with the observation that the Tube LED (yellow light) yields a gradual increment of light levels from dim to bright during the 10-min time span of sunrise. In addition, the result in Figure 13b matches with the phenomenon that the white LED light switches on at 6:00 as soon as the yellow LED light is turned off.
For Case B in Table 1, the sunrise simulation in the CLI unit is adequately performed. Figure 14 quantifies the results for Case B, which are similar to those for Case A except that the yellow light level begins at 5:45. The numerical results in Figure 14 and quantitative observations are consistent.
For Case C in Table 1, the sunrise simulation in the CLI unit is disabled because Alarm is set as “OFF”. So, no average currents exist in the two Tube LED lights. This outcome agrees with the observation that when the alarm is set as “OFF,” it overrides the activation of the two Tube LED lights.
Accordingly, the quantitative outcomes and the qualitative observations of the CLI unit are consistent, which ensures that the sunrise simulation performs reliably and satisfactorily.

3.3. Performance of the CDU Unit

Because Alarm and Open Curtain in Case A are set as “ON”, the activation of the curtain opening in the CDU unit mainly relies on whether the photoresistor detection output at the alarm time exceeds the threshold. Thus, for Case A in Table 1, we consider the photoresistor outputs shown in Figure 15, in which one exceeds the threshold, and the other is below the threshold at the alarm time of 6:00.
Figure 16 shows the numerical data of the stepper motor in the CDU unit in Case A along with the result presented in Figure 15. Figure 16a indicates that the stepper motor can operate at 6:00 until the total number of motor steps reaches the predefined value of 1517. This outcome agrees with the observation that the window curtain starts opening at 6:00 until it is fully opened. Meanwhile, Figure 16b shows that the stepper motor is not activated at 6:00. This outcome coincides with the phenomenon that the window curtain remains closed.
Regardless of the photoresistor outputs, the window curtain remains closed for Cases B and C in Table 1 because Open Curtain in Case B and Alarm in Case C are set as “OFF”. To quantify that observation, we consider the photoresistor outputs shown in Figure 17 in which both exceed the threshold at the alarm time of 6:00.
No numerical data of the stepper motor in the CDU unit can be obtained for Cases B and C along with the results presented in Figure 17. It indicates that the stepper motor is not activated even though the photoresistor outputs are above the threshold at 6:00. This outcome coincides with the phenomenon that the window curtain remains closed throughout for Cases B and C.
Accordingly, the numerical outcomes and the qualitative observations of the CDU unit are consistent. Moreover, they confirm that the opening of the window curtain in the CDU unit is reliable.

3.4. Performance of the TC Unit

In the following, we show the experimental results of the TC unit based on Table 1 and verify their validity.
Because the status of Air Conditioner in Case A is set as “OFF”, the bedroom temperature detected by the temp-humidity sensor almost stays unchanged, as shown in Figure 18.
Since the status of Alarm and Air Conditioner in Case B is set as “ON”, the air conditioner turns on to lower 3 °C from the bedroom temperature at the starting time of sunrise. The result is depicted in Figure 19. It shows the TC unit operates reliably.
Because the status of Alarm for Case C is set as “OFF”, the TC unit is not activated. This yields a result with a trend similar to that in Figure 18. So, the result is omitted.
The outcomes shown in Figure 18 and Figure 19 have confirmed that the operations of the TC unit are valid.

4. Discussions

In this paper, we develop an inexpensive IoT-based bedroom lighting and temperature control system based on known scientific findings confirming the effectiveness of lights and temperatures on human wakefulness. The proposed system performs a dawn simulation, conditionally conducts daylight utilization, and optionally undertakes bedroom temperature regulation. The lower the temperature is, the higher the humidity needs to be. So, the temperature control in our proposed system also induces the humidity change in the bedroom. Such a humidity difference may help awaken a sleeper tenderly. Furthermore, a built-in function of the smartphone can be set up and activated at the alarm time to play soothing music to lessen the stress level of the user after an awakening. To ensure the system can carry out required tasks timely and properly, we build a testbed for conducting experiments. Experiments demonstrate that the qualitative and quantitative results of the system performance are consistent, and the proposed system can reliably meet our design demands satisfactorily. This verifies the correctness of our hardware and software design. On the whole, it is promising that the proposed system can assist in gentle awakenings and sleep inertia mitigation.
Because the proposed system is developed based on the smartphone and IoT technology, it is found that we can conveniently expand and customize the system functions via DIY software design. This way incurs no additional cost. Like the proposed system, the updated system is economically viable and embodies features of sustainability. For instance, we can incorporate the Google speech recognizer in the MIT App Inventor into the SSTCAA. In this way, the user can input data into the SSTCAA through their voice. We can also design an app to control the ON/OFF and brightness level of yellow and white lights and the ON/OFF and opening position of the window curtain.
We can also conveniently adjust the scalability of the proposed system. For example, we can connect additional electronic units to the proposed system for controlling bedroom security. The proposed system can also be suitably integrated with the cyber-physical system (CPS) for residential energy management discussed in [41]. This integration can be achieved because the IoT and CPS are closely related. In future works, we will focus on integrating more essential components into the proposed system for overcoming sleep inertia and strengthening the environmental feature of sustainability associated with the system. For instance, as indicated in [11], the quality control of the human sleep–wake cycle is a strategy for alleviating sleep inertia. In this regard, Takemura et al. [42] suggested that we can conduct a gradual transition of dimming the light starting at a sleep preparation time until bedtime. In this regard, the proposed system may carry out this task via the incorporation of a designed sleep-mode app into our system. Based on the insights in [25], it is hopeful that our proposed system may be enhanced in the environmental aspect of sustainability via the incorporation of big data analytics and artificial intelligence. More specifically, the user needs to be allowed to regularly evaluate the data in the SSTCAA database (including SSTCAA data, sensor-based temperature information, and daily system usage time collected over a long period of time) based on the satisfaction of their performance. It is noted that the daily system operation time is closely related to energy utilization. To achieve a tradeoff between the satisfaction of user performance and the reduction of energy consumption, advanced techniques related to statistical analysis and artificial intelligence may be employed in the system to yield appropriate parameter values for the SSTCAA setting based on those evaluations on big data.

Author Contributions

Conceptualization, T.-J.H.; methodology, T.-J.H., M.-Y.C. and B.-H.H.; implementation—hardware and software, M.-Y.H., M.-Y.C. and R.-E.Z.; validation, M.-Y.H., M.-Y.C., B.-H.H., R.-E.Z. and T.-J.H.; formal analysis, T.-J.H., M.-Y.H. and M.-Y.C.; data curation, M.-Y.H., M.-Y.C., B.-H.H. and R.-E.Z.; writing—original draft preparation, review and editing, T.-J.H.; visualization, T.-J.H., B.-H.H., M.-Y.H. and M.-Y.C.; supervision, T.-J.H.; administration, B.-H.H. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data obtained from the experiments are all included in the paper.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Alerstedt, T.; Billiard, M.; Bonnet, M.; Ficca, G.; Garma, L.; Mariotti, M.; Salzarulo, P.; Schulz, H. Awakening from sleep. Sleep Med. Rev. 2002, 6, 267–286. [Google Scholar] [CrossRef] [PubMed]
  2. Boivin, D.B.; Duffy, J.F.; Kronauer, R.E.; Czeisler, C.A. Dose-response relationships for resetting of human circadian clock by light. Nature 1996, 379, 540–542. [Google Scholar] [CrossRef] [PubMed]
  3. Czeisler, C.A.; Kronauer, R.E.; Allan, J.S.; Duffy, J.F.; Jewett, M.E.; Brown, E.N.; Ronda, J.M. Bright light inducing of strong (type 0) resetting of the human circadian pacemaker. Science 1989, 244, 1328–1333. [Google Scholar] [CrossRef] [PubMed]
  4. Blume, C.; Garbazza, C.; Spitschan, M. Effects of light on human circadian rhythms, sleep and mood. Somnologie 2019, 23, 147–156. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  5. Tahkamo, L.; Partonen, T.; Pesonen, A.-K. Systematic review of light exposure impact on human circadian rhythm. Chronobiol. Int. 2019, 36, 151–170. [Google Scholar] [CrossRef] [Green Version]
  6. Scheer, F.A.; Buijs, R.M. Light affects morning salivary cortisol in humans. J. Clin. Endocrinol. Metab. 1999, 84, 3395–3398. [Google Scholar] [CrossRef]
  7. Leproult, R.; Colecchia, E.F.; L’Hermite-Baleriaux, M.; Van Cauter, E. Transition from dim to bright light in the morning in duces an immediate elevation of cortisol levels. J. Clin. Endocrinol. Metab. 2001, 86, 151–157. [Google Scholar]
  8. Thorn, L.; Hucklebridge, F.; Esgate, A.; Evans, P.; Clow, A. The effect of dawn simulation on the cortisol response to awakening in healthy participants. Psychoneuroendocrinology 2004, 29, 925–930. [Google Scholar] [CrossRef]
  9. Gimenez, M.C.; Hessels, M.; Werken, M.; Vries, B.; Beersma, D.G.M.; Gordijn, M.C.M. Effects of artificial dawn on subjective ratings of sleep inertia and dim light melatonin onset. Chronobiol. Int. 2010, 27, 1219–1241. [Google Scholar] [CrossRef] [Green Version]
  10. Gabel, V.; Maire, M.; Reichert, C.F.; Chellappa, S.L.; Schmidt, C.; Hommes, V.; Viola, A.U.; Cajochen, C. Effects of artificial dawn and morning blue light on daytime cognitive performance, well-being, cortisol and melatonin levels. Chronobiol. Int. 2013, 30, 988–997. [Google Scholar] [CrossRef] [Green Version]
  11. Hilditch, C.J.; Dorrian, J.; Banks, S. Time to wake up: Reactive countermeasures to sleep inertia. Ind. Health 2016, 54, 528–541. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  12. Krauchi, K.; Cajochen, C.; Wirz-Justice, A. Waking up properly: Is there a role of thermoregulation in sleep inertia? J. Sleep Res. 2004, 13, 121–127. [Google Scholar] [CrossRef] [PubMed]
  13. Winterbottom, M.; Wilkins, A. Lighting and discomfort in the classroom. J. Environ. Psychol. 2009, 29, 63–75. [Google Scholar] [CrossRef]
  14. Moyano, D.B.; Fernández, M.S.J.; Lezcano, R.A.G. Towards a sustainable indoor lighting design: Effects of artificial light on the emotional state of adolescents in the classroom. Sustainability 2020, 12, 4263. [Google Scholar] [CrossRef]
  15. Ticleanu, C. Impacts of home lighting on human health. Lighting Res. Technol. 2021, 53, 453–475. [Google Scholar] [CrossRef]
  16. Minerva, R.; Biru, A.; Rotondi, D. Towards a Definition of the Internet of Things (IoT). IEEE Internet Initiative. Available online: https://iot.ieee.org/images/files/pdf/IEEE_IoT_Towards_Definition_Internet_of_Things_Issue1_14MAY15.pdf (accessed on 20 May 2021).
  17. Al-Fuqaha, A.; Guizani, M.; Mohammadi, M.; Aledhari, M.; Ayyash, M. Internet of things: A survey on enabling technologies, protocols, and applications. IEEE Commun. Surv. Tutor. 2015, 17, 2347–2376. [Google Scholar] [CrossRef]
  18. Jia, M.; Komeily, A.; Wang, Y.; Srinivasan, R.S. Adopting Internet of Things for the development of smart buildings: A re view of enabling technologies and applications. Autom. Constr. 2019, 101, 111–126. [Google Scholar] [CrossRef]
  19. Dey, S.; Roy, A.; Das, S. Home Automation Using Internet of Things. In Proceedings of the 2016 IEEE Annual Ubiquitous Computing Electronics & Mobile Communication Conference, New York, NY, USA, 20–22 October 2016. [Google Scholar]
  20. Williams, V.; Terence, S.; Immaculate, J. Survey on Internet of Things Based Smart Home. In Proceedings of the 2019 International Conference on Intelligent Sustainable Systems, Palladam, India, 21–22 February 2019. [Google Scholar]
  21. Tiwari, R.; Sharma, H.K.; Upadhyay, S.; Sachan, S.; Sharma, A. Automated parking system-cloud and IoT based technique. Int. J. Eng. Adv. Technol. 2019, 8, 116–123. [Google Scholar]
  22. Mishra, D.; Khan, A.; Tiwari, R.; Upadhyay, S. Automated Irrigation System-IoT Based Approach. In Proceedings of the 2018 International Conference on Internet of Things: Smart Innovation and Usages, Bhimtal, India, 23–24 February 2018. [Google Scholar]
  23. Moosavi, J.; Naeni, L.M.; Fathokkahi-Fard, A.M.; Fiore, U. Blockchain in supply chain management: A review, bibliometric, and network analysis. Environ. Sci. Pollut. Res. 2021. [Google Scholar] [CrossRef]
  24. Fallahpour, A.; Wong, K.Y.; Rajoo, S.; Fathokkahi-Fard, A.M.; Antucheviciene, J.; Nayeri, S. An integrated approach for a sustainable supplier selection based on 4.0 Industry concept. Environ. Sci. Pollut. Res. 2021. [Google Scholar] [CrossRef]
  25. Bibri, S.E. The IoT for smart sustainable cities of the future: An analytical framework for sensor-based big data applications for environmental sustainability. Sustain. Cities Soc. 2018, 38, 230–253. [Google Scholar] [CrossRef]
  26. Kelly, S.D.T.; Suryadevara, N.K.; Mukhopadhyay, S.C. Towards the implementation of IoT for environmental condition monitoring in homes. IEEE Sens. J. 2013, 13, 3846–3853. [Google Scholar] [CrossRef]
  27. Ghayvat, H.; Mukhopadhyay, S.; Gui, X.; Suryadevara, N. WSN- and IOT-based smart homes and their extension to smart buildings. Sensors 2015, 15, 10350. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  28. Shah, J.; Mishra, B. Customized IoT enabled wireless sensing and monitoring platform for smart buildings. Proc. Technol. 2016, 23, 256–263. [Google Scholar] [CrossRef] [Green Version]
  29. Han, H.; Jo, J.; Son, Y.; Park, J. Smart Sleep Care System for Quality Sleep. In Proceedings of the 2015 International Conference on Information and Communication Technology Convergence, Jeju, Korea, 28–30 October 2015. [Google Scholar]
  30. Yuan, M. Getting to Know NodeMCU and Its DevKit Board. Available online: https://developer.ibm.com/tutorials/iot-nodemcu-open-why-use/ (accessed on 7 March 2021).
  31. Haq, M.A.; Hassan, M.Y.; Abdullah, H.; Rahman, H.A.; Abdullah, M.P.; Hussin, F.; Said, D.M. A review on lighting control technologies in commercial buildings, their performance and affecting factors. Renew. Sustain. Energy Rev. 2014, 33, 268–279. [Google Scholar] [CrossRef]
  32. Hermandez, S. The 5 Best Sunrise Alarm Clocks for Waking up Gently in 2022. Available online: https://www.insider.com/guides/home/best-wake-up-light-alarm-clock (accessed on 28 April 2022).
  33. Sandu, D.E.; Taekema, H.J. Wake up Stimulus Control System. U.S. Patent 8259535B2, 4 September 2012. Available online: https://patentimages.storage.googleapis.com/bb/30/29/d3af3d122cf35c/US8259535.pdf (accessed on 28 April 2022).
  34. Guan, Y.; Yan, Y. Daylighting design in classroom based on yearly-graphic analysis. Sustainability 2016, 8, 604. [Google Scholar] [CrossRef] [Green Version]
  35. Mensah, J. Sustainable development: Meaning, history, principles, pillars, and implications for human action: Literature re view. Cogent Soc. Sci. 2019, 5, 1653531. [Google Scholar] [CrossRef]
  36. Peng, Y.; Xia, K.; Wang, J.Y. Lighting control system based on smart phone and bluetooth. Appl. Mech. Mater. 2014, 602, 1260–1263. [Google Scholar] [CrossRef]
  37. Malik, H.; Sapkota, S.; Farhad, S.M. Reliable and convenient smart light control system using mobile app. In Web, Artificial Intelligence and Network Applications. WAINA 2020. Advances in Intelligent Systems and Computing; Barolli, L., Amato, F., Moscato, F., Enokido, T., Takizawa, M., Eds.; Springer: Cham, Switzerland, 2020; Volume 1150, pp. 1056–1064. [Google Scholar]
  38. MIT App Inventor. Available online: https://appinventor.mit.edu/ (accessed on 3 April 2021).
  39. Ardunio IDE. Available online: https://www.arduino.cc/en/software (accessed on 6 February 2021).
  40. Ho, T.J.; Chang, C.H. Robust speed tracking of induction motors: An Arduino-implemented intelligent control approach. Appl. Sci. 2018, 8, 159. [Google Scholar] [CrossRef] [Green Version]
  41. Franco, P.; Martínez, J.M.; Kim, Y.-C.; Ahmed, M.A. A cyber-physical approach for residential energy management: Current state and future directions. Sustainability 2022, 14, 4639. [Google Scholar] [CrossRef]
  42. Takemura, Y.; Ito, M.; Shimizu, Y.; Okano, K.; Okano, T. Adaptive light: A lighting control method aligned with dark adaptation of human vision. Sci. Rep. 2020, 10, 11204. [Google Scholar] [CrossRef] [PubMed]
Figure 1. Block diagram of the proposed system framework.
Figure 1. Block diagram of the proposed system framework.
Sustainability 14 07928 g001
Figure 2. Display of the SSTCAA.
Figure 2. Display of the SSTCAA.
Sustainability 14 07928 g002
Figure 3. Hardware connection in the CLI unit.
Figure 3. Hardware connection in the CLI unit.
Sustainability 14 07928 g003
Figure 4. Hardware connection in the CDU unit.
Figure 4. Hardware connection in the CDU unit.
Sustainability 14 07928 g004
Figure 5. Hardware connection in the TC unit.
Figure 5. Hardware connection in the TC unit.
Sustainability 14 07928 g005
Figure 6. The RTC-enabled task execution procedure: (a) flowchart; (b) pseudocode.
Figure 6. The RTC-enabled task execution procedure: (a) flowchart; (b) pseudocode.
Sustainability 14 07928 g006
Figure 7. Yellow and white LED light levels in the CLI unit.
Figure 7. Yellow and white LED light levels in the CLI unit.
Sustainability 14 07928 g007
Figure 8. The sunrise simulation algorithm (a) flowchart, (b) pseudocode.
Figure 8. The sunrise simulation algorithm (a) flowchart, (b) pseudocode.
Sustainability 14 07928 g008
Figure 9. Four sequential pulse inputs of the stepper motor driver in each periodic interval.
Figure 9. Four sequential pulse inputs of the stepper motor driver in each periodic interval.
Sustainability 14 07928 g009
Figure 10. The window curtain opening algorithm: (a) flowchart; (b) pseudocode.
Figure 10. The window curtain opening algorithm: (a) flowchart; (b) pseudocode.
Sustainability 14 07928 g010aSustainability 14 07928 g010b
Figure 11. The temperature control algorithm: (a) flowchart; (b) pseudocode.
Figure 11. The temperature control algorithm: (a) flowchart; (b) pseudocode.
Sustainability 14 07928 g011aSustainability 14 07928 g011b
Figure 12. A testbed based on the proposed system development.
Figure 12. A testbed based on the proposed system development.
Sustainability 14 07928 g012
Figure 13. Numerical data of the CLI unit for Case A in Table 1. (a) The average current in the Tube LED (yellow light); (b) the average current in the Tube LED (white light).
Figure 13. Numerical data of the CLI unit for Case A in Table 1. (a) The average current in the Tube LED (yellow light); (b) the average current in the Tube LED (white light).
Sustainability 14 07928 g013
Figure 14. Numerical data of the CLI unit for Case B in Table 1. (a) The average current in the Tube LED (yellow light); (b) the average current in the Tube LED (white light).
Figure 14. Numerical data of the CLI unit for Case B in Table 1. (a) The average current in the Tube LED (yellow light); (b) the average current in the Tube LED (white light).
Sustainability 14 07928 g014
Figure 15. The detection outputs of the photoresistor and the threshold for Case A in Table 1. (a) The detection output is above the threshold at 6:00; (b) the detection output is below the threshold at 6:00.
Figure 15. The detection outputs of the photoresistor and the threshold for Case A in Table 1. (a) The detection output is above the threshold at 6:00; (b) the detection output is below the threshold at 6:00.
Sustainability 14 07928 g015
Figure 16. Numerical data of the CDU unit for Case A in Table 1 together with the detection results in Figure 15. (a) The total number of motor steps for Case A along with the result in Figure 15a; (b) the total number of motor steps for Case A along with the result in Figure 15b.
Figure 16. Numerical data of the CDU unit for Case A in Table 1 together with the detection results in Figure 15. (a) The total number of motor steps for Case A along with the result in Figure 15a; (b) the total number of motor steps for Case A along with the result in Figure 15b.
Sustainability 14 07928 g016
Figure 17. The detection outputs of the photoresistor and the threshold for Cases B and C in Table 1. (a) The detection output for Case B exceeds the threshold at 6:00; (b) the detection output for Case C is above the threshold at 6:00.
Figure 17. The detection outputs of the photoresistor and the threshold for Cases B and C in Table 1. (a) The detection output for Case B exceeds the threshold at 6:00; (b) the detection output for Case C is above the threshold at 6:00.
Sustainability 14 07928 g017
Figure 18. The bedroom temperature for Case A in Table 1.
Figure 18. The bedroom temperature for Case A in Table 1.
Sustainability 14 07928 g018
Figure 19. The bedroom temperature for Case B in Table 1.
Figure 19. The bedroom temperature for Case B in Table 1.
Sustainability 14 07928 g019
Table 1. Three cases of SSTCAA settings for the experiments.
Table 1. Three cases of SSTCAA settings for the experiments.
SSTCAA Setting
AlarmAlarm TimeTime Span of SunriseOpen CurtainAir ConditionerDegree of Temp. Drop
Case AON6:0010 minONOFF3 °C
Case BON6:0015 minONON3 °C
Case COFF6:0010 minONON3 °C
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Ho, T.-J.; Huang, M.-Y.; Chou, M.-Y.; Huang, B.-H.; Zhuang, R.-E. Toward Sustainable Gentle Awakenings and Sleep Inertia Mitigation: A Low-Cost IoT-Based Adaptable Lighting and Temperature Control Approach. Sustainability 2022, 14, 7928. https://doi.org/10.3390/su14137928

AMA Style

Ho T-J, Huang M-Y, Chou M-Y, Huang B-H, Zhuang R-E. Toward Sustainable Gentle Awakenings and Sleep Inertia Mitigation: A Low-Cost IoT-Based Adaptable Lighting and Temperature Control Approach. Sustainability. 2022; 14(13):7928. https://doi.org/10.3390/su14137928

Chicago/Turabian Style

Ho, Tan-Jan, Min-Yan Huang, Meng-Yu Chou, Bo-Han Huang, and Ru-En Zhuang. 2022. "Toward Sustainable Gentle Awakenings and Sleep Inertia Mitigation: A Low-Cost IoT-Based Adaptable Lighting and Temperature Control Approach" Sustainability 14, no. 13: 7928. https://doi.org/10.3390/su14137928

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop