# Choosing the correct power supply for my stepper motor (and other questions)

I think I understand this and what power supply i need to purchase, but would like someone to look over my idea.

Gear:

• NEMA17 SY42STH33-1504A stepper motor rated for 2.8V 1.5A (datasheet)
• Chinese a4988 driver (R100 sense resistors)
• 12V 30A Power Supply
• Arduino Mega

Measurements (when driver is powered but not stepping):

• PSU output: 12V 70mA
• Single Motor coil: 3V 120mA
• VRef: 0.4V

So my power supply is outputting 0.84W and my motor is drawing 0.72W. Which is I guess expected, since some energy is lost to heat. If I'm only drawing 70mA from the PSU for a single motor, if i want to use 6 motors on a single PSU, the total current draw would be 420mA, right? I could potentially just use a 12V 1A PSU? This seems very low powered to me, but maybe it's correct.

Another question is, if my VRef is set to 0.4V (which equals 500mA that can be supplied to the motor [0.4V / (8 * 0.1A)]), then why am i not seeing the full 500mA on the motor when it isn't stepping? I'm only seeing about half of that (120mA * 2 coils = 240mA).

My last question is, I'm using my 5V and GND pins to supply power to the a4988 VDD power pin. My multimeter can only read 10mA or greater, and my multimeter isn't picking up anything. I guess this makes sense since the a4988 datasheet says the logic power draws 5-8mA. The Mega datasheet says a single pin can support 20mA (and other places i've read up to 40mA). Can i safely power 3 driver boards from a single 5V pin (assuming that the max draw is 24mA)?

Your motor draws about 2.8v * 1.5A = 4.2 watts so you need a power supply that can comfortably supply that. A 12v 30A power supply is overkill (at 360 watts) but it won't do any harm. 12v at 1 amp would be plenty and 2 amps would be generous. And 24v at 1 amp would be better as stepper motors work better with higher voltages.

You will probably need a heat sink (and maybe a cooling fan) with your A4988 for a 1.5 amp motor. A Pololu DRV8825 would give you a bit more headroom.

The Arduino 5v pin can be used to power the A4988 .

I would do a 24V PSU, except that i can't power my Mega directly from it. The 12V30A PSU is the only one i have around, and ya, it's total overkill.

I don't need the full 1.5A, I'm attaching a relatively light object to the motor, so i'm running them a bit underpowered (shooting for 0.5A, that's why i set the VRef potentiometer at 0.4V). The a4988 hasn't been heating up too much since it's not supplying it's max potential, but i do have a heatsink on it for precautionary reasons.

I guess my question about the arduino 5V pin, was how many a4988's can safely be powered from a single 5V pin? Not sure if i was correct about 20mA being the max current draw for that pin.

20mA is the recommended max. 40mA is the absolute max. Current over the absolute max can degrade or permantly damage the output.

You should not be powering the A4988s (apply to Vdd) from an output pin. You can control (step, dir, enable pins) many from 1 output pin. 3 should be no problem.

groundFungus:
You should not be powering the A4988s (apply to Vdd) from an output pin. You can control (step, dir, enable pins) many from 1 output pin. 3 should be no problem.

What's the purpose of the 5V pin then, if not for powering devices/components that need low power? I'm doing it this way because i'm trying to reduce my installation to the minimal amounts of parts.

There's the 5V pin on the power header, and then there are the 20 output pins.

You can use the 5V pin, for maybe 200-300mA total if the onboard 5V regulator is being powered from 12V. The regulator has to dissipate (12V - 5V) x current drawn as heat, and it's just a little chip without much heatsinking.
(12V - 5V) x 0.2A = 1.4W for example.
.5A = 3.5W, the regulator will either go into thermal shutdown, or just plain fail. How many motors did you say?

Don't use output pins - 40mA is absolute max, and a burst of current higher than that can damage the pin and the 328P chip.

It seems we have a confusion of terminology. When you say pin I think of a GPIO pin, but I guess that you mean the 5V supply (Vcc). Not usual to hear the Vcc output referred to as a pin. If Vcc comes from USB there is about 500mA available from the Vcc output. If powered through the power plug or Vin, the 5V regulator can supply about 1 Watt (current depends on how much voltage the regulator must drop). Powering 3 A4988s from Vcc should be no problem.

Measurements (when driver is powered but not stepping):

Smart driver chips such as the A4988 will reduce power when not stepping. The continuous power you measured is about 70% of the peak power when running.

How many motors did you say?

Right now is 6 motors, but might reach 10 eventually.

groundFungus:
It seems we have a confusion of terminology. When you say pin I think of a GPIO pin, but I guess that you mean the 5V supply (Vcc). Not usual to hear the Vcc output referred to as a pin. If Vcc comes from USB there is about 500mA available from the Vcc output. If powered through the power plug or Vin, the 5V regulator can supply about 1 Watt (current depends on how much voltage the regulator must drop). Powering 3 A4988s from Vcc should be no problem.

Ya sorry about my terminology, i understand what you mean now. With each a4988 logic supply current needing 5-8mA (datasheet page 4), and since i am powering my arduino through the 12V jack, 10 should be doable.

MorganS:
Smart driver chips such as the A4988 will reduce power when not stepping. The continuous power you measured is about 70% of the peak power when running.

I should've probably mentioned that i'm microstepping, and according to page 17 in the above datasheet i listed, it should be 100%. So that's why i'm confused when i set the potentiometer to 0.4V (and the math to figure out the current is [0.4 / (8 * 0.1)] = 500 mA), why i don't see close to half the total amperage (250mA) when i measure the current on one coil when the motor is powered but not turning.

The electronics in the A4988 do not require much current so there should be no problem powering a number of them from the Arduino 5v pin.

The link in Reply #8 is to the Allegro datasheet. It is probably ore useful just to follow the guidelines on Pololu's A4988 web page. I think they even have a video about setting the current limit.

...R

i am powering my arduino through the 12V jack, 10 should be doable.

I agree. If you are supplying 12V, the regulator must drop 7V (12-5) so to stay under 1W dissipation there is about 150mA, total, available from the regulator.

groundFungus:
I agree. If you are supplying 12V, the regulator must drop 7V (12-5) so to stay under 1W dissipation there is about 150mA, total, available from the regulator.

Oh interesting, thanks for that info.

MorganS:
Smart driver chips such as the A4988 will reduce power when not stepping.

No, the A4988 has no support for this. If you provide a circuit that can modify the Vref dynamically, you can
achieve this effect explicitly

You're right. I don't know where I read that then. It must have been a more-advanced device. Or maybe I mis-read the % drive values shown in the tables on page 17 of the datasheet.

Ok, some notes and questions.

As mentioned before, i have the VRef set to 400mV, which with my chinese a4988, should equate to 500mA of current. When the motor is powered and idle, i'm measuring 450mA for one coil and 0mA for the other. So the total mA is correct, but i'm confused about the actual results. Is only one coil receiving power? I cannot physically turn the motor shaft with my hand, so it's definitely getting power.

Another thing i noticed is when i put my multimeter in series with a single coil wire, normally i put the red wire of the multimeter on the driver-side, and the black/COM wire on the motor-side and i would get the reading of -0.45A. However when i switched red and black wires, it would drop to 0 amps, and then the other coil which normally gets a reading if 0A, then will have the reading of -0.45A. Is this normal behavior?