Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Buck Boost Converter Design Help needed

Status
Not open for further replies.

Okada

Banned
Joined
Jun 16, 2016
Messages
1,159
Helped
129
Reputation
252
Reaction score
129
Trophy points
63
Activity points
0
Hi

This project is a different project and not related to my other projects and hence I have started a new thread.

This is about Buck-Boost Converter.

I need to get 325.0V DC from 150V to 300V AC.

Attached is the circuit. The DC-DC Converter Inductor and Capacitor values are not yet calculated and also the PWM frequency is not calculated.

I am just implementing the logic of synchronous Buck_Boost Converter in C code.

Please have a look and tell me if the code is correct or not. I think the buck and boost codes are inverted becuause in buck mode the duty percentage will be less than 1 and in boost mode it should be more than 1. Right ? Please confirm this.

If I get the code correct then I will calculate the PWM frequency, Inductor and capacitor values.

My Max Iout will be 6A.

Here is the mikroC PRO PIC code.


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
// LCD module connections
sbit LCD_RS at LATB4_bit;
sbit LCD_EN at LATB5_bit;
sbit LCD_D4 at LATB0_bit;
sbit LCD_D5 at LATB1_bit;
sbit LCD_D6 at LATB2_bit;
sbit LCD_D7 at LATB3_bit;
 
sbit LCD_RS_Direction at TRISB4_bit;
sbit LCD_EN_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB0_bit;
sbit LCD_D5_Direction at TRISB1_bit;
sbit LCD_D6_Direction at TRISB2_bit;
sbit LCD_D7_Direction at TRISB3_bit;
// End LCD module connections
 
sbit Shutdown_AC_DC_Converter at LATC5_bit;
 
char msg[21];
unsigned char myFlags = 0, pwm_duty = 0;
double Vin = 0, previous_Vin = 600;
double Vout = 0, previous_Vout = 600;
double Iout = 0, previous_Iout = 30;
 
sbit start_stop_buck_pwm_flag at myFlags.B0;
sbit start_stop_boost_pwm_flag at myFlags.B1;
 
