IOT BASED INDOOR LIGHTING PERFORMANCE OF LED WITH DIFFERENT COLOR TEMPERATURES SYSTEM BASED ON HUMAN ACTIVITY

: Numerous LED light brands are available on the market, each offering a variety of light colors, including warm white (2700 K), white (3000 K), cool white (5000 K), and daylight (6000 K). Each color of light produces heat in the form of different lights in the room. Living things have a physiological ability called circadian rhythm to adapt to changes in their environment due to rhythmic physiological influences on hormonal secretion, temperature, wake-sleep rhythm, glucose balance, and cell regulation cycles. Lighting sources should also be human-friendly, especially with regard to the increased hazards from shortwave emissions. Extended periods of exposure to white light that contains blue and/or violet wavelengths can suppress the production of melatonin, leading to higher secretion of female hormones. This, in turn, elevates the likelihood of developing breast cancer. This paper aims to design a lighting regulation system based on human activity and light color regulation with circadian rhythm for 24 hours a day. This system employs the Internet of Things (IoT) along with multiple sensor systems and WS2812B LEDs. By applying fuzzy logic, it generates outputs that effectively regulate the brightness and color of the lights. The research findings demonstrate that indoor lighting can be easily adapted by utilizing various sensors and fuzzy logic techniques to detect human activity. As a result, the intensity and color of the lights can be automatically adjusted based on human activity, and the IoT allows for remote control of the system.


INTRODUCTION
Lighting is one of the most important household electrical appliances.With the development of technology, lighting technology such as LED (Light Emitting Diode) lamps is energy-efficient, costeffective, and can participate in reducing global warming because in its use, this lamp does not produce heat like incandescent lamps and does not have the potential to disturb health like fluorescent lamps.In addition, the maximum life of this lamp can be 25 times longer than lamps in general (Prabowo et al., 2023).Certain LED light brands are promoted based on their light color or Correlated Color Temperature (CCT).These include Warm-White (2700 K), White (3000 K), Cool-White (5000 K), and Day-light (6000 K).
Living things possess the capacity to adjust and respond to alterations in their surroundings.This ability is due to the rhythmic physiological influence on hormonal secretion, temperature, wake-sleep rhythm, glucose balance, and the cell regulation cycle (Zee et al., 2013).The physiological ability is called the circadian rhythm.Each color of light produces heat in the form of different lights in the room.The color of the lamp is designed so that consumers can choose the color of the lamp according to their wishes.Lighting sources must also be human-friendly to be well received, especially with regard to the increased danger from shortwave emissions.Extended exposure to white light that contains blue and/or violet wavelengths may lead to various health issues.These can include harm to light-sensitive eye tissues, disruption of the circadian rhythm, disturbances in sleep patterns, and an increased risk of breast cancer due to the suppression of the hormone melatonin, which helps protect against cancer (Chellappa, 2021;K Ritchie et al., 2015;Lunn et al., 2017;Mason et al., 2018;Stevens et al., 2014).The pineal gland mainly produces melatonin, and its secretion has a circadian rhythm with more secretion at night.Still, exposure to light at night can inhibit melatonin secretion and then increase the secretion of female hormones, which consequently increases the risk of breast cancer (Boyce, 2022;Chellappa et al., 2019;Parameswaran & Ray, 2022;Song et al., 2023).
Numerous studies have focused on individuals who work shifts, and it has been consistently observed that they face a greater risk of various diseases and health conditions compared to those who work regular daytime hours.When the timing of their work shifts changes, it leads to a mismatch between the primary circadian rhythm and internal cellular oscillators, which operate independently and continuously.Depending on the shift schedule and individual characteristics, this mismatch can persist for different durations.One potential common explanation for these diseases is the disruption of the circadian rhythm over an extended period (Mason et al., 2018;Stevens, 2016).This disruption has been linked to various health issues such as cancer, diabetes, obesity, sleep deprivation, and psychosocial dysfunction (Hong et al., 2022;Lai et al., 2021;Lesicka et al., 2019;Wong et al., 2021).Light intensity is used to describe the amount of light in an area or the brightness level of an area.A higher intensity value indicates a brighter environment.According to a scale from 1,000 [extremely warm (yellowish)] to 10,000 [very cool (bluish)], the color of light is measured in degrees kelvin (K).Warmer hues have a lower temperature than cooler ones, which is an indication of how white light will seem (Riber, 2015).Different activities require different levels of brightness and color of light.To reduce unneeded blue harm from excessive blue emission, Jou et al. (2022) recommended that the color of the light be below 6000 K or close to pure white light.
In this research, a lighting management system based on human activity and also light color settings with circadian rhythms that utilize the Internet of Things will be developed using several sensor systems and WS2812B LEDs.WS2812B is an intelligent control LED light source in which the control circuit and RGB chip are integrated in the 5050 component package (Saebah & Asikin, 2022).This system is connected wirelessly via a Wi-Fi network to adjust the room's light intensity and color.While the light color of the lamp will be adjusted to the circadian rhythm for 24 hours a day.This lighting management system is also developed using fuzzy logic method.Fuzzy logic is defined as a type of logic that has multiple values and deals with uncertainty and partial truth (Tarannum & Jabin, 2018).The fuzzy logic method is then used to process the sensor's input signal, yielding an output that can control the lamp's light's color and intensity.
The sensors used are Light Dependent Resistor (LDR) sensors, Ultrasonic sensors, and Passive Infrared Receiver (PIR) sensors.LDR is used to check the conditions outside the room, whether they are bright or dark.Ultrasonic sensor as a human presence sensor, whether in range or out of range.While the PIR sensor is used as a human presence sensor, whether it has high or low activity.To regulate the level of light intensity, researchers use 3 sensors, namely LDR, PIR and ultrasonic as input signals to fuzzy logic, the output is the level of light intensity needed.While at the light color level researchers use the circadian time according to Lin et al. (2019) and 2 sensors, namely LDR and ultrasonic as input signals to fuzzy logic, the output result is the required light color level.

