Control of light Intensity via Microcontroller for the Efficiency of Electrical Energy

Lighting is a factor to get a safe and comfortable environment. Good lighting allows one to see objects that are done clearly, and can give a refreshing view. Conversely, if the room has poor lighting can cause eye fatigue, therefore it is necessary to control the intensity of light-based microcontroller to regulate the lighting of a room automatically. his research was made by designing a lighting model using a dimmer circuit based on ATMega328 microcontroller, LDR sensor (Light Dependent Resistor) and Bluetooth HC-06. The working principle of the LDR sensor is receiving light from the outside which causes changes in the input voltage level to the microcontroller while the Bluetooth HC-06 works by connecting a Bluetooth device with a smartphone that has installed the PWM Light Control application. which is then processed by microcontroller output in the form of pulse voltage (PWM) in the dimmer circuit to adjust the dim and bright lights. Results for electricity voltage (Volt), Electricity (Ampere), Light level (Lux) and electrical power used. At each increase from 0-255 PWM which is channeled to the dimmer circuit, the power is 0-13,0357 watts, comparable to before using a circuit of around 13,5036 watts with a percentage of 1.7% with a 15-Watt lamp, the light conditions are stable in brightness. The distance of control of this tool reaches 26.15 m with 1 barrier wall and still works with 3 barrier walls with a distance of 21.45 m. So that the use of electric power and light can be adjusted to the needs.


