Stepper motor works erratically with Pololu A4988 drive

Hi Guys,

Second go at this, wrote it the first time and managed to close the tab while I was trying to post this… :imp:

So, I bought these stepper drivers for micro stepping to be used for these motors

The Step motor part number is E26544-12-020 which would be a 12Vdc, 0.14A/per phase, 4 wire bipolar and 15degree/step.

I have the driver connected to my Arduino Adk ( with a arduino Wifi shield mounted) as per the instructions on the pololu site.

The 12Vdc power supply used for motors is from a PC power supply rated at 12Vdc and 8A max.

Given I am new at coding and at electronics I decided to use the code in this link and the code is titled steppertester.pdf

So, this is how the events unfold.

  1. After I had the setup complete and supply switched on I loaded the code and the motor stepped in a random direction and started buzzing with no further motion at all.

  2. I switched off the power supply immediately and had a quick look at the wiring and switched it On again, mind you all this time the for loop is running in the code as I hadnt disconnected the micro controller.

  3. Without making any changes ( all appeared ok) I switch the power supply to the motors on again and noticed the same result,I then touched the casing of the motor and it was very hot.

  4. I switched off again, had a look at literature and I realised I hadn’t limited the driver current.

  5. Given the motor current/phase is 0.14A , I decided to set the current limit to 0.098A by measuring the current in series of one of the coils of the stepper motor , well when I connected the meter in series and switched the supply on again the current at the meter showed a value of 0A, which was quiet weird since the motor was getting hot.

  6. I then decided to do a Vref voltage change using the potentiometer to limit the current, I went down from Vref of 0.62 to 0.08V on the Vref measurement while checking if the motor was showing any signs of motion … it however didnt move at all or even buzz this time around.

Could someone please help me with this …

Much appreciated and Many thanks !


If the stepper motor is getting hot, that means the coils are energized and the stepper motor is receiving power. If the stepper motor is no longer heating up like before, the driver might have been damaged, or maybe things are not connected correctly. It is hard to tell from your picture if your stepper motor is connected correctly. Could you check your connection to your motor to make sure you have each coil connected correctly? You can check which wires belong to the same coil by disconnecting the stepper motor and using the continuity function of a multimeter to determine which pairs of wires are a part of the same circuit (i.e. the same coil).

- Grant

Hi Grant :exclamation:

Thanks for responding and assisting me on this …

At this point the Vref is set to 0.08V and If I can remember correctly the motor did get a bit warm (I will need to check this again when i get back to the lab), however when I first started the Vref was set at 0.62 and that’s when the motor was pretty hot.

I can try and go back to 0.62 to check if the motor jitters like before (which may also mean that the driver is ok)… The motor connections are Ok, as I checked the coil impedance before connecting them…

Do you think the code I linked before is ok for use? is it possible that the for loop may have ended as its only counting to 10,000 which would be 2.8hrs? right…and I have had this set up running for much longer then that (coz the arduino was always connected and energised through USB while I had the 12V external supply off to check driver and motor issue…). I have attached the code this time as well…

Also how can i check if the driver is damaged :question: … is there a way to check pin voltages or signals to confirm this ?

Thanks for your time.
StepperTester.pdf (17.1 KB)

If the power supply is 12V and the motor is rated at 12V, there is no need to set the current limit. The current will be limited to the proper value by the winding resistance.

It is normal for stepping motors to run warm and sometimes, even too hot to touch.

I think as a first step you should just try to get things back to the state where the stepper motor was getting warm, which would indicate the driver is doing something. Can you try that and let me know what happens?

- Grant

Thanks Jim and Grant,

So this is what I did this morning.


  1. I connected all the cables and ran the program with last setup and the motor started rotating a step in one dir and then a step in reverse direction before coming to a halt. It took me a few seconds to realize that this wasn’t the programs intention , So after a confused stare I had a look at cables and saw that the Micro and driver GND wasn’t connected, I connected it and ran the program again but motor did not move at all.

Note :

The only difference I made was by an accident, I was trying to find the right screw driver bit to fit in the potentiometer and had moved the potentiometer clockwise by 30 degrees perhaps. Everything apart from this little change was exactly the same…


