Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
university:courses:electronics:buck_converter_basics [09 Jun 2018 17:23] – Add ripple voltage animation Mark Thorenuniversity: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, an inductor based circuit that produces an output voltage which is lower than the supplied voltage at a high efficiency:+The objective of this activity is to explore some basic principles of a buck converter, a power conversion circuit that efficiently produces an output voltage that is lower than the supplied voltage: 
   * 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> 
 +**{{ :university:courses:electronics:buck_basics:workshop_buck_converter_basics.pptx | Buck Converter Basics Slide Deck}}** 
 +</WRAP>
  
 ===== Background: ===== ===== Background: =====
Line 17: Line 25:
  
 {{ :university:courses:electronics:buck_basics:ldo_hi_v_lo_i.png?500 |}} {{ :university:courses:electronics:buck_basics:ldo_hi_v_lo_i.png?500 |}}
 +<WRAP centeralign> Figure 1. LDO with high voltage drop, low output current</WRAP>
  
   * 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)
  
 {{ :university:courses:electronics:buck_basics:ldo_lo_v_hi_i.png?500 |}} {{ :university:courses:electronics:buck_basics:ldo_lo_v_hi_i.png?500 |}}
 +<WRAP centeralign> Figure 2. LDO with low voltage drop, high output current</WRAP>
  
 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.
 {{ :university:courses:electronics:buck_basics:ldo_hi_v_hi_i.png?500 |}} {{ :university:courses:electronics:buck_basics:ldo_hi_v_hi_i.png?500 |}}
 +<WRAP centeralign> Figure 3. LDO with high voltage drop, high output current</WRAP>
  
 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:tools:lab_hw:adalm_buck|ADALM-BUCK-ARDZ Module]]**\\
 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>education_tools/tree/master/m2k/ltspice/buck_ltspice | buck_ltspice]]**
  
 ===== 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's operation, where S1 is closed and S2 is open. 
 + 
 +{{ :university:courses:electronics:buck_basics:ideal_buck_charge2.png?600 |}} 
 +<WRAP centeralign> Figure 4. Buck converter top switch closed</WRAP> 
 + 
 +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><m>di/dt = (5.0-V_OUT)/L1</m></WRAP> <WRAP centeralign><m>di/dt = (5.0-V_OUT)/L1</m></WRAP>
  
-{{ :university:courses:electronics:buck_basics:ideal_buck_charge.png?600 |}}+The next figure shows the other state, with S1 open and S2 closed. 
 + 
 +{{ :university:courses:electronics:buck_basics:ideal_buck_discharge2.png?600 |}} 
 +<WRAP centeralign> Figure 5. Buck converter bottom switch closed</WRAP>
  
 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><m>di/dt = (0-V_OUT)/L1</m></WRAP> <WRAP centeralign><m>di/dt = (0-V_OUT)/L1</m></WRAP>
  