Background
With the development of technology that is developing now, encouraging operational work done by humans can be facilitated with adequate technology so as to facilitate its use. This is characterized by the presence of various equipment that was created and can be operated and used in an automated manner. the use of equipment with automatic technology is now the right solution because it can be tailored to the needs of users. One of the automated technologies that is currently developing is the microcontroller, currently many microcontrollers are applied to instruments related to everyday human life. Microcontrollers are practical and easy to apply for various purposes because they can be programmed according to needs. Along with the development of technology, the need for electricity is also increasing. For this reason, there is a need to reduce unnecessary electricity consumption.
When the conditions outside are cloudy and the lights are on, then the situation in the room will be too bright and even dazzling. And vice versa if the lights are turned off, then the room will darken. Also, the habit of users who often forget to turn off the lights when leaving the room, of course this makes it very inefficient in the use of electrical energy. Therefore, it is necessary to have an appropriate lighting setting for both lighting needs and the efficient use of electricity. In general, energy savings can be done in two ways, namely by increasing the efficiency of the technology used, or by changing the behaviour of users. Energy saving behaviours include turning off lights when not in use and utilizing natural lighting for lighting.
Several studies have been conducted such as trying to combine the two, namely making a prototype of a tool that can streamline energy for lighting based on the principles of energysaving behaviour. System using dimmer circuit with optocoupler and triac, LDR sensor as light detector and PIR sensor as detection of human presence, programming language using Bascom-AVR, the load used is 60 wat incandescent power supply circuit, microcontroller, LCD, PIR sensor, dimmer circuit and the whole series. With a lamp load of 60 watts, the measurement results show that the maximum power to the load converted to light is only 54.72 or about 93% [1]. The system uses a dimmer circuit with optocoupler and triac, LDR sensor as a light detector and PIR sensor as a detection of human presence, programming language uses Bascom-AVR, the load used is incandescent lamp 60 wa this circuit consists of optocoupler, optoisolator, transistor, triac, and relay. the measurement results using AVO meter resistance from the LDR sensor when given light is 75Ω and when not given the light is 1.05MΩ [2]. In this study the driver circuit is used to pair the voltage between the logic voltage and the voltage to the lamp load and the dimer lamp. By using regulator 7805 to all circuits as a supply of circuit power in the system. Microcontroller support equipment, Bluetooth, LCD, relay driver circuit (optocoupler and transistor) [3].
Another study used a microcontroller to generate sensor signals (presence and light intensity), with light intensity controlled by turning on and off the ballast. Where the auxiliary circuit is connected to the drive gate on each switch. The features of the timer are implemented by software, which allows the power of the lamp to be controlled, with light intensity, and the rules of the environment are achieved. With the use of ballasts, energy savings are achieved. Thus, ballasts can adapt for various applications with modifications in the software. This software modification provides important flexibility for lighting systems without significant changes in the hardware implemented [4]. The next study uses a PIR sensor circuit to detect whether or not someone is passing through the detection area. If the human body enters the detection area, the PIR sensor accepts variations in temperature by the infrared energy emitted around it, it can also produce variations in electrical changes through the pyroelectric effect. Because of the small electric charge and not easily felt by the sensor, the high impedance FET system was adopted to pick up the signal. Because the output amplitude of the sensor measured in the mV level range is not large enough for an MCU, the output signal from the sensor must be amplified by increasing the number of amplifiers doubling the gain [5].
Other lighting control methods are processed by the lighting control circuit to determine the lighting conditions of the load light. Lighting control circuits include semi-conductor switching devices, zero-point intersection detection circuits, and microcontrollers. The steps in the method consist of the first step of the zero-point-intersection detection circuit. AC Voltage The sine wave is converted into a symmetrical square wave then the microcontroller is read as an external control signal and executes one of the many external control loops written in code form by the microcontroller program and Zero time accordingly time-delay time-point pulses generated. [6]. This study uses a compiler battery with a microcontroller placed in a WAIT mode to reduce unused power consumption. The Microcontroller program works normally about every 65 ms. A / D conversion is done with four analog variables. In this way, the analog variable is measured approximately every 65 ms, because the conversion time is only 0.13 ms. If a voltage is detected at a low line, the microcontroller places the digital output in a high state, and activates the inverter; otherwise this output is maintained in a low state. While the use of batteries to maintain signal stability is maintained if there is interference with the microcontroller [7].
With the high-quality SMSP (switch-mode power supply) approach and the DC-DC converter with a power factor of 95% increasing the efficiency of a DC LED lighting system that has 92% power and is implemented into each LED light to supply DC LED lights with the required DC voltage, on the other hand low quality SMSP is implemented for each LED light in an AC LED lighting system, making the AC LED lighting system inefficient and the usage costs of each LED lamp higher [8]. PWM dimming results in an efficient LED light output and its user colour output does not vary. The benefits of dimming have a lower impact on the environment because CO2 emissions are lower, stored energy can create a sense of comfort. PIC16F877A microcontroller is used to generate PWM signals to change the brightness level of the LED module for a certain time with minimum light intensity. This technology results in more energy savings. The proposed technology can be used in applications such as commercial lighting, decorative lighting, road lighting and automotive lighting [9].
In this study, the light intensity controller system uses the Arduino microcontroller by controlling the LDR sensor and Smartphone, implemented by considering the light and electric power requirements in a room. Arduino is an open source microcontroller minimum board. In the Arduino board there is an AVR series ATMega 328 microcontroller which is a product of Atmel. Arduino provides 20 I / O pins, consisting of 6 analog input pins and 14 digital input/output pins. The 6 analog pins themselves can also be used as digital outputs if additional digital output is needed in addition to the 14 pins that are already available. To change the analog pin to digital simply change the pin configuration on the program. In the board can be seen digital pins are given information 0-13, so to use analog pins to digital output, analog pins on the 0-5 board information are changed to pins 14-19. in other words analog pins 0-5 also function as digital output pins 14-16 [10].

Modul Bluetooth HC-06
Bluetooth is a wireless communication protocol that works on 2.4 GHz radio frequency to exchange data on mobile devices such as PDAs, laptops, mobile phones, etc.1. One example of the most widely used Bluetooth module is the HC-06 type. Bluetooth HC-06 module is one of the Bluetooth modules that can be found in the market at a relatively cheap price. The HC-06 Bluetooth module consists of 6 pin connectors, which each connector pin has a different function [11]. For images of Bluetooth modules can be seen in Figure 2 below

Android Operation System
Android is a Linux-based operating system designed for touch screen mobile devices such as smartphones and tablet computers. Android was originally developed by Android, Inc., with financial support from Google, which then bought it in 2005. The operating system was officially released in 2007, along with the establishment of Open Handset Alliance, a consortium of hardware, software and telecommunications companies that aims to advance the open standards of mobile devices. The first Android cell phone went on sale in October 2008 [12].

Fig 5. Block System Circuit Diagram
Based on the circuit diagram block above, it can be seen that the workflow of this system starts on an Android Smartphone. via the Smartphone application with Bluetooth communication commands sent to the Arduino microcontroller. Then Arduino UNO sends the PWM signal to the Dimmer Circuit. In addition, the Microcontroller uses a light sensor system as the first controller of light intensity.

