Help choosing stepper and controller for small balancing robot

Hi, I’m trying to build a small self balancing robot using stepper motors. I haven’t used them before and need some help.

I would like to power the robot with a 2s lipo, 7-8.2v and am controlling it with a 3.3v esp32 microcontroller. I want something small so I would like to use nema 14 or smaller. I was thinking this motor https://www.pololu.com/product/1208 suits my voltage requirements but I’m not sure which stepper controller to use with it.

I saw some of the comments about using current limiting to drive motors above their rated voltage but I am unsure just how much overvoltage is possible. Like using a 3.9v stepper at 8v?

Or would I be better off running off using a 1s lipo (3.4-4.2v) and going with a lower voltage motor?

Any suggestions? I would like to order ASAP.

Hello.

If you are driving the wheels directly in a balancing robot like that, I suspect you will want to use microstepping for smoother movement, which generally requires using a driver with current limiting. To use the #1208 motor with a 2s LiPo and do microstepping you would have to set a low current limit . The maximum supply voltage that can be used with a given motor depends on the characteristics of the driver used so I cannot provide much guidance for your system there. It is common practice to use higher voltage power supplies with current limiting drivers in systems with motors that have lower voltage coils. For example, the pull out torque curve in the datasheet for our lowest voltage NEMA 14 motor (our#1209 motor) is for a 24V supply (torque decreases quicker with speed when using lower voltage supplies).

