Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
kid sinister
Nov 16, 2002

BattleMaster posted:

The resistor provides a connection to ground that makes the pin be at 0 volts in the absence of any other influence. The resistor can be any value, but if you have something hooked up to the pin (a logic output from another IC, etc.) that can drive it to a logic 1 (3.3V or 5V or whatever) you want the resistor value to be high enough to not put too heavy a load on the output. For example, a lot of logic outputs are rated for something like 20 mA, so you want a resistor that will be high enough to draw less current than that - or ideally, much less current than that. I typically use 10 kohm resistors as pulldowns but you can get away with much higher than that.

The reason why you want this is because during some situations, especially during startup of a microcontroller before it has a chance to configure its pins as outputs, the signal will not be driven to 0V or logic voltage, and can be in an indeterminate state that will spuriously turn the signal high or low. This can be unwanted or even dangerous - for example, it's common to put a pull-up or pull-down resistor on the gate of a MOSFET so that during startup the MOSFET is in a safe configuration and doesn't just create like an uncontrolled dead short.

If you just want a pin to always be at 0 volts and it has nothing else hooked up to it, it often (but not always, read the datasheet) is safe to just hook it straight to ground with no resistor.

Oh, okay. So it's like putting a resistor across a capacitor to make sure that the cap has no charge once it's off.

So then what's a pull up resistor? I assume it's also related to digital logic?

Also, I fix old radios. That "ground is 0 volts" is a strange and curious concept. Sometimes, depending on how you plug it in, the ground can be a line voltage even when it's off!

kid sinister fucked around with this message at 00:13 on Jun 7, 2023

Adbot
ADBOT LOVES YOU

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Resistor connected to 3.3v or whatever. Same reason. Maybe keeping an undriven mosfet "on", or setting configuration pins

Shame Boy
Mar 2, 2010

