100kHz SMPS control

Hi,

I was initially thinking of designing a 100kHz SMPS with using 200kHz ADC feedback of the output voltage and current fed into a DSP which would directly interface to the fet drivers, and using cycle by cycle regulation based on these readings, but I think this may be very difficult to read these signals cleanly without them being noisy from all of the switching noise. So as an alternative I am thinking that it would be better to use a SMPS controller IC with voltage and current feeback inputs, which seem to be easier to get to work than a

200kHz ADC in this environment :) and use its output PWM signal as an input into a DSP or CPLD/FPGA for controlling the primary side fullbridge to drive the transformer. This reduces the flexibility of the power supply as the current and voltage limits are set in hardware rather than software, unless some DAC/comparator etc setup is used to drive the SMPS controller IC feedback, but it is easier to trust a SMPS controller IC rather than a complex ADC/DSP software system to control a power supply. Perhaps a tradeoff would be a controller IC with a digital interface to allow on the fly adjustment of the voltage and current limits as well as the PWM frequency etc. Does an IC like this exist? I think it would be pretty useful! Any people here ever use high speed ADC and software to control an SMPS?

cheers, Jamie

Reply to
Jamie Morken
Loading thread data ...

On a sunny day (Sat, 15 Dec 2007 11:29:37 GMT) it happened Jamie Morken wrote in :

You would need to sample much faster, if you want to monitor for example the rising current in an output switch, so you can switch off if it exceeds some level, you need to sample at at least (estimate) 20x during the max on time, say 10MHz would be OK perhaps.

i /------------ I max, max allowed current in switch / / / / / / t 0 5 us ....... sample points

It is then much simpler to use an analog comparator at I max on an input pin of the micro.

Given the above limit protection working, of course your control loopp sampling could be slower, but if you wanted fast control of current limit you would need this high speed again. That could then be done by setting the comparator reference.

The main issue in the above is that you want to protect your switches.

Reply to
Jan Panteltje

That is not really necessary. Sampling once at the end of the on-time is enough. The input voltage is known and the inductor is known. From this you can calculate a maximum on-time that will not destroy the inductor or the switch.

To limit the output current, you can measure the voltage across a sense resistor or the MOSFET. I recently built a circuit based on this method. To sense the MOSFET current I use an RC timing constant which is discharged through a diode into the MOSFET. The voltage across the capacitor is the diode forward voltage + the MOSFET across the MOSFET.

--
Reply to nico@nctdevpuntnl (punt=.)
Bedrijven en winkels vindt U op www.adresboekje.nl
Reply to
Nico Coesel

On a sunny day (Sat, 15 Dec 2007 13:10:20 GMT) it happened snipped-for-privacy@puntnl.niks (Nico Coesel) wrote in :

It seems to me that, if due to some fault condition (could be load, or whatever), it is possible the current would rise much faster, and the device would destruct before you even sample (so before the end of the on time).

Eh, that depends on the configuration. If L is transformed back from the load, then the L you see can become much smaller, think shorted output for example.

That actually reminds me, we had this guy come in and demonstrate UPSs. LOL We did blow it up with a short.

I did use a sense resistor in series with the bottom side of the half bridge in one design. But I used a comparator. Note that PIC s often have a build in analog comparator one could use. That makes things a lot easier and reliable.

Clever. This should work for reasonable values of Ron I suppose?

Reply to
Jan Panteltje

Don't do it. That way lies madness!

You should initially be thinking about what exactly you are trying to do that can't be done with a much-much simpler chip than a DSP.

If you are using a DSP or a PIC or anything like that you need to protect the system during the time that the part takes to wake up and start working. For development and likely also in production, you need to add hardware to keep things safe if the code goes wandering off into the weeds. This usually ends up as complex as just using a switcher chip and controling it with the DSP or micro.

If you want high frequency information the spikes are a big problem. One thing that can work for you is that you can trip the converter at a time when nothing is switching.

Don't put any programable part in the important path of the converter. Use a PWM controller and the like for the whole loop and then use the DSP to command the controller what to do. If you need a little more logic in the path use real logic gates or perhaps a

22V10. Any logic more complex that that should have you questioning what you are doing. I have found that most 22V10s wake up sane. Very few FPGA or CPLDs work right before they get their morning coffee.

Chances are you don't need the comparitor. You can set the important points with DACs and op-amps. A portion of the proportional feedback can be done by resistors on the PWM chip. The integral feedback can be done inside the DSP or micro.

but it is easier to trust a

Do you mean successfully?

Reply to
MooseFET

Don't over react please :-) Software PWM controllers can be major cost savers. A 200kHz PWM converter costs a few bucks. A PWM output on a controller usually comes for free. If the PWM is controlled using a high priority interrupt, the chance of things going wrong is very small.

--
Reply to nico@nctdevpuntnl (punt=.)
Bedrijven en winkels vindt U op www.adresboekje.nl
Reply to
Nico Coesel