Related Works
Several studies have been conducted to investigate lighting intensity and light color regulation systems based on human activities.Choi & Suk (2016) conducted a study exploring how different lighting color temperatures impact the academic performance of primary school students.They also suggested a dynamic lighting system tailored for smart learning environments.The research involved three empirical studies.Firstly, they assessed physiological responses to determine their potential influence on performance.Secondly, they observed cognitive and behavioral responses during academic activities and breaks.Finally, experiments were conducted in real-life settings with long exposures.The results of preliminary studies and field experiments fully supported the positive effects of 6500 K illumination on academic performance, and 3500 K illumination on exhilarating rest activities.Chen et al. (2022) investigated how the lighting environment influences psychological perception, physiology, and productivity.They conducted the study in an intelligent lighting laboratory and included 67 participants exposed to different lighting conditions and correlated color temperatures (CCT).Throughout the experiment, the physiological data of the subjects was continuously recorded, and their psychological perceptions and productivity were assessed using questionnaires and work tests, respectively.The findings revealed that lighting and CCT had a significant impact on the subjects' comfort and relaxation.Warm CCT and higher lighting levels (3000 K-590 lux) were associated with increased comfort.Additionally, optimal productivity was achieved with lighting above 500 lux and equivalent melanopic lux (EML) higher than 150.Different light colors and lighting levels affect human physiology, psychology, and productivity.
Cahyadi & Soewito (2022) conducted research on an indoor lighting system capable of adapting to external lighting conditions and human activities.The purpose of this system is to prevent unnecessary illumination and conserve energy effectively.The setup employs IoT technology, enabling remote control of indoor lighting.Moreover, fuzzy logic methods are integrated into the lighting control system to create versatile applications that surpass conventional systems.The results show that it can operate well and is responsive to human activity in the vicinity, but it has not added light color or circadian rhythms.Kwon & Lim. (2017) carried out a study with the objective of creating a healthy daylighting system that aligns with the user's circadian rhythm throughout the entire day.They achieved this by using a multi-objective context-adaptive approach, which dynamically adjusts the lighting environment based on different control objectives such as health, emotion, performance, and energy savings.The proposed system comprises several key components.Firstly, a data collection process is employed to gather information about both natural and artificial lighting characteristics.Next, a data preprocessing step handles effective data extraction and integration.Subsequently, a data analysis process is used to study how artificial lighting changes based on the chromaticity attribute of natural light.The system also incorporates lighting stage changes that correspond to the time of day, season, and weather conditions.Finally, a service process is implemented to deliver the desired outcomes.The study's results demonstrate that the dynamic daylighting system effectively addresses various control objectives, including health, emotion, performance, and energy savings.However, it should be noted that the system's focus has not been on human activities.
In this research, a flexible lighting management system is developed that can be adjusted manually or automatically based on IoT based on human activity, where the automated system has the capability to detect human motion nearby and accordingly regulate the brightness of the lighting, offering options such as bright, dim, and off.Moreover, it can also adapt the light's color to match predetermined circadian rhythms, providing Warm-White, White, and Cool-White variations.So that the results of this research can provide appropriate lighting in the house based on human activity or for eye comfort and health, circadian disorders, sleep disorders, and breast cancer.