-{{ :university:courses:electronics:buck_basics:ideal_buck_discharge.png?600 |}} +The "freq" and "duty" parameters set the frequency of the switching to 25kHz and the duty cycle of the voltages imposed on this switch node (sw_node) to 50%. That is, the lefthand side of the inductor spends half of the time connected to the input supply, and half of the time connected to ground. Run the simulation, and probe sw_node, Vout, and the current through inductor L1. Zoom in toward the end of the run after the startup transient damps out. (You can right-click, Autorange y-axis to line up the two waveforms.)
- +
-The "freq" and "duty" parameters set the frequency and duty cycle of the voltages imposed on this switch node (sw_node). Run the simulation, and probe sw_node, Vout, and the current through inductor L1. Zoom in toward the end of the run after the startup transient damps out. (You can right-click, Autorange y-axis to line up the two waveforms.)+
  
 {{ :university:courses:electronics:buck_basics:ideal_buck_waveforms.png?500 |}} {{ :university:courses:electronics:buck_basics:ideal_buck_waveforms.png?500 |}}
 +<WRAP centeralign> Figure 6. Inductor current, switch node, output</WRAP>
  
 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:
  
 {{ :university:courses:electronics:buck_basics:runaway_ind_sch.png?500 |}} {{ :university:courses:electronics:buck_basics:runaway_ind_sch.png?500 |}}
 +<WRAP centeralign> Figure 7. Runaway Inductor Schematic</WRAP>
  
 and run it, probing the inductor current: and run it, probing the inductor current:
  
 {{ :university:courses:electronics:buck_basics:runaway_ind_waveforms.png?500 |}} {{ :university:courses:electronics:buck_basics:runaway_ind_waveforms.png?500 |}}
 +<WRAP centeralign> Figure 8. Runaway Inductor Current</WRAP>
  
 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's datasheet.) The first resistance is very small, a close-to-ideal 1 micro-ohm (LTspice does not allow a value of true zero). The current climbs almost linearly to 500 amps in 10 milliseconds! Even with higher resistances of one milliohm, ten milliohms, and 0.1 ohms, currents are still unrealistically high for the experiments we will be doing shortly. (A simulation is very useful for exploring "what if?" situations in a circuit that would not be possible in a real experiment.) 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's datasheet.) The first resistance is very small, a close-to-ideal 1 micro-ohm (LTspice does not allow a value of true zero). The current climbs almost linearly to 500 amps in 10 milliseconds! Even with higher resistances of one milliohm, ten milliohms, and 0.1 ohms, currents are still unrealistically high for the experiments we will be doing shortly. (A simulation is very useful for exploring "what if?" situations in a circuit that would not be possible in a real experiment.)
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:
  
 {{ :university:courses:electronics:buck_basics:lt1054_open_loop_buck.png?800 |}} {{ :university:courses:electronics:buck_basics:lt1054_open_loop_buck.png?800 |}}
 +<WRAP centeralign> Figure 9. Open-loop 2:1 Buck Converter</WRAP>
  
 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 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.
  
 The figure below shows the turn-on transient of the circuit, with ringing due to resonance between the inductor and output capacitance, which is damped out by the load resistance. At 4 milliseconds, a 50-ohm load is connected to the output, causing a drop in the output voltage. This drop is due to finite impedances in the LT1054's switches, as well as the inductor's DC resistance. The figure below shows the turn-on transient of the circuit, with ringing due to resonance between the inductor and output capacitance, which is damped out by the load resistance. At 4 milliseconds, a 50-ohm load is connected to the output, causing a drop in the output voltage. This drop is due to finite impedances in the LT1054's switches, as well as the inductor's DC resistance.
  
-<<re-take of turn-on transient>>+{{ :university:courses:electronics:buck_basics:lt1054_2_to_1_transient.png |}} 
 +<WRAP centeralign> Figure 10. Turn-on and Load Step Transients</WRAP>
  
 === 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 "not-too-well-regulated" 6V supply, this buck converter might be perfectly appropriate. Let's start examining some of the imperfections and decisions involved in designing a buck converter. One of the most important is the selection of the inductor. Even when the output is unloaded, there will be a "ripple current" always flowing in the inductor as the input side of the inductor is alternately connected to the high-voltage input supply and ground. The peak-to-peak ripple current can be calculated as:+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 "not-too-well-regulated" 6V supply, this buck converter might be perfectly appropriate. Let's start examining some of the imperfections and decisions involved in designing a buck converter. One of the most important is the selection of the inductor value. Even when the output is unloaded, there will be a "ripple current" always flowing in the inductor as the input side of the inductor is alternately connected to the high-voltage input supply and ground. The peak-to-peak ripple current can be calculated as:
  
 {{ :university:courses:electronics:buck_basics:eq_ripple_current.png?400 |}} {{ :university:courses:electronics:buck_basics:eq_ripple_current.png?400 |}}
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 by a small amount. Ripple voltage can be calculated as:
 {{ :university:courses:electronics:buck_basics:eq_ripple_voltage.png?400 |}} {{ :university:courses:electronics:buck_basics:eq_ripple_voltage.png?400 |}}
  
-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 "ESR" term, which is the equivalent series resistance of the capacitor. This resistance will be listed in a capacitor's datasheet.
  
