Go Down

Topic: Power boards for NEMA23 Step Motors (Read 894 times) previous topic - next topic


I have an old robot I built about 10 years ago using a TinyTiger microcontroller, two NEMA23 4-wire stepper motors (1.8 degree), and a pair of stepper motor drivers (CyberPak CY-41).

I want to rebuild the robot for an extra challenge for the local middle school's robotics club, using an up-to-date Arduino system. This puts the Arduino system in the hands of the next generation of up-and-coming engineers. I'd rather introduce them to a modern system (Arduino) instead of a deprecated system (TinyTiger).

This will be my first experience with Arduino - I know very little about it. I am a professional embedded programmer, but I work with 32-bit ARM stuff in eclipse-based IDE (i.e. Freescale K20 and CodeWarrior with the real-time MQX operating system) or 8-bit PIC controllers.

What are some recommendations?

1. Which Arduino platform (i.e. Arduino Leonardo)?
2. Keep my existing CY-41 stepper amplifiers?
3. Upgrade to two Motor Shields to maximize compatibility and system integration?
4. Are there alternative stepper motor driver boards specifically designed for the Arduino that have code samples available?

How many Shields can be stacked? Can I stack two Motor Shields on a single Arduino card?



Don't whatever you do downgrade to Motor Shields, these are high current bipolar stepper motors!

You might want to upgrade to microstepping drives, but these are expensive - you have
a working system already?  Just use the AccelStepper library to generate step/direction

Arduino platform depends on what you want to do - how many I/O?  How much
processor power?  Start with Uno or similar if unsure, it should all just work out
of the box, very straightforward.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]


The Leonardo can be a little trickier than an Uno or Mega due to the way it implements the serial connection to the PC. I suggest you avoid a Leonardo (especially if using it for teaching) unless you need some of its particular features.

Two or three hours spent thinking and reading documentation solves most programming problems.


Thank you for the responses.

I'll stick with my existing stepper amplifiers unless I have problems with them. Microstepping might be smoother but not worthwhile this early. Ease of system architecture is the biggest motivator.

For the actual Arduino platform, I will be using a multitude of sensors feeding a Kalman filter. I write monster 5-dimensional Kalmans at work, so this isn't a problem. However, I'm accustomed to using FPU-equipped processors with real-time operating systems running in the millisecond timescale. For the Arduino, I assume floating-point is emulated, and my routine will either be free-running or interrupt-based.

The Arduino platform I select needs enough I/O for the following:

- Digital outputs for two stepper amplifiers (each has pins for pulse, direction, full/half step, enable)
- i2c or SPI to an accelerator/gyro card
- Future expandability to bluetooth or RF for remote-control (preferably using a smart phone)
- A few analog inputs (battery voltage, motor current, etc.)

Perhaps the Arduino Mega 2560? I doubt if this needs the Galileo ;)


Apr 20, 2015, 09:10 pm Last Edit: Apr 20, 2015, 09:10 pm by Robin2
running in the millisecond timescale.
That is very coarse   :)

For the Arduino, I assume floating-point is emulated, and my routine will either be free-running or interrupt-based.
Floating point calculations will be slow. Avoid them if you can.

Two or three hours spent thinking and reading documentation solves most programming problems.


Though you have a proper background and can probably handle anything Arduino-based, start with an Uno first - then move on to something more powerful; the Mega might be a good choice here. I am pretty certain that if the Arduino platform can control a quadcopter - it will be able to handle the needs of your robot.

The only reason I say to start with the Uno is the fact that most example code out there is for the Uno. Also, there are tiny differences between an Uno and a Mega - certain pins are different in function, plus a couple of other tiny issues. You need to start with the base platform, study it well, and get comfortable - and then research what those differences are.

Otherwise, you might find yourself trying out a particular piece of code from the internet, and it not working or something - and tearing your hair out, when it was meant for the Uno - and not the Mega - because of those differences (which the original author or tutorial writer didn't take into account).
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.


Apr 20, 2015, 09:29 pm Last Edit: Apr 20, 2015, 09:31 pm by smoore
I have put multidimensional floating-point Kalman filters on the mbed. It doesn't have an FPU but ran "fast enough", even running floating-point emulation. My first selection for my robot rebuild was an mbed because I have a bunch of extras laying around, but the support community is much larger for Arduino. I figure for middle-school students, getting them into the Arduino is probably the best choice. I'm excited about getting the students programming stuff this early. Their experience so far has been with VEX robotics and Lego Mindstorms. Arduino pumps it up another notch.

The steppers operate at 1.8 deg/step, and figuring the belt drive and final drive ratio, recalculating step rate at 100Hz (10ms) is plenty fast for my application, perhaps too fast. I'll probably need to slow down the filters!

Edit:  cr0sh posted during typing this. Thanks for the advice for the Uno. I'll get one on order. Sounds like the Mega is the upgrade path.

Perhaps the Arduino Mega 2560? Or is there an Arduino platform that uses a similar CPU as the mbed?

From what I've gathered, all of the Arduino-compatible platforms can use a shared development environment, so it makes it easy to move between platforms?


They are stepper drivers or drives, not amplifiers.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]


They are stepper drivers or drives, not amplifiers.
I've been in situations where the word "driver" can refer to a software subroutine, and we lost time on a project because two engineers were working on "drivers" - both comprehended the assignment as "software"! So we had two software subroutines, and no power electronics. The word "amplifier" makes sure there is no misunderstanding of what "driver" is being referred. Amplifier means "electronic device that increases the power of a signal", which is exactly what this power electronic stage performs.

Please don't start a flame war and hijack the thread.


All you need to do is qualify with the relevant information "motor driver circuit", "motor driver
routine", not appropriate a different word with a universal well-known meaning in a non-standard way.  A stepper drive is not an amplifier in the same way an amplifier is not
a stepper drive.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up