News

Moving your CNC with Bresenham’s algorithm

Programming stepper motors to move together correctly for CNC machining can be a challenge and I’m here to help. To move one motor on it’s own is easy enough. Moving several is not too hard, either. What if all those motors are supposed to move in concert and finish their moves at the same time, perfectly, every time? The solution is today’s topic.

A single stepper motor isn’t too hard. Most stepper motors are driven through a dual H-bridge stepper adapter like the A4988, the TMC2130, or the classic L293D. You, the programmer, set the enable pin (turn on the motor), the direction pin, and then flip the step pin high and low for the desired number of steps. Easy enough…

When it’s time to move two motors, I can (of course) move each the full distance.

I could use an Adafruit Stepper Motor Shield, set the target steps and position, and then say “go”. It will move them both one step at a time. One of the motors will be done first. This is sometimes called the hockey stick.

But what we want is both to arrive at the same time.

Notice that I’m using line drawings to describe these movements. The solution to moving these motors is the same one used to draw lines on a screen – Brenseham’s line algorithm.

Now that I’ve described what the issue is and the name of the solution, Here’s the wikipedia entry on Brenseham’s line algorithm. It has pseudo-code and lots more examples to help you out. If that’s not enough, post to our forums with your questions!

One final note: an especially nice feature of Brenseham’s line algorithm is that it does all the math with whole numbers only, which are much faster to calculate in a microchip AND won’t have any rounding errors that can happen in said microchips. So perfect results every time.

Brenseham’s line algorithm is used in Makelangelo-firmware, Marlin, and probably several other CNC firmwares.

News Robot Arm

An ISO compliant Sixi hand

A good designer and leader knows when to say “no”. In today’s example… I have tried several times with the help of Instagram friends and my own employees to build a gripper that we can use with the Sixi robot. I decided, finally, to say No. We’re in the robot arm business, not the gripper business. If that’s true then how will Sixi hold grippers made by other people?

“ISO 9409-1:2004 defines the main dimensions, designation and marking for a circular plate as mechanical interface. It is intended to ensure the exchangeability and to keep the orientation of hand-mounted end effectors.”

https://www.iso.org/standard/36578.html

Are you looking for a challenge? How about making a gripper that works with our STL model of the hand? Then it should work with all commercial robot arms that match the standard, too.

Here’s a link to the DIN EN ISO 9409-1-50-4-M6 STL file.