I remember the default value for Vref when I first checked the driver was 0.62V, so as you guys suggested here is what I tried.

  1. So moved Vref to 0.6Vdc and the motor was as hot as it was the first time but it didn’t move at all.
  2. I then moved Vref to 0.46Vdc and the motor was a bit warm and did not move this time either.

I am attaching my wiring picture , the code it still the same … could you good guys ppl suggest what I should be doing…

Many thanks Jim and Grant , I cant thank enough for your assistance.

PS : The arduino is connected through the USB to the computer for the 5Vdc supply.

It seems like something is still working since you are able to get current to flow through the coils and heat up the driver. Could you measure the current through one coil when VREF is set to the two voltages you mentioned (0.6V and 0.46V)? Please note that when measuring current the meter should be in series with the coil. (In a previous post it seemed like you might have been trying to measure it while the meter was in parallel.)

If you have access to an oscilloscope, could you use it to look at the step signal? Also, if you have another stepper motor or stepper motor driver, could you try swapping them in one at a time and see if one of those work?

By the way, in a previous post you mentioned that your Arduino was always powered and providing a step signal even when the driver was not powered. In general, applying signals to the logic pins of a driver or controller when in is not powered could potentially damage it. I am not sure at this point whether your driver is even damaged, but I recommend setting up your system so that does not happen in the future.

- Grant

Hi Grant,

Sorry for a late response … finally got down to the circuit again.

Well, the ammeter was connected in series every time I tried to measure current.

Anyhow, this time I tried to measure current again and it showed me 0A, the motor didn’t heat up …everything was just motionless. Fearing the driver might be dead,I pulled out my spare pololu stepper driver(same spec) which I had ordered for the second motor , soldered and connected it as per the usual circuit.

I energized the circuit and there was no motion, i measured Vref and got a value of 1.27, I then connected the ammeter in series and got 0A.

I would like to add that the microcontroller is working fine as I could check on multimeter that the enable pin was low and step and dir high. I also tried to connect one coil of the motor to 12Vdc to check if it stepped in either direction and it did. I believe the motor is fine as well.

I do not have access to an oscilloscope and hence cannot check what pulse the coil is getting, given this new development what would you recommend.

thanks again!

At this point, I am not sure what is causing the issue, but since your new stepper motor driver is not working either, it still seems likely that there is an issue with the setup. Could you simplify your setup as much as possible by removing the Arduino from your setup and seeing if the stepper motor holds its position (resists turning when torque is applied) and draws current? If it does, could you then try toggling the step pin on the stepper motor driver and see if it will move the motor? If that does not work, could you post pictures of the new setup?

- Grant

Hi Grant,

I haven’t made any headway since the last post, I however am planning on hiring an oscilloscope to check the coil outputs. Would you be able to help with the selection of an oscilloscope for this purpose please as I am not sure what coil outputs I am looking at and hence the questions below…here is a link for oscilloscope rentals

I was looking for some other answers regarding the driver coil outputs and believed that a lot of people would have tried hooking their drivers to scopes to fault find and which would be available on google but it appears not common at all, I hope you don’t mind me asking these questions here and could answer these for me please…

page 14 of a4988 data sheet shows square wave but doesn’t say what the amplitude and frequency of the wave would be for a various Vmot supplies? Is the a4988 driver coil output voltage and current dependent on the supply from Vmot? also how does one know how many square waveforms/PWM get the motor to move? i.e is there an exact math to what PWM’s are sent to the motor coil to how much rotation that motor gets?

Could you also comment on significance of Ibb and Idd in terms of motor supply current and logic supply current? are these the amplitude of current for the coil outputs?

Thanks again!

The waveforms depend on the motor characteristics, the power supply and the current limit (if activated) and can’t easily be predicted. If you want help that is likely to be useful, I suggest to follow Grant’s advice in his May 28 post closely, and post the information that he requested.

Thanks for your suggestion Jim,

Grant did ask me to check the step signal on the May 19th , back then I could afford to rent one and so on … given now I can, I thought it might be a good opportunity to start from May 19th and cover up until 28th and at the same time get some feedback on things I have been wandering.

Anyhow, thanks for your advise. I will do without the scope and post results.


You might find some of the following resources helpful in learning more about how stepper motors are driven: … AN2974.pdf

