Close

six degrees of freedom brush position control

A project log for If ( ) Then {Paint}

a machine to create canvas paintings of your favorite digital images

john-opsahlJohn Opsahl 07/13/2019 at 22:140 Comments

The first major challenge of this project was to develop a cnc machine that can orient a brush in any position relative to a horizontal canvas. There are two parts to this challenge -> 1) develop a cnc machine design capable of achieving six degrees of freedom, 2) identify a microcontroller and a gcode interpreter that can be used to operate the machine. 

At the start of the six axis cnc machine design effort, I committed to the following mechanical design constraints:

I was able to get away with using a structural material with low stiffness (at least compared to other cnc machines) because the end effector of this application (i.e. a brush) is so light weight. The large electric motor at the end effector typical of cnc mills was not needed. In addition, cnc canvas painting is not a precision machining operation. A little wobble or flex in the machine structure during operation is acceptable. Maybe even desirable if it makes the painting look less robotic. 

The development of the mechanical design began at the end effector, progressed to the three axis head, and finished with the three axis gantry. Hundreds of design decisions were made throughout the process. It doesn't seem practical to document all of those details here. In fact, it's probably even quicker if you just take a look at the design and use your best mechanical intuition to make a guess on why something was done one way and not the other. The tip I will give you is that at no point were aesthetics considered in the design. The form of all structural components is purely a result of function. A solid model .step file of the six axis cnc painter is attached to this project.

Additional notes about the mechanical design:

Identifying a microcontroller and gcode interpreter were the next part of this challenge. I initially started out using Mach3 and it worked great. But I really wanted a cheap open source option. I ended up making my own branch of grbl-Mega-5X and made modifications to allow six axes control and six limit switch inputs (https://github.com/johnopsahl/grbl-Mega-5X). An Arduino Mega 2650 microcontroller is needed to run grbl. There are still a few issues with the homing routine but otherwise it has worked great so far. I use the cncjs Gcode sender because it is open source and supports up to six axes (https://cnc.js.org/).

It was an exciting moment when all six axes moved using one gcode command.

Discussions