Looking for suitable mcu to drive current mode converter  - Page 1
Forum section: electronics / general

author: Miyuki
author_rank: Frequent Contributor
timestamp: September 01, 2019, 05:59:38 pm
content: Hi folks,I am looking for mcu to control current mode converterSwitching frequency 100-200kHz, peak current mode with limited duty.And I need enough featured counter to have access to time when current comparator matchesDo someone have experience with this type of control ?

author: PCB.Wiz
author_rank: Super Contributor
timestamp: September 01, 2019, 10:45:59 pm
content: That could be a challenge.Silabs have EFM8LB1 which has 72MHz PWM and CLUs could be used for current time capture, and DACs used to set current.Microchip has some hybrid part, with a PIC and a Analog-PWM in the same package, or you could use an external analog PWManda MCU with a DAC for your control.DSC's have finer PWM, but they tend o come in larger packages.

author: Miyuki
author_rank: Frequent Contributor
timestamp: September 02, 2019, 08:00:41 am
content: I done some searching and found STM32F334 series designed for "digital power conversion applications"They have something called HRTIM and it runs at 144MHz and have insane amount of featuresAccording to datasheet it is much more capable than I need for this or any other planned projectIt comes even in small packages for decent price 3-4 $

author: T3sl4co1l
author_rank: Super Contributor
timestamp: September 02, 2019, 08:22:27 am
content: dsPIC comes to mind. Probably a lot in the 32 bit range. Some STM32F0 or up can do it, probably some MSP430s as well. There are MCUs and DSPs with advanced timers in them that can generate signals like this without any software intervention.Probably on the level of XMEGA is the lowest you could go, and that may be a challenge; ATmega isn't going to cut it, the lesser PICs, etc.Specifically what you're looking for is some combination of: timer-counter, with event driven reset, with the event generated by an analog comparator (for peak current mode) with response time much less than 1us; ADC with sample rate higher than F_sw, and at least 8 bits (well, I suppose you could get by with less, but >= 8 is common anyways); and CPU with >50 instructions per switching period, to perform PID loop calculations (this should be almost trivial). (For average current mode, use two ADC channels and waive the comparator requirement; although a comparator is not a bad idea anyway for fault detection purposes.)It may be a worthwhile question to ask yourself: why use an MCU, instead of for example, controlling a switching regulator that has all this functionality in hardware ready to go? A good example is TPS54233, a peak current mode buck regulator with transconductance error amp. You can drive the COMP pin from a DAC, setting peak current manually. Or you can run a 100% stock circuit (no COMP shenanigans), but connect a large resistor from DAC to VSENSE, so the voltage sense divider is from the output AND from the DAC, to VSENSE, to GND. This has an inverting characteristic, where setting DAC to MAXVAL drives the output to Vout(min), and vice versa.For example, an approximation of a CC/CV bench supply can be made simply by connecting an adjustable clamp to COMP. If you go one further, and add an output current sense amp, and current error amp, you can use the clamp circuit again, but set the clamping threshold from the error amp, regulating output current for true CC/CV operation. These setpoints (voltage and current) can then be set by DACs, allowing complete autonomous operation without software control; even a 6502 can handle the software! (Now, this does suck a bit, as there's not really a good clamping circuit, it's a bit of a pain to do fully analog. There aren't really ICs for it. So it would be understandable to pull this function inside an MCU.)Tim

author: Miyuki
author_rank: Frequent Contributor
timestamp: September 02, 2019, 08:57:49 am
content: I do it for learning mostly so I want complete digitally controlled converterAnd I know it can be done combined way or even complete analog way (even all features I want, but at huge complexity)In this specific project I want supply to have ability to simulate big output choke (GMAW welding supply)So it produce constant voltage until it detect short circuit then it switch to current ramp, or produce even more complicated output patterns (as in attached picture)In this complicated output shaping is purely digital control easier to adjustIf I want something more steady, like solar cell mmpt tracking, separate switching controller and small MCU with DAC is simpler way

author: Siwastaja
author_rank: Super Contributor
timestamp: September 02, 2019, 03:35:16 pm
content: STM32F334.

author: Rikka0w0
author_rank: Newbie
timestamp: October 02, 2019, 06:27:45 am
content: Peak current mode control is too fast for ADCs, so you need to have an analog comparator and its output should be able to reset the output of the PWM module. To avoid the instability caused by limited duty cycle, assume you have a 8 bit ADC, you need to have a at least 9 bit PWM. Your PWM frequency is 100-200Khz, your MCU need to have a 51.2-102.4MHz clock, or it needs to have a high-resolution PWM module.My recommendations would be STM32F334 or TMS320F28335. Some STM32F4 will also work.

author: SiliconWizard
author_rank: Super Contributor
timestamp: October 02, 2019, 01:04:33 pm
content: You could of course, also use a small FPGA instead.

author: Sal Ammoniac
author_rank: Super Contributor
timestamp: October 02, 2019, 04:28:46 pm
content: Infineon XMC4000 series.

author: Miyuki
author_rank: Frequent Contributor
timestamp: October 03, 2019, 10:33:07 am
content: I will stick to STM32G series they are cheap and small with fast featured PWM