Very very newbie... Time and speed controlled stepper motor

Hi everyone, sorry for my english. I have no information about electronics, that's way i need your help.

İ want to control the stepper motor with two buttons. When i press the first one the motor must wait at least 30 seconds, then return a full turn within 30 seconds. All these processes must be within 60 seconds and must be repeated. İt doesn't matter how long is the waiting time it could be 59 seconds and 1 second for turn.

When i press the second button then the full rotation must complete within 60 seconds, no waiting time. Must repeated till i shut it down.

For power i think to use a 12v 7a motorcycle battery.

Is it possible to do these and what parts do i need?

Yes it is certainly possible.

Start by learning about stepper motors with these two links Stepper Motor Basics Simple Stepper Code

also look up the AccelStepper library

and learn about managing timing using millis() with these links Several Things at a Time Using millis() for timing. A beginners guide

You need to have a stepper motor driver between your motor and the Arduino. If you need advice about the choice of driver you will need to post a link to the datasheet for your stepper motor.

Stepper motors are very inefficient, they consume almost full power even when stationary. They are really only suited to being powered from batteries if they need to operate for short periods

It would also make it much easier to give useful advice if you describe the project you are hoping to create.


And I recommend reading up on state-machines, since most simple behaviours like this are fairly straightforward to think about as a state-transition diagram. transitions correspond to external events and to time-outs.

Thanks for the advice. Well, i made a gear system and mounted my camera on it. So i can track the milkyway while doing timelapse. unfortunately it works manually. After take a pic must turn the gear. Repeating this process for a few hours is also quite boring.

First button will be used for time lapse and second for long exposure,simple star tracker.

This is what i want to do