# Investigation of an LED Strip Controller Based on a PWM Driver and a PIC Series Microcontroller
## 3 Results and Discussion
The LED controller can be installed in control panels together with other auxiliary devices (e.g., power supplies, contact rows, power supplies, etc.). A real image of the LED controller under consideration during this study mounted on a control panel is shown in Figure 6.  
The LED controller also has a liquid crystal display that shows its operating status and parameters. These parameters can not only be changed using the application, but also by using the physical buttons on the controller. It is worth noting that such control panels are quite compact and can be installed in residential or industrial premises, shopping centers, etc. When designing control panels, it is necessary to take into account the general concept of the premises and the principles of ergonomics of the arrangement of devices, as well as the general design [2; 3; 4; 5]. Figure 4: (a) Algorithm block diagram of the LED controller program; (b) algorithm block diagram of LED controller application program. As mentioned earlier, the operation of the LED controller is achieved using two essential parts of the microcontroller--PIC24 FV32 KA302 and PWM driver PCA9685. The characteristics of the PWM pulse are controlled programmatically by the microcontroller via the PWM driver. The PWM driver is also a rectangular pulse generator. During the study, the dependence of the reaction time on the length of the command was determined. The results of these studies are presented in Figure 7. The I2C protocol is used for com  
Figure 5: An image of the LED lighting controller application window on a smart device. Figure 6: Image of a 16-channel LED controller (PWM) mounted on a control panel with additional components: 1—cables to LED strips; 2—LED controller; 3—cables to LED strips; 4—power supply unit; 5—LED strips for stair lighting. munication between the microcontroller and the PWM driver. I2C has a master-slave architecture, where one device is the master and the other devices are controlled by the master device (slaves). This allows you to quickly and efficiently organize communication between a large number of devices. I2C can operate in different speed modes, allowing adaptation to specific system requirements. I2C uses two--data (SDA) and synchronization (SCL)--lines, making it very resource efficient. A certain time interval is required for the microcontroller to send the command to the PWM driver. This time (reaction time) depends on the length of the microcontroller command and the speed of the protocol used. As can be seen from the research results, the response time was the lowest (0.5 ms) when the length of the command sent by the microcontroller was 1 bit. The reaction time is the duration after which, after sending a command to the microcontroller, a change in the output signal of the PWM driver is received for controlling the lighting parameters of LED strips. In order to measure the dependence of the reaction time on the length of the command, the microcontroller was programmed to send commands of variable lengths (1-10 bits). Microcontrollers have timer modules or timers that can capture the time between two events. In this case, a timer module was configured in the microcontroller, which recorded the moment when the command was sent to the PWM controller. Then, when the first signal change from the PWM controller was observed, the microcontroller set the timing. The reaction time was calculated as the difference between these two time points. As can be seen from the results, the dependence of the reaction time on the length of the command was linear. This dependence is convenient, as it is possible to predict the speed and time of operation of the LED controller with sufficient accuracy. Reaction times were measured programmatically using the measurement/counting functions on the microcontroller. As mentioned, control of the LED strip light flux was carried out by changing the characteristics of the PWM signal. The characteristics of the PWM signal were changed by transmitting commands from the microcontroller to the PWM driver.