# Controlling motor direction, usage and speed

I want to build a machine that can follow a set of simple rules by which it controls a motor. These rules are yet to decided, but the patterns are as follows:

1. Turn motor clockwise for A minutes, then pause for B minutes and then continue in a anti-clockwise direction for C minutes (and repeat from beginning after a wait of D minutes)
2. Turn motor clockwise for A minutes and then pause for B minutes (and repeat from beginning)
3. Turn motor anti-clockwise for A minutes and then pause for B minutes (and repeat from beginning)

Now, I might simplify things and decide not to include a switch between patterns and only use pattern 1, but let's include the option to have the user input which pattern should be executed.

I plan to use a low RPM motor, something similar to this 6 RPM motor. Moreover, could the speed of the motor be adjusted (for example, 1-6 RPM) as well? How?

With my lacking knowledge of microcontrollers, how could these features be achieved? Do I need relays for the motor as well? How about the speed settings? I suppose I could have a dial with a few preprogrammed pattern and speed settings.

-
Afters om additiona research I am warmng for the idea to use a Arduino, EasyDriver and a stepper motor. Something like this: youtube.com/watch?v=SCyGM2Tp37w Does it sound like a good idea? Considering that I could program it quite freely and accurately. Any disadvantages? For example having it running four days on end? –  Figaro Jun 7 '14 at 19:20