In a video uploaded on June 8, Dutch YouTuber Sten, a Lego devotee who runs the Creative Mindstorms channel on the social media platform, chronicles the creation of the Pixelbot 3000, from building its mechanism to ‘printing’ the final product.
The Pixelbot is essentially a next-level version of the Bricasso printer, developed about nine years ago by JK Brickworks. Built entirely from Lego parts, the Bricasso scanned a pre-pixelated source image and saved it to a Lego Mindstorms EV3 unit. The saved data was then used to produce a mosaic using 1 x 1 bricks. Mindstorms, which has been discontinued, was released as an educational kit for building programmable robots from Lego bricks and components.
The creation of the Pixelbot involved a lot of trial and error, something Sten repeatedly makes clear throughout the video.
“So, the plan is to make an AI image generator, and I was thinking it might be a good idea to use these 16 x 16 base plates and then make a pixel art out of those little 1 x 1 plates,” he says at the start of the video.
A few days later, after “reconsidering”, he started over, replacing the 16 x 16 base plate with a 32 x 32 one as it produced a superior image. A few days after that, the original rack and pinion mechanism that moved the platform was replaced by screw pieces. After perfecting the device, Sten worked on the software that drives it.
Rather than using a pre-pixelated scanned image like the Bricasso, Open AI’s DALL-E 3 generates a cartoon-like image that’s ‘printed’ as a mosaic. Using Python, the YouTuber wrote code that divided the high-resolution, 1024 x 1024 source image into a 32 x 32 grid and picked the color of the center pixel of each space to improve the sharpness of the resulting mosaic.
However, that was still too many color values for Pixelbot to handle (Lego only has 70 colors), so Sten made the machine go over every pixel in the source image, choose the closest color, and replace it with a Lego-friendly color.
Because the machine needs to be ultra-precise when placing its bricks, Sten added touch sensors. After trialing the robot, he noticed that the bricks ran out quickly, so he added a “quality of life feature”: coding that made the device stop when it ran out of any color.
The final step was choosing an image to ‘print’. Sten left that decision up to his other creation, Dave, the world’s first AI-powered Lego robotic head. Dave decided the image should be of a 'quirky robot holding a sunflower.'
You can watch the 15-minute video of the Pixelbot 3000’s creation, including seeing how the final Lego mosaic image turned out, below. The Pixelbot 3000 code is available for download on GitHub.