void main() {
 
    asm clrwdt
    
    CM1CON0 = 0x00;
    CM2CON0 = 0x00;
    
    SLRCON = 0x00;
    
    ADCON1 = 0x80;
    ADCON2 = 0b10110101;
    
    ANSELA = 0x07;
    ANSELB = 0x00;
    ANSELC = 0x00;
    ANSELD = 0x00;
    ANSELE = 0x00;
    
    TRISA = 0xC7;
    TRISB = 0x00;
    TRISC = 0x00;
    TRISD = 0x00;
    TRISE = 0x00;
    
    PORTA = 0x00;
    PORTB = 0x00;
    PORTC = 0x00;
    PORTD = 0x00;
    PORTE = 0x00;
    
    LATA = 0x00;
    LATB = 0x00;
    LATC = 0x00;
    LATD = 0x00;
    LATE = 0x00;
    
    Delay_ms(180);
    
    LCD_Init();
    LCD_Cmd(_LCD_CURSOR_OFF);
    LCD_CMd(_LCD_CLEAR);
    
    LCD_Out(1,1,"Vin  = ");
    LCD_Out(2,1,"Vout = ");
    LCD_Out(3,1,"D%   = ");
    LCD_Out(4,1,"Iout = ");
    
    PWM1_Init(2000);
    PWM1_Set_Duty(0);
    PWM1_Stop();
    
    PWM2_Init(2000);
    PWM2_Set_Duty(0);
    PWM2_Stop();
    
    Shutdown_AC_DC_Converter = 1;
    
    while(1) {
           
           asm clrwdt
           //AC Vin range 150V rms to 320V rms
           //equivalent DC voltages are 210.13V and 453.00V DC
           
           Vin = ADC_Read(0) * 453.0 / 1023.0;      //5V Vin = 453V DC which is = 320V rms
           Delay_us(20);
           Vout = ADC_Read(1) * 325.0 / 1023.0;   //2.5V Vin = 325.0V DC
                                                      
           Delay_us(20);
           Iout = ((((double)ADC_Read(2) * 5.0 / 1023.0) - 2.5) / 0.1);                                           
           Delay_us(20);
           
           if((previous_Vin != Vin) || (previous_Vout != Vout)) {               
               if(Vout < 511) {        //Run in boost mode
                    if(start_stop_buck_pwm_flag == 0) {                    
                        PWM1_Stop();
                        PWM2_Start();
                        
                        LATC2_bit = 0;         //
                        LATC1_bit = 1;
                        
                        start_stop_buck_pwm_flag = 1;
                        start_stop_boost_pwm_flag = 0;                                                
                    }
                    
                    /*eg: boost mode, input will be less than output
                      required output is constant 325.0V DC
                      So, only input voltage is monitored
                      if Vin is 170V AC rms then DC will be 170 * 1.4142 - 2 = 238.4V DC
                      this has to be converted to 325.0V DC
                      So, 238.4/325.0 = 0.7336
                      D = 1 - 0.7336 = 0.2664
                      duty value to be used with PWM1_Set_Duty() library function is (255 duty value is 100%)
                      255 * 0.2664 = 67.9 = ~68
                     */
                    pwm_duty = 255.0 * (1.0 - floor(Vin / 325.0));
                    PWM2_Set_Duty(pwm_duty);
               }
               else if(Vout >= 511) {  //Run in buck mode
                    if(start_stop_boost_pwm_flag == 0) {                    
                        PWM2_Stop();
                        PWM1_Start();
                        
                        LATC1_bit = 0;
                        LATC2_bit = 1;
                    
                        start_stop_boost_pwm_flag = 1;
                        start_stop_buck_pwm_flag = 0;                        
                    }             
                    /*eg: buck mode, input will be more than output
                      required output is constant 325.0V DC
                      So, only input voltage is monitored
                      if Vin is 270V AC rms then DC will be 270 * 1.4142 - 2 = 379.8V DC
                      this has to be converted to 325.0V DC
                      So, 325.0/379.8 = 0.856
                      D = 0.856     (duty is always less than 1)
                      duty value to be used with PWM1_Set_Duty() library function is (255 duty value is 100%)
                      255 * 0.856 = 218
                     */ 
                    pwm_duty = floor(255.0 * (325.0 / Vin));
                    PWM1_Set_Duty(pwm_duty);
               }
               
               LCD_Out(1,8,FloatToStr(Vin, msg));
               LCD_Out(2,8,FloatToStr(Vout, msg));
               LCD_Out(3,8,FloatToStr(((double)pwm_duty * 0.392), msg));
               
               previous_Vout = Vout;
           }
           
           LCD_Out(4,8,FloatToStr(Iout, msg));
           
 
    }
}

 

Attachments

  • Buck Boost Conv.PDF
    41.8 KB · Views: 124

There was a mistake related to turning ON the high-side mosfet of the boost converter when in buck mode and turning ON the mosfet of buck converter in boost mode. It was inverter. I have fixed it.

Please check the new code and tell me if this is correct.


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
void Start_Buck_PWM() {
    PWM2_Stop();
    LATC1_bit = 1;
    LATC2_bit = 0;
    PWM1_Start();
}
 
void Start_Boost_PWM() {
    PWM1_Stop();
    LATC2_bit = 1;         
    LATC1_bit = 0;
    PWM2_Start();
}
 
if(previous_Vin != Vin) {               
               if(Vout < 511) {        //Run in boost mode
                    if(start_stop_buck_pwm_flag == 0) {                    
                        Start_Boost_PWM();                 
                        start_stop_buck_pwm_flag = 1;
                        start_stop_boost_pwm_flag = 0;                                                
                    }
                    
                    /*eg: boost mode, input will be less than output
                      required output is constant 325.0V DC
                      So, only input voltage is monitored
                      if Vin is 170V AC rms then DC will be 170 * 1.4142 - 2 = 238.4V DC
                      this has to be converted to 325.0V DC
                      
                      D = (1 - Vin/Vout)
                      So, 238.4/325.0 = 0.7336
                      D = 1 - 0.7336 = 0.2664
                      duty value to be used with PWM1_Set_Duty() library function is (255 duty value is 100%)
                      255 * 0.2664 = 67.9 = ~68
                     */
                    pwm_duty = 255.0 * (1.0 - floor(Vin / 325.0));
                    PWM2_Set_Duty(pwm_duty);
               }
               else if(Vout >= 511) {  //Run in buck mode
                    if(start_stop_boost_pwm_flag == 0) {                    
                        Start_Buck_PWM();                                       
                        start_stop_boost_pwm_flag = 1;
                        start_stop_buck_pwm_flag = 0;                        
                    }             
                    /*eg: buck mode, input will be more than output
                      required output is constant 325.0V DC
                      So, only input voltage is monitored
                      if Vin is 270V AC rms then DC will be 270 * 1.4142 - 2 = 379.8V DC
                      this has to be converted to 325.0V DC
                      D = Vout/Vin
                      So, 325.0/379.8 = 0.856
                      D = 0.856     (duty is always less than 1)
                      duty value to be used with PWM1_Set_Duty() library function is (255 duty value is 100%)
                      255 * 0.856 = 218
                     */ 
                    pwm_duty = floor(255.0 * (325.0 / Vin));
                    PWM1_Set_Duty(pwm_duty);
               }
}

 

