This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MCU choice for DC brushed motor application

Other Parts Discussed in Thread: LM3S2616

Hi everybody,

I will have to select a Microcontroller for a 1W DC brushed motor with encoder. PWM frequency of about 20kHz. The unit has to be low power. I usually used Piccolo F28027 in most of  Actuator designs (motor, piezo-transducer...), but this unit his not really low power.

The idea is to check the features of the MSP430 Family. What's your recommandation of MSP430 model for such an application ?

Piccolos have an integrated eCAP module, which can be used to interface the encode quadrature signals. Is there MSP430 models with integrated module.

Thanks for your inputs, have a nice day !

  • Hi,

    As far as I know doesn't exist a MSP430 with a peripheral to directly interface the encoder. But you can use two I/O lines, with interrupt, to emulate the eCAP by software.

     

    Best regards,

    AES

  • I'm thinking almost any of the MSP430F5xx MCUs would work nicely for you.  The best correlation to the eCAP module is the Timer B module, which can be clocked at up to 25 MHz and comes with enough capture/compare channels to capture your quadrature signals and drive your PWM control output(s) on the same time base.  At 25MHz, your control resolution would be about 10 bits.  Not as good as DSP motor control but maybe good enough for your application?

    The other issue would be your raw CPU performance which is limited to 25MHz with MSP430.  Again, not as good as DSP performance but maybe OK for your application.

    Jeff

  • Thanks for your inputs, I've seen that  the stellaris LM3S2616 does have encoder quadrature input. But such controller are not really low power unit (maybe closer to Piccolo consumption).

    It exists a dev kit for brush DC motor : Stellaris® Brushed DC (BDC) Motor Reference Design Kit

    What's your opinion about stellaris controller ?

     

    I found this "selection tool" on TI website

    http://focus.ti.com/docs/solution/folders/print/746.html

    I take a look at the MSP430F2616 with the famous 7CC timer B. If I well understand, there is no dedicated PWM module on such device, but the timer module will interact with GPIO. For my application, it means 4 outputs for the PWM H-bridge signal and 3 input for the quadrature signal from the encoder. 1or 2 compare will be necessary for the PWM generation and maybe three for the encoder. Thus the capabilities of the Timer B look pretty interesting for my application.

    Let me know if Im wrong.

    Have a nice day

     

     

  • What are the main differences between the Timer B and other A-D (16 bits). It seems that timer B has 7CC and other 3CC, Is there any other differences ? Is this possible to synchronize 2 timers (A 3CC) as instance ?

     

  • Timer A and Timer B are almost the same.  Timer B has synchronized loading of the compare latches, which can be very helpful in PWM applications.

    Timer D is very new and only available in pre-release silicon (I think), but it has interesting high-resolution characteristics to simulate clocking up to 250MHz.  Since I haven't used one I don't know how they get around the 16-bit limitation.  (Super fast clock but still only 16 bits of range?)

    You can loosely synchronize two timers by starting them at the same time and clocking them from the same source.  However, as you can imagine this synchronization isn't perfect.  It would work for loosely coupled items (like quadrature input on one timer and PWM outputs on the other timer) but not on tightly coupled items like the PWM outputs that control the H bridge.

    I didn't know there are three inputs from the quadrature encoder.  You may need to put those inputs on a Timer A and then do PWM outputs from a Timer B.  One of the seven CCRs would have to be used to set the PWM frequency.  That would leave only 6 for your four PWM outputs and your three encoder inputs.

    Jeff

  • Jeff Tenney said:
    Super fast clock but still only 16 bits of range?

    Usually, 16 bit resolution are more than you need. The limitation of TimerA is that with increasing frequency, you lose resolution. TimerD can maintain high resolution to PWM cycle times (or capture times) where TimerA can only provide 1 or 2 bits resolution. If at all.
    Imagine an incoming 1MHz PWM signal you want to analyze. With a timer clock of 25MHz, TimerA/B can only detect 4% steps with +-2% error. With 250MHz, you'll get 8bit resolution (0.4% steps, +-0.2% error).

     

  • TI just published this app note on BLDC motor control with Timer B (in MSP430).  Quite appropriate given the original question.  [Edit: What I mean is that brushless motors are gaining popularity over brushed motors and MSP430 can control either.]

    http://www.ti.com/litv/pdf/slaa503

    Jeff

  • Thanks for the links, looks interesting for BLDC. I see that they connect the hall interface to a "standard" gpio port. I plan to connect my encoder to the TimerB, as for the PWM lines. Finally I have a 2 channels encoder and 2 channels H-bridge IC. Do you recommend to use a different timer for the encoder ? Thanks for your help.

  • Yes, the "feedback" from the hall sensors went to standard gpio ports with interrupts enabled.

    However, in the "closed-loop" solution, the feedback went into a Timer A instance, clocked with the same source as the Timer B instance driving the PWMs.

    Ideally, all the I/Os (the PWM outputs and the feedback) would be in the same timer.  However, the only really important piece is that the PWM outputs all come from the same timer.  So our discussions above about using four Timer B outputs for PWM and three Timer A inputs for capturing the encoder signals (or hall signals or whatever) were right on track. 

    Timer B has 7 CCRs.  After using CCR0 to set the PWM frequency, using 4 CCRs to drive the FETs, you're left with only two CCRs for capturing the encoder signals.  If you have three signals to capture from the encoder, then you could move the encoder signals to a Timer A.

    Jeff

**Attention** This is a public forum