Control System for Adjusting the Brightness Level with PWM Technique Using Visual Net Microcontroller-Based

A lamp is an artificial source of light produced by channeling electric current through the filament, which then heats up and produces light. Eye health experts believe that the ideal brightness of a lamp depends on ambient light. The rule must ensure that the brightness of the lights must be equivalent to the light around because, in that way, the light from the lights and surroundings will blend, and the eyes do not need to work harder. To overcome the problem, a control system was created by implementing the pulse width modulation (PWM) technique to control the brightness of the lights manually using a visual net application. Utilization of a microcontroller as a control center in controlling the brightness level of the lamp using the type of microcontroller AVR16, by displaying the PWM value on a form, designed on the visual net. Thus, it needed to set the level of light brightness to be ideal in the desired conditions. Keywords— Microcontroller, Visual Net, PWM.


INTRODUCTION
The lamp is an artificial source of light produced by channeling electric current through the filament, which then heats up and produces light. The glass covering the hot filament prevents air from coming into contact with it so that it will not be damaged immediately by oxidation. Lights are marketed in various forms and available in various voltages, ranging from 1.25 volts to 300 volts. The electrical energy required for incandescent lamps to produce bright light is greater than for other artificial light sources such as fluorescent lamps and light diodes so that gradually, in some countries, the incandescent lamp starts to be limited. Additionally, some use of incandescent lamps, for example, chicken heater and infrared heaters in industrial heating, make more use of the heat generated. Conversely, if the brightness level of the lamp is too much, it will cause eye irritation and permanent eye disease.
Eye health experts believe that the ideal brightness of a lamp depends on the ambient light. The rule must ensure that the brightness of the lamp should be equivalent to the light around. Therefore, the light will blend, and the eyes do not have to work harder. A control system needs to be created by implementing the pulse width modulation (PWM) technique that can control the brightness of the lights manually using a visual net application. Some researchers have researched the application of PWM with a microcontroller, such as single-phase induction motor voltage control using asymmetric PWM and fuzzy logic transitions by Zigirkas and Kalomiros. A microcontroller-based AC voltage regulator for single-phase induction motors using asymmetric pulse width modulation (PWM) and fuzzy logistics was proposed [1]. Zulkifli, Ramli, and Razali developed ZVS power converters for voltage control with low-cost microcontrollers. Tests on open and closed-loop were applied using Proportional Integral (PI) control to control the Pulse Width Modulation (PWM) signal pattern for the inverter output in hardware trial testing [2]. Single-phase seven-level inverter Pulse Width Modulated (PWM) controls were designed for hardware and singlephase seven-level inverter implementation [3]. Ravindran implemented the microcontroller arm to maximize solar panel power output using the Hill-Climbing Algorithm. The microcontroller controlled the solar panel current with the help of a 12bit ADC sampling frequency of 200 kHz and adjusted the duty cycle of the PWM signal given to the converter gate drive circuit [4]. Xu and Kang designed the PWM speed DC motor drive. The design of a bipolar pulsewidth modulation (PWM) motor speed control system was used in the PIC16F876 microchip as a control system circuit and became the main technology controlling DC motors [5].
An inexpensive didactic module for adding single-phase inverters was published by Silva. It was a one-phase DC-AC converter controlled by a Pulse Width Modulation (PWM) strategy, consisting of software and hardware elements that suggested the users connect the converter to applications on mobile phones [6]. A multi-carrier PWM implementation using TMSthe 320F28335 DSP application for the multicellular single-phase inverter series was released by Guedouani using MATLAB/Simulink and the coding tool for the TMS320F335 floating-point digital signal processor (DSP) [7]. Savkin investigated a real-time drive model activated based on the LUT magnetization curve for educational purposes. The structure of the model for real-time execution in a motion control microcontroller, run under PWM frequencies up to 40 kHz [8] [9]. Bolanos-Cerrud studied optimization algorithm for accurate sine wave PWM generation with a microcontroller replacement. The numerical methods and procedures were used in the algorithm to solve numerical obstacles in achieving accurate PWM sine wave frequency generation [10].
Aref examined microcontrollers for MPPT digital control Table PV systems. The SPWM was generated by comparing sinusoidal waves with a variable frequency of sawtooth waves using the Perturb and Observe (P&O) method for MPPT control of PV systems [11]. Pimentel investigated HIL-based DC Motor Speed Control, implemented as a physical system handled by IGBT, based on PI control using a microcontroller PWM output [12]. Yener designed a microcontroller-based ECG signal generator using a PWM microcontroller output and experimental ECG data. It appeared that the circuit could produce the desired ECG waveforms by sending PWM outputs and low-pass filters and performing well [13]. Mohsin analyzed irrigation pump drivers by solar PV panels and the same time used the maximum power extracted in high light hours during the day by increasing the motor speed during the period and reducing it at low lighting periods by using PWM [14]. Kebir designed the construction of an inverter for a photovoltaic system. Buck-boost was supported by a photovoltaic panel using TL494, which generated a PWM signal for the control of two transistors to have a 311V voltage adjusted by a control loop that held a constant voltage whatever influences temperature and sunlight [15].
Khan designed and manufactured digital MOSFET-based AVRs for synchronous generators to produce PWM, according to the peak voltage by the Peak detector [16]. Jasielski investigated the LBDD PWM hybrid modulator for BD-class digital audio amplifier based on the STM32F407VGT6 microcontroller and analog DLL. A new architecture and implementation of the 9-bit hybrid LBDD PWM modulator for Class-BD digital audio amplifiers had been proposed [17]. Ravi Kumar studied a microprocessorbased closed-loop speed control on DC motors using PWM. The benchmark goal of the DC drives was to maintain the system at a stable speed regardless of load conditions. In this project, the PWM used for DC motor speed control was generated using a P89V51RD2 microcontroller [18]. Ahmed investigated microcontroller-based rectifier design for chemical surface treatments. The microcontroller pulse width modulation (PWM) technology was used to produce DC currents that drive the h-bridge with 150KHz. [19]. Liu designed high voltage DC power supplies using PWM wave microcontroller AT89S51 generated by using software programming as a helicopter control signal [20].
This research differs from previous researchers who examined Pulse Width Modulation (PWM) used for various applications such as PWM used for single phase induction motor voltage control, PWM for seven-stage one-phase inverters, PWM for drive gate converter circuits, and PWM for controlling motors DC This paper presents PWM to control the brightness and dim of the LED by using a visual net based on a microcontroller.