Turning high side transistors permanently on doesn't work with standard bootstrap driver like IR2181 or IR2110.
 

@FvM

Then what should I do ?

I found a problem. When PWmx_Init() library which is a peripheral library is used then toggling LATx bits doesn't work. LATx regsiters are not connected to output and so the only way for me is to set PWMy duty 100% when PWMx is running.

This is the new schematic and code. Also I have attached Proteus file. I can't see PWM varying. Please tell me what is the problem ?

Vary the MAINS VOLTAGE and AC-DC CONVERTER FEEDBACK pots and see duty is not varying.


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
sbit stop_buck_converter_flag at myFlags.B0;
sbit stop_boost_converter_flag at myFlags.B1;
 
void Start_Buck_PWM() {
    PWM2_Set_Duty(255);
}
 
void Start_Boost_PWM() {
    PWM1_Set_Duty(255);
}
 
 
if(previous_Vin != Vin) {               
               if(Vout < 511) {        //Run in boost mode
                    if(stop_buck_converter_flag == 0) {
                        Start_Boost_PWM();                 
                        stop_buck_converter_flag = 1;
                        stop_boost_converter_flag = 0;
                    }
                    
                    /*eg: boost mode, input will be less than output
                      required output is constant 325.0V DC
                      So, only input voltage is monitored
                      if Vin is 170V AC rms then DC will be 170 * 1.4142 - 2 = 238.4V DC
                      this has to be converted to 325.0V DC
                      
                      D = (1 - Vin/Vout)
                      So, 238.4/325.0 = 0.7336
                      D = 1 - 0.7336 = 0.2664
                      duty value to be used with PWM1_Set_Duty() library function is (255 duty value is 100%)
                      255 * 0.2664 = 67.9 = ~68
                     */
                    pwm_duty = 255.0 * (1.0 - floor(Vin / 325.0));
                    PWM2_Set_Duty(pwm_duty);
               }
               else if(Vout >= 511) {  //Run in buck mode
                    if(stop_boost_converter_flag == 0) {
                        Start_Buck_PWM();                                       
                        stop_boost_converter_flag = 1;
                        stop_buck_converter_flag = 0;
                    }             
                    /*eg: buck mode, input will be more than output
                      required output is constant 325.0V DC
                      So, only input voltage is monitored
                      if Vin is 270V AC rms then DC will be 270 * 1.4142 - 2 = 379.8V DC
                      this has to be converted to 325.0V DC
                      D = Vout/Vin
                      So, 325.0/379.8 = 0.856
                      D = 0.856     (duty is always less than 1)
                      duty value to be used with PWM1_Set_Duty() library function is (255 duty value is 100%)
                      255 * 0.856 = 218
                     */ 
                    pwm_duty = floor(255.0 * (325.0 / Vin));
                    PWM1_Set_Duty(pwm_duty);
               }
               
               LCD_Out(1,8,FloatToStr_FixLen(Vin, msg, 6));
               LCD_Out(2,8,FloatToStr_FixLen(Vout, msg, 6));
               LCD_Out(3,8,FloatToStr_FixLen(((double)pwm_duty * 0.392), msg, 6));
               
               previous_Vout = Vout;
               previous_Vin = Vin;
           }



- - - Updated - - -

What should I do ? I am not able to find FET driver which can turn ON High-side switch continuously. Should I use 2 diodes instead ?
 

Attachments

  • Buck Boost Converter.rar
    149.5 KB · Views: 112

I mentioned a hardware problem of your design and didn't look at software details.
 

@FvM

Yes, i know. I was searching for CCM FET Drivers but not able to find for high voltage. Also software has problem. I have posted the code and project in post #4.
 

@ FvM

I was able to get the Synchronous Buck-Boost Converter working.

