Hi, I've been working on a project to make a Laser Harp and to generate all the beams, I'm using a bipolar stepper motor. I'm driving the motor using the A4988 Driver IC which is connected to an Arduino UNO R3 chipset. However, no matter what I do, I am unable to get the stepper motor running. I hear a high pitched noise of something inside and on holding the stepper motor, I can feel vibrations coming from inside. However, the main shaft does not move. I'm running the motor with a simple program I found online to rotate the stepper 200 steps clockwise and then 400 steps anticlockwise. I was initially looking to use the Nema 17 stepper motor but had to settle for another older motor I was able to get my hands on from a local store as I am hard-pressed for time. I read up that the problem could be in the connections to the coils (The sequence for A, A', B and B' being jumbled up) which might cause the issue. I switched the connections around for all possibilities but to no avail. The store I bought it from could not provide me with any information regarding the stepper motor and had the same suggestion of switching the coils. From the torn label, I have been able to gather that it is a Minibea Miniangle stepper. The model number seems to be 23LM and then something which is too faded to decipher. I am using the A4988 in full step mode. Could I get some help on what could be going wrong? Is there something very obvious that I'm overlooking or making a blunder in? I've been trying to figure it out all day and its just given away to frustration that leads me to think that there could be a problem with the shaft on the inside. I'm using a 9V DC battery to run the motor and the Arduino's 5V output for the a4988. Any suggestions?
I don't see a problem with your program except that you are only doing 1 step per second so 200 will take a long time (but the motor won't care).
You need to draw a simple pencil diagram showing how YOU have everything connected and post a photo of the drawing. Please do NOT use Fritzing.
The Pololu A4988 web page has a good wiring diagram and other useful information.
If you mean a PP3 style 9v battery then that is probably your problem - they cannot provide enough current for a motor. And I think 9v is on the low side for an A4988 - but check the documentation.
If you don't have link to the datasheet for your motor then measure the coil resistances with your multimeter and tell us what they are.
Also, if it is not a Nema17 sized motor tell us what size it is - maybe post a photo of it.
Hey Robin2, thank you for replying. I read up a bit and came to the same conclusion that my 9V battery isn't being able to supply enough current. I did refer to the Pololu A4988 web page while setting up my circuit. I spent some time listening to the motor as it ran and it seems that the internals are working correctly. The vibrations on the body are clearly coinciding with the timing utilized in the program. Will be getting my hands on a 15V, 1.5A power supply as well as a multimeter tomorrow so I'll try operating the motor with the power supply and will measure the coil resistances. I'll get back soon with a clear sketch of my circuitry as well as proper pictures of the motor. Thanks once again. I'll be back with my findings on using the motor with the power supply.
A 9V PP3 sized battery is not appropriate for "high current" applications like small motors, and certainly
cannot drive a stepper motor which is several watts continuous.
I hooked up my motor to a 15V, 1A power supply and was able to get it to work. However, something weird that happened was that I was not able to measure the coil resistances. I tried all possible combinations but the multimeter registered no measurable resistance. I followed all the guidelines I found online for measuring the coil resistances but to no avail. I used a guideline for the coils that I found online and it seemed to work fine. The stepper worked as per the program, moving clockwise for one rotation followed by anti-clockwise for two rotations. I forgot to mention earlier that the motor is of 1.8 degree per step and has 200 steps per rotation. I was wondering whether I would be able to power the motor using a 12V, 2A power adapter. I was thinking of getting a cheap adapter with a barrel jack, cutting it off and then using it. Would that work? I used a spare one I had at home which was rated at 9V and 1A by removing the barrel jack and using the wires to connect to the breadboard. It made the motor vibrate but was not able to make it turn. I have attached pictures of the motor, the circuit and the reference guideline i used for the wires.
I tried running the motor using the 12V, 2A power supply and it worked fine. I tested the motor using the program I had attached earlier and I faced no issues. However, the A4988 kept getting very hot at which point the motor would not function properly and just move randomly. Whenever it did this, I disconnected all power supplies and let the circuit cool for a while after which it would work normally again. I pushed my luck once and ended up melting my breadboard a bit. Since then, I have not been able to get the motor to run. I set up the same circuit in another part of the board which looked alright and, on running the default clockwise once, anti-clockwise twice program, found the motor only turning clockwise for both cycles of clockwise and anti-clockwise. Soon after, the motor stopped moving at all. There was no vibration either. I triple checked all my connections and they were correct. My power supply is also working fine. Suspecting that I may have destroyed the driver IC A4988, I connected the 2B,2A,1A and 1B outputs of the A4988 to digital pins 8,9,10 and 11 respectively and using the digitalRead method, kept reading and printing those values for every time the stepPin went HIGH or went LOW. I found something peculiar: in the order of the outputs 2B,2A,1A,1B, my output was 1,0,0,0 for all states of the stepPin(i.e. HIGH or LOW) as well as the dirPin(i.e. HIGH or LOW) which I was using to provide step and direction inputs to the A4988. Regardless of whether the stepPin was HIGH or LOW or for that matter whether the dirPin was HIGH or LOW, the output from the digitalRead was always 1,0,0,0. I could find no documentation about the output nature or the exact outputs of A4988 to understand if this was normal or not. Could this be an indication of the IC Driver being fried?Also, should I have adjusted the on-chip potentiometer again before I ran the circuit with the new power supply? That step had skipped my mind up until now.
upalb:
However, the A4988 kept getting very hot at which point the motor would not function properly
That sounds like your motor is drawing too much current. What is the resistance of the motor coils?
Try adjusting the current limit on the A4988 to about 1.5 amps or a bit less IF it is already above that level. If it is already set at a lower level do not make it higher.
I connected the 2B,2A,1A and 1B outputs of the A4988 to digital pins 8,9,10 and 11 respectively and using the digitalRead method, kept reading and printing those values for every time the stepPin went HIGH or went LOW
Never do this - it sounds like you connected 12V outputs to Arduino pins.
Even if the A4988 was running from 5V the outputs are completely meaningless without inductive
motor windings connected, and again will blow arduino pins if connected.
With chopper stepper drivers like this the rules for reliable use are:
Never connect motor driver outputs to logic inputs!!
Never disconnect or connect motor windings to the driver when it is powered up, usually this
fries everything.
Always ensure connections to motor windings are rock solid before powering up (for same reason as 2),
breadboards are not recommended for this reason.
Set the correct current setting for your motor.
Never mis-connect the outputs, the A outputs must go to one winding, the B outputs to the other,
crossing them over should be avoided.
Robin2, I tried measuring the coil resistances, earlier. However, I was not able to get any measurable value. I suspect that it could have been a problem with the multimeter I was using. I will definitely try measuring the resistances once I get my hands on another multimeter.
MarkT, thank you for the advice. I see now that I was making many mistakes that was putting my components at risk. After reading your post, I got quite scared about having blown my Arduino Uno. I made a quick check of all the digital pins and thankfully, they were all in working order.
I will try running the motor after making the proper changes and taking the proper precautions and will get back as soon as possible.