# Investigation of an LED Strip Controller Based on a PWM Driver and a PIC Series Microcontroller
## 3 Results and Discussion
As described earlier, the control of the LED controller is based on microcontroller commands. A program and its algorithm were developed for the control of LED strip lighting. The principal diagram of the program algorithm is presented in Figure 4a. The program starts with the START PROGRAM command. A request to the phone application follows. An array of stored data are read when the query is executed. The resulting data array is analyzed. Following receiving data from the application, the microcontroller sends commands to the PWM driver, which changes the parameters of the PWM signal accordingly. If the data in the application are unchanged, the LED controller executes the latest commands saved in the application. According to the commands received from the microcontroller, the PWM driver transmits the commands to the control channels of the MOSFET transistors. It is checked whether the entire program cycle has been completed and the application is informed about the successful completion via the BLUETOOTH module. If new data are entered into the application, the entire cycle is repeated, and the data entered into the application are saved. The control of the LED controller takes place using an application on a smartphone [1; 2; 3; 4; 5]. This application is designed for smart devices with the Android operating system. The block diagram of the application program algorithm is presented in Figure 4b. The application program starts with the START PROGRAM command (the control application is created using JavaScript). Communication with the LED controller is in progress. The LED controller sends a response about its last state. The presentation of application data on the smart device screen is in progress. If required (depending on the user), data are entered into the application and the application sends the changed information to the LED controller. Based on these data, configuration of the LED controller is carried out and adjustment of the LED strip light flux is carried out. The application program checks the status of whether the LED controller correctly controls the LED strips according to the newly entered commands. As mentioned earlier, the application is designed for smart devices (mostly phones). An image of the application program window is presented in Figure 5. Control applications are a convenient and modern way to manage various environmental parameters (in this case, the LED light flux). As mentioned earlier, the concept of this LED controller is intended for controlling the lighting of stairs, so the application is most suitable for this purpose. In the first step, the application receives information from the controller about the current state. The next step prompts the user to make changes. If no changes are made, the application works according to the last parameters. It is possible to change the sequence of lighting of LED strips and the time interval (after how long the next LED strip be activated and so on) between individual LED strips. After entering the lighting commands and parameters and sending them to the LED controller, the application can be turned off, and then the LED controller works independently according to the pre-entered control parameters. If a deviation in the control parameters of the LED controller is noticed, the user is informed and information about the changes in the control of the LED controller is visible on the  
Figure 3: The electric circuit of the power supply and parameter control of the LED lighting controller. screen. Using the BLUETOOTH communication, it is possible to transmit commands to the LED controller at a distance of several tens of meters. In the case of deviations in the operation of the LED controller, the application can offer the operator a choice of possible actions (such as rebooting the system, etc.). The LED controller designed and tested in this study is a fairly compact device that does not take up much space. It can be installed on various objects where it is necessary to control the LED lighting according to a certain scenario.