... continuing the previous Experiment, meanwhile we have designed the PCB through which we will be testing the functionality of our Buck-Boost Regulator design.
We have used high density LiPo-pack as the primary power source for our entire circuit.
special thanks to my colleague and Element14 member shivamgpl8824tiwari ; Test & Measurements were carried out to prove the equality between the obtained test results with the simulated ones.
Detailed Arduino code has been provided under the Code section: 62.5 KHz PWM @ 25% and 50% Duty-cycle respectively through ATMEGA328P, with an 8-bit resolution.
Simulated Model for Buck-Boost Converter:
A conventional Dual-Switch Buck-Boost Converter utilizes a single inductor. However, it has an additional MOSFET (Q2) and an additional diode (D2) compared to an inverting buck-boost converter.
By turning Q1 and Q2; ON and OFF simultaneously, the converter operates in buck-boost mode, and the voltage conversion ratio also complies with standard equation. This confirms that the dual switch buck-boost converter performs a non-inverting conversion. The ideal waveforms of a two-switch buckboost converter operating in buck-boost mode and CCM are shown (below). Q1 and D1 both see a voltage stress of VIN, while Q2 and D2 both see a voltage stress of VOUT. Q1, Q2, D1, D2, and L1 all see a current stress of IIN + IOUT with inductor ripple current neglected. The relatively large
number of power devices and high-current stress in buckboost mode prevents the converter from being very efficient.
M=Vout/Vin=D/(1-D)
Operating-mode optimization of a two-switch buck-boost converter
The two-switch buck-boost converter is a cascaded combination of a buck converter followed by a boost converter. Besides the aforementioned buck-boost mode, wherein Q1 and Q2 have identical gate-control signals, the two-switch buck-boost converter also can operate in either buck or boost mode. By operating the converter in buck mode when VIN is higher than VOUT, and in boost mode when VIN is lower than VOUT, the buck-boost function is then realized.
In buck mode, Q2 is controlled to be always OFF, and output voltage is regulated by controlling Q1 as in a typical buck converter. The equivalent circuit in buck mode and corresponding ideal waveforms in CCM are shown (below). The voltage conversion ratio is the same as that of a typical buck converter: M= Vout/Vin=D where D is the duty cycle of Q1.
- In buck mode, the output voltage is always lower than the input voltage since D is always less than one. Higher efficiency is possible in buck mode compared to the buck-boost mode for three reasons. First of all, Q2 is always OFF in buck mode, which means there is no power dissipated in it. Second, Q1, D1, and L1 see a lower current stress of only IOUT in buck mode compared to IIN + IOUT in buck-boost mode, which potentially reduces power loss. Third, although conduction loss of D2 stays the same, the reverse recovery loss is eliminated in the buck mode because D2 always conducts.
By keeping Q1 always ON, D1 is reverse biased and stays OFF, and the two-switch buck-boost converter then operates in boost mode. Similar to the typical boost converter, the output voltage is regulated by controlling Q2. The equivalent circuit in boost mode and corresponding ideal waveforms in CCM are shown (below). The voltage conversion ratio is the same as that of a typical boost
converter: M=Vout/Vin=1/(1-D) where D is the duty cycle of Q2.
- In boost mode, the output voltage is always greater than the input voltage because D is always greater than zero. Similarly, higher efficiency could be achieved in boost mode than in buck-boost mode due to fewer operating power devices and lower current stress.
PCB for our design:
Schematics for the circuit was developed through AutoCad Eagle 9
PCB was fabricated through PCBPower Service, India.; despite the huge costs, as our primary fabricator is PCBWay, Shenzhen; which caused huge delays due to COVID-19 Incident.
Required Components:
Converter Section:
Resistor 4.7K
Capacitors 100nF& 330nF
7805 Voltage Regulator
Double Pole Switch
Controller Section:
ATMEGA328P DIP, 16 MHz Oscillator, Resistor 10K & Capacitor 10uf
Feed-back Section:
Resistors 4.7K X4 & Resistors 1K X4
Buck-Boost Converter Section:
2P Euro-headers X2
Input Capacitor 100uF
Output Capacitor 220uF
Schottky Diodes 1N5817-B X2 , MPX1D0840L4R7 KEMET 4.7uH Inductor
Load Resistor 100/2W
MOSFETS IRF9530 & IRF530 with heat-sink
...and an 8 Channel Logic Analyzer for measuring the IN/OUT Voltage_Node as well as Buck & Boost Nodes from MCU.
Test results:
As our Circuit is ready, it's time for some real tests. Plugging a 12V battery to input, one can enter the voltage required at the output and watch the expected results in the serial monitor. We can adjust the sensor offset values to get more precise voltage sensing.
Code:
#define vin_node A1
#define vout_node A2
#define iout_node A0
#define boost_node 5
#define buck_node 6
int raw_vin=0, raw_vout=0, raw_iout=0;
float Vout_max=13.0, Iout_max=1.0, Vout_min=11.1, Iout_min=0.1,Vin_thresold=10.5;
float Iout_sense;
float Vout_sense;
float Vin_sense;
uint8_t duty_cycle = 25;
String mode="";
bool startup=true;
unsigned int count=0;
void setup() {
Serial.begin(115200);
//pinMode(buck_node,OUTPUT);
//pinMode(boost_node,OUTPUT);
TCCR0B = TCCR0B & 0b11111000 | 0x01;
analogWrite(buck_node,255);
analogWrite(boost_node,0);
}
void loop() {
if(Serial.available()) {
String data = Serial.readString();
Vout_max = data.toInt();
Vout_max = Vout_max/10;
Serial.print("Vout_max= ");
Serial.println(Vout_max);
}
for(int i=0;i<10;i++) {
raw_iout += analogRead(iout_node)-513;
raw_vin += analogRead(vin_node);
raw_vout += analogRead(vout_node);
}
raw_iout=raw_iout/10;
raw_vout=raw_vout/10;
raw_vin=raw_vin/10;
Iout_sense=float(raw_iout)*0.0586;
Vout_sense=float(raw_vout)*0.046;
Vin_sense=float(raw_vin)*0.046;
if(count>100) {
Serial.print("Vin= ");Serial.println(Vin_sense);
Serial.print("Vout= ");Serial.println(Vout_sense);
Serial.print("Iout= ");Serial.println(Iout_sense);
Serial.print("Duty cycle= ");Serial.println(duty_cycle);
Serial.print("Converter MODE : ");Serial.println(mode);
count=0;
}
if(startup==false) {
regulate(Iout_sense, Vin_sense, Vout_sense);
auto_cutoff(Iout_sense,Vin_sense, Vout_sense);
}
else {
soft_start();
}
delay(600);
count++;
}
void regulate(float Iout, float Vin, float Vout) {
if(Vout_max<Vin) {
mode="";
mode="Buck mode";
analogWrite(boost_node,0);
if((Iout<Iout_max && Iout>Iout_min) && (Vout<Vout_max)) {
if(duty_cycle<250) {
duty_cycle+=2;
}
analogWrite(buck_node,255-duty_cycle);
}
else if((Iout>Iout_max) || (Vout>Vout_max)) {
if(duty_cycle>2) {
duty_cycle-=2;
}
analogWrite(buck_node,255-duty_cycle);
}
//Serial.print("Duty cycle= ");Serial.println(duty_cycle);
}
else if(Vout_max>Vin) {
mode="";
mode="Boost mode";
analogWrite(buck_node,0);
if((Iout<Iout_max) && (Vout<Vout_max)) {
if(duty_cycle<220) {
duty_cycle+=2;
}
analogWrite(boost_node,duty_cycle);
}
else if((Iout>Iout_max) || (Vout>Vout_max)) {
if(duty_cycle>4) {
duty_cycle-=2;
}
analogWrite(boost_node,duty_cycle);
}
//Serial.print("Duty cycle= ");Serial.println(duty_cycle);
}
}
void auto_cutoff(float Iout,float Vin, float Vout){
if((Vout>=Vout_max) && (Iout<Iout_min) || (Vin<Vin_thresold)) {
analogWrite(boost_node,0);
analogWrite(buck_node,255);
Serial.println("Charging Completed.");
delay(64000);
}
}
void soft_start() {
if(Vout_sense<=Vout_min) {
regulate(Iout_sense, Vin_sense, Vout_sense);
Serial.print("Vin= ");Serial.println(Vin_sense);
Serial.print("Vout= ");Serial.println(Vout_sense);
Serial.print("Iout= ");Serial.println(Iout_sense);
Serial.print("Duty cycle= ");Serial.println(duty_cycle);
Serial.print("Converter MODE : ");Serial.println(mode);
Serial.println("Soft Start Activated");
delay(64000);
}
else {
startup=false;
}
}
Attaching an 8 Ch. Logic analyzer(also hacked as PWM Generator):
Here, we have used the Saleae Logic8 under PulseView Software(Project Sigrok) with PWM decoder, running on win10, to capture the PWMs generated at the buck & boost nodes, which further feed the MOSFETS at 62.5KHz, with 25% and 50% duty-cycle.
Converter Mode: Buck; Captured @ Channel 6
Converter Mode: Boost; Captured @ Channel 7
Conclusion
The initial goal to efficiently utilize the KEMET MPX Series Power Inductor along with dual FETs and other passive components, for the functional prototype of Buck-Boost Converter met to our expectations. Once again, special thanks to Element14 and KEMET(sponsors) for providing me the golden oppurtunity to participate in this Challenge. I hope for feedback and knowledgeable insight from our Community members. I hope to utilize the smd inductors for our upcoming LTE powered Environmental Sensor-Matrix Project.
Top Comments