Both high-side switches will be On all the time with required PWM duty that is both On in buck and boost modes. Only the low-side switches are toggled based on buck or boost mode. The high-side and low-side switches will get Complementary signals. I use 2x PxA and PxB signals for the Synchronous Buck-Boost Converter.

I have attached the Proteus simulation and schematic. Also I have attached Proteus simulation video for those who don't have Proteus.

Now I am trying to make it in another way that is using one P1A pin for both high-side switches and then using P1B for Buck low-side switch and p2b for Boost low-side switch. I guess this will be better because both high-side switches will be running with the same PWM duty and signal and driven by same pin of FET driver.

In the attached simulation the Inductor and Capacitor values are not calculated yet and also in the code the PWM frequency and duty are not calculated. The attached simulation is only a test for getting proper signals for Synchronous Buck-Boost Converter.

I also faced a strange problem when using mikroC PRO PIC's PWMx_Init() library with Proteus. If I set same PWM frequency for both PWMs then I don't get signals on Proteus Oscilloscope. maybe it is a simulation only problem. I have to test with same PWM frequencies on hardware. So, I have used 1KHz and 2KHz pwm frequencies for PWM3 and PWM4 in mikroC PRO PIC Code.

Here is the code.


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
// LCD module connections
sbit LCD_RS at LATB4_bit;
sbit LCD_EN at LATB5_bit;
sbit LCD_D4 at LATB0_bit;
sbit LCD_D5 at LATB1_bit;
sbit LCD_D6 at LATB2_bit;
sbit LCD_D7 at LATB3_bit;
 
sbit LCD_RS_Direction at TRISB4_bit;
sbit LCD_EN_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB0_bit;
sbit LCD_D5_Direction at TRISB1_bit;
sbit LCD_D6_Direction at TRISB2_bit;
sbit LCD_D7_Direction at TRISB3_bit;
// End LCD module connections
 
sbit Shutdown_Buck_Converter at LATC6_bit;
sbit Shutdown_Boost_Converter at LATC7_bit;
 
char msg[21];
unsigned char myFlags = 0, pwm_duty = 0;
double Vin = 0, previous_Vin = 600;
double Vout = 0, previous_Vout = 600;
double Iout = 0, previous_Iout = 30;
 
sbit stop_buck_converter_flag at myFlags.B0;
sbit stop_boost_converter_flag at myFlags.B1;
 
void Shutdown_Buck_Mode() {
    Shutdown_Buck_Converter = 0;
    Shutdown_Boost_Converter = 1;
}
 
void Shutdown_Boost_Mode() {
    Shutdown_Boost_Converter = 0;
    Shutdown_Buck_Converter = 1;
}
 
void Shutdown_Buck_And_Boost_Converters() {
    Shutdown_Buck_Converter = 0;
    Shutdown_Boost_Converter = 0;
}
 
void Start_Buck_And_Boost_Converters() {
    Shutdown_Buck_Converter = 1;
    Shutdown_Boost_Converter = 1;
}
 
 
 
void Start_Buck_Converter() {
    TRISC1_bit = 1;
    TRISC2_bit = 1;
    TRISD2_bit = 1;
    TRISD5_bit = 1;
    
    Shutdown_Buck_And_Boost_Converters();
    
    PWM3_Init(1000);
    CCP1CON.CCP1M3 = 1;
    CCP1CON.CCP1M2 = 1;
    CCP1CON.CCP1M1 = 0;
    CCP1CON.CCP1M0 = 0;
    CCP1CON.P1M0 = 0;
    CCP1CON.P1M1 = 1;
    CCPR1L = 127;
 
    
    PWM4_Init(2000);
    CCP2CON.CCP2M3 = 1;
    CCP2CON.CCP2M2 = 1;
    CCP2CON.CCP2M1 = 0;
    CCP2CON.CCP2M0 = 0;
    CCP2CON.P2M0 = 0;
    CCP2CON.P2M1 = 0;
    CCPR2L = 127;
    
    PWM3_Start();
    PWM4_Start();
    
    TRISC1_bit = 0;
    TRISC2_bit = 0;
    TRISD2_bit = 1;
    TRISD5_bit = 0;
    
    Start_Buck_And_Boost_Converters();
}
 
