In this paper, the 16-bit dsPIC33EP series chip controller of Microchip Company is used as the main digital chip of switching power supply. The design scheme of digital control multi-output is introduced. The corresponding hardware and software design are carried out and the principle prototype is made.The experimental verification of the prototype shows that the prototype achieves multi-output and the system works stably, and has intelligent functions such as fault locking and timing control, which meets the design requirements.Switching power supply is an indispensable key electronic component in electronic equipment. With the development of power electronics technology and the wide application of electronic information technology in electronic equipment, the functional requirements of these devices for switching power supply are getting higher and higher.The traditional analog switching power supply system has many components, complex structure and low integration. When the performance index of power supply changes, more hardware needs to be replaced, and the control method can not be changed, so its flexibility is poor. However, the pulse width controller used in the system is relatively simple, relatively low cost and high reliability.Compared with analog power supply, digital power supply can modify working parameters and optimize power supply system by software programming. It has the advantages of flexibility, compatibility and easy to realize monitoring and management functions.Digital control technology has become an important research direction of power electronics and one of the development directions of switching power supply in the future.In this paper, according to the design requirements of the power supply system of a project, the input voltage is mainly 18-36V; the output voltage/current is 5 V/lOA, 3.3 V/3A, 5 V/2A, and -5V/2A; the voltage adjustment rate is 2%; the current adjustment rate is 2%; the digital timing control is 5 V/lOA, 3.3V/3A, and lOms are opened first, and the other two are opened at the same time. Temperature protection function.This paper takes dsPIC33EP controller of Microchip Company as the core, and designs hardware and software to meet the above requirements.DsPIC33EP “GS” series chips are digital control chips specially designed for switching power supply, which are launched by Microchip in recent years.The dsPIC33EP “GS” series chips adopt the Harvard architecture of DSP MCU, which supports almost all the mainstream switching power supply in the power industry.For example, the new generation of dsPIC33EP64GS50X series CPU has the highest processing performance up to 70MIPS. As a digital control chip specially designed for switching power supply, dsPIC33EP64GS50X provides four pairs of (8-way) PWM output, which can meet the requirements of almost all common topologies.The resolution of PWM output signal can reach 1.04ns. Compared with the communication power supply whose switching period is in microsecond level, it is enough to achieve high precision voltage output.In addition, the chip can provide up to 22 analog inputs, which can monitor the input/output, voltage/current and temperature of the power supply in real time.This series of chips can be widely used in AC/DC converter, automotive HID, battery charger, DC/DC converter, digital lighting, induction cooker, renewable energy and UPS power supply.The dsPIC33EP controller highly integrates three peripherals: power PWM generator, high-speed 12-bit analog-to-digital converter (ADC) and high-speed analog comparator. They cooperate with each other to generate and control PWM, which is very suitable for the use of digital power controller in this project.The power supply system mainly achieves four power outputs: 5V/lOA, 3.3V/3A, 5V/2A, thermostatic element and -5V/2A. The system requires primary and secondary isolation. Besides the combined output of 5V/2A and -5V/2A, the others require independent structure output.In this paper, 5V/10A is realized by half-bridge topology and secondary synchronous rectification; 3.3U/3A is realized by single-ended forward topology; 5V/2A and -5V/2A are realized by single-ended forward topology.Each output voltage, current and temperature signal is input to the dsPIC33EP controller through sampling circuit, then the analog signal is converted into digital signal by the controller for quantization, and then the output voltage feedback signal is compared with a reference value set in the controller to obtain the error signal. Then, a series of digital algorithms are used to obtain the error signal. The expected duty cycle output of the PWM is used to control the work of the corresponding power supply and realize the stable output of each voltage.The corresponding protection circuit is set according to the voltage, current and temperature signals sampled. Once the overvoltage, overcurrent or overtemperature occurs, the duty cycle of the corresponding PWM module is reduced to zero, and the output of the module stops.In addition, the power supply system can be digital timing control through software design.The schematic diagram of the power supply system is shown in Figure 1.The power supply system consists of three independent DC/DC main power circuits, namely 5V/10A, 3.3V/3A and ( 5V/2A) main power circuits, to achieve four voltage outputs.There are many topologies of power conversion circuits, such as forward converter, flyback converter, push-pull converter, half-bridge converter and so on.The advantages of single-ended flyback converter are simple circuit structure, less use of components, low voltage stress of MOSFET and wide voltage regulation range.The disadvantage is that the conversion efficiency is difficult to improve, the output characteristics are poor, and the dynamic response effect is not good.Single-ended flyback converter is more complex than single-ended flyback converter, but its output characteristics have better dynamic response effect and conversion efficiency is higher than that of single-ended flyback converter.Therefore, the 3.3V/3A and 5V/2A main power circuits in this paper use single-ended forward converter to achieve voltage output.Push-pull structure has the advantages of high voltage output power and good output characteristics.Conversion efficiency is high.
The transformer works in the first and third quadrants, and the core utilization rate is high.The disadvantages are complex circuit structure, large number of power devices and complex transformer design.The overall volume of the circuit is large.The high primary voltage stress makes the selection of switch tube difficult.The half-bridge structure has the advantages of high output power and high conversion efficiency.The transformer works in the first and third quadrants, and the core utilization rate is high.Only one winding is used in the primary stage, and the volume of the transformer is smaller than that of the push-pull structure.The primary MOSFET only bears twice the input voltage, which is beneficial to the selection of MOSFET.Therefore, the 5V/10A main power circuit in this paper uses half-bridge converter to realize voltage output.
Fig. 2 is one of the 5V/10A main power circuits, which uses half-bridge topology.
Considering the secondary output current 10A, the secondary uses synchronous rectification to improve power efficiency.After reasonable design, the transformer chooses RM6 core with turn ratio of 4:3:3, and the output inductance chooses RM6 core with inductance of 3.6uH 0.3uH.The working frequency is set by the dsPIC33EP controller, the pulse width modulation voltage single-loop control mode is adopted, and the complementary driving signals are generated by the PWM1 and PWM2 modules, which have the functions of dead-time regulation and fault protection.The digital PWM unit of dsPIC33EP controller provides driving signal.Because the switching transistor used in this design is MOSFET transistor, it needs to provide large current at the moment of opening, and it needs to withdraw large current at the moment of switching off. The output port of PWM module of main control chip has limited ability to provide current, so it needs to increase the driving circuit.At the same time, according to the overall design of the system, the control circuit is isolated from the original side.Pulse transformer isolation is adopted in this design, which has low cost and high cost performance.The block diagram of the isolation drive circuit is shown in Figure 3.The input and output signals of the driving signal of the isolation driving circuit are usually pulse waveforms. The main function of the isolation driving circuit is to isolate the driving signal.The input driving signal of isolation driving circuit is complementary driving PWM wave (such as PWMIH, PWMIL). First, the driving chip is used to convert the level and enhance the driving ability. Then, the driving signal is transferred from the original side of the pulse transformer to the secondary side through the pulse transformer.
Then, the opening speed of the MOSFET is adjusted by the gate driving resistance. The dynamic resistance is used to control the rise time of the MOSFET waveform and the limited current effect.In this paper, the voltage, current and temperature signals need to be sampled. The actual feedback signals are continuous signals, which must be digitally converted before they can be processed in the dsPIC33EP controller. This process is implemented by the ADC module built in the chip.The output value of the signal sampling circuit can be directly input to the ADC interface of the dsPIC33EP controller, that is, the ADC interface. These signals will participate in the calculation of the feedback loop or the corresponding protection program of the system.The current sampling circuit directly sampled the output current through the current detection resistance, and then the current sensor was used to process the current feedback. The current was input to the ADC interface of the controller for analog-to-digital conversion. Finally, the corresponding output current was controlled by the controller.The current sampling circuit is shown in Figure 4.Among them, the amplification factor of current transformer is 40, so the current sampling voltage CSl= 40xRs x/o.The voltage sampling circuit feeds back the output voltage sampling value to the ADC interface of the controller, carries on the analog-to-digital conversion, and then controls the corresponding output voltage by the controller.Operational Amplifier Output Voltage VFB= (R52/R51) xVo.
In order to simplify the temperature sampling circuit, the upper and lower resistors are used as voltage dividers, in which the lower resistors are thermistors, and the voltage from voltage dividers is directly output to the ADC interface.As shown in Figure 5.In the initial stage of power-on, the main program of system software design mainly completes the initialization and setting of system parameters, and completes the initialization call of functional module registers; starts timer, digital PWM, analog-to-digital converter and executes PWM control subroutine in standard interrupt program.Figure 6 is the main program flow chart.In analog power supply, the change of output voltage with time is continuous, while in digital power supply, the output voltage is several samples in discrete time domain sampled by ADC sampling frequency Fs.Therefore, the main control chip can only obtain the output voltage at the sampling time, and the output voltage can be updated after the next sampling.The output voltage value sampled by high-speed 12-bit analog-to-digital converter (ADC) is expressed digitally between Ox0000 and OxFFF.The output voltage is compared with the reference value to get the error signal. The error signal is processed by the digital compensator to get the new duty cycle of PWM wave, and then the digital-to-analog conversion (DAC) is realized.The main program enters the ADC interruption after each sampling. The output voltage is sampled and the new duty cycle is obtained by using digital compensator operation. Finally, the four-way voltage stable output is realized.Figure 7 shows the ADC interrupt flow chart.The design methods of digital compensators are mainly divided into two categories: one is based on the design method of continuous system. The design method is to obtain the digital compensator Hc (z) from the compensator Hc (s) designed in the continuous domain by using a certain discrete transformation, which is called “indirect design method”.The other is to establish discrete model Hp (z) of controlled object in Z domain, and then design compensator directly in discrete domain, which is called “direct design method”.Because the design method of analog compensator for continuous system is familiar, indirect design method is adopted in this scheme.The following is an example of the design of a digital compensator for one of the 5V/lOAs.As can be seen from Figure 8, the transfer function of 5V/lOA includes four parts: digital compensator, PWM, controlled object (i.e. main power loop) and ADC.The main power parameters of 5V/10A are: rated input voltage Vin is 28V; transformer ratio n is 4:3:3, Np=4, Ns=3; output inductance Lo is 3.6uH; output capacitance Co is 141uF, its equivalent resistance Resr is about 15MQ; load resistance Rout is 0.5Q.The number of times is set to 1.0583ns.The ADC module sampled once in each switching period, so the sampling frequency is 200 kHz, that is, the sampling period Ts is 5 us.The open-loop transfer function of the system is the Bird diagram of Hsys (s)*Hc (s) (the yellow curve in Fig. 10). Its traversing frequency is about 13 kHz, and the phase margin is about 550, which meets the design requirements.With this parameter as the original parameter of the digital compensator, the final parameter still needs to be further adjusted in the actual engineering debugging until it basically meets the performance requirements.The power supply of this project has the function of fault locking, and has the functions of over-voltage, over-current and over-temperature protection.
DsPIC33EP has five high-speed 12-bit analog-to-digital converters (ADCs): four dedicated cores and one common (common) core.
For the loop control part, four dedicated ADC cores are used to process the 4-way voltage which needs synchronous sampling. The remaining signals such as current and temperature that need to be monitored are sampled and converted by polling using the common ADC core.At the same time, the protection threshold is set in the program. Once the sampling signal exceeds the corresponding protection threshold, the digital PWM module corresponding to the corresponding DC/DC converter is closed, which plays the role of fault locking.In addition, each DC/DC main power circuit is controlled by the corresponding digital PWM module.Here, the driving signals of 5V/10A main power circuit are provided by PWM1 and PWM2 modules, and the driving signals of 3.3V/3A and 5V/2A main power circuit are provided by PWM3 and PWM4 respectively.Each digital PWM module needs a delay time to start, so only according to the timing control requirements, reasonable setting of the start delay time of PWM4 module is longer than that of PWM1, PWM2 and PWM3 lOms can realize the design requirements of 5V/10A, 3.3V/3A, lOms and ( 5V/2A).
In this paper, the 16-bit dsPIC33EP series dsPIC33EP64GS50X of Microchip Company is used as the main control chip, and the principle prototype of the system is built through the hardware and software design to realize four-way voltage output.The comparison between the measured results and the design indicators is shown in Table 1. The measured results meet the requirements of the design indicators, which verifies the feasibility and validity of the above circuit design.The measured waveforms of some key points are shown in Fig. 11-15.At rated 28V input, the upper waveform of Fig.
11 is the leakage waveform of 5V/10A primary lower MOS transistor with a peak value of 32.5V, and the lower waveform is the output voltage ripple of 63mV.
In Figure 12, the upper waveform is 3.3V/3A primary MOSFET drain waveform with a peak value of 61.9V; the lower waveform is its output voltage ripple of 69mV.In Figure 13, the upper waveform is Shi 5V/2A primary MOS transistor drain waveform with a peak value of 58.8V; the lower waveform is its positive output voltage ripple of 63 mV.As can be seen from Figure 14, the output voltages are 5 V/lOA, 3.3 V/3A and 5 V/2A, respectively.The power-on sequence is 5V/10A of channel 1 and 3.3V/3A of channel 2. The power-on sequence is 5V/10A of channel 1 and 3.3V/3A of channel 2. After about 140 ms, the power-on sequence is 5V/2A of channel 3 and-5V/2A of channel 4.The four-way output voltage and the actual power-on timing are in good agreement with the theoretical design and meet the design requirements.The principle prototype has the function of fault locking, i.e. over-voltage, over-current and over-temperature protection. Fig. 15 shows the leakage waveform and output voltage waveform of primary MOS transistor when the output current exceeds 130.When over-current is detected, 3.3V will work, protect, work and re-protect repeatedly until the fault disappears. The phenomenon of over-voltage and over-temperature is the same, all of which are realized by burping protection.In this paper, the design of a multi-channel power supply based on dsPIC33EP controller is discussed, including the overall design idea and the corresponding hardware and software design.According to the principle of this scheme, the prototype can realize four-way voltage output and work steadily, and has the function of fault locking and digital timing control, which can meet the design requirements.