Forum Rule: Always post complete source code & details to reproduce any issue!

# Thread: Four DC Motors (with Encoders) and Stepper Motor Control on Single Teensy 3.5?

1. ## Four DC Motors (with Encoders) and Stepper Motor Control on Single Teensy 3.5?

I've got an application that needs to control four brushed DC motors with encoders and a single stepper motor and am wondering if this could be accomplished on a Teensy 3.5. I know I can do the four motors and encoders with no problem using the encoder library (encoders operate at around 8000 ppr with motors running ~20 rpm) but my concern is whether or not I can add in a stepper motor. My understanding that stepper motors require really precise timing and I'm wondering if the interrupts used for monitoring the encoders would interfere with the Teensy's ability to handle the stepper motor output. Is the Teensy just so fast I don't need to worry about it?

2. It of course depends on what "control four brushed DC motors" actually means, at what speed (step frequency) you need to move your stepper and what else you plan to do with the Teensy. But, I'm quite sure that this will not challenge a T3.5 at all.

The 4 DC motors will generate pulses at 20 / 60 * 8000 =~ 2.7kHz per motor which is not really fast. If you use TeensyStep to drive the stepper with say 20kHz it'll generate a load of less than 5% on a T3.5. The interrupts used for TeensyStep will not interfere with those from the encoder library.

3. Originally Posted by luni
It of course depends on what "control four brushed DC motors" actually means, at what speed (step frequency) you need to move your stepper and what else you plan to do with the Teensy. But, I'm quite sure that this will not challenge a T3.5 at all.

The 4 DC motors will generate pulses at 20 / 60 * 8000 =~ 2.7kHz per motor which is not really fast. If you use TeensyStep to drive the stepper with say 20kHz it'll generate a load of less than 5% on a T3.5. The interrupts used for TeensyStep will not interfere with those from the encoder library.
Thanks, it's for a variant of a CNC machine and I want to replace the z-axis that currently uses a brushed DC motor with a stepper motor since they are more readily available as an assembly. I'm fairly confident the Teensy has the horsepower to do everything, I was just concerned that the interrupts could interfere because I know very little about stepper motors. Thanks again.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•