void Start_Boost_Converter() {
    TRISC1_bit = 1;
    TRISC2_bit = 1;
    TRISD2_bit = 1;
    TRISD5_bit = 1;
    
    Shutdown_Buck_And_Boost_Converters();
    
    PWM4_Init(1000);
    CCP2CON.CCP2M3 = 1;
    CCP2CON.CCP2M2 = 1;
    CCP2CON.CCP2M1 = 0;
    CCP2CON.CCP2M0 = 0;
    CCP2CON.P2M0 = 0;
    CCP2CON.P2M1 = 1;
    CCPR2L = 127;
 
    PWM3_Init(2000);
    CCP1CON.CCP1M3 = 1;
    CCP1CON.CCP1M2 = 1;
    CCP1CON.CCP1M1 = 0;
    CCP1CON.CCP1M0 = 0;
    CCP1CON.P1M0 = 0;
    CCP1CON.P1M1 = 0;
    CCPR1L = 127;
    
    PWM4_Start();
    PWM3_Start();
    
    TRISC1_bit = 0;
    TRISC2_bit = 0;
    TRISD2_bit = 0;
    TRISD5_bit = 1;
    
    Start_Buck_And_Boost_Converters();
}
 
void main() {
 
    asm clrwdt
 
    CM1CON0 = 0x00;
    CM2CON0 = 0x00;
 
    SLRCON = 0x00;
 
    ADCON1 = 0x80;
    ADCON2 = 0b10110101;
 
    ANSELA = 0x00;
    ANSELB = 0x00;
    ANSELC = 0x00;
    ANSELD = 0x00;
    ANSELE = 0x00;
 
    TRISA = 0xC7;
    TRISB = 0x00;
    TRISC = 0xFF;
    TRISD = 0xFF;
    TRISE = 0x00;
 
    PORTA = 0x00;
    PORTB = 0x00;
    PORTC = 0x00;
    PORTD = 0x00;
    PORTE = 0x00;
 
    LATA = 0x00;
    LATB = 0x00;
    LATC = 0x00;
    LATD = 0x00;
    LATE = 0x00;
 
    Delay_ms(180);
 
    LCD_Init();
    LCD_Cmd(_LCD_CURSOR_OFF);
    LCD_CMd(_LCD_CLEAR);
 
    LCD_Out(1,1,"Vin  = ");
    LCD_Out(2,1,"Vout = ");
    LCD_Out(3,1,"D%   = ");
    LCD_Out(4,1,"Iout = ");
 
    while(1) {
           
           asm clrwdt
           
           Delay_ms(2000);
           Start_Buck_Converter();
           Delay_ms(2000);
           Start_Boost_Converter();
    }
}

 

Attachments

  • SBBC.PDF
    44.3 KB · Views: 131
  • Buck Boost Converter Rev A.rar
    275.7 KB · Views: 114
Last edited:

I got these values for Inductor and Capacitor. I found 15uF 500V capacitor at mouser.in

But I am not able to find 1mH >= 6AInductor. if I get 1mH 6A Inductor then I will use 2x in series.

PHP:
Topology: Buck - Step Down 

Inductance based on the specified minimum load current.
Item	Value	Units
Volts In	422.26	V
Volts Out	325	V
Load Current	4.92	A
Freq.	25	KHz
Vripple	9.75	V
Duty Cycle	76.966797707574	%
Ipp Inductor	1.476	A
Ipk Inductor	5.658	A
Irms	4.2036498426962	A
L	2028.6695786012	uH
C	15.535452091129	uF




Topology: Boost 

Inductance based on the specified minimum load current.
Item	Value	Units
Volts In	210.13	V
Volts Out	325	V
Load Current	4.92	A
Freq.	25	KHz
Vripple	4.55	V
Duty Cycle	35.344615384615	%
Ipp Inductor	1.476	A
Ipk Inductor	5.658	A
Irms	4.2036498426962	A
L	2012.7273796123	uH
C	15.287517159763	uF

https://www.mouser.in/ProductDetail...EpiMZZMsh%2b1woXyUXj4tPNVPqgqaj%2bNHOboWmVWA=

https://www.mouser.in/ProductDetail...GAEpiMZZMsh%2b1woXyUXj4tPNVPqgqajazoumv/kT4k=
 

I am not getting Inductor. To complete this project I need 1mH 6A Inductor. How to make my own Toroidal Inductor ? I can't increase PWM frequency because resolution will decrease.
 

Hi