Pull-up resistors are also commonly encountered in what's called open-drain circuits, where instead of chips explicitly driving a line high or low, the chip merely connects the line to ground (or doesn't). The pull-up resistor will keep the line high by default, and anything connected to the line can then pull it low without risk of two different things on the same line conflicting in a harmful way (like one trying to drive it low while the other tries to drive it high, resulting in effectively a short circuit - the most they could do is both connect it to ground at the same time, which wouldn't do anything bad). This is used for certain kinds of logic and for shared data busses like I2C, where a bunch of different unsynchronized things need to be connected to the same two wires without risking a short circuit.

kid sinister
Nov 16, 2002
So the "up" and "down" just refers to the voltage on the line?

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Pull the line up to "positive voltage"

Pull the line down to "zero voltage"

Sagebrush
Feb 26, 2012

kid sinister posted:

So the "up" and "down" just refers to the voltage on the line?

Yes.

An electrical line that is not connected to either ground or a voltage source will "float," or take on a random voltage from charges in the air and ambient electric fields and stuff. If this is an input line into an electronic device, that means you can get random weird behavior as the device interprets that floating voltage as input data.

The most obvious example of this is a pushbutton. Say that your digital input pin is connected through the button to 5 volts. When the button is depressed, the pin sees 5 volts and reads that as a logic 1. When the button is not pressed, the connection to 5 volts is physically broken and the input floats. It doesn't necessarily go to 5 volts or 0 volts or anything else. It just takes on a random unpredictable value. This means that the released state cannot be reliably detected.

A pull down resistor is connected so that when the button is released, there is a connection through the resistor to ground. That small current flow causes the pin to go to 0 volts reliably, which is interpreted as a logic 0. When the button is pressed, there is a much larger lower-resistance path to 5 volts, so the pin goes up to 5 volts. This is read as a logic 1. A tiny amount of current does flow between 5v and ground, but it's insignificant.

Generally a pull-up resistor is used instead of pull-down, because it reduces overall current consumption.

cruft
Oct 25, 2007


I never really looked at your av before this post, and I have to comment that it pairs perfectly.

Sagebrush
Feb 26, 2012

yeah it's fantastic. there is a whole set of yosposters with kelly avatars and every one of them is spot-on.

Splode
Jun 18, 2013

put some clothes on you little freak
A colleague of mine sent me an application note about sizing pull-up/down resistors based on CMOS switching times. The resulting formula was pretty aggressive, and often recommended resistors of under 10k (4.7k for my specific application) to prevent the CMOS pin from floating between on and off. Apparently this could damage the pin otherwise? I'm phone posting but I'll dig out the app note tomorrow. Has anyone else run into this? I've been using very high value (100k) pull-up/downs for years.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
Pull-ups for digital signals are often small to keep rise times fast and noise small. For 100kHz I2C you'll see ~1k a lot. 1.5Mbps and 12Mbps USB use 1.5k on one of the lines for passive signaling and insertion detection (the actual transmitters pull the line both high and low). Overcoming this doesn't require a particularly strong driver. A few volts across a few k gives you on the order of 1mA, which any microcontroller or FPGA can comfortably drive/sink continuously.

babyeatingpsychopath
Oct 28, 2000
Forum Veteran


Splode posted:

A colleague of mine sent me an application note about sizing pull-up/down resistors based on CMOS switching times. The resulting formula was pretty aggressive, and often recommended resistors of under 10k (4.7k for my specific application) to prevent the CMOS pin from floating between on and off. Apparently this could damage the pin otherwise? I'm phone posting but I'll dig out the app note tomorrow. Has anyone else run into this? I've been using very high value (100k) pull-up/downs for years.

Yeah, pullup/down resistors have gotten a lot smaller as signal speeds have gotten faster. With a pulldown resistor, the rise time is basically 0, but the fall time is dependent on how fast the cap inside the chip can discharge through the resistor. Old CMOS stuff had (relatively) large gate capacitance, so big C discharging through big R is whatever. T=R*C, (time to charge in seconds = resistance in ohms multiplied by capacitance in farads) so if C gets REALLY small, then T starts going up appreciably. Standard Arduino pins have 10-50pF of capacitance (depending on family and package), esp32 is below 2pF.

If it's possible to use the chip's internal pullup/pulldown resistors, that's probably a better option. Or size your resistors to be roughly the same as the chip's internal ones. The relative datasheets will have equations. From Atmel's 328P:
Minumum is (VCC-0.4V)/3mA = R. Maximum is 300ns/(capacitance of your bus line) = R.

Shame Boy
Mar 2, 2010

Or you can be like that voltage regulator I used in a design recently that said it had a pull-up on the enable pin so I didn't include one and then was very confused why it wasn't turning on until I checked more closely and the pull-up was like 2 megohm and other poo poo on the same line was enough to completely overwhelm that. Thanks guys.

e: And by "other poo poo" I mean "a few microamps of reverse leakage through a diode" not like, an actual fuckin' load

Shame Boy fucked around with this message at 17:26 on Jun 7, 2023

tuyop
Sep 15, 2006

Every second that we're not growing BASIL is a second wasted

Fun Shoe

Sagebrush posted:

Yes.

An electrical line that is not connected to either ground or a voltage source will "float," or take on a random voltage from charges in the air and ambient electric fields and stuff. If this is an input line into an electronic device, that means you can get random weird behavior as the device interprets that floating voltage as input data.

The most obvious example of this is a pushbutton. Say that your digital input pin is connected through the button to 5 volts. When the button is depressed, the pin sees 5 volts and reads that as a logic 1. When the button is not pressed, the connection to 5 volts is physically broken and the input floats. It doesn't necessarily go to 5 volts or 0 volts or anything else. It just takes on a random unpredictable value. This means that the released state cannot be reliably detected.

A pull down resistor is connected so that when the button is released, there is a connection through the resistor to ground. That small current flow causes the pin to go to 0 volts reliably, which is interpreted as a logic 0. When the button is pressed, there is a much larger lower-resistance path to 5 volts, so the pin goes up to 5 volts. This is read as a logic 1. A tiny amount of current does flow between 5v and ground, but it's insignificant.

Generally a pull-up resistor is used instead of pull-down, because it reduces overall current consumption.

This is an excellent short description of how those resistors work, thanks! Makes total sense to me now.

PRADA SLUT
Mar 14, 2006

Inexperienced,
heartless,
but even so
What's the best resource for in-depth DCDC switcher design? I'm not talking like the hobbyist youtuber, "if the switching frequency is faster, you use smaller inductors", I'm looking for an engineering analysis of switcher topology, component sizing calculations, output filter types, considerations for loads, etc.

There are a couple things that I've just been following the data sheets on, and I'm starting to need to really understand why the data sheets suggests these auxiliary components, because the operating environment of a project I'm working on is less friendly to hardware.

e.g.,
For cap sizing, am I just looking at the RC time constant and assuming I'm maintaining the entirety of the off cycle? Or just enough to address the dI/dt from the inductor side?
For inductor sizing, do I assume energy storage of 1/2LI^2 maintaining the entirety of the off cycle?
What the relationship between these elements, aside from ripple? Like if I do a fat oversizing of the both components, what's the downside (besides physical size)?
Does this change with an inductive load, or am I just using a standard P-FET with a flyback on the output?
What's the EMI advantage/disadvantage of PWM vs controlling an enable on a duty-cycle-locked oscillator? How would I calculate the assumed EMI level from these modes? Is this a calculation just from the assumed PWM duty cycle and then the output stability of the system? (while I could do an SI/EMI simulation, I would like to know how I would "ballpark" the value ahead of time).


Anyway, not looking for specific answers, but more for resources that address switching design with a level of detail similar to the above. I've already read the entry in AoE and a few assorted textbooks, if relevant.


e: to clarify, I'm doing a design where I expect failures on the switching block, and need to plan my non-IC components to handle failures, or at least run calculations enough do a FMEA.

PRADA SLUT fucked around with this message at 21:25 on Jun 7, 2023

Hexyflexy
Sep 2, 2011

asymptotically approaching one

PRADA SLUT posted:

What's the best resource for in-depth DCDC switcher design? I'm not talking like the hobbyist youtuber, "if the switching frequency is faster, you use smaller inductors", I'm looking for an engineering analysis of switcher topology, component sizing calculations, output filter types, considerations for loads, etc.

There are a couple things that I've just been following the data sheets on, and I'm starting to need to really understand why the data sheets suggests these auxiliary components, because the operating environment of a project I'm working on is less friendly to hardware.

e.g.,
For cap sizing, am I just looking at the RC time constant and assuming I'm maintaining the entirety of the off cycle? Or just enough to address the dI/dt from the inductor side?
For inductor sizing, do I assume energy storage of 1/2LI^2 maintaining the entirety of the off cycle?
What the relationship between these elements, aside from ripple? Like if I do a fat oversizing of the both components, what's the downside (besides physical size)?
Does this change with an inductive load, or am I just using a standard P-FET with a flyback on the output?
What's the EMI advantage/disadvantage of PWM vs controlling an enable on a duty-cycle-locked oscillator? How would I calculate the assumed EMI level from these modes? Is this a calculation just from the assumed PWM duty cycle and then the output stability of the system? (while I could do an SI/EMI simulation, I would like to know how I would "ballpark" the value ahead of time).


Anyway, not looking for specific answers, but more for resources that address switching design with a level of detail similar to the above. I've already read the entry in AoE and a few assorted textbooks, if relevant.

Not sure if this is the kind of thing you're looking for, but if you want some uni level lectures on various power electronics topics, I went through a fair few of https://www.youtube.com/@katkimshow/videos her lectures a few years ago when I was looking and they were very helpful.

Beyond that I'd suggest searching for "Texas Instruments ... buck converter" etc on youtube, they do a whole load of lectures on most of the chips they make and design issues around using them.

Sagebrush
Feb 26, 2012

tuyop posted:

This is an excellent short description of how those resistors work, thanks! Makes total sense to me now.

Thank you! I am a teacher and it's nice to hear that my main job skill -- explaining complex topics in a way that lets inexperienced people understand what's going on -- is still working. :cheeky:

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

PRADA SLUT posted:

What's the best resource for in-depth DCDC switcher design? I'm not talking like the hobbyist youtuber, "if the switching frequency is faster, you use smaller inductors", I'm looking for an engineering analysis of switcher topology, component sizing calculations, output filter types, considerations for loads, etc.

There are a couple things that I've just been following the data sheets on, and I'm starting to need to really understand why the data sheets suggests these auxiliary components, because the operating environment of a project I'm working on is less friendly to hardware.

I don't know what the *best* resource is. My previous job was doing digital design on mostly SMPS ICs, and I found myself needing to do a lot of simulations and build a lot of circuits on the bench that were some form of SMPS, almost always a boost, and my background was roughly 100% computer engineering/digital and 0% anything remotely related to power or anything "analog". My approach to learning was roughly equal parts attempting to design/understand things/build simulations, having conversations with colleagues, and doing web searches to find/read a bunch of old datasheets, app notes and magazine articles. The conversations were important because they were usually how I went from being stuck on one part or another of whatever I was working on to knowing the web search terms (or specific technique) I needed to overcome that problem. I can share a very rough outline of switcher design that may or may not give you some threads to pull at:

  • Topology: boost, buck, buck-boost, etc.-- where are the switches, inductors, and output capacitor? The front-page application schematics from datasheets are helpful here.
  • Inductor current waveforms:
    • From topology you can get voltage across inductor when output is at its steady state value and switches are in each position.
    • From inductor voltages, the inductance, and the fact that V=L di/dt, you can get the inductor current slope in each switch position.
    • At steady state you know the inductor current won't walk up or down each cycle so you can use this to infer the average switch duty cycle
    • Knowing the duty cycle, switching frequency, and inductor current slopes you can find the inductor current ripple; the difference between minimum and maximum inductor current. The waveform will not be quite as nice looking for constant-on-time parts, but since the average inductor current won't change at steady state the average duty cycle will be the same.
    • You can also find the average inductor current from the load current and the switch duty cycle (if, in your selected topology, the load/output capacitor is disconnected from the load for part of the cycle). For a buck the output capacitor is always connected and current is sometimes coming from the input and other times coming from ground, so the average load current is just the average inductor current. For a boost the inductor current is higher than the load current since it's disconnected for part of the cycle.
    • With your current ripple and an idea of your average inductor current, you can find your maximum inductor current. Add a bit of margin and this should be the spec current of your inductor.
    • With your current waveform in hand, you can find your output ripple at your max load. This is much worse for boosts since they run with the output disconnected from the inductor for a big chunk of the cycle.
    • At this point you may say "wait, but for small load currents my inductor ripple would have the inductor current going negative and pulling charge out of the output capacitor, but maybe I can't do that because this 'switch' is actually a diode." Congratulations you've discovered discontinuous conduction mode (DCM) (the inductor stops conducting instead of pulling charge backward) and also forced-continuous mode (on, say, a synchronous (uses FETs for all switches, not a combination of FETs and diodes) buck you can absolutely let the ripple take the inductor current negative; the only thing it can hurt is efficiency. When the load gets high enough to bring your entire inductor current waveform above 0 you'll be in continuous-conduction mode (CCM)
  • Control schemes: hysteretic, voltage mode, peak current mode, average current mode, etc.
  • EMI: hot loops, SSFM, silent switcher line (the online articles about silent switcher are a good jumping-off point for SMPS EMI in general)

PRADA SLUT
Mar 14, 2006

Inexperienced,
heartless,
but even so
Yeah, I understand the operation of DCDC switchers, but I need to do a fairly complex bring-up on an FPGA for RF with like 8 different voltage levels, switchers, and power sequencing, in an environment where I expect various elements to fail. So, I'm trying to address every possible source of FMEA or EMI/EMC.

Like one thing I can't figure out for the life of me is how to figure out the assumed EMI comparing PWM vs a constant oscillator (controlled simply as an on/off) control on the feedback loop. Normally I could assume taking octaves of the switching frequency along with a current sampling and that's my noise profile, but if I'm working with an EMI-sensitive device, I need to know more specifically how I could assume the variability in switching frequency to design a filter around it. And on a constant oscillator, I'm going to "drop out" on occasion and the frequency per unit time will change slightly.

Hexyflexy
Sep 2, 2011

asymptotically approaching one

PRADA SLUT posted:

Yeah, I understand the operation of DCDC switchers, but I need to do a fairly complex bring-up on an FPGA for RF with like 8 different voltage levels, switchers, and power sequencing, in an environment where I expect various elements to fail. So, I'm trying to address every possible source of FMEA or EMI/EMC.

Like one thing I can't figure out for the life of me is how to figure out the assumed EMI comparing PWM vs a constant oscillator (controlled simply as an on/off) control on the feedback loop. Normally I could assume taking octaves of the switching frequency along with a current sampling and that's my noise profile, but if I'm working with an EMI-sensitive device, I need to know more specifically how I could assume the variability in switching frequency to design a filter around it. And on a constant oscillator, I'm going to "drop out" on occasion and the frequency per unit time will change slightly.

That's when you phone up your application engineer contact at whoever makes that FPGA!

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

PRADA SLUT posted:

Yeah, I understand the operation of DCDC switchers, but I need to do a fairly complex bring-up on an FPGA for RF with like 8 different voltage levels, switchers, and power sequencing, in an environment where I expect various elements to fail. So, I'm trying to address every possible source of FMEA or EMI/EMC.

Like one thing I can't figure out for the life of me is how to figure out the assumed EMI comparing PWM vs a constant oscillator (controlled simply as an on/off) control on the feedback loop. Normally I could assume taking octaves of the switching frequency along with a current sampling and that's my noise profile, but if I'm working with an EMI-sensitive device, I need to know more specifically how I could assume the variability in switching frequency to design a filter around it. And on a constant oscillator, I'm going to "drop out" on occasion and the frequency per unit time will change slightly.

I'm not saying you are, but if you're interested in never having ripple (inductor current and output voltage) below the switching frequency, and having the spectrum be very predictable, that's exactly the sort of thing forced continuous mode was invented for. Even if the load drops to nothing the controller will just push charge in and out of the output capacitor at Fsw so the ripple frequency never drops. If you're not in FCM, any switcher can have its effective switching frequently get very low at light load; audio frequency, even.

If the SMPS IC vendor has field applications engineers, they may be available to help. I doubt they would do detailed theoretical analysis of your EMI situation (I've only ever seen it approached empirically), but they would at least be familiar enough with best practices to save time in the xacto-knife-and-anechoic-chamber phase, and they might be able to provide answers to FMEA questions you couldn't get any other way. "What if the comp cap gets knocked off the board?" type questions can be hard to answer for somebody who can't email the designer to ask what's inside the chip on that pin.

I would blow Dane Cook
Dec 26, 2008
https://www.youtube.com/watch?v=k2C4lbbIH0c

Dominoes
Sep 20, 2007

I'm not convinced maker bloggers have seen a credit card.

Shame Boy
Mar 2, 2010

I can't not read that thumbnail as "They Bake Pis[s] Here"

The yellow tint to the IR heater is not helping.

mobby_6kl
Aug 9, 2009

by Fluffdaddy
My electronics Legos arrived ( a while ago) and I made a USB PD charger for my Mavic Air 1 batteries. The batteries require 13.2v which is pretty awkward so I got a
15v USB-PD "decoy" https://www.aliexpress.com/item/1005005266657349.html
dc step-down converter with a current limiter to prevent the powerbank/supply from cutting power: https://www.aliexpress.com/item/32464248769.html



It gets really hot at 2A so I might try to find a different solution later (probably trying to program the PPS supply, which seems like a huge PITA). For the moment though the problem is that I can't find a blade connector that would fit the battery, like this one but 2mm pitch:



There are a few 2mm options on digikey (https://www.digikey.cz/en/products/...JC7LgiuHwS4uJAA) but they're keyed and again it would cost like $30 to have a single connector shipped. Any ideas where I could find something that would work with this?

babyeatingpsychopath
Oct 28, 2000
Forum Veteran


mobby_6kl posted:

Any ideas where I could find something that would work with this?

Battery connectors like this are deliberately very proprietary and expensive in one-off quantities. The best bet is to get something 3d printed.

mobby_6kl
Aug 9, 2009

by Fluffdaddy

babyeatingpsychopath posted:

Battery connectors like this are deliberately very proprietary and expensive in one-off quantities. The best bet is to get something 3d printed.

Seems like it, yeah. Can't track down the actual connector even though there are aftermarket car chargers on aliexpress using it, but also not even the 2mm blade connectors by themselves. I think I'll design an enclosure for the whole thing including the plug for the battery , and try to make some "blades" out of scrap metal or something :v:

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
Are the ali express chargers cheaper than the 30 bucks for buying the connector itself? Just buy one of those and steal the connector.

PRADA SLUT
Mar 14, 2006

Inexperienced,
heartless,
but even so
Anyone have a resource for type-3 compensator network design for a switcher?

I’m trying to understand how I would go about sizing components for a specific switching frequency. I understand the voltage divider into the feedback input as a voltage comparator, but not RC component sizing for the feedforward and feedback elements of the control loop.

movax
Aug 30, 2008

PRADA SLUT posted:

Anyone have a resource for type-3 compensator network design for a switcher?

I’m trying to understand how I would go about sizing components for a specific switching frequency. I understand the voltage divider into the feedback input as a voltage comparator, but not RC component sizing for the feedforward and feedback elements of the control loop.

Have you checked app notes? I remember Intersil having a good one, maybe TI or others do as well. Nothing from the controller manufacturer?

PRADA SLUT
Mar 14, 2006

Inexperienced,
heartless,
but even so
It's weird, there's a note in the data sheet on it, but not how to understand what the assumptions should be:



e.g., pick gain according to the desired converter bandwidth? How would I determine what I want?

I'm on a 500kHz buck and this control loop is just to stabilize the PWM. Is it based on the demand of the output load current, which would be from the clock cycle of the load components and amplitude of current?


3V3 on top

The divider is just to set the voltage to send back into the feedback, but looking at item 1, the gain product from the Rff and Rfb ratio would be 44dB, which.. I don't know what to do with? Is this just the gain product necessary for the -20dB / 0dB closed-loop crossing (with >+45 phase)?

Controls aren't my strong suit, and I'm used to regs that just Do The Control Circuit on the die, so this is a new element to design.

PRADA SLUT fucked around with this message at 05:09 on Jun 20, 2023

ANIME AKBAR
Jan 25, 2007

afu~

PRADA SLUT posted:

Anyone have a resource for type-3 compensator network design for a switcher?

I’m trying to understand how I would go about sizing components for a specific switching frequency. I understand the voltage divider into the feedback input as a voltage comparator, but not RC component sizing for the feedforward and feedback elements of the control loop.

The k factor method has never failed me.

App notes on compensation from TI and Intersil are good too, but their methods are not so consistent (different rules for buck vs boost, or continuous vs discontinuous, etc), but the k-factor method is completely general, as it's based on the overall open loop transfer function without requiring any info on what the open loop circuit actually is. I've never seen a case where the k factor method underperformed (so long as a reasonable phase margin/crossover frequency was chosen).

Only thing I would add to the k factor method is to also check your gain margin as a last step. There's been a couple times where I had 60 degree phase margin but only like 4dB gain margin, and had to dial down fc a bit. You want at least 6dB, or 10dB if possible.

ANIME AKBAR fucked around with this message at 12:05 on Jun 20, 2023

pgv100
Jul 2, 2007

PRADA SLUT posted:

What's the best resource for in-depth DCDC switcher design? I'm not talking like the hobbyist youtuber, "if the switching frequency is faster, you use smaller inductors", I'm looking for an engineering analysis of switcher topology, component sizing calculations, output filter types, considerations for loads, etc.

There are a couple things that I've just been following the data sheets on, and I'm starting to need to really understand why the data sheets suggests these auxiliary components, because the operating environment of a project I'm working on is less friendly to hardware.

...

"Fundamentals of Power Electronics" - Erickson
"Switch Mode Power Supplies - Spice Simulations and Practical Designs" - Basso

These are both extremely solid books, and the Erickson book will bring you up to speed, but requires a rudimentary understanding of the 'fundamentals' of semiconductors.

PRADA SLUT
Mar 14, 2006

Inexperienced,
heartless,
but even so

ANIME AKBAR posted:

The k factor method has never failed me.

App notes on compensation from TI and Intersil are good too, but their methods are not so consistent (different rules for buck vs boost, or continuous vs discontinuous, etc), but the k-factor method is completely general, as it's based on the overall open loop transfer function without requiring any info on what the open loop circuit actually is. I've never seen a case where the k factor method underperformed (so long as a reasonable phase margin/crossover frequency was chosen).

Only thing I would add to the k factor method is to also check your gain margin as a last step. There's been a couple times where I had 60 degree phase margin but only like 4dB gain margin, and had to dial down fc a bit. You want at least 6dB, or 10dB if possible.

Do you generally set the crossover frequency as 10% of the switching frequency (eg, like a filter cutoff)? Is there a benefit to using a particular crossover for a buck?

ANIME AKBAR
Jan 25, 2007

afu~

PRADA SLUT posted:

Do you generally set the crossover frequency as 10% of the switching frequency (eg, like a filter cutoff)? Is there a benefit to using a particular crossover for a buck?

Switching frequency fsw isn't directly a factor. It's the transfer function that matters, and in general the transfer function is independent of fsw (for continuous conduction mode that is). But the transfer function is effectively undefined above half of fsw, so you have to stay below fsw/2, but fsw/10 is usually very conservative. For a buck-derived converter, getting to fsw/4 is often doable, especially if the output filter has a bit of damping. For boost or buckboost converters, the rhpz is usually what limits your fc (again, this isn't related directly to fsw).

babyeatingpsychopath
Oct 28, 2000
Forum Veteran


ANIME AKBAR posted:

Switching frequency fsw isn't directly a factor. It's the transfer function that matters...

This topic is clearly over my head, so could you briefly explain what a transfer function is in this context?

PRADA SLUT
Mar 14, 2006

Inexperienced,
heartless,
but even so

babyeatingpsychopath posted:

This topic is clearly over my head, so could you briefly explain what a transfer function is in this context?

Transfer function is a way of modeling a system's response to some inputs (given input X, the system will output Y).

In the case of the (switching) regulator, it takes 12V in and outputs 3V3, but it has a feedback path from 3V3 back into the regulator. The regulator then "checks" the 3V3 feedback path and adjusts itself (the pulse width) to ensure it's always outputting the right voltage. You could think of it similar to how an op amp with a feedback path "self-adjusts" to provide the correct output voltage.

However, some regs (or systems in general) allow you to build your own RC feedback network to alter how the reg responds to changes in the output which gives you fine control over the systems response.

This guy has some good examples of control systems:
https://www.youtube.com/watch?v=O-OqgFE9SD4

Or here's a paper from TI with a little more detail:
https://www.ti.com/lit/an/slva662/slva662.pdf

The actual design of a complex control network is.. not my specialty, so I have to defer that to grey-bearded goons in checkered shirts to answer.

PRADA SLUT fucked around with this message at 16:17 on Jun 21, 2023

petit choux
Feb 24, 2016

Hey thread, sorry to bother you with one of my dumb questions again. I just bought an O scope and I've never seen a power cord like this. Anybody know if it's possible to power this without their cord?



And BTW, just to show off my other O scope:

https://i.imgur.com/NFZZhUc.mp4

Sagebrush
Feb 26, 2012

You're probably going to have to post a picture of that power cord friendo

petit choux
Feb 24, 2016

Okay, I was mistaken, it uses a standard power cord. I've powered it up with nothing connected and well a couple lights come on.

Adbot
ADBOT LOVES YOU

cruft
Oct 25, 2007

petit choux posted:

Okay, I was mistaken, it uses a standard power cord. I've powered it up with nothing connected and well a couple lights come on.

:confused:

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply