Author Topic: looking for easy way to design digital controlled SMPS  (Read 3223 times)

0 Members and 1 Guest are viewing this topic.

Online MiyukiTopic starter

  • Frequent Contributor
  • **
  • Posts: 906
  • Country: cz
    • Me on youtube
looking for easy way to design digital controlled SMPS
« on: August 04, 2017, 08:08:11 am »
Hi
I wan to ask if you have any experience with digital controlled SMPS and if you using any tools to do all the math around

I have following DC/DC setup: full bridge IGBT, have current transformer to measure primary current also have over current protection compactor, and at secondary side, voltage sense and current shunt to measure output 

I need to be able to control output as constant voltage and also as constant current

I'm little lost where to begin with all that digital compensation networks, is here any easy tools to do it (just put ADC values in and get needed duty cycle)?
processor used is STM32F103
 

Online hans

  • Super Contributor
  • ***
  • Posts: 1641
  • Country: nl
Re: looking for easy way to design digital controlled SMPS
« Reply #1 on: August 04, 2017, 09:24:22 am »
STM32F3x4 (e.g. 334) has similar PWM module like the dsPIC33 GS, but with a 217ps resolution (like having a 4.6GHz timer clock). That way you could create a 100kHz PWM with 12-bit resolution.
I think both STM32F3x4 and dsPIC33GS have hardware dead-time insertion if you want to drive a full H-bridge.

And it has a 5MSPS ADC plus 72MHz Cortex m4 core.
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 8651
  • Country: gb
Re: looking for easy way to design digital controlled SMPS
« Reply #2 on: August 04, 2017, 09:29:38 am »
Does your STM32 offer fast enough PWM to get the desired resolution? Does it have a fast enough CPU to crunch the data from ADC if you want to do cycle by cycle?
High resolution PWM is vital. However, its not usually the actual CPU crunch that makes devices unsuitable for making power supplies (or many other things requiring a tight control loop) with a decent impulse response. Its the latency from ADC sample to PWM output. The CPU power plays a part in that, but its not the whole story.....
I would consider something like TI Piccolo/Delfino for a proper, high power setup
.... the Piccolo and Delfino's ADC interrupt scheme, CLAs and high resolution PWM hardware have been optimised to allow every cycle of the PWM to be updated by the control loop with minimal delay from the ADC samples which feed the control loop. This is what distinguishes these control oriented devices, and comparable families from other vendors, from reasonably fast general purpose MCUs being fudged into control applications.
 

Offline julian1

  • Frequent Contributor
  • **
  • Posts: 735
  • Country: au
Re: looking for easy way to design digital controlled SMPS
« Reply #3 on: August 05, 2017, 12:33:38 am »
Can I add a question ;-) How do you go about introducing the slight timing delay when switching between high-side and low-side transistors to avoid shoot-through? Eg. to account for gate charge/discharge time, and transistor turnon/off time?

Basic analog mosfet drivers sometimes introduce additional logic to sense gate charge before switching the opposing transistor. More complex designs use programmable delay via a resistor with RC circuits to reach better efficiency.

Do hardware based mcu PWMs modules offer this type of control? I was thinking it might be easier to use a mcu DAC controlling a RC circuit.

OP asked about IGBT and a full bridge, but I imagine many of the issues are the same.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3146
  • Country: ca
Re: looking for easy way to design digital controlled SMPS
« Reply #4 on: August 05, 2017, 01:50:56 am »
There are MCU series designed specifically for power applications (for example dsPIC33EPxxxGS). They will have all you need - high resolution PWM with dead time and complimentary channels to drive bridges, fast multi-channel ADC, DSP engine, fault detection etc. etc.
 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3461
  • Country: it
Re: looking for easy way to design digital controlled SMPS
« Reply #5 on: August 05, 2017, 05:48:34 am »
I wanted to embark in this adventure sooner, but the PCB has been sitting there for months... maybe during vacations is the time.

I have a question: do you happen to know what happens if you pause the excecution with the debugger in the dspic GS?
AFAIK peripherals like CANbus keeps operating at least to end current transmission and keeps generating ACKs so the bus isn't upset, but peripherals like old-style PWM is stopped at current state.

I'd like to have the switches put in a safe state and i remember reading that some MCUs have option to specify that but i don't remember seeing such an option for the GS
 

Offline Pitrsek

  • Regular Contributor
  • *
  • Posts: 171
  • Country: cz
Re: looking for easy way to design digital controlled SMPS
« Reply #6 on: August 05, 2017, 07:54:53 am »
It seems that XMC range from Infineon is  tailored for SMPS as well. No personal experience tough. 
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26907
  • Country: nl
    • NCT Developments
Re: looking for easy way to design digital controlled SMPS
« Reply #7 on: August 05, 2017, 11:32:51 am »
IMHO you shouldn't attempt to use a debugger on a microcontroller which controls a PWM stage.
On topic: it very much depends on the topology whether you really need a fast control loop. Flyback for example doesn't depend on the PWM to transfer more or less energy so the control loop only needs to compensate for input voltage changes and current dependant voltage drops. I have done a few of these circuits and one thing which is very important is to have an inductor current limitter in hardware so when the software does something bad it doesn't cause damage.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3146
  • Country: ca
Re: looking for easy way to design digital controlled SMPS
« Reply #8 on: August 05, 2017, 02:44:28 pm »
I have a question: do you happen to know what happens if you pause the excecution with the debugger in the dspic GS?

Each module has a bit which indicates if the module should continue running when debugger halts or not. PICkit3 manipulates these bits and should have settings somewhere (at least it used to in pre-X MPLAB) which lets you configure which module should continue running in debug or not. On some PICs this bit is broken in CAN modules, I don't know if yours is one of them. This might be in errata or in the debugger docs.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf