Primus gets moving

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 entry was posted in Primus and tagged . Bookmark the permalink.

2 Responses to Primus gets moving

  1. Patrick says:

    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 says:

    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