Revisiting my dot-matrix EV3 Lego printer

This photo shows v3.0 of the Viper Printer.

This year I decided to revisit the dot-matrix Lego printer that I first built and programmed in 2017. The original design was the result of a lot of iterating, but it still had some significant problems. I wanted to try again, with a focus on eliminating errors and printing very consistent images.

You can download .LXF and .IO models of v3.0 of my LEGO printer, plus Python code for the printer, from the Viper Bots’ GitHub repo.

Keep reading to learn more.

The highlights:

  • I’m using three medium motors, where before I was using two large motors. I find they are a little more precise, less noisy, and easier to fasten to the structure.

This 3D rendering shows an example of a gear-driven rack in a sandwich of Technic 5×7 liftarm frames.

This side-by-side comparison shows a printout from Viper Printer v2.0 on the left and v3.0 on the right. The tank-tread assembly for moving the printhead and the paper feeder in v2.0 were imprecise, leading to vertical and horizontal gaps in the printout. The v3.0 printout is nearly pixel perfect (it’s only darker because the marker was pushed down farther)

  • I replaced the tank tread assembly with a long rack, driven by gears, that moves the print head back and forth across the paper. This has resulted in more precise dots, with the pen stopping at the correct position every time. I was really excited to learn that a stack of two layers of Technic bricks and one layer of Technic gear racks (part 3743) fits perfectly inside a sandwich of Technic liftarm 5×7 frames (part 64179, my favorite Technic part of all time) with a small 8-tooth gear. I saw an example of this in a tutorial on Lego gears.

This 3D rendering shows a pen holder made entirely of Lego technic pieces.

  • I replaced the old pen mechanism, which used two tires rotating in opposite directions to move the pen up and down. The advantage of that approach was its simplicity, but it was inconsistent — and anyway, I no longer possessed the same size wheels! I tried to rebuild the mechanism using larger tires, but couldn’t find a gear arrangement that would work. For that reason, I was forced to do something different. The new pen holder is made completely of Technic pieces and uses pressure to hold a Sharpie marker in place. The new pen holder is bulkier than I want, but I’m happy that it’s entirely Lego. To move the pen holder up and down I’m using I’m using another rack/frame sandwich.

  • My old printer design simply rested directly on a table, but it needed to be a table with a textured surface to keep the paper from slipping. After several seasons of First Lego League, I have acquired a lot of Technic panel plates (part 64782). I decided to use these to build a solid base for the printer. Adding this base greatly strengthened the overall structure of the printer! I also found that the panels could be arranged to be exactly 8.5″ across, the same as letter size paper. The challenge with these Technic panels is that the surface has indentations and holes. I tried to position the pen holder so that’s it over the flattest part of the panels.

This 3D rendering shows the paper feeding mechanism of the Viper Printer 3.0.
  • I redesigned the mechanism for paper feeding. My old design tried to position a large motor in the center of the printer between the two wheels to avoid one wheel moving harder/faster than the other. But the way I connected the motor and the way I geared it down was very flimsy. My new design is a vast improvement, and the structure is very strong.

  • The code is very similar to what I had before, but one significant improvement is that the printer now resets the position of the print head and the pen holder any time the code exits (whether because of an error, or because the user deliberately interrupts it).


When I began experimenting with using a long brick-and-rack assembly to move the print head, my early attempts bowed in the middle because of the weight of the print head. To overcome this, I built a strong parallel track of Technic beams under the bricks. The “frame sandwich” rests on this bottom beam track, and the beams bear the weight.

This 3D model illustrates the gap between the “rack stack” of bricks, and a parallel track of beams.

It was very difficult to align this parallel track properly — I didn’t realize that the height of Technic bricks doesn’t match the height of Technic beams, and their holes will not align unless you add extra plates to the bricks. As I learned in “The Unofficial LEGO Technic Builder’s Guide”, “holes in two bricks separated by two plates are exactly 3 studs apart.”

Unfortunately, the height of two plates is not equal to the height of one beam. The beam is a tiny bit taller. Consequently, my solution works in real life with a tiny amount of bowing; it isn’t geometrically perfect. Lego Digital Designer insists there is not enough empty vertical space between the stack of bricks and the parallel beam track to fit the bottom of the frame sandwich. only let me render an example if I turned off collision detection.

The future:

My all-Lego pen holder works pretty well, but there’s still some vertical wiggle room for the marker. And it’s not easy to align it properly. So, inspired by the work of Kush Garg — an Indian student who built his own version of my Viper Printer 1.0 — I hope to write an alignment script. It would let you precisely position the pen, moving it downward until you use a touch sensor to tell it to stop.

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of follow-up comments via e-mail. You can also subscribe without commenting.