Stepper Motor Help

Hello,

Newbie here looking for assistance troubleshooting my system. I followed a very straightforward tutorial I found on YouTube, but can’t get my motor to move at all.

I’m using a 12V 2A power supply for the Nema17 motor, a 9V 1A power supply for the Arduino, an A4988 driver to control the motor, I cranked up the current limit potentiometer on the driver and I copy pasta the first code example from the site.

First I tried soldering everything together to a PCB, didn’t work. Then I tried using a driver expansion board to eliminate the soldering. The expansion board lights up when logical voltage is connected...

I swapped the motor and driver thinking faulty hardware, but still no movement.

From what I understand if the motor doesn’t have enough current I should at least feel the torque carrying limit when manually spinning the shaft but it doesn’t feel much different having it connected vs not. Seems like the motor isn’t getting power. I swapped the motor wires in several configurations…

The motor says 2A per phase, does that mean I need a power supply with at least 4A? I know the driver only supports 2A…

I feel like my issue is something really stupid…

Many thanks

ELEGOO MEGA R3 Board ATmega 2560
https://a.co/d/eCkifYf

Stepper Motor Driver Expansion Board A4988 3D Printer Control Shield Module
https://a.co/d/5HYIW4W

A4988 Stepstick Stepper Motor Driver Module with Heat Sink
https://a.co/d/c7C2z83

Nema 17 Stepper Motor Bipolar 2A 59Ncm(84oz.in) 48mm Body
https://a.co/d/8CWzdzv

Example code 1


Show a drawing of your devices with pin numbers and connections.

While you draw... here is a video on setting the A4988 driver...

A common mistake is not having all your grounds connected. Are you grounds all tied together? A schematic would be helpful.

Understand each part in the whole setup how they work. Figure out how to test each part.

If your stepper motor has 4 wires, figure out which of them form pairs. Drive 9 to 12 V from a battery through one pair. Does the motor make one step? Switch the polarity and connect again. Does the motor step back? Do the same with the other pair of wires.

Ok, the motor is ok. Check if your A4988 is ok. Write a program where the motor makes one step per second. Disconnect the motor and measure the voltage at both outputs. The output at one pair should read +12, 0, -12, 0, +12, 0, -12, 0 etc, changing once per second.

If that seems ok, run the same program with the motor connected. Read the voltages. They should still show +12 etc. If you get only a few volts or under 1, your power supply is faulty. Or your A4988 is faulty. Measure your power supply while you run your program. If it drops considerably, it is faulty. If not, your A4988 is faulty.

I might have missed something.

1 Like

Here’s a crudely drawn schematic. If I helps I can make it digital but it’ll take some time

Thank you, I will test this later today

Looks like you have 5V logic power and 12V motor power reversed. Post a picture showing the A4988 mounted on the expansion module and the wiring to Arduino and motor.

Screenshot_20240108_102038

I finally figured it out! As blh64 mentioned, I didn't have everything that I needed connected to ground...On the expansion board I needed to connect the 'EN'(Enable) pin to ground to enable the driver :sweat_smile:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.