RESEARCH METHODS
This research aims to offer optimal indoor lighting that caters to human activities, ensuring both comfort and well-being.The proposed method involves three key steps to regulate light intensity and color.Firstly, a Light Dependent Resistor (LDR) sensor is employed to detect the presence of ambient light in the room.Next, a Passive Infrared Receiver (PIR) sensor is utilized to identify human presence or absence, while Ultrasonic Sensors are employed to determine if humans are within or outside the detection range, while also gathering information about the current time of day.Additionally, once the existence of humans is detected, they will be inputted into the Fuzzy Logic Controller to assess human activity, adjust the emitted light intensity, and modify the light's color accordingly.
Figure 1.System Design Flow Figure 1 depicts the steps that will be taken, beginning with preparing the device to be used, followed by the device detecting light using a light sensor, then detecting the presence of humans at that location using motion and distance sensors.Finally, the current time is detected to obtain the correct circadian rhythm, which will then be entered into Fuzzy Logic.The results of the adjusted light will be recorded for evaluation.Fuzzy Rule bases are created to solve problems with rules that have been created based on expert knowledge.The rules have conditions (if) and actions (then).These rules will be inputted into a program, which in turn will be fed into the Fuzzy Logic Controller.The Fuzzy Logic Controller will then compare these rules with the current configurations and identify the associated rules.This fuzzy will compare the amount of movement and distance obtained from three sensors, which are the inputs of the system, namely the PIR sensor, LDR sensor, and Ultrasonic sensor.In Figure 2, we can observe an outline of the intelligent lighting system.The author employs a single NodeMCU ESP8266 microcontroller for this purpose, which can be accessed via the internet network via a smartphone, with input consisting of 3 sensors, namely Ultrasonic, PIR, and LDR.The output results will be sent to the 19 bit WS2812B RGB LED in the form of light color and light intensity.In this research, the NodeMCU ESP8266 microcontroller becomes a Fuzzy Logic controller, or controller of the smart lighting system developed.The course of the system in this scheme is: a) Distance Sensor: An ultrasonic sensor will detect the distance between the system and humans.b) Motion Sensor: the PIR sensor, is designed to identify human movements within the vicinity of the system.c) Light Sensor: The LDR sensor will detect light outside the system.d) Internet of Things: The microcontroller will be connected to the internet or server to be managed remotely using a computer or smartphone.e) Fuzzy Rule Base: The microcontroller will process All inputs from sensors, which will then be entered into a fuzzy rule base to determine the right results.f) WS2812B: Likewise, after the fuzzy rule base determines the results, the microcontroller then sends a signal to the WS2812B to change the light intensity and light color of the LED lights according to the predetermined results.
Figure 3. System Flowchart The subsequent phase involves creating a Flow Chart that illustrates the progression of the suggested system.This graphical representation outlines the individual stages of the process sequentially.The Flow Chart for this study is displayed in Figure 3.The flowchart starts by first checking the connected mode that can be changed via IoT connected to the user's computer or smartphone.If the selected mode is manual, then the system will immediately proceed to the fuzzy logic controller to adjust the brightness of the lights according to the user's change.If the selected mode is auto, it will continue to check the amount of light using the light sensor.If the light outside the system is sufficient, it will proceed directly to the fuzzy logic controller to turn off the lights.If the light outside the system is not enough, it will continue to check for the presence of humans in the system coverage area using the distance sensor.Then the system reads the color of light based on circadian rhythms and stores it in the Fuzzy Rule Base.Then proceed to detect movement using a motion sensor.The data from these sensors will then be collected in the Fuzzy rule base to determine the type of light that the system will generate.Then, to provide light intensity and light color that have been set in the Fuzzy rule base to WS2812B.

