Thinking up robots and machines is one of my number one pleasures. Being able to realize them, tops everything. I added a couple of power tools to my small shop and as a result, my projects got bigger and more mechanical.
Here is my latest creature, the Paint Machine. It’s a machine the prints simple bitmaps with spray chalk on the street or sidewalk.
Some of the key features:
- dimension: width: 220cm, length: 38cm, height: 24cm, weight: 12kg
- printing speed: ca. 0.036 km/h
- resolution (4:3): 61px * 46px, print: 225cm * 170cm
- swappable print head
- remote controlled with smartphone app
I started working on this in April and built almost everything from scratch. A lot of time went in designing parts, trying them out and then re-designing them. Now I guess, it would require a lot less time to build a second one.
Needed parts and materials
Here is a list of parts that I used to build it. I’ve probably forgotten some but I think the most important ones are included. Cost for everything is around 600€ but you could definitely save a lot by using used parts or adapt to what you have already laying around.
Motors, wheels and pulleys:
- 4 inline skate wheels with bearings and spacers
- 3 Pololu 50:1 Metal gearmotor
- 4 HTD pulleys, 26 teeth
- 2 HTD pulleys, 14 teeth
- 1 HTD pulley, 18 teeth
- 2 HTD toothed belts, 160 teeth
- HTD toothed belt, 2m
- 5 1m V-slot 2020
- 4 OpenBuilds Solid V Wheel Kits and 2 eccentric spacers
- various OpenBuilds M5 screws, T-nuts and joining strip plates
- 2 micro switches
- 18mm birch plywood, laminated, 200cm * 40cm and 80cm * 40cm, called “Siebdruckplatte” in german.
- some wood screws
- wood glue
- Arduino Due
- Arduino Mega Proto board
- 3 Pololu DRV8801 DC motor driver
- 2 Adafruit alphanumeric displays
- Adafruit Huzzah ESP8266
- IRL2203N N-channel MOSFET
- 12V solenoid
- LiPo battery, 11.1V, 3600mAh
Building the main body
If you want to build your very own paint machine, plans and software are available in the links section. I’ll experiment a bit and don’t have thousands of pictures like I have in my other builds, but a couple of videos that document how I’ve built the machine. It’s not a super detailed step by step instruction but I think you get the idea. I used a variety of tools here but I’m sure you could come along with a jig saw, a drill press and a couple of hand tools.
The print head consists of two parts, the carriage with the motor and the real print head. That means it is relatively easy to swap the print head with the spray can for some other print head.
For the main board I chose an Arduino Due, that I had laying around for a long time. The Due is a 32-bit controller, running at 84 MHz, so it’s quite fast and it has a lots of pins for IO.
All extensions are soldered on an Arduino Mega Prototyping shield. The three DC motors are powered by a small DC motor driver, the Pololu DRV8801. This driver can handle 8V-36V and up to 1A continuous (2.8A peak). Every motor driver needs a PWM signal to control the speed and one pin to control the direction.
The motors have an encoder attached to its axle. The encoder generates 64 ticks per revolution. The encoder uses 4 wires, Vcc, GND, encoder A and encoder B. Problem is, I routed the power wires for the motor parallel to the encoder lines. Everything seemed to work fine, until I finally tried to drive the motor a couple of hundred ticks in one direction and then back to the previous position. That simply didn’t work. I had to rewire all three motors, using shielded cables for the encoders. After that I couldn’t see obvious errors in the positioning any longer.
As the motors are DC motors and not steppers, positioning works quite different. I’m using a simple PID-control loop, which works OK-ish. Sometimes the motor overshoots the position and has to turn back a bit (can also be seen in the video). If I decrease the amplification a bit, the motor no longer overshoots but in other situation didn’t have enough power to reach the desired position, e.g. when printing uphill. That would result in a humming, stalled machine. A little nudge then helps. I chose the DC motors because I thought that steppers would require more power to operate, especially require current to hold a position, whereas the DC geared motors hold the position simply because of their gear reduction. Still I might try steppers, maybe in a new version.
Another problem was the power supply for the ESP8266 breakout board. When powered via the main 11.1V battery, the power regulator got extremely hot. Sometimes the wifi connection simply broke off, sometimes the board seemed to get stuck in a reset loop. To help with that, I added a switched DC-DC converter and added a 1000u cap on the 3.3V lines. The ESP8266 is much more reliable now.
The Arduino firmware receives commands via the serial port from the ESP8266. There are commands that can be used to control the machine remotely, like “run left motor on speed x”. The main command is sending values for the bitmap to print. Currently one pixel is configured to be 35mm * 35mm. The complete bitmap is then (4:3, 61px * 46px).
The ESP8266 acts mainly as a WiFi-Shield. The firmware tries to be as transparent as possible. It opens a wifi access point and waits for incoming socket connections. Then it just acts as a bridge between the wifi and the serial connection.
When started, the Android app tries to connect to the wifi access point. After the connection is established, the paint machine can be driven with tank like remote controls.
To send a bitmap to the paint machine, the bitmap is selected from the gallery. Minimal image processing, like level adjustment, is possible before sending the bitmap.
There are a couple of improvements I want to try. As the print head can be swapped, I want to construct a couple of different print heads. I have some ideas for that and I’m already prototyping one.
A custom Arduino Mega shield with all driver chips on it would be nice. If you would be interested in a custom PCB, please let me know in the comments. Also maybe a custom enclosure for all the electronics.
For the motors, I could think of a paint machine that uses only stepper motors. Maybe that would require a bigger battery but that is not really a problem.
This was a fun built, definitely my biggest and heaviest. I enjoyed building the mechanical structure, wiring all the electronics, writing the firmware and the client app. I tried a couple of new techniques and materials. Failed a lot and learned a bit. Wood for the main structure was a good decision. It took much longer than I thought with drilling, cutting and sanding, but it was worth it. A frame completely out of aluminum profiles would work fine, but would look much colder, I think.
This machine is a conversation starter, even if it was not primarily designed as such. I haven’t printed very much, because it’s November and we’re in Hamburg, but the couple of times I was trying it out, it made some heads turn. Just after the very first print in front of our office, an elderly neighbor approached me, while I was still sitting on the sidewalk, fiddling with the machine. I was expecting a couple of harsh words about vandalism, etc.
But it went like this:
He: Oh, what is this?
Me: That’s a huge printer. It has just printed this here. *pointing*
He: Really? Hmm … *looks at the print* … *looks at the machine* Everything built yourself?
He: Hmm. *nodding* Tell me next time you print something. Want to see it in action.
Links and downloads