Need help designing a high voltage stepdown converter - Page 1
Forum section: electronics / projects

author: Brathahn
author_rank: Contributor
timestamp: August 26, 2021, 07:01:41 pm
content: Hello everyone,i want to build a speed controller for a DC-motor. Sounds simple, right?Here are the requirements:-Input voltage: 325VDC (rectified mains)-Output voltage: 0-220VDC-Max output current: 2A-Setpoint via potentiometer, but external fine adjustment with a current loop -20mA/+20mA (-10%/+10%)-Adjustable overvoltage protection-Motor: 220VDC 0,7Ai did a mockup "schematic" to illustrate what i wanna do and what i think will work:the stepdown controller will be a TL494, its a nice "all in one" smps-circuitIRFP460 as the main switching element.FAN7171-F085 highside driver.Now for my questions:-General design advice?-Would a normal mains filter be enough or do i need some more advanced filtering for such a circuit?-Is the irfp460 too overkill? Maybe there is a better one? I've choosen them, because i have some of them laying around. Space on the circuit board would not be an issue.-How much inductance do i need? And how do i calculate it?-How can i "mix" the two setpoints together? Do i need some fancy op-amps or can it be done with resistors only?-Would a comparator op-amp with a "set only" latch (reset via power cycle) be enough for the overvoltage protection?Thank you

author: Zero999
author_rank: Super Contributor
timestamp: August 26, 2021, 09:20:27 pm
content: What's the motor driving?My advice is don't bother with a DC:DC converter.Run the motor off unfiltered, rectified mains and use PWM to control the speed. The peak voltage of 325V vs 220V will not do any damage. Make sure the motor is properly earthed.

author: twospoons
author_rank: Frequent Contributor
timestamp: August 26, 2021, 09:25:41 pm
content: Quote from: Zero999 on August 26, 2021, 09:20:27 pm=> 100Hz torque ripple?

author: Zero999
author_rank: Super Contributor
timestamp: August 27, 2021, 09:14:19 am
content: Quote from: twospoons on August 26, 2021, 09:25:41 pmThat's why I asked what load the motor is driving.It's also possible to mitigate the torque ripple, to some degree, by adjusting the duty cycle.