I have a new problem. I am using IR2112 for Buck-Boost Converter. it has VDD, VSS, VCC and COM pins. I have one power supply which provides 12V and 5V. So, can I connect VSS and COM pins of IR2112 ? IR2112 is used to drive 4 N-Channel Mosfets in the Synchronous Buck-Boost Converter. I am using 2x IR2112. The max V+ voltage will be 422 V DC.
 

I changed the MCU to dsPIC33 as PIC could not generate 400 KHz PWM. > 350 KHz PWM was needed as I was not getting 1mH or 2mH 6A Inductor. i increased the PWM frequency to 365 KHz and the inductor value came as 138 uH. I ordered 138 uH 6A Inductor from Coilcraft.

Using this calculator I got these values.

https://www.daycounter.com/Calculators/Switching-Converter-Calculator.phtml

Now, the Inductor value is almost same for Buck and Boost modes but there is a difference in Capacitor value. What is the effect of Capacitor if I choose the higher value that is 3.3uF 600V ? Only peak-to-peak ripple voltage value changes ?

PHP:
Topology: Boost 

Inductance based on the specified minimum load current.
Item	Value	Units
Volts In	210.13	V
Volts Out	325	V
Load Current	4.92	A
Freq.	365	KHz
Vripple	3.25	V
Duty Cycle	35.344615384615	%
Ipp Inductor	1.476	A
Ipk Inductor	5.658	A
Irms	4.2036498426962	A
L	137.85803969947	uH
C	1.465926302991	uF


Topology: Buck - Step Down 

Inductance based on the specified minimum load current.
Item	Value	Units
Volts In	422.26	V
Volts Out	325	V
Load Current	4.92	A
Freq.	365	KHz
Vripple	3.25	V
Duty Cycle	76.966797707574	%
Ipp Inductor	1.476	A
Ipk Inductor	5.658	A
Irms	4.2036498426962	A
L	138.94997113707	uH
C	3.1922161831086	uF


This is the code I have written for testing purpose.

Proteus simulation and simulation video are attached.

Yellow signal is common signal for both High-Side Mosfets. Blue signal is for Buck Low-Side Mosfet and Pink signal is for Boost Low-side Mosfet. Green signal is for Fan. I am using TRISx to turn ON/OFF the PWMs but I don't see the required PWM which needs to be turned OFF turning OFF. I see both low side Mosfets with PWM signals. Why ? Is it Proteus bug ? In hardware I will actually use dsPIC33FJ128MC802 as it has 4 PWMs. I have ordered it and I will receive it in 3 or 4 days. Only then I can test it on hardware.


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
unsigned int pwm_duty1 = 0, pwm_duty2 = 0;
 
void Start_Buck_Converter() {
     TRISB.F12 = 1;
     TRISB.F14 = 0;
     TRISB.F15 = 0;
     P1DC1 = 166;
     P1DC2 = 166;
 
}
 
void Start_Boost_Converter() {
     TRISB.F14 = 1;
     TRISB.F12 = 0;
     TRISB.F15 = 0;
     P1DC1 = 76;
     P1DC2 = 76;
}
 
void main() {
 
    asm clrwdt
 
    ADPCFG = 0xFFFF;
    TRISA = 0x00;
    TRISB = 0b11110010000000011;
 
    PORTA = 0x00;
    PORTB = 0x00;
 
    LATA = 0x00;
    LATB = 0x00;
 
    Delay_ms(180);
 
    pwm_duty1 = PWM1_Mc_Init(365000, 0, 0x77, 0);
    pwm_duty2 = PWM2_Mc_Init(2000, 0, 0x77, 0);
 
    PWM1_Mc_Set_Duty(pwm_duty1, 1);
    PWM1_Mc_Set_Duty(pwm_duty1, 2);
 
    PWM2_Mc_Set_Duty(pwm_duty2);
 
    P1DTCON1 = 0xC3;
    P2DTCON1 = 0xC3;
    PWM1CON2.UDIS = 0;
    PWM2CON2.UDIS = 0;
 
    PWM1_Mc_Start();
    PWM2_Mc_Start();
 
    while(1) {
          asm clrwdt
          Start_Buck_Converter();
          Delay_ms(2000);
          Start_Boost_Converter();
          Delay_ms(2000);
    }
}



- - - Updated - - -

Edit:

Problem solved. This is the new code. Now signals are fine. Don't know why making pin as input is not stopping the PWM.

