Go Down

Topic: Simple Stepper Program (Read 218218 times) previous topic - next topic

daxasd

#15
Jul 09, 2015, 08:35 pm Last Edit: Jul 09, 2015, 08:39 pm by daxasd
thanks guys for reply

then what is the difference between using this high and low pulses and using the
Stepper.h library

for example

Code: [Select]


#include <Stepper.h>
Stepper myStepper(StepsPerRevolution, 8,9,10,11);
Stepper myStepper(StepsPerRevolution, 9,10);
setSpeed(rpms);
step(steps);



also I have seen AccelStepper.h library is it useful?

thanks

Robin2

They are just 3 different ways of doing much the same thing. Ultimately the libraries have to do what my code does. They just wrap it up in fancy clothes.

The libraries do have a value if you are using a h-bridge to drive a stepper because they take care of the complex series of pulses. But it is much more sensible IMHO to leave that task to a specialized stepper driver and take the load off the Arduino.

As its name implies the AccelStepper library is intended to apply acceleration and deceleration to the motor. If you don't need acceleration and if you have a specilized stepper driver it does not really offer much value IMHO.

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

daxasd

@Robin2

Thank a lot

then in the case of the stepper.h library is it convenient to use these functions when we use a specialized stepper driver that adjust the pulses and the microsteps manually
or using direct pulses without any library is better in this case.

Robin2

then in the case of the stepper.h library is it convenient to use these functions when we use a specialized stepper driver that adjust the pulses and the microsteps manually
or using direct pulses without any library is better in this case.
Your question is a bit confusing - especially the bit I have highlighed

And what do you mean by "these functions" ?

I have never used the Stepper library and I am not sure whether it is suitable for controlling a specialized stepper driver. I think the options are DIY or the AccelStepper library.

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

segg3060

Be carefull to set the amps on the A4988 as we burned up 3 of them befor we caught on

MaxDan

Hello,

Anyone have a pic for the wiring on this code for Old Burt Brains?

First Project new job.

Thank you,

Dan

MaxDan

Hello,

Anyone have a pic for the wiring on this code for Old Burt Brains?

First Project new job.

Thank you,

Dan

Robin2

#22
Jan 10, 2016, 11:04 am Last Edit: Jan 10, 2016, 11:06 am by Robin2
The Pololu web pages for their A4988 and DRV8825 stepper driver boards have good wiring diagrams - and lots of other useful info.

If you need more specific advice about your own project please start your own Thread so that your details do not distract readers of my little Tutorial.

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

paul_larner

will this work with an arduino and the addafruit motor shield?

Robin2

will this work with an arduino and the addafruit motor shield?
AFAIK the Adafruit motor shield has a simple h-bridge motor driver (rather than a specialized stepper driver) and if I am correct the answer is NO.

It is important to read this Thread in the context of Stepper Motor Basics


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

paul_larner

Is there any chance you could write the code to make this work with the addafruit motor shield?,im sure a lot more people would find that usefull!,cheers Paul.

Robin2

Is there any chance you could write the code to make this work with the addafruit motor shield?,im sure a lot more people would find that usefull!,cheers Paul.
Sorry. None.

I don't consider that shield to be a suitable device for controlling stepper motors. Did you not read Stepper Motor Basics

Feel free to write your own code but please don't add it to this Tutorial Thread.

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

paul_larner

if its not a suitable device,why is it sold as such?,it works and delivers enough umpf for my needs,sounds like an excuse to me!

rpt007

Try to dig a bit deeper into the stuff and you might understand why @Robin2 denied to modify/ extend the code.
It has nothing to do with the popularity of the shield.

Go with a "normal" bipolar stepper and the popular A4988 or DRV8825 and you will be happy.
Before you ask:
Did you really read and understand How to use this forum ?
AND:
Do you have already some solution or is a part of the problem sitting in front of the screen?  :)

Robin2

if its not a suitable device,why is it sold as such?,
You need to address that question to the people who sell it. I have nothing to do with the sale or marketing of any Arduino related products.

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

Go Up