Paint Custom Graffiti Automatically with the Graffomat
The Graffomat is a large-format plotting machine that sprays paint instead of moving a pen to create amazing works of art.
Inspiration for the Graffomat
Niklas Roy has a workshop in Berlin that is adjacent to two large graffiti walls near a park. Every time he visits the walls, there is something new to see since the previous art is painted over quite often. This motivated him to participate, but rather than going through the painstaking process of painting by hand, Roy wanted to construct a rig that could do this for him with extreme precision, which he calls the Graffomat.
Building the rig
The idea behind the painting machine was to have a device that can move a can in two axes while being able to spray it automatically as well, similar to how a pen plotter works but on a much larger scale. At the base is a set of six caster wheels for easy maneuverability between different sites. The vertical Y axis is located here in the form of a cordless drill that spins a metal rod to raise and lower the X axis. This second, horizontal axis also uses a drill with a pulley that rotates to move the spray can head left and right. Both of these axes are mounted onto pairs of metal rods to ensure smooth and accurate operation.
Determining coordinates
There is a problem with using cordless drills, however, as they do not have a way to determine their own positions, therefore making a coordinate system almost impossible. To combat this, Roy added several strips of paper that alternate between black and white. When the gantry moves, a pair of photoresistors count how many times the color changes to derive the relative positions for both axes.
Moving the two axes
Power is provided to the entire system by a single 12V 18Ah lead-acid battery which is then fed into two BTS7960B high-power H-bridge motor drivers for the cordless drills and a single XL4016 step-down converter module for all of the low-voltage electronics. When the onboard Arduino Nano wants to move the spray can somewhere, it begins sending PWM pulses to the correct H-bridge. This means both the direction and speed of each axis can be adjusted in software as needed. And once it becomes time to spray some paint, a servo motor pulls a string which presses a wooden block against the can's nozzle.
Firmware
The program running the Graffomat is relatively simple. It listens on its serial port for new data packets that contain commands and coordinates to be executed. If a move is needed, the motors are turned until the new target position is reached, at which point the controller signals that it is ready for a new packet. Roy also built an auxiliary unit with an onboard screen and SD card that can feed an image line-by-line to the gantry controller.
Controlling the spray can plotter via the internet
Rather than having to physically stand next to the system, the Graffomat also has the ability to be controlled over the internet. A laptop runs a simple webserver that listens for commands over the WebSocket protocol and "echoes" them back to each client when one is received. From there, it transfers data to the controller via the Web Serial API in order to send data packets.
Painting some graffiti
To test out his new automatic graffiti machine, Roy began by spraying a simple vector "Hello World" message in bright pink paint.
Next, he tested the dot-matrix capabilities by generating an image with four layers: cyan, yellow, magenta, and black, that gradually build up dots until an image comes together, essentially emulating an inkjet printer.
As a final test, Arturo Castro and Carolina Romano made a spinning head in blender and outputted the animation as a series of still images. The plotter then sprayed each one along the wall, letting people take pictures of each one and then stitching them back together to create a stop-motion video.
You can see the Graffomat in action below!