Now, only one issue remains that is about Capacitor value. Please answer about Capacitor value.


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
void Start_Buck_Converter() {
     TRISB.F12 = 1;
     TRISB.F14 = 0;
     TRISB.F15 = 0;
     PEN2H_bit = 0;
     PEN1H_bit = 1;
     P1DC1 = 166;
     P1DC2 = 166;
 
}
 
void Start_Boost_Converter() {
     TRISB.F14 = 1;
     TRISB.F12 = 0;
     TRISB.F15 = 0;
     PEN1H_bit = 0;
     PEN2H_bit = 1;
     P1DC1 = 76;
     P1DC2 = 76;
}

 

Attachments

  • Buck-Boost Converter.rar
    274.3 KB · Views: 118
Last edited:

Ok. I experimented with a few different Output Voltage Ripple values and found that only Capacitor value changes and so using a 3.3uF 600V Capacitor doesn't affect the system. Thank you all for your help.
 

I am using 100 uF Electrolytic and 100 nF Ceramic Capacitors for the bootstrap for IR2112. I want to know know what should be the voltage rating of the Capacitors ? 600V DC ?
 

Hi,

The max voltage across the bootstrap capacitor is Vcc.

I don't think 100uF as bootstrap capacitor makes sense.

Klaus
 

I don't think 100uF as bootstrap capacitor makes sense.
Typically not, but there are exceptions like an overmodulated 50 Hz inverter that needs to keep 100 % PWM duty cycle for several milliseconds.
 

My PWM duty doesn't go beyond 98% but I searched a lot for 68uF 35V Capacitor in mouser.in but could not find one and hence decided to use 100 uF 35V and 100 nF 50V in parallel. I am not using tantalum Capacitor because that was not available for that value and hence I am using 100 nF 50V in parallel to 100 uF 35V.

I further increased the PWM frequency to 500 KHz and Inductor value came to be 100 uH and I have ordered 100uH 10.1A Inductors from Coil Craft. PCB layout is being designed. Soon, I will test the Buck-Boost Converter on hardware and will update this thread.
 

I got 68uF 35V Electrolytic Capacitors at mouser.in

The PCB layout is being designed and I have ordered components from mouser.in and coilcraft (standard shipping - 21 days). By the time the components arrive the PCB will be ready. See attached image. I generated 500 KHz PWM.

I have one question. At mikroe forum I read that if dsPIC33 runs at 120 MHz then it will heat up and it needs a heatsink. Is this correct ? My dsPIC33 max Fosc is 80 MHz and I am running it at 80 MHz and generating 500 KHz PWM for the Buck-Boost Converter because it allows me to use 100 uH Inductor. Do I need a heatsink for dsPIC33FJ128MC802 ?
 

Attachments

  • DS1Z_QuickPrint25.png
    DS1Z_QuickPrint25.png
    35.5 KB · Views: 108

I should I checked the User manual. The function prototype of

Code:
PWM1_Mc_Init()
[/code

the motor control PWM library clearly mentions that freq value should be unsigned int and so I can't have more than 65535 KHz. Now, What should I do ? I only got 100 uH 10A Inductor. If I have to use this inductor then I have to use 500 KHz PWM. Isn't there a way to configure Motor Control PWM registers to generate 500 KHz PWM ? I need 2x Complementary signals and I should be able to control each signal individually. If I use standard PWM then i can't get complementary signals. What is the solution ?


Edit:

The problem is solved. I chose to use 53.6 KHz PWM (Motor Control) to control the Buck-Boost Converter. it allowed me to use 560uH 7A Inductor. I have ordered the Inductor from Coilcraft.

Here are the new and final calculations

[PHP]

Topology: Buck - Step Down 

Inductance based on the specified minimum load current.
Item	Value	Units
Volts In	422.26	V
Volts Out	330	V
Load Current	8	A
Freq.	53.6	KHz
Vripple	0.99	V
Duty Cycle	78.15090228769	%
Ipp Inductor	2.4	A
Ipk Inductor	9.2	A
Irms	6.835202996254	A
L	560.49457750795	uH
C	117.82135125537	uF


Topology: Boost 

Inductance based on the specified minimum load current.
Item	Value	Units
Volts In	210.136	V
Volts Out	330	V
Load Current	8	A
Freq.	53.6	KHz
Vripple	0.99	V
Duty Cycle	36.322424242424	%
Ipp Inductor	2.4	A
Ipk Inductor	9.2	A
Irms	6.835202996254	A
L	593.33402834313	uH
C	54.760175248642	uF

[/PHP]
 
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top