Well, it has taken a while but I have finally got the motion control properly underway. Code details will follow shortly. In the meantime, you can see the beast move on YouTube:

This should be the embedded video:

This Post Has 2 Comments

  1. Patrick

    how did u control the acceleration? I am real puzzled about that, adding on the fact that that im using dc motors, im am really really confused.

  2. peteh

    If you look in the other Primus sections, you should find the code for the mouse. There is also a description of how the stepper acceleration can be achieved.

    For a DC mouse, the same process can be used. Generally, this is done by creating a series of positins and feeding these to a controller. That controller’s only job is to maintain the mouse at a fixed position.

    On every control cycle tick, we do sums like this:

    currentSpeed = currentSpeed + acceleration; currentPosition = currentPosition + currentSpeed

    You can find quite a good writeup of how this is done here:

    http://www.barello.net/Papers/Motion_Control/index.htm

Leave a Reply

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