Any oscilloscope would probably work for looking at the inputs and outputs of your driver. You should not need anything fancy. Please note, when using an oscilloscope to test the board, you should make sure to always measure between a signal line and ground. You should never connect the ground clip of a standard scope probe to anything other than ground (so you should not try measuring across the motor coils), as that could damage the oscilloscope.

- Grant

Hello Grant,

I didn’t get the oscilloscope this weekend as Jim suggested not to… I tested the circuit with bare minimum as you had suggested in your 18may post.


This morning, I disconnected the arduino and connected the driver to a 12Vdc power supply, even went and got a new bread board , and applied 5Vdc on the step pin. There were no movements, shifts, noises, heated motor casing or anything for that matter , I could rotate the motor shaft to any direction comfortably before and after applying the 5Vdc on the step pin.

I then completely removed the driver from the motor and supplied 12Vdc to a coil of the motor by repeatedly switching the power supplyon and off , the motor “tried to move” or tried to rotate every time I did this, which concludes that the motor is fine and trying to do its job , however the pulse may not be strong enough for it to do what it is trying…

I then moved on to the next driver and did exactly the same and the motor did not move or heat at all, again I could move the rotate the motor comfortably.

I am quiet sure that the drivers are not working… just to ensure my trouble shooting was ok , I connected my spare 5Vdc stepper motor to its 5V driver and used parmon to drive it through parallel ports and it worked effortlessly for this 5Vdc motor, applying 5Vdc on the 5Vdc motor coil gave me the same results as applying 12Vdc on 12Vdc stepper.

I am sure its a driver issue as I have exhausted all other avenues and all other components are working fine…

any suggestions… Thanks

It does seem to me as well that either something in the setup of the stepper motor driver or the driver itself is causing the problem. Could you post some pictures of your new simplified setup? By the way, I noticed that your motor seems to be pretty low power, so it might not give a lot of resistance to you turning it when you are powering it, so that does not necessarily indicate the driver is not working. Could you tell me in more detail how you were stepping the STEP pin?

- Grant

Hi Grant,

I am currently travelling and as such wont be able to post pics, I however have attached a diagrammatic representation of the setup

For stepping the step pin, I had the setup as per as the attached diagram, I had the ground of the powersupply connected to the driver board ground pin and then I would connect the 5Vdc from the same powersupply to the breadboard step pin by using a pointy lead( repeatedly) to see if I was noticing any change to motor noise, heat, movement etc.

I would also like to add that much smaller motors then the ones I am using are able to exhibit noticable resistance while forced to turn, I am talking about these types

Would you like me to use parmon and try step the driver pin? I dont know why I didnt try this before.

Thanks alot Grant, much appreciated! :smiley:

Yes, you should try stepping that pin. The STEP pin on the stepper motor driver is floating, so connecting and disconnecting a 5V source might not have the same affect as toggling the pin. By the way, you should probably tie the DIR pin to GND or 5V since that pin is also floating.

- Grant

Hi Grant,

I tried the minimum setup using parmon and nothing moved, heated or had any torque on the shaft.

I have attached the pics for you as you requested. I did have dir pin grounded this time around.

Could you advise if I should get new drivers … you guys don’t sell drivers with the pins pre-soldered by any chance do u?
(If you guys dont sell presoldered boards due to them breaking during transportation , would you still consider selling them at my expense anyhow…and perhaps putting some paper strips around them to cushion it please :smiley:

and if I do get new drivers, what is that I should do different this time around.

thanks again!

Thank you for posting the pictures. I don’t see anything obviously wrong with your setup, and I am not sure what might have happened to your drivers, but it seems like they are not working. If you contact us at, we might be able to help you out with a discount on some new drivers. We do not sell our stepper motor drivers pre-soldered, but some of our distributors like UltiMachine and EckerTech do.

If you get a new stepper motor driver, I recommend verifying your solder connections, trying it first with the minimal wiring diagram, and setting the driver’s current limit before connecting the stepper motor.

- Grant

Hi Grant ,

Thanks for your time, btw are you sure I need to set the current limit, someone earlier stated and I agree that I wouldn’t since the motors and supply are both rated at 12Vdc and the windings will dictate the current that needs to flow.