RESULT AND DISCUSSION
Here using the method proposed above to adjust the light intensity level, 3 sensors are used namely LDR, PIR and ultrasonic as input signals to fuzzy logic, and the output is the required light intensity level.Meanwhile, at the light color level, the circadian time and 2 sensors, namely LDR and ultrasonic, are used as input signals to fuzzy logic, and the output is the required light color level.Then in Figure 7 for the PIR sensor, because the PIR sensor value only produces values of 1 and 0, help is needed from the ultrasonic sensor to calculate the average amount of activity that will affect the membership function as follows: a. High Activity: the PIR sensor is 1 and the difference between the current range (captured from the ultrasonic sensor) and (the average of the last 5 ranges from the ultrasonic sensor) is > 40 cm.b.Low Activity: the PIR sensor is 1 and the difference of the current range (captured from the ultrasonic sensor) with (average of the last 5 ranges of the ultrasonic sensor) is >=5 cm and < =40 cm.c.No Activity: the PIR sensor is 1 and the difference of the current range (captured from the ultrasonic sensor) with (average of the last 5 ranges of the ultrasonic sensor) is < 5 cm.

Figure 8: Output Membership Function of Light Intensity
In Figure 8, the output membership function of light intensity is shown.The three sensors will determine the level of light intensity, namely bright, dim, and off, as follows: a. Bright: 150 lux b.Dim: 70 lux c.Off: 0 lux Where we used the Fuzzy rule base in previous research by Cahyadi & Soewito [24] which can be seen in table 1.