-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 "taps" in the series-connected inductors. For each run, probe the current in R1 and the voltage at Vout. The figure below shows a stepped simulation, for between 1 and 6 of the HP1-1400L's inductors connected in series:+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 "taps" in the series-connected inductors. For each run, probe the current in R1 and the voltage at Vout. The figure below shows a stepped simulation, for between 1 and 6 of the HPH1-1400L's inductors connected in series:
  
 {{ :university:courses:electronics:buck_basics:lt1054_buck_ripple.png?600 |}} {{ :university:courses:electronics:buck_basics:lt1054_buck_ripple.png?600 |}}
 +<WRAP centeralign> Figure 11. Inductor Ripple Current and Output Ripple Voltage</WRAP>
  
-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 this effect.)+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 more apparent.)
  
 ==== Circuit Construction and Testing ==== ==== Circuit Construction and Testing ====
-Construct the circuit on a solder-less breadboard or Perma-Proto board. Note that the HPH1-1400L has six inductors that can be connected in any way (series, parallel, or a combination of the two). Be sure to observe proper polarity, connecting all inductors in series.+Build the following breadboard circuit for the buck converter, following the schematic in Figure 16(Q1, R2, R3 can be added later.) Note that the HPH1-1400L has six inductors that can be connected in any way (series, parallel, or a combination of the two). Be sure to observe proper polarity, connecting all inductors in series as shown. 
 +<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:tools:lab_hw:adalm_buck|ADALM-BUCK-ARDZ Module]] is available as an alternative. 
 +</WRAP>
  
-<<NoteAdd HP1-1400L pin numbers and a diagram>>+{{ :university:courses:electronics:buck_basics:lt1054_2_to_1_bb.png |}} 
 +<WRAP centeralignFigure 12. Breadboard Circuit</WRAP>
  
-<<Note: Make version that has all extraneous stuff removedto aid the student in construction.>>+The circuit can also be soldered on “Perma Proto” solderable breadboard from Adafruitwhich matches the layout of typical solderless breadboards.
  
-<<Fritzing picture of solderless breadboard>> 
- 
-Circuit Construction: 
 {{ :university:courses:electronics:buck_basics:lt1054_buck_perma_proto_sm.jpg?600 |}} {{ :university:courses:electronics:buck_basics:lt1054_buck_perma_proto_sm.jpg?600 |}}
 +<WRAP centeralign> Figure 13. Alternate Construction Method</WRAP>
  
 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?
  
 {{ :university:courses:electronics:buck_basics:lt1054_buck_multi_inductors.gif?800 |}} {{ :university:courses:electronics:buck_basics:lt1054_buck_multi_inductors.gif?800 |}}
 +<WRAP centeralign> Figure 14. Ripple Current for 2 to 6 Windings in Series</WRAP>
  
-<<Discussion on the strange steps at the top and bottom - LT1054 is a bipolar device, current initially flows through catch diodes, then through LT1054 output driver transistors...>>+//(Notice the "steps" in the switch node voltage as the inductor current passes through zero. After switching, current initially flows through diodes D1 or D2. As the current passes through zero and switches direction, the LT1054 output driver "takes over" and drives the switch nodeIn the LTspice simulation, try probing the LT1054 CAP+ current, D1 current, and D2 current separately, noting that the inductor current is the sum of the three.)//
  
 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.
 {{ :university:courses:electronics:buck_basics:lt1054_buck_ripple_voltage.gif?800 |}} {{ :university:courses:electronics:buck_basics:lt1054_buck_ripple_voltage.gif?800 |}}
 +<WRAP centeralign> Figure 15. Output Ripple for 22uF, 22+47uF output capacitance</WRAP>
  
 ===== Activity 2: An Open-Loop Variable Buck Converter ===== ===== Activity 2: An Open-Loop Variable Buck Converter =====
Line 158: Line 184:
  
 {{ :university:courses:electronics:buck_basics:lt1054_closed_loop_buck.png?800 |}} {{ :university:courses:electronics:buck_basics:lt1054_closed_loop_buck.png?800 |}}
 +<WRAP centeralign> Figure 16. Buck Converter with Internal Oscillator Override</WRAP>
  
 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 "something" that will increase the duty cycle to compensate and bring the output voltage back to it's desired value. There are various ways to accomplish this: we'll leave it as an extra activity to close loop in (either in LTspice or on the breadboard) using a voltage reference, op-amp, and an LTC6992 PWM generator. The result will be a true voltage-mode buck converter. 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 "something" that will increase the duty cycle to compensate and bring the output voltage back to it's desired value. There are various ways to accomplish this: we'll leave it as an extra activity to close loop in (either in LTspice or on the breadboard) using a voltage reference, op-amp, and an LTC6992 PWM generator. The result will be a true voltage-mode buck converter.
  
