Hack A Sketch
This Etch A Sketch is a robotic Leonardo da Vinci that will snap a picture of you and draw your portrait in a flash.
In the world of graphical displays, there are plenty of options that are much better than an Etch A Sketch. In fact, the Etch A Sketch is pretty awful. The resolution is terrible, images must be composed in a single pass without lifting the stylus, and there are only two colors. There is no comparison with the average computer monitor, let alone an 8K ultra-high definition TV.
But yet there is something mesmerizing about drawing a complex image on an Etch A Sketch by carefully turning each knob in just the right way, without a single error, to produce a Mona Lisa or Starry Night. That feeling simply cannot be reproduced by opening an image file on your computer.
The YouTubers at Every Flavor of Robot may not have the skills to manually draw a masterpiece with an Etch A Sketch, but they are quite good with robotics. And since they were looking for something that they could present at Open Sauce 2024, they came up with the idea of building an Etch A Sketch robot that can draw portraits. After all, who among us can say that they do not want to see their own smiling face plastered on the screen of an Etch A Sketch?
With only two weeks to complete the build, the team had their work cut out for them. They started by building the basic setup — a 3D-printed frame to fit the Etch A Sketch into, along with mounts to attach the motors that would be needed to turn the knobs to make the drawing. The motors had magnets glued to their backs so that their precise positions could be read by encoders, enabling precision control.
Early tests did not go as expected. Even drawing straight lines proved to be a problem. After assessing the situation, Every Flavor of Robot decided to develop a feedforward controller that predicts exactly what it needs to do before doing it. Once this controller was calibrated, it was performing much better and basic shapes could be drawn with a high level of accuracy.
To draw more complex shapes, a more advanced control mechanism was needed. The team settled on using G-code, which is the same thing that guides, for example, 3D printers. Towards the goal of drawing portraits, a pipeline was developed to convert images to SVGs, then to G-code that controls the motors.
This was all set to move at top speed, which worked well for a while — until it broke the Etch A Sketch. After tearing down the broken Etch A Sketch, it was found that the stylus is moved by rails via thin strings attached to the knobs, and one of these strings snapped. A new Etch A Sketch was inserted into the robot, then gears were fitted onto the knobs to slow the drawing down to take strain off of the strings.
But you do not want this moving too slow. I mean, how long do you want to wait to see your portrait before you give up and walk away? So to speed things up, the G-code was optimized. Initially, a picture resulted in about 50,000 lines of G-code being produced, but Every Flavor of Robot wanted to reduce that to about 1,000 lines. This was accomplished by “cartoonifying” the image first. That greatly reduced the complexity of the image and made edge detection much less noisy and complex. Accordingly, the sketched images were clear and faster to produce.
Finally, the team optimized their drawing algorithm with some techniques that deal with the old Traveling Salesman problem, then ran a bunch of tests. After that, the robotic Etch A Sketch was ready for presentation at Open Sauce.
Watching the finished product work is a thing of beauty. Stick around until the end of the video for a slew of demonstrations that you will not want to miss.
R&D, creativity, and building the next big thing you never knew you wanted are my specialties.