| Electronics > Projects, Designs, and Technical Stuff |
| Run into a wall (3180 fet drive circuit) |
| << < (3/4) > >> |
| zap!:
First off, thank you so much for the response. It's very helpful in learning this stuff. Secondly I forgot to mention that at the moment i'm manually controlling the duty cycle and just focusing on getting the buck working smoothly. I will be adding a current sense and voltage sense portion once I have this dialled. --- Quote from: T3sl4co1l on September 04, 2019, 08:34:03 am ---C5-R1..? --- End quote --- Those are thrown in to settle any ringing on the gate. is that correct configuration? what about values? or is it not needed at all? --- Quote ---20uH sounds much too small for an Arduino to control. You won't be able to sample current often enough to keep it in a safe range. --- End quote --- What value would you recommend? When I did some of the buck converter calculations with my switching and max current ect I got ~10µH as needed inductance so thought 20 would be plenty. my plan is to add a low value current shunt and amplify that drop for the Arduino to read. Any help on the inductor size in a way I learn something would be greatly appreciated. --- Quote ---Bootstrap drive, for N-ch, is easy: a diode from +12V to VCC, local bypass cap from VCC to VEE (and transistor source), --- End quote --- Are the values for these important? I'll have a look for calculations... i'm assuming it will need to deliver a certain amount of current. 2.5 amps? I originally was planning on using an N-ch but got scared off from the extra circuitry. It seems that i'll need to take on the challenge as it really sounds like the way to go. --- Quote ---Again, an Arduino isn't really going to sample fast enough (assuming ATmega series) to handle this (e.g. per-cycle current limiting), even at the low switching frequency. --- End quote --- with the above considered is this still true? is there a µprocessor you'd recommend? |
| T3sl4co1l:
All that's needed is a series gate resistor. Maybe you saw the test circuit in the datasheet, and thought that was meant to go with the gate? It's actually to simulate a gate, where you usually have the series resistor, and the capacitor is the gate capacitance. No need to simulate when you've got the real thing! :) 47 to 100uH would be a more comfortable inductance. The cutoff frequency will be pretty low (some kHz), which helps in getting a good measurement of the current with such a slow platform. XMEGA would be better (~1MS/s ADC, usefully fast analog comparator, some hardware event functionality to reduce the need for direct software control), but most of the ARM based boards would be fine (Arduino Due for example?). STM32F3xx was recently mentioned in another thread. Certainly, anything in the 50MHz+ range should be fast enough to respond to things even at ordinary switching rates (100kHz+), assuming the ADC can sample reasonably fast (at least once per cycle). Further reading -- peak and average current mode control. Because, most SMPS introductions just consider PWM, and while that's what's being done, that's not why we do it. The PWM is just an intermediate step, where what's requested is some current in the inductor, and the PWM is adjusted to achieve that current. (In peak current mode, it's not even generated as PWM at all: it's a pulse, started by an oscillator, and terminated by the inductor charging to the threshold current. It looks like PWM when you scope it, but "that's not why we're do it"!) The key insight is that, if you set PWM% and let it run, independent of whatever's going on at the source or load, what you've made is a DC transformer, not a regulator -- and certainly not something that will tolerate fault conditions, or perhaps even just startup conditions! What you're doing, first and foremost, is setting the current in the inductor, as needed to maintain the output voltage (or current, or input voltage or current, as the case may be!). The inductor current is paramount, because if current rises too high, poof goes the transistor. Safety is the most obvious benefit, but there is the knock-on benefit of control loop compensation. This is a bit hard to explain, but it comes down to this: if you're controlling PWM% to set output voltage, the controller has to wait to see what happens after the inductor and capacitor respond. There's a lot of phase shift there, so the controller has to go very cautiously (slowly). Which means relatively poor regulation for AC loads. And if there's no response, if the load is shorted perhaps, it just sits there commanding more and more, eventually hitting 100%. (Or if there's a response but it's coming very slowly, like at startup when the capacitor starts at 0V and the controller is trying to get it up to whatever Vout is supposed to be.) But if we first and foremost set the inductor current, we can control and limit it perfectly without any worry, and we can then vary the current setpoint to regulate output voltage. The inductor and capacitor are controlled in nested loops, which can be compensated independently -- and much more easily. Tim |
| zap!:
--- Quote from: T3sl4co1l on September 04, 2019, 07:05:24 pm ---All that's needed is a series gate resistor. Maybe you saw the test circuit in the datasheet, and thought that was meant to go with the gate? It's actually to simulate a gate, where you usually have the series resistor, and the capacitor is the gate capacitance. No need to simulate when you've got the real thing! :) 47 to 100uH would be a more comfortable inductance. The cutoff frequency will be pretty low (some kHz), which helps in getting a good measurement of the current with such a slow platform. XMEGA would be better (~1MS/s ADC, usefully fast analog comparator, some hardware event functionality to reduce the need for direct software control), but most of the ARM based boards would be fine (Arduino Due for example?). STM32F3xx was recently mentioned in another thread. Certainly, anything in the 50MHz+ range should be fast enough to respond to things even at ordinary switching rates (100kHz+), assuming the ADC can sample reasonably fast (at least once per cycle). Further reading -- peak and average current mode control. Because, most SMPS introductions just consider PWM, and while that's what's being done, that's not why we do it. The PWM is just an intermediate step, where what's requested is some current in the inductor, and the PWM is adjusted to achieve that current. (In peak current mode, it's not even generated as PWM at all: it's a pulse, started by an oscillator, and terminated by the inductor charging to the threshold current. It looks like PWM when you scope it, but "that's not why we're do it"!) The key insight is that, if you set PWM% and let it run, independent of whatever's going on at the source or load, what you've made is a DC transformer, not a regulator -- and certainly not something that will tolerate fault conditions, or perhaps even just startup conditions! What you're doing, first and foremost, is setting the current in the inductor, as needed to maintain the output voltage (or current, or input voltage or current, as the case may be!). The inductor current is paramount, because if current rises too high, poof goes the transistor. Safety is the most obvious benefit, but there is the knock-on benefit of control loop compensation. This is a bit hard to explain, but it comes down to this: if you're controlling PWM% to set output voltage, the controller has to wait to see what happens after the inductor and capacitor respond. There's a lot of phase shift there, so the controller has to go very cautiously (slowly). Which means relatively poor regulation for AC loads. And if there's no response, if the load is shorted perhaps, it just sits there commanding more and more, eventually hitting 100%. (Or if there's a response but it's coming very slowly, like at startup when the capacitor starts at 0V and the controller is trying to get it up to whatever Vout is supposed to be.) But if we first and foremost set the inductor current, we can control and limit it perfectly without any worry, and we can then vary the current setpoint to regulate output voltage. The inductor and capacitor are controlled in nested loops, which can be compensated independently -- and much more easily. Tim --- End quote --- This is very interesting. Ok so to see if I'm getting this: The project should be approached with a current controlled charger mentality which happens to have voltage control as a function of that current control? What would the current measurement method look like? still a shunt resistor? |
| T3sl4co1l:
Yup, exactly. If you don't need common grounds, a low-side shunt resistor is very easy. Can be read directly with the ADC, or with an opamp for gain first (the MCU may have enough gain internally, though it may be quite slow too, so give that some consideration). Otherwise, a high-side shunt resistor is still fine, using something like an INA193 to give a ground referenced signal. Hall effect sensors, and current transformers, can also be used, giving the bonus of isolation (who cares if the sense line is at like +200V, or at mains voltage?). (CTs you have do a bit of cleverness, since they only work at AC.) Tim |
| zap!:
--- Quote from: T3sl4co1l on September 04, 2019, 10:23:33 pm ---Yup, exactly. If you don't need common grounds, a low-side shunt resistor is very easy. Can be read directly with the ADC, or with an opamp for gain first (the MCU may have enough gain internally, though it may be quite slow too, so give that some consideration). Otherwise, a high-side shunt resistor is still fine, using something like an INA193 to give a ground referenced signal. Hall effect sensors, and current transformers, can also be used, giving the bonus of isolation (who cares if the sense line is at like +200V, or at mains voltage?). (CTs you have do a bit of cleverness, since they only work at AC.) Tim --- End quote --- ok so i've changed my setup (circuit attached) to get the high side N-CH working with the bootstrap and am running into an issue with startup. If i put a 220Ω resistor as a load (instead of the battery) circuit starts up and there is no issue regulating the fet switching but if i instead connect the battery the fet will not switch on. if i again connect the 220Ω to get it started and attach the battery while its working then it works with the battery attached... what am i doing wrong here? If i'm understanding there should be a 6v difference between the source and 3180 high side drive input IE fet gate which should be enough for the irfz44n to turn on... the issue I'm thinking is that like my first post was for, the 3180 will not function down at 12-13v range which it should. Any ideas would be helpful as i once again feel like there is a defection or something. |
| Navigation |
| Message Index |
| Next page |
| Previous page |