This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
university:courses:electronics:buck_converter_basics [09 Jun 2018 17:23] – Add ripple voltage animation Mark Thoren | university:courses:electronics:buck_converter_basics [05 Feb 2024 20:30] (current) – "Promote" Slide Deck to top of page, formatting links Mark Thoren | ||
---|---|---|---|
Line 3: | Line 3: | ||
===== Objective: ===== | ===== Objective: ===== | ||
- | The objective of this activity is to explore some basic principles of a buck converter, | + | The objective of this activity is to explore some basic principles of a buck converter, |
* Inductor characteristics (current / voltage / time relationships) | * Inductor characteristics (current / voltage / time relationships) | ||
* Volt-second balance | * Volt-second balance | ||
Line 9: | Line 10: | ||
* Inductor current ripple | * Inductor current ripple | ||
* Output voltage ripple | * Output voltage ripple | ||
- | * open-loop vs. closed loop operation | + | * Open-loop vs. closed loop operation |
+ | * Voltage-mode control | ||
+ | |||
+ | ===== Workshop Slide Deck ===== | ||
+ | A slide deck is provided as a companion to this exercise, and can be used to help in presenting this material in classroom, lab setting, or in hands-on workshops. | ||
+ | <WRAP round download> | ||
+ | **{{ : | ||
+ | </ | ||
===== Background: ===== | ===== Background: ===== | ||
Line 17: | Line 25: | ||
{{ : | {{ : | ||
+ | <WRAP centeralign> | ||
* Large load current drawn from the regulated output (where there is a small difference between the unregulated input voltage and the regulated output voltage) | * Large load current drawn from the regulated output (where there is a small difference between the unregulated input voltage and the regulated output voltage) | ||
{{ : | {{ : | ||
+ | <WRAP centeralign> | ||
The reason for the conditions on current and input-output voltage difference is that the linear regulator will always dissipate the product of the output current and this voltage difference as heat. The following figure shows a situation in which 3.5 watts of power will need to be dealt with, using a large heat sink, fan, or both. | The reason for the conditions on current and input-output voltage difference is that the linear regulator will always dissipate the product of the output current and this voltage difference as heat. The following figure shows a situation in which 3.5 watts of power will need to be dealt with, using a large heat sink, fan, or both. | ||
{{ : | {{ : | ||
+ | <WRAP centeralign> | ||
Heat sinks are large, expensive, and lose effectiveness if they accumulate dust. Fans are loud and have limited lifetimes. And of course, electrical power lost as heat costs just as much as power that does something useful in your circuit. This is where buck converters are useful. | Heat sinks are large, expensive, and lose effectiveness if they accumulate dust. Fans are loud and have limited lifetimes. And of course, electrical power lost as heat costs just as much as power that does something useful in your circuit. This is where buck converters are useful. | ||
Line 34: | Line 45: | ||
Solder-less breadboard and jumper wire kit or Perma Proto solder breadboard\\ | Solder-less breadboard and jumper wire kit or Perma Proto solder breadboard\\ | ||
ADALP2000 parts kit parts as required\\ | ADALP2000 parts kit parts as required\\ | ||
+ | Optional: **[[university: | ||
12V power supply (preferred) or 5V USB power supply (workable)\\ | 12V power supply (preferred) or 5V USB power supply (workable)\\ | ||
Voltmeter (optional, can use M2K in Voltmeter mode.)\\ | Voltmeter (optional, can use M2K in Voltmeter mode.)\\ | ||
- | LTspice files for this activity\\ | + | LTspice files for this activity: **[[downgit> |
===== Activity 1: An Open-Loop 2:1 Buck Converter ===== | ===== Activity 1: An Open-Loop 2:1 Buck Converter ===== | ||
==== Theory and Simulation ==== | ==== Theory and Simulation ==== | ||
=== Simulation using ideal components === | === Simulation using ideal components === | ||
- | Open the Buck_Concept.asc LTspice file. Assume Vout is some voltage between zero (ground) and Vin (5V). When S1 closes, the lefthand side of inductor L1 is connected to the 5V supply, and the current through L1 ramps up with a slope of: | + | Open the Buck_Concept.asc LTspice file. The figure below shows one of the two states of the circuit' |
+ | |||
+ | {{ : | ||
+ | <WRAP centeralign> | ||
+ | |||
+ | Assume Vout is some voltage between zero (ground) and Vin (5V). When S1 closes, the lefthand side of inductor L1 is connected to the 5V supply, and the current through L1 ramps up with a slope of: | ||
<WRAP centeralign>< | <WRAP centeralign>< | ||
- | {{ : | + | The next figure shows the other state, with S1 open and S2 closed. |
+ | |||
+ | {{ : | ||
+ | <WRAP centeralign> | ||
When S2 closes, the lefthand side of inductor L1 is connected to ground, and the current through L1 decreases with a slope of: | When S2 closes, the lefthand side of inductor L1 is connected to ground, and the current through L1 decreases with a slope of: | ||
Line 51: | Line 71: | ||
<WRAP centeralign>< | <WRAP centeralign>< | ||
- | {{ : | + | The " |
- | + | ||
- | The " | + | |
{{ : | {{ : | ||
+ | <WRAP centeralign> | ||
Hover the cursor over the peak and valley of the I(L1) waveform, noting the current values. (We already know the high time and low time of the waveform - the period is 1/25kHz, or 40us, and the duty cycle is 50%, so the high time and low time are both 20 microseconds.) | Hover the cursor over the peak and valley of the I(L1) waveform, noting the current values. (We already know the high time and low time of the waveform - the period is 1/25kHz, or 40us, and the duty cycle is 50%, so the high time and low time are both 20 microseconds.) | ||
Line 68: | Line 87: | ||
{{ : | {{ : | ||
+ | <WRAP centeralign> | ||
and run it, probing the inductor current: | and run it, probing the inductor current: | ||
{{ : | {{ : | ||
+ | <WRAP centeralign> | ||
The simulation applies the same 5V across the same 100uH inductor, but instead of switching at 25kHz, the voltage source is left connected continuously. The simulation steps through four values of inductor DC resistance (all inductors have some resistance, usually specified in the inductor' | The simulation applies the same 5V across the same 100uH inductor, but instead of switching at 25kHz, the voltage source is left connected continuously. The simulation steps through four values of inductor DC resistance (all inductors have some resistance, usually specified in the inductor' | ||
Line 80: | Line 101: | ||
where tS1 is the time that S1 is closed, tS2 is the time that S2 is closed. | where tS1 is the time that S1 is closed, tS2 is the time that S2 is closed. | ||
- | |||
- | |||
Solving for Vout: | Solving for Vout: | ||
Line 99: | Line 118: | ||
{{ : | {{ : | ||
+ | <WRAP centeralign> | ||
A few things to note about the LTspice schematic: | A few things to note about the LTspice schematic: | ||
The Coilcraft HPH1-1400L 6-winding transformer allows the circuit to be simulated / tested with several different values of inductance. The "K1 L1 L2 L3 L4 L5 L6 0.95" statement tells LTspice that the windings are on the same core (coupled), rather than discrete inductors. This means that the inductance will increase by the square of the number of inductors connected in series: 202uH for a single inductor, and 202uH * 36 = 7.2mH when all six inductors are connected in series. | The Coilcraft HPH1-1400L 6-winding transformer allows the circuit to be simulated / tested with several different values of inductance. The "K1 L1 L2 L3 L4 L5 L6 0.95" statement tells LTspice that the windings are on the same core (coupled), rather than discrete inductors. This means that the inductance will increase by the square of the number of inductors connected in series: 202uH for a single inductor, and 202uH * 36 = 7.2mH when all six inductors are connected in series. | ||
- | Also, the elements in dashed boxes apply stimulus for the simulation, with opening and closing of switches representing the connection or disconnection of a jumper wire on your breadboard. | + | Note that the circuit |
The figure below shows the turn-on transient of the circuit, with ringing due to resonance between the inductor and output capacitance, | The figure below shows the turn-on transient of the circuit, with ringing due to resonance between the inductor and output capacitance, | ||
- | <<re-take of turn-on transient> | + | {{ : |
+ | <WRAP centeralign> | ||
=== Ripple Current and Ripple Voltage === | === Ripple Current and Ripple Voltage === | ||
- | Now we've got a circuit that efficiently converts one voltage to another, without burning lots of power. In fact if you had an application where there was a well-regulated 12V power supply available, and a downstream circuit needed a " | + | Now we've got a circuit that efficiently converts one voltage to another, without burning lots of power. In fact if you had an application where there was a well-regulated 12V power supply available, and a downstream circuit needed a " |
{{ : | {{ : | ||
Line 116: | Line 137: | ||
So a higher inductance would seem to be better, as the ripple current is proportionally lower. However, it takes more wire to make a higher-value inductor, and the resistance will be higher. There are often limitations on how physically large an inductor can be as well; portable electronics often require circuits to be as small as practical, and sometimes as small as physically possible. In general, a peak-to-peak ripple current is chosen to be between 10% and 60% of the DC output current. | So a higher inductance would seem to be better, as the ripple current is proportionally lower. However, it takes more wire to make a higher-value inductor, and the resistance will be higher. There are often limitations on how physically large an inductor can be as well; portable electronics often require circuits to be as small as practical, and sometimes as small as physically possible. In general, a peak-to-peak ripple current is chosen to be between 10% and 60% of the DC output current. | ||
- | Why does ripple current matter? Ideally, any DC-DC converter (LDO, Buck, Boost, etc.) produces a stable, low-noise output voltage from an imperfect (noisy, variable) input voltage. Ripple current induces a corresponding ripple in the regulated output voltage, as the ripple current charges and discharges the output capacitance. Ripple voltage can be calculated as: | + | Why does ripple current matter? Ideally, any DC-DC converter (LDO, Buck, Boost, etc.) produces a stable, low-noise output voltage from an imperfect (noisy, variable) input voltage. Ripple current induces a corresponding ripple in the regulated output voltage, as the ripple current charges and discharges the output capacitance |
{{ : | {{ : | ||
- | So a higher output capacitance will result in a lower ripple voltage. But as with the inductor, there are often limitations on how physically large a capacitor can be. | + | So a higher output capacitance will result in a lower ripple voltage. But as with the inductor, there are often limitations on how physically large a capacitor can be. Also note the " |
- | The LT1054_2to1_buck.asc simulation allows you to easily experiment with different inductances and capacitances. Try connecting the input side of R1 (the current-sense reistor) to the various " | + | The LT1054_2to1_buck.asc simulation allows you to easily experiment with different inductances and capacitances. Try connecting the input side of R1 (the current-sense reistor) to the various " |
{{ : | {{ : | ||
+ | <WRAP centeralign> | ||
- | With the green trace showing a decreasing ripple current with increasing inductance, and the red trace showing a corresponding decrease in ripple voltage... accompanied by poorer load regulation due to the increased resistance of the windings. (Try increasing the .param dcr to 0.5 ohms to exacerbate | + | With the green trace showing a decreasing ripple current with increasing inductance, and the red trace showing a corresponding decrease in ripple voltage... accompanied by poorer load regulation due to the increased resistance of the windings. (Try increasing the .param dcr to 0.5 ohms to make this effect |
==== Circuit Construction and Testing ==== | ==== Circuit Construction and Testing ==== | ||
- | Construct | + | Build the following |
+ | <WRAP info> | ||
+ | The circuits in this lab are compatible with solderless breadboard construction. However they are relatively complicated and take time to construct and debug. The [[university: | ||
+ | </ | ||
- | << | + | {{ :university: |
+ | <WRAP centeralign> Figure 12. Breadboard Circuit</ | ||
- | << | + | The circuit can also be soldered on a “Perma Proto” solderable breadboard from Adafruit, which matches |
- | << | ||
- | |||
- | Circuit Construction: | ||
{{ : | {{ : | ||
+ | <WRAP centeralign> | ||
Measure the ripple current for different numbers of series-connected inductors. The animated figure below shows the ripple current for 2, 3, 4, 5, and 6 inductors. How well does this match the LTspice simulation? | Measure the ripple current for different numbers of series-connected inductors. The animated figure below shows the ripple current for 2, 3, 4, 5, and 6 inductors. How well does this match the LTspice simulation? | ||
{{ : | {{ : | ||
+ | <WRAP centeralign> | ||
- | << | + | // |
Measure the ripple voltage at the output of the converter, with a 22uF output capacitor. Then place an additional 47uF capacitor in parallel, for a total of 69uF. Does the measured ripple match the simulated ripple reasonably well? Note that both the inductor and electrolytic capacitors can have a very wide tolerance - tolerances of +/-20% are common for inductors, and -20%/+80% is a common tolerance for electrolytic capacitors. | Measure the ripple voltage at the output of the converter, with a 22uF output capacitor. Then place an additional 47uF capacitor in parallel, for a total of 69uF. Does the measured ripple match the simulated ripple reasonably well? Note that both the inductor and electrolytic capacitors can have a very wide tolerance - tolerances of +/-20% are common for inductors, and -20%/+80% is a common tolerance for electrolytic capacitors. | ||
Line 149: | Line 174: | ||
The animated figure below shows the ripple voltage for output capacitances of 22uF and 22uF+47uF. | The animated figure below shows the ripple voltage for output capacitances of 22uF and 22uF+47uF. | ||
{{ : | {{ : | ||
+ | <WRAP centeralign> | ||
===== Activity 2: An Open-Loop Variable Buck Converter ===== | ===== Activity 2: An Open-Loop Variable Buck Converter ===== | ||
Line 158: | Line 184: | ||
{{ : | {{ : | ||
+ | <WRAP centeralign> | ||
Open the circuit and run the simulation; the duty cycle and frequency are parameterized so that they can be easily changed. Test several values of the duty cycle (20%, 40%, 60%, 80%), show that VOUT = VIN * Duty Cycle | Open the circuit and run the simulation; the duty cycle and frequency are parameterized so that they can be easily changed. Test several values of the duty cycle (20%, 40%, 60%, 80%), show that VOUT = VIN * Duty Cycle | ||
Line 171: | Line 198: | ||
Obviously, sensitivity to input voltage changes and output loading is undesirable. The figure below shows a feedback path that observes the output voltage, and adjusts the duty cycle accordingly. That is, if the load increases, causing a drop in output voltage, this will be sensed by " | Obviously, sensitivity to input voltage changes and output loading is undesirable. The figure below shows a feedback path that observes the output voltage, and adjusts the duty cycle accordingly. That is, if the load increases, causing a drop in output voltage, this will be sensed by " | ||
- | This feedback path can be implemented in another way - using a software-programmable feedback loop. The M2K already has the required elements - it can measure the output voltage, and control the duty cycle of a digital output. Scopy includes a "debug mode" that allows interaction with JavaScript programs, and a script is included in the zip file that does this. | + | This feedback path can be implemented in another way - using a software-programmable feedback loop. The M2K already has the required elements - it can measure the output voltage, and control the duty cycle of a digital output. Scopy includes a "debug mode" that allows interaction with JavaScript programs, and a script is included in the resources section |
- | + | ||
- | << | + | |
- | + | ||
- | << | + | |
- | + | ||
Yet another way is to use an Arduino Uno microcontroller to close the loop. The Uno has 6 analog inputs, one of which can be used to measure the output voltage. It also includes several PWM outputs, that can be used to control the duty cycle of the LT1054. | Yet another way is to use an Arduino Uno microcontroller to close the loop. The Uno has 6 analog inputs, one of which can be used to measure the output voltage. It also includes several PWM outputs, that can be used to control the duty cycle of the LT1054. | ||
==== Circuit Construction and Testing ==== | ==== Circuit Construction and Testing ==== | ||
- | Connect the buck output to the A0 analog pin on the Arduino and the Arduino' | + | Connect the buck output to the A0 analog pin on the Arduino and the Arduino' |
- | Physical construction << | ||
{{ : | {{ : | ||
+ | <WRAP centeralign> | ||
Copy this Arduino sketch into your Arduino sketchbook (and restart the Arduino IDE if it's open.) | Copy this Arduino sketch into your Arduino sketchbook (and restart the Arduino IDE if it's open.) | ||
- | + | <WRAP round download> | |
- | <<Github link is live, pull request sent to merge into analogdevicesinc/ | + | * Arduino Sketch: **[[downgit> |
- | https:// | + | </WRAP> |
The following figure shows the operation of the closed-loop circuit. The setpoint voltage is 3.141V, and the purple trace starts out close to this value at the lefthand side of the Scopyshot. A 50 ohm load is then connected to the output, drawing approximately 120mA, and producing a dip in the output voltage. The Arduino loop detects this and increases the PWM frequency accordingly, | The following figure shows the operation of the closed-loop circuit. The setpoint voltage is 3.141V, and the purple trace starts out close to this value at the lefthand side of the Scopyshot. A 50 ohm load is then connected to the output, drawing approximately 120mA, and producing a dip in the output voltage. The Arduino loop detects this and increases the PWM frequency accordingly, | ||
{{ : | {{ : | ||
+ | <WRAP centeralign> | ||
+ | <WRAP round download> | ||
+ | **Resources: | ||
+ | * LTSpice files: **[[downgit> | ||
+ | * Fritzing files: **[[downgit> | ||
+ | * JavaScript files: **[[downgit> | ||
+ | </ | ||
===== Going Further ===== | ===== Going Further ===== | ||
- | This activity borrows heavily from Analog Devices Application Note 140, which is an excellent reference to build upon concepts in this activity: | + | This activity borrows heavily from Analog Devices Application Note 140, which is an excellent reference to build upon concepts in this activity:\\ |
- | + | **[[http:// | |
- | http:// | + | |
- | AN19 is the LT1070 design manual, rich with examples: | + | AN19 is the LT1070 design manual, rich with examples:\\ |
- | http:// | + | **[[http:// |
- | Article on simulating SMPS loop gain (and why it's often unnecessary): | + | Article on simulating SMPS loop gain (and why it's often unnecessary): |
- | http:// | + | **[[http:// |
+ | ===== Questions: ===== | ||
+ | Return to **[[university: | ||
+ | Return to **[[university: |