Dark Out of Range No Activity Off
In Table 1, the Fuzzy rule base for the light intensity level of this system is determined, namely, if the light outside the system captured by the LDR is sufficient, then the output of the system will turn off.If the light outside the system captured by LDR is not enough, then the system will proceed to the next sensor.The next Fuzzy Rule base is from the Ultrasonic sensor, if it is not detected within the range, then the system will turn off.If detected within range, the system will proceed to the next sensor.The last and main Fuzzy rule is based on the amount of activity on the PIR or motion sensor, where the average amount of activity will affect the output results of the system.If the activity detected by the motion sensor is high, the lights will turn on brightly, if the activity detected by the motion sensor is low, the lights will turn on dimly, and if the activity is not detected, the output will turn off.This fuzzy rule base is based on the scheme of Lin et al. [21], which provides an overview between the color of light and the time span used according to human circadian rhythms.The fuzzy rule base can be seen in Table 2. 08:00 a.m.Dark Within Range 3000 (Warm-White) In Table 2, this Fuzzy rule base provides an overview of the color of light and the time range used according to the human circadian rhythm.The fuzzy rule base for the color of light in this system is that if the light outside the system captured by the LDR is sufficient, the output of the system will turn off.If the light outside the system captured by LDR is not enough, then the system will proceed to the Fuzzy Rule base of the Ultrasonic sensor, if not detected within the range, then the system will turn off.If detected within range, the system will proceed with the circadian rhythm Fuzzy Rule base, the color of the light will be adjusted to the time in the Fuzzy Rule base.The design results of the IoTbased color temperature lighting control system for the comfort and health of room lighting are shown in Figure 11.After assembling the system, the next step is to connect the microcontroller to the LDR sensor, PIR sensor, ultrasonic sensor, and WS2812B LED using jumper cables (male to male and male to female) on the breadboard.LDR sensors, PIR sensors, and ultrasonic sensors are used as input to provide data, which is then sent to the microcontroller.This information is then used as a reference to provide certain conditions so that the lights can be lit efficiently and effectively.The LDR sensor itself measures the amount of light in the room, so the system does not turn on automatically when the room light is sufficiently reduced.In addition, ultrasonic sensors and PIR sensors work together to detect the presence and activity of people in certain locations, and allow the system to prevent false on/offs that can be caused by stationary objects.The switched on LED lights can be automatically controlled by the microcontroller for both the intensity level and the color of the light based on the conditions received from the input or IoT.This system program was developed with the C programming language using the Arduino Integrated Development Environment (IDE) application shown in Figure 12.This program contains fuzzy logic that is used to regulate the performance of the system so that it can produce the appropriate level of intensity and color of LED lights.To determine whether this IoT-based indoor lighting performance of LEDs works properly, it must first be tested.This test is divided into several sections, which are as follows: 1) Measures human presence and activity in a room using a combination of PIR and ultrasonic sensors.This experiment was carried out to demonstrate that by connecting the two sensors in predetermined locations, they can complement each other's strengths and weaknesses while also adapting the light to human activity.The combination of sensors can also eliminate the presence of other moving objects (for example, fans).Tests were carried out at various possible operating points: In the tests carried out in Tables 3, the test results can be declared successful.Here, the user can also utilize the flexibility of the IoT system to manually change the strength of the light generated by the system via a smartphone.
2) Testing light color changes to match circadian rhythms.This test is conducted to prove that the color change of light can adjust the circadian rhythm.10:00 pm 0 Success In the tests carried out in Table 4 the test results can be declared successful because at the specified time, they can meet the range of light color temperatures from Lin et al. [21].
3) Using IoT, test the replacement of the Fuzzy Rule Base, as well as changing the lighting from manual to automated.The test results in Figures 13a to 13c show that the IoT application on the system can change the state of the lights manually or remotely, in Figure 13a gives the results of the Cool White light color, then in Figure 13b gives the results of the White light color and finally in Figure 13c gives the Warm-White light color.Users have the ability to customize lighting settings during periods of activity that may go unnoticed by the automated system.4) Experimenting with the extent of human presence detection zones through various large and small movements based on the distance between the presence of people and lights.The experiment continued by measuring the exact range of the system's detection zone where the perpetrator made large movements, such as moving away from the system.The test results of the system's detection area range show that it can accurately detect human movement at a distance of up to 200 cm from the system.The simulations performed in this study show that the system can be easily tailored to the needs of the user.If the user performs some activity, the system can recognize the action and generate light intensity levels and colors efficiently and conveniently.
Figure 14.Testing the detection range of the sensor For example, when the user just enters a room, the system just turns on the room lights with bright lights and a Warm White color (detected as walking activity), and then when the user sits in front of the computer desk and performs activities in front of the computer, the lights are dim and a Warm White color (recognized as the activity of working at the desk in the room).The system can also flexibly turn on the lights manually to provide the desired light and color.

CONCLUSION
The research is carried out by developing an IoT-based lighting control system based on human activity and integrating light color settings with circadian rhythms.This lighting control system is also created using the fuzzy logic method, resulting in an application in the form of a control system that is more flexible in regulating the intensity and color of the light produced when compared to conventional systems or regulatory systems that only provide control of light intensity.Furthermore, this setup makes use of the Internet of Things (IoT) to function as a remote-controlled indoor lighting system.The findings of this research indicate that by incorporating multiple sensors, this lighting system can accurately detect human activity.Leveraging fuzzy logic techniques, the system can then adjust the brightness and color of the light according to human activity patterns and circadian rhythms, promoting comfort and well-being.Moreover, the IoT-based system allows for remote management.
Overall, the researchers' approach for adjusting the amount of light in the room produced fairly good results, indicating that it can be further refined in future research.In the future, the indoor lighting system could be outfitted with Artificial Intelligence (AI) and Machine Learning, allowing for more precise detection of human activity and the provision of circadian rhythm light colors based on more natural light characteristics.This can be accomplished with a variety of sensors, such as spectral sensors or RGB color sensors.

Figure
Figure 2. Proposed System

Figure 4 .
Figure 4. (a) Fuzzy Logic Control of Light Intensity Block Diagram, (b) Fuzzy Logic Control of Light Color Block Diagram

Figure 9 .
Figure 9.Time Input Membership Function

Figure 10 .
Figure 10.Light Color Output Membership Function

Figure 11 .
Figure 11.Results of system implementation

Figure 12 .
Figure 12.Programming the System Using the Arduino IDE

Figure 13
Figure 13.a) Cool White lamp color test results, b) White lamp color test results, c) Warm-White lamp color test results