PIC12F675 Buck Boost or Cuk Converter
Category: Switch Mode Power Supplies (SMPS)
Designer: RANA MUHAMMAD ADNAN KHALIL
Notes
This circuit is simulated in Proteus 7.10. While code is written in MpLab X IDE using XC8 compiler. The microcontroller used in this project is PIC12F675. A Buck-Boost (or Cuk) converter is made by generating PWM through microcontroller. The working of this project is given below. 1. To understand the working of this circuit, first see previous circuits "PWM Generator With Duty Cycle Control", "PIC12F675 Buck Converter" and also "PIC12F Boost Converter". 2. In this circuit, a buck-boost converter is made using PIC12F675. 3. The output voltage Vo formula for buck-boost converter is Vo = D*Vin/(1-D) where D is duty cycle (0.1 to 0.9). 4. To derive the mosfet Q1 (IRF3205), a npn transistor Q2 (2N3904) is used, because Q1 should operate in saturation or cutt-off region. 5. The mosfet Q1 needs 12V for saturation therefore, a npn transistor Q2 is used to shift level from 5V to 12V (but in inverting mode i.e., not gate). 6. The input voltage for this buck-boost converter is 12V, and output voltage can be step down or can be step up (i.e, can be less than 12V or can be greater than 12V) depending on PWM duty cycle. 7. The resistor R1 is the load resistor, switching circuit should be operate with some load, otherwise the control is difficult. 8. The output voltage can be controlled by changing the duty cycle or mosfet Q1 through potentiometer RV1. 9. When the duty cycle of mosfet Q1 less than 50%, the circuit is in step down (buck converter) mode and output voltage will be less than input voltage (use above equation for duty cycle and output voltage relation). 10. When the duty cycle of mosfet Q1 greater than 50%, the circuit is in step up (boosr converter) mode and output voltage will be greater than input voltage (use above equation for duty cycle and output voltage relation). 11. The frequency can also be changed by changing RV2, I choose very low switching frequency (alsmost 250Hz) for simulation in Proteus, increase the switching frequency to reduce the value and size of inductors and capacitors. 12. In steady state, the average voltage accross both inductors (L1 and L2) are zero and the voltage (Vc) across capacitor C1 which is placed between these inductors is the sum of input and output voltage. Vc = Vin + Vo 13. The value of inductors L1 and L2 is selected according to switching frequency, and it is inversely proportional. 14. The capacitors C1 and C2 are also dependent upon switching frequency, C2 is used for output voltage filter. 15. The LED D2 is used as indication of output voltages. 16. When the mosfet Q1 is ON, it connects the inductor L1 to ground, and inductor L1 is charged and stores electrical energy in the form of current (i.e (1/2)*L*I^2), the inductor L2 is also charged at input voltage. 17. The equations for both inductors VL1 and VL2 are: VL1 = L1*(di_l1/dt) = Vin VL2 = L2*(di_l2/dt) = Vc - Vo = Vin Note, that both voltages are equal to Vin 18. The current in inductor L1 will flow from left to right and the current in inductor L2 will flow from right to left because there is a short circuit path of Q1 and due to this short circuit the current will not flow from diode D1, D1 behaves as open circuit (in short when Q1 is ON both inductors L1 and L2 are charged). 19. When the mosfet Q1 is OFF, both inductors (L1 & L2) releases its energy and both inductors maintain their current direction, and now the short circuit path available is through diode D1. 20. Now from above equation we can write equaltion for output voltage, which is L1*(di_l1/dt) = Vin - Vc = -Vo ; and L2*(di_l2/dt) = -Vo Note that in both equations to sign of output voltage is -ve. 21. The current direction can be seen using arrows. 22. Assumming the steady state, the final output voltage can be calculated using this equation. Vo = D*Vin/(1-D) 23. The mosfet Q1 and diode D1 should be used with proper heat sink. Application: 1. This circuit can be used to understand the concept of a buck-boost converter. 2. Thic circuit can be used as variable step-up and step-down or buck-boost converter for DC input. 3. This circuit can be used to drive load from solar panels, because the input voltages of solar panels can vary with environmental effects. 4. This circuit can be used to drive power LEDs to maintain constant output voltage whether the input voltages are high or low. Download these files to perform more experiments.