Art Robot – A cnc pen plotter

Art Robot

Art Robot is my ongoing art project. It is a CNC-plotter I designed and built.

Mechanically it is quite basic pen plotter with a frame made of 3D printed and laser cut parts except for the x axis. For x axis movement the machine uses kind of tank tracks that move the whole machine using the table edges as guiding rails. This way you get large work area in relation to machine size.

Machine is controlled with Arduino micro controller and Grbl opensource CNC-milling controller software. Grbl is written in C. The controller part of the project didn’t require any programming from my part only configuring the Grbl software for my machine.

CNC machines read programming language called G-code. The programming part of the project is focused on transforming SVG vector files to G-code and creating SVG vector interpretations from base images.

I have developed the software for the robot every now and then since 2019. First I created an online too for converting SVG’s to G-code as a university project. The back end was written in Java. Now I have switched the language to Kotlin and the software consist of three main parts:

SVG to G-code conversion. I used Apache’s Batik parser module for parsing the SVG files and convert the SVG paths to corresponding G-code tool paths for the machine. Hardest part in this process is converting Bezier curves, that are not supported by the ancient G-code language, to simple arcs.

SVG generation. I wanted the machine to draw pictures based on images and/or scripts of some sort. For that I needed the machine to generate SVG. User can easily preview the generated SVG from screen and then when user Is satisfied with the review the SVG to G-code conversion part of the software can convert it to actual commands for the robot.  I use Processing library as the basis of the SVG generation module.

PC to robot communication. the Grbl controller software reads G-code commands send over simple serial connection. Currently I am using Universal G-code sender for sending my commands to the robot, but I am working on implementation for sending the commands from PC to the robot.

2021