We only have a few drivers that have a minimum supply voltage that would work with a 2s LiPo and only our DRV8834 driver carrier would work with a 1s LiPo, so you should pay attention to the minimum voltage specification when selecting a driver. Also, you should avoid using the DRV8825 with a motor with a low coil voltage (like the #1209 motor I mentioned earlier) as it can have trouble maintaining the low current required for accurate microstepping with such motors.

-Nathan

Sorry if I’m a little weak on stepper motors, I haven’t used them before.

So you’re saying that if I’m using a current limiting/constant current driver I could run the #1208 or 1209 motor at 12V or 7.5V as long as the driver is set to current limit at 500ma? Or 1A in the case of the 1209?

Or do I have to adjust the current limit based on voltage? ie: if running a motor rated at 10v 500ma and you go to 20v do you have to back the current limit to 250ma?

Also, when you say “To use the #1208 motor with a 2s LiPo and do microstepping you would have to set a low current limit” do you mean it would have to be set LOWER than the rated 500ma?

I’m thinking if I want to run between the 2s and 3s voltages at constant current I need either your #2966, 2970 or 2971 to be compatible with 2s voltages from 7.4v up to the 12.6v of a 3s?

Yes, you should be able to use the #1207, #1208, or #1209 motors with a 12V power supply, so long as you use a current limiting driver and set the current limit to the current rating for the motor. The current limit does not need to be changed if the supply voltage is changed; current limiting drivers sense the current through the motor coils and will adjust the PWM duty cycle to decrease the current if necessary. The supply voltage should be above the motor’s voltage rating; the drivers do not boost voltage and if a voltage below the rated voltage is supplied across the coils then the current will be below the rated current. The coils can be treated as a resistors and ohms law applies when holding a position.

Using a 3s LiPo would allow you to use our popular and inexpensive A4988 drivers. The MP6500 or DRV8880 drivers are better choices for a 2s LiPo and could also work with a 3s LiPo. The AMIS-30543 driver you mentioned would have basic functionality with a 2s LiPo and full functionality with a 3s LiPo. It is a bit more expensive, but has some unique features like 1/128 microstepping and a current limit that can be changed at will over an SPI bus.

-Nathan

Trying to calculate power consumption and just wanted to check something with you.

Suppose I have the 1209 motor (2.7v, 1A/coil) hooked up to a current limiting driver and I’m using (just to make it simple) an 8.1v supply. Does this mean that the current draw from the battery would be 1/3 of the motor or about .33 A at 8.1v?

Also is it correct that if I turn down the current limit on the driver below the rated for the motor it will still work ok but with less torque/speed? So if I got the 2267 motor and it turned out I didn’t need the extra torque, I could turn the current limit down to save battery?

Our current limiting stepper drivers behave a lot like switching regulators, so the current drawn from the power supply does decrease as the supply voltage increases, but it is a little more complicated than the formula you propose. There are two coils on the stepper motor. The current the driver sends to the coils depends on the microstepping position and both coils never operate at 100% current at the same time for most of our stepper drivers, however there are also some losses in the system. So, for a conservative estimate, you can assume that 2 coils drawing 1A each at 2.7V will consume about 5.4W of power and your 8.1V supply will need to supply 0.67A of current for that 5.4W load.

You are correct, turning down the current limit will reduce the power consumption of the motor with the trade off of also reducing the torque. In general, the motors usually work okay like that.

-Nathan

Thanks! I’m not so concerned with current because I’m using high discharge quadcopter batteries that can push 25A or more. Mostly I was concerned about consumption and about how long the battery would last.

After thinking about it, it looks like the 2267 motors would probably be overkill so I think I’ll try the 1209 with either the DRV8880 or MP6500, I don’t think I need to do hi-res microstepping for this,so either of those should be ok I think.

Still not sure how much torque I really need, but there’s only one way to find out!

Hey! Things are working but I have a question. I got your DRV8880 and 1209 stepper motor with the stamped aluminum brackets. Both motors are screwed to a 1/4" piece of basswood that forms the base of my robot.

I’m noticing the motors make quite a bit of noise, I haven’t worked with steppers before so I’m not sure if it’s something I’m doing or if they are just normally like this?

The DRV8880 is in it’s minimal wiring configuration (1/8 microstep default), current limit set to about 0.6A (vref .88), no load on the motor other than a wheel that’s not touching the ground. Running at a step rate of 80hz the sound is fairly loud, as I turn the step rate up to 1khz it goes up in pitch and gets quieter. There is no sound when the motors are energized but not turning. The power supply shows 8v 0.2A with just one motor connected. The motors and DRV8880 are cold.

I think some of the sound is the wood acting as a “sounding board” so I will try some rubber mounts, but it still seems kinda loud.

I’m wondering what I can do that might reduce the volume? Would higher/lower microstep rate or current limit make a difference? Or might I have something setup wrong?

Stepper motors tend to hum at the frequency at which the step pin is being pulsed. Using a finer microstepping mode smooths motion and raises the frequency of the steps, both of which should lower the audible hum. Using a lower current limit will also reduce the volume of the humming, though this comes with the trade-off of torque being reduced as well. Finally, a rigid attachment of the vibrating motors to a platform with a lot of surface area can create a kind of “soundboard” effect and adding some dampening to your motor mounts should also help.

-Nathan

Ok, interesting thing. I got both my motors running and one is substantially louder than the other. As in, one is very annoying and the other is nearly silent.

Both are mounted on opposite ends of the same board, all the screws are nice and tight, both using the DRV8880 in the same configuration. Very strange.

Just to make sure, I’ll try swapping which DRV8880 each motor is connected to and see if that makes a difference.

Ok, I moved the loud motor over to the quiet motor’s DRV8880 and the motor is still loud. That pretty much narrows it down to the motor itself. I checked the mounting screws and they all seem equally tight on both motors so I’m having a hard time figuring out why one of my motors would be several times louder than the other one. Any ideas? Bad motor?

We generally expect stepper motors to make some noise.

Is the motor otherwise functioning as you would expect? Can you post a video that shows the two motors and the noise difference between them?

-Nathan

I’m still investigating the issue, what I thought was odd was that one motor seemed so much louder than the other, but they both seem to be working ok.

One question, on the DRV8880 is it necessary to re-adjust the current limiting pot when the supply voltage is changed? Or does it work right at any supply voltage once you set it?

The DRV8880 IC has a small internal 3.3V regulator that is used to power the IC’s internal logic and the potentiometer circuit for setting VREF, so the potentiometer setting will be stable as VM changes.

-Nathan

i just got 2 stepper motor for my robots project.
but i have some problem i can’t figure out.
https://www.oyostepper.com/goods-494-Stepper-Motor-for-3D-Printer-DIY-CNC-Robot-10-50-Degree-C-04-Amp-Black-17HS13-0404S1.html
https://www.oyostepper.com/goods-475-3-Axis-31Nm-439ozin-Nema-24-Stepper-Motor-Driver-Power-Supply.html

Hello.

Your post does not have any detail that lets us help you troubleshoot your problems, so I suggest reading our support page for advice about how you could start troubleshooting and the best way to ask for help.

- Patrick