I have uploaded the code to the Arduino to make motor spin one way then spin the other way .
I followed this diagram for the wiring
So... the problem i am finding is that when i connect it to power the motor just vibrates and dose not spin.... it dose vibrate in intervals what makes me think the code is working.
I am powering the thing by putting a dc adapter into my breadboard and plugging into that.
Now i may be answering my own questions but could this problem happen from under powering ? I am currently using a 5V 2A barrel supply.
Would under powering cause it to just vibrate and not spin? and if this the case what size barrel power supply should i use for max performance from the motor ??
Or if it dose not sound like it is the power supply what could the problem be?
Any advice would be awesome! I am a carpenter so this is all very new to me haha
I used the same colours as the diagram ..... but on my motor it has a black wire insted of a yellow wire... so i put the black wire in the yellow place.... this could also be the problem??
An A4988 is not powerful enough for a 2 amp motor. It will overheat and shut down. The DRV8825 is better but still probably not enough. A driver board with a TB6560 is probably required. For even higher currents the stepper drivers become a lot more expensive.
The little screw on the A4988 adjusts the maximum motor current. The speed of a stepper motor is controlled by the interval between steps. Of course if it does not get enough current it will miss steps.
You use a multimeter to find out which pairs of wires correspond to a winding. You must
wire each winding to one output channel of the driver - Stepper drivers have two output
channels that function independently for current control. You can also confirm the winding
resistance when you measure the windings.
The wiring colours mean nothing unless you know the manufacturer and their exact full model
number (basic model numbers indicate nothing about the winding or cabling), and you have the
brochure/datasheet for that model.
So in practice you always check with a multimeter - why would you not?
Under powered - Soloution - Get a higher voltage barrel power supply. 12v 2A ? Would that be efficient?
The wiring from motor to driver is wrong - Solution - This part i am slightly confused about .
MarkT:
You use a multimeter to find out which pairs of wires correspond to a winding. You must
wire each winding to one output channel of the driver - Stepper drivers have two output
channels that function independently for current control. You can also confirm the winding
resistance when you measure the windings.
What is the windings? and what am i looking for when using the multi meter ?? Sorry i know this must be real beginner stuff... haha but i am real beginner.
The motor driver is not sufficient for the motor . Solution - Get a sufficient driver or get a smaller motor ??
What would you recommend is the better option? I have only used that driver as its the one that they used on the indestructible.
The motor has to lift a picese of 1/2'' ply about 1'1/2'' square and canvas then bring it back down again... I am making some bellows . If a smaller motor would be able to handle this then i could just get a different motor and keep the driver i am using .
Thanks so much for all your help, its great learning a new skill.... be that as quick as i can
Your circuit is ok as long as your power supply does not exceed the Vin limit of your Arduino, so 12V is ok. If you increase the motor driver voltage - which might be useful in the future to gain more power out of your stepper - you should use separate power supplies with common ground.
Right now it's ok to get your stepper running.
My guess is, that you did not yet set up the current limit of your A4988, or did you?
If not, the driver might be set up such that it is in an uncomfortable current delivery situation and the driver stumbles.
Have a look at Pololu's site how to adjust the current limit of an A4988 by using the Vref-method. For getting your stepper turn without load on the motor axis, just adjust the current to say 500 .. 800 mA which does not heat the driver up too much but will ensure that the stepper turns smoothly.
rpt007:
My guess is, that you did not yet set up the current limit of your A4988, or did you?
No I did not . I twisted to the screw around abit to see what it did ... clockwise gave it more power and anti clockwise less....
i just watched a video about how to set it using the multi meter... so i will try and set it to 700ma?
Also would you all recommend i get a more powerful driver for this project ? if it is worth it i will just do it as i need this to work pretty well.
Or the other option what may be cheaper is to get a smaller motor that works with the A4988. As long as it can make the bellows im making go up and down i dont mind
This has been a proper learning curve for me ... i didnt even know how to use the multi meter haha .... i still kind of dont know what im doing but i really do appreciate all your help ! If i can pull this project off i will be forever thankful .
Ok so im kinda freaking out a bit now ... so i was prodding around with my multi reader trying to get a reading to adjust the current limit on the driver... but i could not find a reading... probably because im slightly confused about where to put the multi-meter prongs and also what im doing all together.
and... the motor stopped and my Arduino starts flashing at me!! The ''On'' Led and the ''L'' Led !! The reset button wont seem to do anything !! When i plug it into my computer with the USB it all seems to work fine and i can upload code to it ... but when i connect it back to the dc power from my breadboard circuit i get the same flashing! .... Have i goosed it ??
Ok... so when i tried a lower V dc connector ( 5v 2a ) the lights went back to normal on the arduino
BUT !
the driver got really hot and i could slightly smell it ... im not sure if this happened on my test with the first 12V 2A connector... either way how can i test if its burnt out or not ???
Man this has been more stressful than i thought haha
So what have i done wrong here?? I though 12V 2A was a fine amount of power to use????
If for example i had to start again from scratch ...
You could go with a DRV8825, which is a bit more powerful as your A4988, but still always the first action to use a driver with a stepper is to adjust the current limits.
To do that:
check your wiring and make sure you connected it the right way (visit Pololu's site and search for "DRV8825 minimal wiring diagram"
don't connect the stepper yet !
Switch power ON and start adjusting
The measuring points on the driver are:
GND and
the top of the little potentiometer (you could grab a little screwdriver with the "+" tip of your multimeter, place it on the potentiometer trimming screw, turn it slowly and watch the voltage value changing.
If the 2 bypass resistors are 0.1 Ohms (you might see 2 little blocks with "R10" on board of the driver) - for getting a current limit of 700mA, your Vref level on a DRV8825 should be adjusted to 0.35V.
You will find useful information always on Pololu's site. Maybe my little contribution in this forum about this current limiting process could also give you some useful information: