How to control RANDOM speed and direction with arduino?

Hi everyone!

So before I ask, I just wanted to say this is my first time using arduino and really(outside of rc cars and choppers) motors as well. So be gentle!:)

Anyway, the motor in the link below is what I have to work with.

What I want to do, is have that motor spin, but in random patterns. I want the direction of spinning to change randomly at adruino's discretion, and the speed to be random as well. As if it weren't hard enough, I would like to set a limit on how fast the motor can spin and have it spin at random/choppy speeds between the minimum speed and maximum speed. (in other words, let's say I want the max to be 50rpm. I would like to have it spin at random speeds and change directions randomly between 1 and 50rpm.) Is this possible?

I also have this motor

But as I am pretty new to motors, I am unsure of which one exactly I should use. I can't see me needing more than 80 revolutions per minute though. Thank you all!

The motors you have selected are AC induction motors. As such they are very difficult, almost impossible, to perform the movements you have described utilizing just an arduino. You need to work with DC motors using H-drivers and feedback using shaft encoders.


The first motor says it is an induction motor, and the second one looks like an induction motor too. Induction motors are notionally constant speed devices where the speed is determined by the driving frequency and the number of poles. While it is possible to vary the speed by varying the driving frequency or forcing the motor to slip, it's much more complicated than with other motor types. Basically, these motors are not a good choice if you want variable speed.