II. LITERATURE REVIEW
A. LED Light Emitting Diode (LED) is an electronic component that emits monochromatic light when applied forward voltage [21]- [23]. It is a family of diodes made from semiconductor materials. The colors of the light emitted by the LED depend on the type of semiconductor material used. The LEDs can also emit infrared rays that are not visible as frequently encountered on TV remote control or remote control of other electronic devices.
An LED is small and easily attached to a variety of electronic devices [24]- [26] and has been widely used as a light in LCD TVs, replacing tube lights. Unlike an incandescent lamp, an LED does not require the burning of a filament so that it does not cause heat in producing light. The way an LED works is almost the same as the diode. It has two poles, namely the Positive pole (P) and the Negative Pole (N) [27]- [30]. It will only emit light if the forward voltage is passed from the anode to the cathode. The LED consists of a semiconductor chip doped to create P and N junctions. The doping process in semiconductors is the process of adding impurity to a pure semiconductor to produce the desired electrical characteristics. When the LED is powered by a forward voltage or forward bias, i.e. from the anode (P) to the cathode (K), the excess electrons in the Ntype material will move to the region that has an excess hole (the hole), which is a positively charged region (P-Type material). When electrons meet the hole, they release photons and emit monochromatic light (one color). The LED, which emits light when flowing forward voltage, can also be classified as a transducer that can convert electrical energy into light energy.

B. Microcontroller
A microcontroller is a digital electronic device that has input, output, and control with a program that can be written and deleted in a special way [7]. The microcontroller manages reading and writing data. There is a computer in the chip used to control electronic equipment, which emphasizes efficiency and cost-effectiveness. It is called a "small controller" where an electronic system that previously requires a lot of supporting components such as IC TTL and CMOS can be reduced, centralized, and controlled by the microcontroller. Using the microcontroller makes the electronic system concise, the design of electronic systems faster because most of the systems are easily modified software, and the search for interference is easier to trace. After all, the system is compact.
However, the microcontroller cannot completely reduce TTL and CMOS IC components frequently still needed for high-speed applications or simply increase the number of input and output (I/O) channels. In other words, a microcontroller is a mini or micro version of a computer since the microcontroller contains several peripherals that can be directly utilized, for example, parallel port, serial port, comparator, digital to analog conversion (DAC), analog to digital conversion, and so forth using uncomplicated or complex minimums systems. VCC is a pin that functions as a power supply input. GND is a Ground pin. RESET is used to reset the microcontroller. XTAL1 and XTAL2 are external clock input pins. AVCC is a voltage input pin for the ADC. AREF is the ADC reference voltage input.