author: Miyuki
author_rank: Frequent Contributor
timestamp: August 27, 2021, 09:44:10 am
content: Quote from: twospoons on August 26, 2021, 09:25:41 pmMost motors have so huge inertia compared to supply ripple you won't ever see it in the shaftAnd can work just well with a simple Triac/thyristor regulator even when today mosfets are reasonable cheap and can have smoother regulation and with fancy regulation you can modulate PWM according to line voltage to limit that torque ripple

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 27, 2021, 12:47:22 pm
content: A few tips:1. TL494 is usable, but don't be misled by the common application circuits. Use an average current mode control. For this,2. Add a current sense shunt in series with GND, between the buck diode and filter cap. This senses inductor current, at the low side so you don't need any dumb isolation tricks. And I gather you don't need a common ground reference, so it doesn't matter to split grounds here.You'll be using the 494's error amp to regulate this voltage drop, i.e. the inductor current. Which gets you a constant-torque characteristic already, which is nice for some applications. If you need constant speed, add a second error amp (can be anything from a single TL431*, to a proper op-amp, or an MCU if you want digital control) and control motor terminal voltage (EMF sensing), or tach voltage if you have a generator type tach attached; or for an encoder type, a F-to-V converter can be used to the same end.*Which is less a "variable zener", and better thought of as a self-powered op-amp with a startlingly large, yet suspiciously accurate, input offset voltage. Like all voltage mode op-amps, it has an integrator characteristic, i.e. the output (K) voltage responds gradually to changes in the input (REF) voltage. Essentially, REF is -IN, A is GND and +IN, and K is OUT/VCC.3. Don't use a high side driver. Since you don't need common ground at all (again, assumption), put the motor and diode in the high side (buck-boost). Downside, now you do need some fiddly level translation to measure inductor current, but it's not so bad at least, there are standard solutions: a Hall effect sensor is alright (albeit, not real great at these low currents), or a high side translator can be used (like so:https://www.seventransistorlabs.com/Images/HighSideCurrentSense.pngshown here with extra protection/filtering, which shouldn't be necessary in your case).The fatal flaw with your circuit as-is, is the gate driver never starts up -- bootstrap gate drivers rely on a low side pulling down the switch node, where current can flow from the LV supply into the bootstrap capacitor, thus supplying the high side while it goes up and does its thing. Without a low side, you at least need something like a bias resistor, charge pump, or fully isolated supply to keep it powered. Which, if you're going to use a 15V transformer, I mean you could just use a dual-winding one and be done*, or two transformers. Crude but effective!*Mind that such transformers are usually wound bifilar, i.e. a pair of enameled wire together. So the breakdown voltage between secondaries might not be all that great, and running more than 100V or so this way might be dubious. It'll probably work; but it's not a great look, and I would prefer a better solution.Actually, it probably does start up, but it'll be weird. See, at startup, the output's at 0V, so the bootstrap can charge. Great. It can start switching, and as inductor current builds, the buck diode catches it, and that current is shared partially with the bootstrap capacitor -- it keeps itself charged, without another switch explicitly pulling SW down. Also great. The trick is, say the motor spins up, and it stops switching -- it's at speed and there's no load, or it overshoots slightly and needs to stop switching for a moment while the motor spins down. After a few ms of no switching, the bootstrap capacitor gets discharged by the driver, and it disables itself (undervoltage lockout (UVLO)). When this point is reached, the motor has to spin down almost completely to a stop, before the gate driver will come back online -- and, because of a quirk in these devices, it may not start up automatically, you need to toggle the input because it's only edge-triggered, not level-triggered -- if the controller is demanding 100% duty all this time, it simply stays stuck asking for "on", never retrying! Now, mind this is only apossiblescenario, given a controller that goes up to 100% duty -- the TL494 does not, so it won't stay stuck off like that. But you'll still have the spin-down scenario, as the TL494 will happily go to 0% duty (and even if you clamp it at a few % minimum... that's rather dangerous for control purposes, aye?).So there you go, actually a neat bit of device characteristics you don't usually see. Easily avoided by supplying power to the driver -- it only needs a mA or so (and any extra can be taken up by a zener diode clamp in parallel with the bootstrap cap), and then you can go back to the usual assumptions -- that it's always powered and responsive.And yes, IRFP460 is way too huge here, something like a STF7N60M2 will do fine, and is quite cheap, and fast.Tim

author: Brathahn
author_rank: Contributor
timestamp: August 27, 2021, 10:21:17 pm
content: Thanks for your answers!Quote from: Zero999 on August 26, 2021, 09:20:27 pmThe motor will drive a three phase generator. The whole setup will simulate a backup power genset. A genset controller will measure and control the voltage and frequency of the generator. The frequency is controlled with the speed of the DC motor, the voltage is controlled by the generator exitation.Also i want to use a DCDC converter to not damage the insulation of the motor. (its quite old)Quote from: T3sl4co1l on August 27, 2021, 12:47:22 pmFirst of: thanks for the elaborate answer!I dont understand why i should measure the motor current when i want to control its voltage? The external controller will measure and regulate the speed with ramping the motor voltage up and down. Also what happens when the motor fuse will blow? The tl494 will sense zero current and will ramp up the voltage until the overvoltage protection kicks in.Quote from: T3sl4co1l on August 27, 2021, 12:47:22 pmOkay, i did not know that you need a low side driver for the bootstrapping too. So i will use your suggestion with the extra supply for the FET.My simple approach to this:ps: how do i get the inline thumbnails working? it only shows the attach=x in the preview and the post itself?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 28, 2021, 02:44:50 am
content: Quote from: Brathahn on August 27, 2021, 10:21:17 pmThe simple answer: I'm a professional. Trust me, it's better this way.The long answer:First of all, you've seen what I write [on a regular basis, as it happens], are yousureyou want the long answer?The short of the long is, it goes several levels of abstraction deep, into control theory, which uses rational polynomials (hey, finally an application for those stupid polynomials they taught you in high school!..). The coefficients of which are given by component values (in whatever combinations as determined by the circuit arrangement), and the roots of which correspond to stability, or how well-behaved the loop is.It's very difficult to wrap a control loop around a two-pole system. The controller adds a pole itself (i.e., the compensation components which you have the freedom to adjust), and ideally the system only has one additional pole (at a low enough frequency to matter; poles at much higher frequency are irrelevant, more or less), leaving plenty of phase margin. More than two poles in the system means there will be enough phase shift that it takes very little loop gain to cause oscillation.With pure voltage mode, the LC output filter adds two poles to the loop, making compensation just about impossible.With current mode, the loop is closed around the L first,isolating the effect of the Cand allowing optimal compensation. The inner loop is fast, essentially Fsw * ripple fraction. The outer loop is then closed around the current loop, which looks like two staggered poles, well behaved and thus easily compensated as well. No double phase shift is incurred,and the total loop can operate faster than the pure LC cutoff!More intuitively, current mode also gives you a hard and unconditional current limit: if the motor goes short circuit, or stalled, there's no problem, nothing tries to ignite. The controller is 100% fully in control at all time, and simply commands whatever "100% current" means. Which is set by design.And if you need a voltage limit, absolutely, use a voltage limit(ing outer loop)! Or add a fault latch and comparators to trigger it, whatever works.If you regulate voltage, you can in turn vary it to regulate RPM or frequency or whatever. Or merge several error amps together with a min(x,y) function (i.e., diode wired-OR) to do them sort of in parallel; there are some tradeoffs either way. (Probably, either way would be fine here, thus controlling current, voltage and RPM in turn.)There's nothing wrong with cascading feedback loops -- you do incur a bit of phase shift every time, meaning each outer level needs to be at least a bit slower than the one inside. That's fine for current mode, where the outer loop has to be slower due to the size of the capacitor, or the inertia of the rotor and so on.QuoteInline attach is disabled because... technical reasons... Anyway, after posting, you can copy the attachment link directly, and edit to embed that.I wouldn't go and craft my own gate driver here -- the bootstrap kind is perfectly fine, you just don't need to bootstrap it anymore. Just run isolated power straight to its high side supply, done and done.Specifically: optos are extremely slow. The circuit shown is reasonable up to a few kHz -- I've used it myself -- but likely anything for a switching power supply needs to run too fast for that to be reasonable. A faster opto like SFH6345 can be used, or a digital isolator IC, and that gets you a logic level to work with; add on some level shifting/boosting to drive some 100s of mA+ into the gate (which is a fairly large capacitor, typically a few nF equivalent), and you've got a proper gate driver! But, once you've put down the 20 or so discrete components to do all that... you really might as well just use the literal one IC and be done with it. (Aside from didactic purposes, of course; I made plenty of discrete gate drivers back in the day!)Tim

author: Zero999
author_rank: Super Contributor
timestamp: August 28, 2021, 10:47:26 am
content: Quote from: Brathahn on August 27, 2021, 10:21:17 pmDon't worry about damaging the insulation it should be fine. The DC:DC converter you've shown isn't isolated and will still give the peak mains voltage between the motor windings and chassis anyway. To ensure you don't get the peak voltage, you need an isolated DC:DC converter, but as I say, 325V won't do any harm.Dumb question: why not use an inverter and boost converter, rather than a motor generator set, if you want 230V to 400V three phase?

author: Brathahn
author_rank: Contributor
timestamp: August 28, 2021, 03:08:12 pm
content: @TimThanks for further explanation! I will use the highside with the isolated power then. Also the TL494 conveniently has two error op-amps that can be used for exactly this purpose.Quote from: Zero999 on August 28, 2021, 10:47:26 amA stepdown converter wont give you the full input voltage on the output side (as long as the FET wont go into 100%duty)The pulses from the FET will be "dampened" in the inductor. A quickly rising voltage will result in a slow rising current because of Lenz's law. And whats beyond the inductor will further be dampened by the capacitor. So when you set it to 200VDC it will be at exactly 200VDC (+/- some ripple ofc.)Why use a mechanical system?In my mind, the simulation should be as close as possible to the original system; there you would have a diesel engine with a synchronous generator. And with moving parts you can see and hear whats going on. I also intend to do a mains paralleling operation with that tiny generator and export the whole 0.1kVA of it

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 28, 2021, 03:49:03 pm
content: Quote from: Brathahn on August 28, 2021, 03:08:12 pmAhp! Careful. They are wired together, to PWM. You can't cascade them. Using them for current and voltage (or frequency or whatever) respectively, you get current mode limiting, but voltage regulation with all the crummy performance of a voltage mode control!So you need to strap one op-amp as disabled (or use it for something else, like, Idunno, temperature limit say), and use the other for the current loop. Add an external amp (LM321, TLV2371, etc.) for the outer loop and you're set.Tim