An Introduction Microchip's dsPIC33F family is a high-performance 16-bit digital signal controller (DSC) with an improved Harvard architecture and C compiler optimized instruction set with 16-bit wide data bus and 24-bit wide instructions, working from 3.0-3.6V Speed ​​up to 40MIPS, in the LED drive system application, it is convenient to implement multi-channel switching power supply (SMPS) and other digital power converters such as AC/DC converter, DC/DC converter, power factor correction (PFC), constant current Detection and other functions, this article focuses on the use of dsPIC33 MCU to achieve a series of LED power, drive, dimming, communications and other applications, the following design ideas will be presented to everyone. Power supply design The life of the LED ultimately depends on the processing of the power flowing through the LED. At present, due to the pursuit of cost, many LED luminaire manufacturers still use the power supply of the RC capacitor to supply power to the LED, which causes great damage to the LED performance. Product performance is also greatly reduced; in addition, due to different power environments in different countries and regions around the world, there are also differences in civilian voltages. The voltage range of electrical appliances in various countries is also different. High-quality LED lighting factories use digital power sources to make LED power supplies. LEDs get the cleanest power supply and extend the working life of LEDs. The dsPIC33F “GS†Series Digital Power DSCs fully support digital control loops because they are equipped with 4 to 8 PWMs with 1 nanosecond (ns) resolution, up to 4 20ns comparators and 1 or 2 samples. The rate is 2 - 4 MSPS, 10-bit on-chip ADC with low latency and high resolution control, and each comparator has an integrated digital-to-analog converter (DAC). These devices feature 18 to 44 pins and 6 to 16 KB of flash memory. The interactive peripherals of these devices minimize processor intervention while meeting the real-time requirements of high-speed current mode control. Firstly, the differential AC power is converted into DC voltage. In this process, external voltage changes are collected through K1, K2, and K3. The output voltage is controlled by dsPIC33 PWM to ensure the stability of the output voltage. It is applicable to various voltage ranges. , greatly reduced the need to produce different types of LED lamps due to different civilian voltages. Then the SPWM generated by the dsPIC33 drives the full-bridge circuit to generate an AC voltage. The waveform is detected by the transformer. After the transformer is isolated, the PFC is adjusted to output a safe and stable DC voltage for subsequent processing for the LED. The typical BUCK circuit effectively controls the output stability through a closed-loop circuit composed of a PWM waveform and AD. In particular, the processing of the freewheeling diode in this scheme increases both system stability and power consumption. LED driver part design At present, there are many LED driver special chips in the market. The advantages are simple circuit, small size and low cost. However, this circuit also has its insurmountable shortcomings, such as: simple design, low intelligence level, small driving current, and no boost circuit. , unable to quantify the output, etc. The dsPIC family of MCUs is equipped with 4 to 8 PWMs with a resolution of 1 nanosecond (ns) and a 10-bit AD with a sampling rate of 2 - 4 MSPS. The MCU PWM control MOS controls the current flowing through the LED. Let the output current and voltage be finely adjusted, AD collects real-time current, quantizes the output, monitors the working state of the LED in real time, and PWM and AD form closed-loop control, which maximizes the working state of the LED and reduces the difference caused by the LED itself. Instability. The Boost boost constant current process is divided into two parts, charge and discharge, to illustrate this circuit. Charging process During the charging process, the switch is closed (the MOS tube is turned on), the equivalent circuit is shown in Figure 2, and the switch (MOS tube) is replaced by a wire. At this time, the input voltage flows through the inductor. The diode prevents the capacitor from discharging to ground. Since the input is direct current, the current on the inductor increases linearly at a rate that is related to the inductor size. As the inductor current increases, some energy is stored in the inductor. Discharge process The equivalent circuit when the switch is turned off (the MOSFET is turned off). When the switch is turned off (the MOSFET is turned off), the current flowing through the inductor does not immediately become 0 due to the current holding characteristic of the inductor, but slowly becomes 0 when the charging is completed. The original circuit is broken. On, the inductor can only be discharged through the new circuit, that is, the inductor starts to charge the capacitor, and the voltage across the capacitor rises. At this time, the voltage is already higher than the input voltage. The boost is complete. Constant current process Add a sampling resistor to the output load terminal, pass the current condition of the load through AD, feed back to the MCU for processing, adjust the output PWM duty cycle, and achieve constant current processing. Dimming system design LED dimming solutions and specifications have been constantly changing, and have not been fixed until now, so there are three dimming schemes for PWM, analog and thyristor (TRAIC) on the market. In the three schemes, analog dimming is simpler and easier to implement. The disadvantage of the analog dimming scheme is that the adjustment range of the LED current is limited to a certain maximum value to about 10% of the maximum value (10:1 dimming range). Since the chromatogram of the LED is related to the current, this method Not suitable for some applications. The thyristor (TRAIC) dimming scheme is a commonly used scheme in the market. It is a dimming scheme based on a traditional light source such as an incandescent lamp. The advantage is that there is no need to change the existing room wiring, the construction is simple, and the versatility is compared. Strong, but it is at the expense of sacrificing power factor and increasing the complexity of the circuit, and thyristor (TRAIC) dimming can not achieve stepless dimming, when the conduction angle of the thyristor is low to a certain extent The luminaire will flash, which is determined by the principle of the scheme. PWM dimming is the mainstream solution in the dimming market, and its advantages are as follows: 1. With PWM dimming from zero to the most light, there will be no flickering. 2, the performance will be better. Because the dimming output power uses a power factor correction circuit, which is mandatory for the power factor of the world. Although it is generally required from 25W, the United States requires that the lamp must have a mandatory power factor from zero watts. Correction circuit. The use of TRAIC dimming will sacrifice power factor and increase circuit complexity. Therefore, the use of PWM dimming can provide the best performance choice and is the future trend. 3. The cost will be better. Adjusting the duty cycle with PWM does not require much additional control circuit cost. 4. No matter how large the dimming is, the LED is allowed to work under optimized and constant current. 5. The color tone of the LED remains the same throughout the dimming range (the color tone changes like the lumen output of the LED as the LED operating current). The dsPIC MCU uses PWM dimming in the system design process. The dsPIC MCU is equipped with 4 to 8 channels of PWM, which can easily realize RGB true color dimming, and cooperate with 10-bit on-chip ADC to manage and detect the real-time operation of each group of lights to achieve better working results. Communication system design 0-10V, DALI, DMX512 are three communication methods commonly used in LED lighting systems. DMX512 has gradually become a mainstream solution due to its high efficiency of data transmission and long transmission distance. The DMX512 protocol is an acronym for Digital Multiplex and was proposed by the American Theatre Technology Association USITT. The most original version was published in 1986 and was revised in 1990. The USITT DMX512/1990 is a dimming and lighting console data transmission standard that is a universal signal control protocol for digital devices in the lighting industry and an international protocol. Advantages of DMX512: 1. The hardware cost is relatively low and the protocol is simple and reliable. 2. The signal pipeline is a bus topology. The failure of one terminal does not affect the normal operation of other terminals, and the system stability is high. 3. Differential level working mode, long transmission distance, more suitable for discrete distribution of lamps. 4. The agreement is an international general agreement with good compatibility. 5. The control is flexible and convenient, and won the favor of the original traditional stage lighting practitioners. Insufficient DMX512: 1. The bus structure makes the number of DMX device terminals limited, generally 32, and needs to add a signal distributor. 2. The bus structure determines that different device terminals must be distinguished by address, and setting the address is not convenient. 3. It is difficult to meet the control requirements of LED luminaires without expanding 512 data channels. 4. Programming is more complicated, only suitable for more professional lighting practitioners or professionals. In view of the shortcomings of DMX512, this scheme has extended the original DMX512 protocol to a certain extent, which has solved its shortcomings well: 1. By adding a serial signal amplifier to avoid the original star signal distributor, greatly reducing the difficulty of engineering wiring. 2. Provide the tested DMX512 protocol to customers, shorten the customer's familiarity with DMX512, and accelerate the development cycle. In addition to providing DMX512 communication mode, the dsPIC33 solution also supports the infrared interface and RF interface due to the versatility of the MCU. It implements wireless control mode and increases the selling point of the product. It can also use the internal dsPIC33 chip with CAN to set the LED light. Connect with automotive products, such as car dashboard backlights, reading lights, etc., to increase product types. in conclusion Based on the dsPIC33 LED driver single-chip solution, the power control and system management are combined into one, which reduces the complexity of the hardware design, and at the same time takes into account the flexibility of the design of the drive output number, which can be changed by changing the memory in the periphery of the control chip. The content realizes the customization of control parameters such as LED current size, on-off time, on-off mode, ambient brightness and system temperature, and can also perform long-distance dimming control and wireless control through the MCU communication interface. The dsPIC33 LED driver single chip solution has the following advantages: Low cost - single chip solves multi-channel constant current control, eliminating the need for dedicated constant current chips, effectively reducing system cost. High efficiency - non-isolated switching power supply, no transformer leakage loss, high conversion efficiency, the overall efficiency of the system is up to 95% when fully loaded. Strong driving ability - can support up to 8 non-isolated constant current drive outputs, can drive 8 strings (no less than 14 per string) LED, the total output power is not less than 100W. Flexible control--using high-performance DSC as the control core, the advantages of MCU real-time control function can be fully utilized, and the current size and brightness-off mode of each LED can be independently controlled. Good scalability - configure temperature, brightness, color temperature and other detection interfaces, support serial port, I2C, CAN and other communication interfaces, paving the way for system integration. Decorative Wall Lights,Decorative Lights,Wall Art Decor,Light Decoration Guangzhou Huanyu Clocking Technologies Co., Ltd. , https://www.findclock.com