Go Down

Topic: Controlling bipolar stepper motors with time (Read 376 times) previous topic - next topic

joaomiranda2

Hello!

I am relatively new to this arduino world, so excuse me if I say something dumb xD

I am trying to control two bipolar stepper motors with time. I am using to nema 17 motors (datasheet) and the drivers are tb6560(datasheet).

Basically, this is how i intend it to work, both motors rotate CW during 60 seconds or if they hit a crash sensor they stop and wait until the 60 seconds pass. Then they change direction and rotate CCW during 60 seconds or, again, if they hit  crash sensor they stop and wait until the end of the 60 seconds. And just basically do this again and again.

I have seen the simple stepper code, but I am having a hard time translating from the use of the buttons to the use of time. And I have found a lot of this nema 17 stepper motor codes, but a lot of them are so different that I'm not sure what is the correct one, some use libraries, some don't. About the crash sensors I think I can do it, doesn't seem that difficult.

Thank you in advance for any help


Paul_KD7HB

What have you tried? And did it come close to what you want?


Paul

joaomiranda2

Haven't really tried anything, I'm a university student and i rarely have access to the components I've just told you about. Besides, Electronics isn't really my field of study, but they demanded it in a project. So, I'm just kind of looking for some guidance.

Thank you for your response Paul

Robin2

Two or three hours spent thinking and reading documentation solves most programming problems.

MorganS

Take a step.

Look at the time (flip direction).

Look at the crash sensors.
"The problem is in the code you didn't post."

Go Up