Microchip is pushing the idea of using their chips as SMPS controllers -- why don't you check their web site for app notes?

--
Tim Wescott
Control systems and communications consulting
http://www.wescottdesign.com

Need to learn how to apply control theory in your embedded system?
"Applied Control Theory for Embedded Systems" by Tim Wescott
Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html
Reply to
Tim Wescott

I don't see it as over reaction. Spraying the entire lab with flaming capacitor parts and the epoxy that used to be the package for the power semiconductors is a joy I wouldn't deny the OP. On the other hand in these green days, blast shields with a asbestos coverings are hard to get.

Reply to
MooseFET

In my experience, the 'cost savings' are achieved only in avoiding problems that originate in the application or programming of the DSP or microcontroller.

The versatility of the DSP / microcontroller has to be weighed against all of the nit picky add-ons required to ensure that misbehavior in the silicon, interconnection or code doesn't result in a 'nonrecoverable' event.

My preference is that these devices be used in such a way that they can only modify normal safe operation, as may be desired Their failure should not affect the ability of the system to continue in operation - their failure, if detectable, should merely produce a fault warning that can be addressed separately, in a safe manner, by other intelligence.

Having seen enough of them converted to mush, the first time a simple fault occurs, these things are preferably socketed, or isolated on an FRU. The 'other intelligence', by the way, should not be configured with similar shortcomings.

CPLDs, on the other hand, have the potential to be considered as clock-work glue logic, should they ever be produced in a sufficiently simple and rugged format and not misapplied. At present they seem to exhibit the same supply fault dependencies and require similar precautions in their use.

RL

Reply to
legg

You have to be careful doing that. We had to redesign a piece of gear that used the system 8051 to control a -48 to +5 converter. Blew about 6 transistors before the software guy got his code right. It would be worthwhile to have some hardware gating to prevent doing something real stupid.

Tam

Reply to
Tam/WB2TT

The 100kHz transformer I have only has 50uH primary inductance with

500VDC what would the maximum on time be for it?

cheers, Jamie

Reply to
Jamie Morken

..and that was on an 8051 which is very easy to code for. It wasn't a DSP or a PIC which can be a lot harder to code on.

I am sort of surprised that the software guy didn't dream up some way to fully test his code in a more protected environment.

Reply to
MooseFET

I guess that is a dsPIC with an analog comparator?

cheers, Jamie

>
Reply to
Jamie Morken

Doesn't matter for a real embedded software engineer.

Now you are making sense. Test first then try in a real-life circuit. Still, software like this should be written in a way the output is limited by some hard boundaries based on the hardware. So when calculations go wrong, the output isn't going beyond the limits of the hardware.

--
Reply to nico@nctdevpuntnl (punt=.)
Bedrijven en winkels vindt U op www.adresboekje.nl
Reply to
Nico Coesel

I don't understand how that is wired up, could you elaborate on the circuit? The current sense I've seen for SMPS controller IC's use a sense resistor and an RC lowpass filter fed into the Isense pin of the controller IC.

cheers, Jamie

Reply to
Jamie Morken

My application is a step-up converter so the MOSFET switches to ground. I've connected a resistor and capacitor in series between 3v3 and ground (resistor is connected to 3v3). Now a diode is connected between the drain of the mosfet and the capacitor. Every time the MOSFET switches on, the capacitor is discharged but not further than voltage accros the MOSFET + the diode forward voltage. In other words, the voltage across the capacitor is a (crude) measure for the amount of current flowing through the MOSFET.

--
Reply to nico@nctdevpuntnl (punt=.)
Bedrijven en winkels vindt U op www.adresboekje.nl
Reply to
Nico Coesel

Where the guy went wrong was in turning the OFF transistor ON before turning the ON transistor OFF. They lasted a few minutes. Not obvious why he messed with that part of the code at all; possibly to replace assembly code with c.

Tam

Reply to
Tam/WB2TT

Does this circuit have any advantages to using a sense resistor below the mosfet feeding an RC lowpass? Besides the trade between a diode and a sense resistor are they pretty well the same performance?

cheers, Jamie

Reply to
Jamie Morken

That, I think, explains it. Many people somehow think that code in a low level language that works should be replaced with code in a higher level language.

I still think that it is surprising that he put code that did that onto real hardware. I often use a scope in checking and debugging my code that works with low level hardware. I also tend to build in interlocks so that things like attempts to turn on both transistors forces things into a safe state. It usually takes very little extra to do it.

Then again with no micros involved, we just blew something up in the lab by turning a knob. We applied about 60V oooops!.

Reply to
MooseFET

The current measurement this method makes is very crude but in practice it can be a good way to go. It doesn't consume much power and gives a measure of the conduction drop of the MOSFET which is a good measure of how hard it is being forced to work.

Reply to
MooseFET

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.