A defining characteristic
of a stepper motor is that, under normal circumstances, it is made to take
up and hold one of a number of fixed positions. Movement from one of these
positions to another is only by stepping it through a series of intermediate
positions. A typical stepper motor might have 200 such positions in a single,
complete rotation of the drive shaft. With little effort, this can be increased,
on the same motor, to 400 steps. (Commercial drivers may increase this to
thousands through microstepping).

Say we have a 400 step per revolution motor. Directly driving a 45mm
diameter wheel, this corresponds to 0.35mm of ground travel per step.
Trust me, it is remarkably easy to make the motor move a single step at
a time.

Now, if we are able to make the motor move by, say, 5000 steps per second,
we might achieve a ground speed of around 1.7m/s. Enough to be in with
a chance in a serious competition. Much less than that will do to get started with.

So we have a motor that can be positioned to about 0.35mm as slowly as
we want and yet might drive us forward at speeds approaching 2m/s. Surely
there must be a catch. Well, yes there is.

First up, you may well find that you are unable to make a given motor
run that fast. Better control electronics (all available as ICs so don’t
panic yet) and higher drive voltages might fix that.

Secondly, even if the motor can run that fast it may not have enough
torque to push the mouse at those speeds. More drive voltage can help
here and, of course, suitable drive electronics are available in the form
of integrated circuits.

Thirdly, they are bulky and heavy. They also require relatively high
capacity batteries – these are heavy too. Remember the need for higher
voltages? More batteries. More weight.

There is no question about it, steppers are poor cousins in the power
to weight contest. Nevertheless, they are worth looking at. And listening to – a stepper driven mouse makes a pleasing hum as the motors step at speed 🙂

Competitive
mice can certainly be built with steppers, they are very easy to control and there
is no messing around with motor control feedback loops and tacky arithmetic. A very large proporton of the SE Asian mice use stepper motors with great success.

NEMA17 stepper motors joined back to back A pair of NEMA17 size stepper motors
glued back to back

For a micromouse, you are going to be looking for stepper motors in a
NEMA type 17 body. All that means is that it will be about the right physical
size. These are typically about 40mm square and can be mounted back to
back with the wheels directly on the drive shaft to give a wheel track
of around 90mm – just about perfect. This size of motor is what you can
pull from old disk drives. Generally, although surplus motors like those
will drive a mouse, they don’t have enough of what it takes to run fast
or deliver much torque.

Surplus disk drive motors look exactly like any other NEMA17 steppers but are designed to be used at 12Volts with a drive current of about 150mA. In contrast, the Vexta motors I recently found at a junk sale (yes – a matching pair!) are the same size but are rated at 4V, 950mA. These will give a lot more torque and can be driven at 12V with a current limiting driver to give good high-speed performance.

In the UK, at least, suitable motors can be obtained from RS Components, These are part number 440-420 and are rated at 5V, 500mA.

To make a stepper driver, you are going to need to generate two, independent
pulse trains. The widths are not too critical but it would be good if
your processor can be interrupted when each pulse is generated. On each
interrupt, you load up the timer value required to set the time to the
next pulse and you are done. Very low overhead stuff this should leave
plenty of processor time for tricky stuff like mapping and not running
into the walls.

It is possible to drive steppers together and make steering corrections
by missing steps on one or the other motor. If you do that you will be
limited as to the maximum speed of your mouse. Stepper motors are quite
sensitive about getting smooth pulse trains. Once they get messed up at
speed, they are likely to just stop turning rather than slowing down.
The result will be a micromouse that suddenly swings around one wheel
to examine the wall a bit more closely. It is unlikely that you will recover.

Steering is best done by slightly slowing down the pulse train for one
wheel. A microcontroller with a pair of spare timers can do this easily.
A number of controllers have flexible output compare functions or programmable
counter arrays. If you want, you could use an external counter chip like
the 8253 which has three timer channels.

With a little more cunning, I am told you
can do all the necessary work with a single timer on an 8051 processor.
As ever, you choose between hardware and software for you complexity.

This Post Has 7 Comments

  1. zheny z

    Could you let me know what is the best type of steper motor for me to build a micromouse? And where can I buy it?

  2. Peter Harrison

    That is too big. the body is 48mm long. Also consider whether you want to drive a bipolar or unipolar motor.

  3. zheny z

    yes, I also the length is real a problem. But this is stepper motor NEMA-17 as you referred on the website, could you
    tell me where to buy the stepper you mentioned on this page?
    As I can only drive a steper with 4 wires and and two phases, maybe that stepper is good to me.

  4. mahyar

    Hi, I’m facing with a problem in choosing the most sufficient motor for my MICROMOUSE robot.I have doubt between DC motors and stepers, but I prefer stepers because they are more accurate, in fact the problem is it’s shake or vibration which show during movment.

    can we drive steper motor without any shake or at least with less shaking ?

    Thank you in advance !

  5. Peter Harrison

    Stepper motors are much easier and probably cheaper to get started with unless you can find a way to make your own encoders for DC motors. It is perfectly possible to make smooth and fast stepper mice. There are lots of examples.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.