Need advice on how to power up 2 stepper motors (NEMA 17)

Hello everyone,

I am currently working on an artistic installation which involves 2 wheeled robots and I need to power up two NEMA 17 with a battery.

These motors are driven by two Pololus A4988 at 1A 9V each.
For the moment I am using a 12V battery at 2.9Ah with two voltage regulators but I will probably remove them and replace my current battery with a 9V at about 6Ah.

The Arduino mega I am using runs with the 12V battery as well via the power jack connector, and my Pololus are connected to the Vin port.

Anyway, I am having problems with the Arduino integrated voltage regulator, as it is quite hot when my motors are working. Could the current passing through my Arduino voltage regulator fry it? Do I need to build a separated circuit for the motors?

You will find below the fritzing schematics of my project.
Thank you in advance for your answers.

Could the current passing through my Arduino voltage regulator fry it?

YES

Do I need to build a separated circuit for the motors?

YES

Never run those steppers being powered through an Arduino board.
You seem to be lucky not having fried it yet!!

Look at this:

As others have said don't try to power the motors THROUGH the Arduino. You should not have any problem powering the Arduino from the 12v supply.

A 6Ah battery won't last long with 2 motors each drawing about 2 amps continuously. Stepper motors are notoriously inefficient. Think in terms of a 100Ah deep-cycle lead-acid battery (expensive and heavy) - or a mains power supply.

And don't leave a lead-acid battery discharged for long.

...R
Stepper Motor Basics

These motors are driven by two Pololus A4988 at 1A 9V each.
For the moment I am using a 12V battery at 2.9Ah with two voltage regulators but I will probably remove them and replace my current battery with a 9V at about 6Ah.

Using voltage regulators to power a stepper driver is just wrong, you throw away power
and reduce the top speed of the motor to no purpose. Stick 12V direct into the the A4988 drivers.

The A4988 will pull a lot less than 2A from the supply, note, they power-convert so the ingoing
current is less than the motor current.

I agree that using steppers for robot traction is about the worst way you could do it. Standard
DC motors, wheel encoders, that's how you get battery life.

Thank you all for your responses, it helps me a lot.

As others have said don't try to power the motors THROUGH the Arduino. You should not have any problem powering the Arduino from the 12v supply.

Ok, so should I power up my arduino and my motors power circuit in parallel after the battery? And can I build a shield that would get the power from the battery via another power jack and dispatch it between the Vin pin of the arduino and the power circuit of my motors?

Stick 12V direct into the the A4988 drivers.

I can't, my motors must be powered at 9V.

A 6Ah battery won't last long with 2 motors each drawing about 2 amps continuously.

Each motor draws 1 Amp, not 2, so it would last for about a little less than 3 hours.

The A4988 will pull a lot less than 2A from the supply, note, they power-convert so the ingoing
current is less than the motor current.

So basically I don't need a battery that large?

I agree that using steppers for robot traction is about the worst way you could do it. Standard
DC motors, wheel encoders, that's how you get battery life.

I agree, but since it's a quite big robot (60x60cm, with a 1x2m aluminium panel on top) it requires some torque. Also it is quite difficult for me to find a decent DC motor with wheel encoders that could do the trick. Anyway, I searched for planetary gears which would help but it would complexify things.

sweet_sweats:
I can't, my motors must be powered at 9V.

Each motor draws 1 Amp, not 2, so it would last for about a little less than 3 hours.

Post a link to the datasheet for your motor. Stepper motors work better with higher voltages. The A4988 can regulate the maximum current to protect the motor.

When the motor current is specified (you mention 1 amp) it is usually for a single coil and the motors have 2 coils.

So basically I don't need a battery that large?

What number do you mean by "that large"?

How long do you want it to operate on the battery?

The amp-hrs number on a battery sticker is usually grossly exaggerated - particularly for lead-acid batteries.

...R

Ok, here is what I found.

My supplier gave me two different NEMA17 which, he told me, have almost the same specs :

  • One has for full serial number 42HS40-1704JA05-D21 but I found it with this serial : JK42H40-1704
    here is the link

  • The other has for serial number 42BYGH38-401A. It is used in this extruder.
    here is the link

It seems that they don't have the same specs.. Anyway I may have misread the voltage because I can't find the 9V specification. Should I power them at 12v then?

Thank's.

Both of those are low impedance bipolar steppers, ignore any voltage specification
for such motors unless it is the insulation breakdown voltage. These motors are
current driven.

They each take about 3.5W when stationary at their nominal current, this will
increase somewhat at higher speeds. I'd expect the A4988 to pull about 0.4A to 0.5A
driving such a motor from 12V (when stationary).

Ok great.

So I did a small schematic resuming the wiring.
I would like to power my arduino via the VIN pin.
Can you tell me if it would work?

Image from Reply #9 so we don't have to download it. See Image Guide

...R

That is how I would connect them except that I would use the barrel connector on the Mega. But maybe that is the same as the Vin pin.

...R

There's a 1A rated diode between the barrel jack and Vin. The 5v regulator will run a little warmer from Vin compared to the barrel jack. Maybe not noticeably; it depends on what other IO is connected to the Mega.

I just tried and everything seems to work much better.
The motors are apparently stronger and the voltage regulator of the arduino is not even warm.

Still, when the torque of the motors is not sufficient, they start grunting but I guess it is because they need to speed up slowly.

Concerning the IOs of the MEGA, there will only be an ESP8266 (wifi module), a LED and probably some IR sensors, so nothing requiring a lot of power.

Thank you all for your very fast help!

Give the "AccelStepper" library a try.
This library is pretty easy to use and includes support of multiple steppers plus adjustable acceleration, deceleration.