Try to move stepper just with the Arduino but it's just vibrating [solved]

I think I have an easy to solve problem, but just can't find the answer. Maybe it's too easy for someone to mention in all the tutorials...
I can move my Nema 17 Stepper with an EasyStepperDriver, with (fast) and without (slow) external power.
But to fully understand the process of driving it (to embed it in another controller) I like to move it just with the Arduino.
Shouldn't be that difficult as there are stepper examples. I seem to have a bipolar stepper as it has 4 cables (red, blue, green, black). But no matter how I connect them to the Arduino, the stepper does not turn, it is just is vibrating.
The code is given, I connect 4 cables to 8,9,10,11 what did I do wrong.
Please someone help me

Are you trying to connect the motor's coils direct to an Arduino output pin?

If so that is where you are going wrong. The pins can not supply enough current to drive the motor and you will damage your arduino.

Yes they can.
They even can with the EasyStepperDriver without external power source.
As there is no force holding the motor there is not much current needed :slight_smile:

The title of your post suggests that your nonsensical ideas aren't working very well for you.

Grumpy_Mike:
Are you trying to connect the motor's coils direct to an Arduino output pin?

If so that is where you are going wrong. The pins can not supply enough current to drive the motor and you will damage your arduino.

derletztename:
Yes they can.
They even can with the EasyStepperDriver without external power source.
As there is no force holding the motor there is not much current needed :slight_smile:

But Sparkfun's Quick Start doesn't show the Easy Stepper powering the board from i/o pins: the board is controlled from i/o pins, but powered from Arduino's Vin and it says the Arduino should be powered at 12V.

So your idea of powering the motor from i/o pins is very definitely going to extract too much current from an i/o pin. They can supply 40mA max, 20 or so recommended. That's LED territory, not stepper motors.

But apart from that, what you're trying to do is feasible: you didn't post the code btw, but I guess you're trying to drag the motor round by phasing the outputs 8, 9, 10 and 11? Well that's exactly what I do here but you need a driver chip even then. I used the L293: it doesn't provide any intelligence, the code does that: every input A has an output Y so the outputs follow the code excactly.

So you're "right and wrong": you can use the logic approach you took, ie phase the pins to drag the motor, but your power approach is doomed and you need a chip in between. L293 is ancient technology, so don't really consider using it.

derletztename:
Yes they can.
They even can with the EasyStepperDriver without external power source.
As there is no force holding the motor there is not much current needed :slight_smile:

So you ask for help and you do not believe the answer. Does that make you smart?

I hope everything is clear now and nobody blames me for being stupid or something.

That is fine that you are retracting what you said earlier. And you are not connecting the stepping motors directly to the motor's coil, which as several people have told you will not work.

I expect grown ups here

Yep and that is what you have.
However what can you expect if you ask a question and you are told not to do something. Then you respond by saying there is nothing wrong with what you are doing. How then would you expect to be treated?

Your video shows the motor running powered from the Arduino and from an external supply but you do not show the problem setup?

But I did use the 5V PIN of the Arduino. Does this make the difference?

Using the 5V pin on the arduino feeds the current from the source powering the arduino, through the regulator on the board. This limits the amount of current available and possibly injects some interference into the arduino but you seem to be getting away with that.

As there is no force holding the motor there is not much current needed

Not sure what you mean but forces on the motor have no effect on the amount of current the motor takes or needs.

Can you draw a diagram of how you are wiring things up because your description seems to contradict itself.

A stepping motor will only vibrate and not move if:-

  1. It is wired up wrong and so has not got the correct sequence.
  2. The coils can not get enough current to move
  3. The pulses are too fast for the motor.

I understood my error and deleted the post, but you were too fast :frowning:
The difference is using the 5V PIN to power and the I/O PINS to control. I didn't read properly before. Therefore I deleted my last post...

derletztename:
I ..... deleted the post

And now posts which refer to the missing post, make no sense. Did I miss something exciting?

not sure why anyone replied without requesting a wiring diagram.

the stepper much be tiny, bottle cap or so.

when you look at the wires, you should find pairs.
label on pair A1 and A2 and the other pair B1 and B2

you need to power A1 and ground A2
then you need to release them. if you bring both to ground....

well, try this take a stepper and connect the wires to each other. then try to spin it.

when you tie the lines together, you get a completed circuit. as the motor moves, it generates power and that acts like a brake.

but, once you worked out the logic,
A1 is 5v and A2 is ground.

then B1 goes high, and B2 is pulled to ground
then A2 goes high, A1 to ground
then B2 high, B1 gnd.

you alternate coils while alternating the polarity to the coils.

standing still is often a sign of one coil being energized, then the same coil getting reverse polarity
then repear that with the other coil.

the key to steppers is that one coil, then the next....

dave-in-nj:
the stepper much be tiny, bottle cap or so.

NEMA17s are 2" cubes more or less; this one has current of over an Amp.

But you raise a good point: NEMA numbers refer only to a motor's physical size, not its electrical characteristics; it's logically possible although unlikely, that a NEMA17 could draw mere milliamps.

dave-in-nj:
not sure why anyone replied without requesting a wiring diagram.

I did. See reply #6

Not sure if I am jumping in the deep end here.

In my post yesterday [SOLVED] First lessons from using a stepper - Motors, Mechanics, Power and CNC - Arduino Forum I got a vibrating motor and how I found a resolution. This turned out to be a result of pulsing the motor too quickly. So I would try changing the rate at which you switch.

Thanks everybody, I'm fine now. JimboZA gave me the solution. I just mixed up I/O Ports with the 5V PIN.
Also I understood now how to manually controll them via some power up chip and I believe everybody else having this problem can learn form my mistakes now :slight_smile:

Is there any "solved" Button in this forum I can press to make this clear to people with the same problem?

derletztename:
JimboZA gave me the solution.

Glad to help.

Is there any "solved" Button in this forum

Nope: what you did with "solved" in the thread title is the right thing to do.