Posted on

Inverse Kinematics

The web is full of wonderful sources of information, and you can easily find all the math required to drive a SCARA arm using inverse kinematics online. Turning it into efficient code… not so easy to find. This is the part of the design that actually scared me the most.

I decided to dig into it a bit tonight, and I have to say that after grabbing a pencil, drawing some pictures and writing out some of the equations it has become a lot clearer, and I even have hope of running the kinematics straight from the Arduino Mega.  Who knew that the maths I had to struggle through at Varsity would actually come in handy after all!

When the firmware is running, I will publish my Marlin fork to github.  I aim to integrate it in such a way that it could possibly be pushed into the main branch of marlin without breaking anything else, but that is definitely a long time goal.  Let’s get Morgan running first!

4 thoughts on “Inverse Kinematics

    1. Thanks, I will definitely give it a good look!

  1. Hi Quentin,

    Amazing progress. I have been working on a similar concept over the last few weeks. I am finding your lessons learned very useful.

    Have you looked a the Delta robot version of Marlin? It uses Inverse Kinematics to position the 3 vertical links. https://github.com/jcrocholl/Marlin

    The code you would be interested in is at https://github.com/jcrocholl/Marlin/blob/deltabot/Marlin/Marlin_main.cpp#L1683

    It basically converts x,y,z into the appropriate delta position. With the Scara arm you would only need to convert x and y(One triangle).

    I totally agree, this is bringing back fond memories of using Sine,Cosine and Tangents.

    Good luck with your adventures. (I am finding it shocking that prices are so dear in SA. It must have changed a lot since I was there the last time)

    Kind regards,
    Bertus.

    1. Hi Bertus,

      I am having quite a lot of fun on this build. I think I now finally understand how someone can take years to build a tiny model train, and still have the will to finish it…

      Yes, these past few weeks I have been playing with Johann’s rostock marlin, and I actually have an alpha version compiled and ready, just waiting for the last bits of wiring and electronics now. Wanted to do that this weekend, but alas… Real world work interferes again.

      Prices are shocking, and until we can upset the applecart with volume and affordable machines, South Africans will continue to be exploited on these “non essential” items.

      That’s why we do what we do!

      Cheers,
      Quentin

Leave a Reply

Your email address will not be published. Required fields are marked *