-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 that does this.
- +
-<<Details on enabling Debug Mode in Scopy. Run the buck_dmm.js Java Script file in Scopy and click to the DMM pane.>> +
- +
-<<Note: This is a bit clunky at the moment. There is a more complete API in development to allow interaction with the M2K  from C, C#, Matlab, Python, etc. without using Scopy>> +
- +
  
 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's D3 digital signal to the buck converter's control input.+Connect the buck output to the A0 analog pin on the Arduino and the Arduino's D3 digital signal to the buck converter's control input. Figure 17 shows connections to an Arduino Uno clone. The yellow wire connects the buck output to the Arduino's A0 input, and the blue wire connects the Arduino's PWM output on Digital Pin 3 to the oscillator override input. (Using two ground wires ensures a lower inductance connection between circuit grounds.)
  
-Physical construction <<need to re-shoot with new M2K>> 
 {{ :university:courses:electronics:buck_basics:lt1054_arduino_in_loop.jpg?400 |}} {{ :university:courses:electronics:buck_basics:lt1054_arduino_in_loop.jpg?400 |}}
 +<WRAP centeralign> Figure 17. Buck Converter with Arduino Control</WRAP>
  
 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/linduino ...>+  * Arduino Sketch**[[downgit>Linduino/tree/master/LTSketchbook/Active%20Learning/LT1054_voltage_mode_buck_DC_ctrl | LT1054 closed loop buck with duty cycle control]]** 
-https://github.com/mthoren-adi/Linduino/blob/master/LTSketchbook/Active%20Learning/LT1054_voltage_mode_buck/LT1054_voltage_mode_buck.ino +</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, restoring the voltage to its correct value. Then the resistor is removed, producing an increase in the output voltage. Once again, the Arduino loop detects this disturbance and compensates. 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, restoring the voltage to its correct value. Then the resistor is removed, producing an increase in the output voltage. Once again, the Arduino loop detects this disturbance and compensates.
  
 {{ :university:courses:electronics:lt1054_buck_arduino_load_transient.png?800 |}} {{ :university:courses:electronics:lt1054_buck_arduino_load_transient.png?800 |}}
 +<WRAP centeralign> Figure 18. Arduino Controlled Buck Transient Response</WRAP>
  
 +<WRAP round download>
 +**Resources:**
 +  * LTSpice files: **[[downgit>education_tools/tree/master/m2k/ltspice/buck_ltspice | buck_ltspice]]**
 +  * Fritzing files: **[[downgit>education_tools/tree/master/m2k/fritzing/buck_bb | buck_bb]]**
 +  * JavaScript files: **[[downgit>education_tools/tree/master/m2k/javascript/buck_script | buck_script]]**
 +</WRAP>
 ===== 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://www.analog.com/media/en/technical-documentation/application-notes/AN140fb.pdf|Application Note 140]]**
-http://www.analog.com/media/en/technical-documentation/application-notes/AN140fb.pdf+
  
-AN19 is the LT1070 design manual, rich with examples: +AN19 is the LT1070 design manual, rich with examples:\\ 
-http://www.analog.com/media/en/technical-documentation/application-notes/an19fc.pdf+**[[http://www.analog.com/media/en/technical-documentation/application-notes/an19fc.pdf|Application Note 19]]**
  
-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://www.analog.com/en/technical-articles/ltspice-extracting-switch-mode-power-supply-loop-gain-in-simulation-and-why-you-usually-don-t-need.html+**[[http://www.analog.com/en/technical-articles/ltspice-extracting-switch-mode-power-supply-loop-gain-in-simulation-and-why-you-usually-don-t-need.html|Extracting Switch Mode Power Supply Loop Gain in Simulation]]**
  
 +===== Questions: =====
  
 +Return to **[[university:labs:power|Power Based Lab Activity Material]]**\\
 +Return to **[[university:|Engineering University Program Home]]**
university/courses/electronics/buck_converter_basics.1528557789.txt.gz · Last modified: 09 Jun 2018 17:23 by Mark Thoren