Electronics > Power/Renewable Energy/EV's

PCMC+PSFB on STM32 is it possible?

(1/1)

Alex-lab:
Hi,

Up to now I have been using STM32G4 to control phase-shift full-bridge (PSFB) in voltage control mode (VCM). Now I would like to add peak current control mode (PCMC) for better performance, but it appears that none of STM32G4 is capable with such capabilities. At least I was unable to find the way for it.
Did I miss something? What is the best way for such digitally controlled power supply?
I have thought about some hybrid, a digital+analogue approach by coupling STM32 with something like UC28950, but I still believe that should be a better way...

Thanks,

fourtytwo42:
I also found the STM32 PWM poor in terms of facilities and adaptability, of course they use the same block of IP in all there offerings so they are all the same.
I thought of pairing it with an FPGA but that's getting expensive so in the end I changed to the motor control variety of the PIC24EP series, unfortunately a different IDE and programmer/debugger to pay for.

uer166:

--- Quote from: Alex-lab on June 07, 2024, 07:39:27 am ---Hi,

Up to now I have been using STM32G4 to control phase-shift full-bridge (PSFB) in voltage control mode (VCM). Now I would like to add peak current control mode (PCMC) for better performance, but it appears that none of STM32G4 is capable with such capabilities. At least I was unable to find the way for it.
Did I miss something? What is the best way for such digitally controlled power supply?
I have thought about some hybrid, a digital+analogue approach by coupling STM32 with something like UC28950, but I still believe that should be a better way...

Thanks,

--- End quote ---

HRTIM with reset event inputs (for your peak current limit) should be able to do this, the regular advanced timers are way too limiting. Have you looked into that peripheral?

mtwieg:
At a glance at the reference manual, it looks like the STM32G4 has all the requisite building blocks for doing current mode control:
1. PWM synthesis controlled by external events
2. Analog comparators which can generate events for the PWM synthesis based on the sensed current
3. DACs which can connect to the inputs of the comparators (12 bits should be sufficient)
4. DACs can be set up to generate ramp/sawtooth waves to implement slope compensation

I've worked a lot with C2000 MCUs which are aimed at such applications, and the feature set looks comparable. Actually configuring these peripherals to work together properly is definitely not straightforward though. I would hope that STM's documentation is better than TI's...

Siwastaja:

--- Quote from: mtwieg on June 08, 2024, 02:01:43 pm ---At a glance at the reference manual, it looks like the STM32G4 has all the requisite building blocks for doing current mode control:
1. PWM synthesis controlled by external events
2. Analog comparators which can generate events for the PWM synthesis based on the sensed current
3. DACs which can connect to the inputs of the comparators (12 bits should be sufficient)
4. DACs can be set up to generate ramp/sawtooth waves to implement slope compensation

--- End quote ---

Yes. First time I did this (on STM32F334), all of the mentioned* many years ago setting it all up wasn't too difficult, in principle... just that ST, as usual, has some silicon bugs/undocumented "features" such as some invert bit here not doing anything at, and some other bit there completely breaking non-related IO pin... So before committing to a large batch of unmodifiable PCBs, do a prototype first. Which hopefully is quite obvious anyway.

It's all in the reference manual, just build a prototype (around devboard, or spin an early revision of the actual board) and read the related sections on the reference manual and start working.

*) expect that instead of slope compensation, which I did not need due to by-design <50% duty cycle, I used the DACs for arbitrary current waveform generation

Navigation

[0] Message Index

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod