In a video uploaded on June 8, Dutch YouTuber Sten, a Lego enthusiast who runs the Creative Mindstorms channel on the social media platform, documents the process of building the Pixelbot 3000 from its mechanism to 'printing' the final product.
The Pixelbot is essentially the next generation of the Bricasso printer that JK Brickworks developed about nine years ago. Built entirely from Lego parts, Bricasso scanned the pre-pixelated source images and stored them on a Lego Mindstorms EV3 device. The saved data was used to create a mosaic using 1 x 1 bricks. Mindstorms, which has been discontinued, was released as an educational kit for creating programmable robots using Lego bricks and parts.
Creating Pixelbot involved a lot of trial and error, which Sten makes clear repeatedly throughout the video.
“So the plan is to create an AI image generator. I thought it would be a good idea to use these 16 x 16 base plates and then create pixel art with those little 1 x 1 plates,” he says. The beginning of the video.
After a few days of “reconsideration,” he began replacing the 16 x 16 baseplate with a 32 x 32 baseplate, producing excellent images. A few days after that, the original rack and pinion mechanism that moved the platform was replaced with a piece of screw. After completing the device, Sten worked on the software that would run it.
Instead of using pre-pixelated scanned images like Bricasso, Open AI's DALL-E 3 creates cartoon-like images that are 'printed' as a mosaic. The YouTuber wrote code using Python to divide a high-resolution 1024 x 1024 source image into a 32 x 32 grid and pick the color of the center pixel for each space, improving the clarity of the resulting mosaic.
But there were still too many color values for Pixelbot to handle (Lego only has 70 colors), so Sten had the machine look at every pixel in the source image, pick the closest color, and turn it into a Lego-friendly color.
The world's best AI Lego robot!
Because the machine requires extreme precision when laying bricks, Sten added touch sensors. After testing out the robot, he found that it ran out of bricks quickly, so he added a “quality of life feature.” In other words, the coding stops the device when the color runs out.
The final step was to select the images I wanted to ‘print’. Sten left that decision to another of his creations, Dave, the world's first AI-powered Lego robot head. Dave decided that the image should be 'a whimsical robot holding a sunflower'.
Below you can watch a 15-minute video of the creation of the Pixelbot 3000, including seeing what the final LEGO mosaic image will look like. Pixelbot 3000 code can be downloaded from GitHub.
I made an AI LEGO® PixelArt robot