Results and Discussion
Design includes: Creating a design drawing, making a circuit scheme. The second stage is the process of making and filling the program, the process of making an application and the last step is configuring between hardware and software.

Creating Design Drawings
In this design an illustration is made in its application in a room and can be seen in Figure  6

Dimmer Scheme Series
In this stage, the design needed to make a dimmer circuit is a Dimmer circuit that can be used as a regulator of light intensity. With a dimmer circuit, the lights can be adjusted from the dead, dimmed to the brightest. The main component of a dimmer circuit is an optocoupler and MOSFET that can control AC voltage so that it directly impacts the light (load). This circuit is made to be controlled through Pulse Width Modulated (PWM) generated from Arduino or other pulse generator circuits.
The workings of the dimmer sequence start from D2 (1N4007), load resistors R7 and C3 capacitors that are connected to form a rectifier. In this circuit the position of R7 shows as a current limiter after going through D2 with a value of around 1.5 Ampere. Furthermore, the voltage of C3 is set to a maximum value of 10V by resistors R4 and R5, capacitors C2 and diodes D1 as supply of optocoupler voltage. Optocouplers and R6 function as channel PWM pulses from the signal generator to control the gate of the MOSFET. While the function of the R3 resistor is used as a protective LED on the optocoupler by limiting the current. Below is the scheme of the dimmer circuit. In this design an illustration is made in its application in a room and can be seen in Figure  9. In the series of images 9. addition of additional components in the form of Arduino UNO as a microcontroller will send PWM output signals as traffic light brightness control, LDR (Light Dependent Resistor) functions as the first light controller when the LDR finds the room feels dark the lights will automatically increase the intensity the brightness is light, and finally the Bluetooth HC-06 functions as the second controller, if the smartphone application is connected to the HC-06 Bluetooth module, then the light intensity can be adjusted to the user's needs. At the determined stage where the location of the APK file will be saved then check the list on V2 (Full APK Signature) the last step click "Finish" wait a few moments after that copy the file that has become the APK extension to the Smartphone then install it until it is complete and can be used.

Use of the PWM Light Control Application
After the application is installed on an Android smartphone, the application can be used and the following steps are used in the PWM Light Control application PWM Light Control application is an application as the second controller of the light intensity control circuit based on the microcontroller. when the application is run the application will automatically activate Bluetooth on the smartphone. After that, shift the automatic mode to the left, then the Login Access appears as the security of the application so that the use of the device is more awake. After the login access is filled in correctly, the device can enter the Bluetooth Mode of the Devices. Then pair the PWM Light Control application with a BluetoothHC-06 device after waiting a while. And at this stage the application is ready to be used to adjust the level of light intensity as needed.

Analysis of Test Results
After testing the tools used, the power output is obtained, from each PWM channeled to the Dimmer circuit, explaining that the brighter the light used is the greater the power used. In this case, the use of electric power can be optimized in its use with a microcontroller based light intensity control device

System Feasibility Analysis
In the design and manufacture of light intensity control devices based on microcontrollers, experiments have been carried out in stages so as to produce data as expected or planned.
With the existence of a light intensity control device based on the microcontroller, it is expected to be able to provide a solution in the use of electric power and light in daily needs.

Conclusion
The conclusions that can be taken in this study are as follows: 1. In this study, researchers can draw conclusions from the performance of PWM streamed by Arduino Uno in practice, every increase from 0-255PWM which is channeled to a dimmer circuit, the power used is 0-13.0357 Watts compared to before using a circuit of around 13, 5036 Watt with a comparison ratio of 1.7% with a 15 Watt lamp power with a stable light condition in its brightness 2. The distance of control of this tool can reach 26.15 M with 1 barrier wall and can still work with 3 barrier walls with a distance of 21.45 M in its use. 3. Tools designed to function properly, when the room is exposed to dim lighting, the lights can light up brightly and when the room gets lighting, then the lights dim. 4. The electric current used to turn on the lights is smaller (depending on the detected light) compared to the switch system with a constant current.

Suggestion
1. It is expected that microcontroller-based light intensity control devices can be further developed with more complex forms. 2. The Light Control PWM application should be developed with better control items and can be uploaded to the Play store. 3. For further research you can list the types of lights that can be used in this series of devices.