Skip to main content
Neo M
Associate III
Jan 24, 2017 9:25 PM UTC
Question

Interface 5 motors requiring n-Pulse Generation mode

Posted on January 24, 2017 at 22:25

I asked a question earlier on how to generate n-Pulses from STM32 to drive a servo like interface -> 

https://community.st.com/0D50X00009XkdsSSAR

, and it worked. This feature is available only on TIM1/8. Is there a novel way of interfacing 5 motors to one F7?

I am trying to interface 5 Teknic Clearpath SDSK motors to STM32F7 Nucleo Dev Board. They are Brushless DC motors with a stepper like interface. The motor moves a set distance based on the number of pulses it receives. The speed is determined by the frequency of the pulses, like a stepper motor. 

I can hook up the two motors to TIM1 and 8, and the rest with a feedback to counter,. DMA buffering won't work, as I rely on the pulses sent to determine the current position of the motor. I am just looking for a better solution here.

#stm32-pwm-timers #n-pulse
This topic has been closed for replies.

11 replies

waclawek.jan
Super User
Jan 24, 2017 9:59 PM UTC
Posted on January 24, 2017 at 22:59

Well there are several possibilities, for example pairing up two timers as master-slave and gating one from the other or using SPI with well-crafted data.

Neither is as simple and straighforward as the repetition-counter trick in timer and it's upon you to work out the details.

JW

Tesla DeLorean
Guru
Jan 24, 2017 10:30 PM UTC
Posted on January 24, 2017 at 23:30

Couldn't you one-shot from a interrupt, and count, is the rate likely to saturate the processor?

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Neo M
Neo MAuthor
Associate III
Jan 24, 2017 11:39 PM UTC
Posted on January 24, 2017 at 23:39

I need the pulses to be at a few 100 kHz frequency. I believe doing this for 5 (or 3) motors, along with a bunch of other things I want the processor to do, will saturate the processor.

Tesla DeLorean
Guru
Jan 25, 2017 12:55 AM UTC
Posted on January 25, 2017 at 00:55

How about using a $0.30 F0 part to control motor?

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Andrei Chichak
Lead
Jan 26, 2017 1:43 AM UTC
Posted on January 26, 2017 at 02:43

This would be a great use of the motion control microcode package for the TPU on a MC68332 or PowerPC chip. But it would only be able to handle 16 or 32 channels of this stuff simultaneously.  

Unfortunately the ST ARM chips don't do multi-channel motor control very nicely. You're going to have to add some extra hardware, whether processors or motor controllers.