6
\$\begingroup\$

I'm looking at some microcontrollers for power converters control (dsPIC33F and some ARM Cortex M3/M4 like the STM32F372CBT6 for instance) and I'm a bit worried by the limited number of PWM outputs (they top at around 8-11).

Since in the future my needs may change, I'd like to avoid finding myself in a situation where I need more PWM outputs. Therefore I'd like to know if it would be better to (in order to increase the number of available PWMs):

  • Use multiple microcontrollers and communicate between them (via CANbus for instance), each microcontroller controlling its own PWMs
  • Use external PWM generator modules via SPI/I2C (do they exist?)
  • Any other microcontroller/DSP family supporting more PWM outputs?
  • Creating as many PWM as needed using an FPGA? Not sure about this (IMHO probably over-complicated)

Why this many PWM? I don't think they are so many in fact ... With 10 PWM signals you could only control 2 H-bridges and a synchronous Buck converter.

Feel free to ask more questions if not clear enough.

\$\endgroup\$
10
  • 1
    \$\begingroup\$ TLC9540 gives you 16 12-bit PWM sinks in a 28-pin package. \$\endgroup\$ Commented Dec 13, 2013 at 21:42
  • \$\begingroup\$ Seems a LED driver although it could be used for my purpose as well. Does it provide duty cycle condiguration, phase shift, complementary outputs and deadtime management? \$\endgroup\$
    – user51166
    Commented Dec 13, 2013 at 21:45
  • \$\begingroup\$ It's meant for visual purposes, so it has none of those. It only does basic PWM. \$\endgroup\$ Commented Dec 13, 2013 at 21:51
  • \$\begingroup\$ Well that's too bad. Just saw that C28x Piccolo DSP from TI has 16 PWM outputs (some of which at high resolution, HRPWM). I wished for some more though ... And TI policy about IDE and compilers doesn't really appeal me ... \$\endgroup\$
    – user51166
    Commented Dec 13, 2013 at 22:13
  • 2
    \$\begingroup\$ I would probably opt for one small micro-controller per module, either with the HW goodies you want, or implement them in SW. \$\endgroup\$ Commented Dec 13, 2013 at 23:18

4 Answers 4

5
\$\begingroup\$

Here is some references of MCUs with high PWM outputs (> 12)

But as Wouter van Ooijen said in a comment, maybe you should review your architecture and instead of using one big MCU with many PWM outputs, you should use one small MCU for each "component" (SMPS, motor, etc.), and use one big MCU for the general control of all other MCUs. This will lead to a more flexible design: you can add a motor simply by adding a small controlling MCU and linked to the big one in SPI or I2C.

For the CPLD/FPGA approach, you can take a look at Lattice ice40 CPLD and to this reference design : MxN Channel PWM Do some searchs about PWM on Altera and Xilinx website to have other CPLD references.

\$\endgroup\$
3
  • \$\begingroup\$ Nice the dsPIC33E series (although I though it was slower than the dsPIC33F series) with 8.32ns PWM resolution. However the integrated ADC is not so good IMHO (10 bits only, 12 bits on some channels). I could always use an external ADC though ... \$\endgroup\$
    – user51166
    Commented Dec 14, 2013 at 8:12
  • \$\begingroup\$ Ok... I think you should understand you can't have a MCU which is best in every domain : ADC, Timer, PWM, USB, SPI, I2C, CAN, LIN, RAM, etc. Maybe you will find some, but how about the price ? How about the packaging ? Using multiple chips seems to be the more flexible option in your case : an external (a good) ADC in I2C/SPI, one small MCU for each component, etc. \$\endgroup\$
    – zeqL
    Commented Dec 14, 2013 at 10:17
  • \$\begingroup\$ I agree with you. And I think I'll use small & cheap MCU to handle PWM generation while having a bigger, faster and more powerful DSP managing ADC, control algorithms, USB communication, ... \$\endgroup\$
    – user51166
    Commented Dec 14, 2013 at 12:03
1
\$\begingroup\$

They make really tiny little pwm boards that are very easy to use. I used this thing: https://www.sparkfun.com/products/8897

It's called a "Servo Control Board" because that's what people usually use them for, but the outputs are just pwm. There's 8 of these per board, and you can chain them together to get up to 128 pwms if you need.

This one speaks serial (rs232 or ttl) so you need a uart on your board, but you probably have at least one available. There are various libraries available to talk to it. I just wrote one in c++ because I wanted it to fit into an existing framework I had. I'd be happy to share if you wanted it.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Seems like it's just a PIC16 used to generate PWMs and receiving orders from the main MCU. I think that without too much hassle I could do a better integrated hardware by embedding my own slave MCU onto the PCB. Nice suggestion though :) \$\endgroup\$
    – user51166
    Commented Dec 14, 2013 at 8:04
  • \$\begingroup\$ The only issue I see is how PWM are synchronized between the different boards. Is there a trigger / synchronization signal? If they're not synchronized I couldn't control the phase shift let's say of module 1 with respect to those of module 2. \$\endgroup\$
    – user51166
    Commented Dec 14, 2013 at 8:08
0
\$\begingroup\$

Adafruit makes a module with 16 12-bit pwm outputs, and modules are chainable together.

\$\endgroup\$
0
\$\begingroup\$

There are XMOS mcu's with 8-16 fast cores and 90 i/o's . That could probably enable you to get up to 90 PWM channels.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.