C. Simplex Data Transmission
One-way system (Simplex) is a communication system where the sender of the message only sends messages without having to receive a response from the recipient, meaning the sender continues to send messages regardless of whether the message was received or not. The application of this communication system is on the broadcast system of radio stations, television stations, and Static WEB [8].
One-way transmission or better known as simplex is a data transmission mode that can only carry data information in one direction, for example, radio and television. The signals sent from station transmitters can only be received by broadcast capture aircraft, but the broadcast capture aircraft cannot send information back to the transmitter station. Computing-based applications, and extending support for databases both standalone or database server.
Visual Basic 2010 comes from a programming language that is very popular among computer programmers, namely BASIC, which was adopted by Microsoft in the Microsoft Quick BASIC program. Along with the development of computing and design technology, Microsoft released a product called Microsoft Visual Studio with Visual Basic in it.

III. METHOD
In conducting the research, the methodology was literature study needed to learn the basic theories related to the topic of discussion. The development processes integrated in the approach was tool design and manufacturing, tool analysis, discussion, and testing [10].  Figure 7 shows the system algorithm. System initialization was the process that occurred when the power supply was connected to the system when the data cable on the microcontroller was connected to the USB port on the laptop. The system would activate when the indicator LED on the microcontroller turned on [11]. A laptop pairing process with a microcontroller was a process to connect the laptop to the microcontroller to communicate with each other by entering the serial port using serial communication in which the data was sent in bytes. The final phase of the system was adjusting the brightness of the lights in the visual studio to increase or decrease it.

A. Block Diagram
The block diagram displayed in figure 8 illustrates the design of the input and output of the light brightness system. Ms. Visual Studio worked as an input. A microcontroller as a processing unit was connected to a 12V power supply. Visual Basic served to display the distance interface, and Visual Net to display the distance of the objects to the screen.

B. Physical Design of the Tool
In this case, the physical design of the tool was: sketch of the warning system on vehicles passing into sharp turns using Google Sketch up software, while the sketch of the tool design system is as follows: In the picture above is the design of the whole system at the time of implementation. Visual studio used is visual studio 2010 and laptop and is connected to the laptop with a data cable via a USB port. The components needed in making the system are shown in Table 1

C. Pulse Width Modulation Value
The Pulse Width Modulation value in this system uses 8 bit resolution (255), which means that each speed value is represented by the numbers 0 to 255. The following Pulse Width Modulation values will be implemented on the system: When the duty cycle was 90% and the resolution used was 8 bytes, the value of the duty cycle was represented by numbers 0 to 255 to generate the PWM value of 229.50.

D. ATMega16 Minimum System Series16
The microcontroller used for the design was AVR type, namely ATMega16, programmed using BASCOM-AVR Software.

E. Overall Series of Electronic Schematics
In the system that was made the design of the prototype system was made in 2 LEDs using 2 220 ohm resistors and 16 * 2 LCD to find out the value of pwm. Next is a series of LEDs and resistors from the system being built. The design of the prototype system was made with two LEDs utilizing two 220-ohm resistors and 16x2 LCD to find out the PWM value. Subsequently, a series of LEDs and resistors of the system was built.

F. Testing
Testing was conducted to examine whether the design applied to the tool worked successfully or not. The VB form design had two rooms prototypes. Two buttons indicating plus and minus were available to adjust the level of light in the room, there were several buttons. Figure 12 shows the VB display.
Visual Studio Net managed to adjust the brightness of the lights by first connecting the serial port that matched with the one on the device manager display. After the pairing process, direct light brightness control could be controlled manually.

Testing on WM Values on LCD and Lamp Brightness
The LCD testing was carried out by connecting the LCD to a microcontroller containing a program to display the PWM value to be processed. After testing, it would be found whether the LCD had worked properly and according to what was designed. Figure 13 shows the display of the PWM value on the LCD.

Voltage Testing
Voltage test is needed to find out whether the components used are working. The voltage test is shown in table 2. From the table it can be seen that the microcontroller works at a voltage of 4.98Volt, the LED can light up when the voltage condition is 3 volts and the LCD works with a voltage of 4.98 Volt

System Strengths and Weaknesses
Based on the exposure and experiments conducted, the author found the advantages and disadvantages of the design of the microcontroller-based light brightness. The advantages were 1). the process of adjusting the light through the interface display, 2). the process of lamp brightness through the PWM value, and 3). the changes in the PWM value displayed on the LCD. Meanwhile, the disadvantages were 1). the manual lighting settings and 2). the challenging process of laying down components.

V. CONCLUSION
The conclusions in this study are as follows. The application of the Avr16 microcontroller based Pulse Width Modulation (PWM) technique on the automatic control system can effectively adjust the brightness of the light to be ideal under the conditions we want. Implementation of design and construction using visual basic net with prototype 2 rooms can make it easier to control the level of light through the plus and less buttons.