RPi Printer Server For Your 3D Printer


Want to run your 3D printer without your laptop attached? Looking to make your hackerspace printer network accessable? OctoPrint aims to make a 3D print server for the Raspberry Pi.

The open source Python project allows you to upload and manage GCODE files on the RPi. You can then select files that you want to print, and get basic statistics before running the printer. Information including temperature can be reported back via the UI, and arbitrary GCODE commands can be run for setup and testing.

Some other nifty features include streaming video to the UI so the print job can be watched remotely. Support for creating time-lapse videos is also available. Adding a wifi dongle and webcam to an RPi turns it into a fully featured print server.

The project uses the Flask web framework to serve the UI, and Tornadio with Socket.io to communicate with the UI asynchronously. You can pull the code from the project’s Github and try it out.

Thanks to [Camerin] for sending this in.

20 thoughts on “RPi Printer Server For Your 3D Printer

      1. Extroot gives a lot of problems when doing sysupgrade, so I prefer to either move squashfs to external storage and hack kernel bootargs, or just swap a 4MiB SPI flash chip in favour of a 16MiB one.
        What bothers me, is that it’s likely to be slow as hell on a 400Mhz MIPS, but I guess I’ll have to find that out.

        1. Only problems extroot can give you during upgrade is if you upgrade kernel modules. Backup configs, wipe extroot, recreate it with new kernel checksum, restore configs. With local package repository it will be a fast job.

          1. > Backup configs, wipe extroot, recreate it with new kernel checksum, restore configs.

            Takes a lot of pointless data maneuvers. I prefer to have a squshfs image with all the stuff compiled-in and upgrade everything in one run, including kernel. And when we have only 4 MiB of flash, and it’s NOR, I prefer to boot squashfs from external usb flash.
            In flash I just keep a dummy squashfs partition with near-to-zero filesize. All the rest goes for rootfs_data.
            Still, this method requires a few patches, including a proper sysupgrade script, so that sysupgrade will actually upgrade the stuff on the external flash. But that’s easy, since I prefer to compile my own images, rather than use the stock ones.

    1. A “Real” cnc controller has absolutely no security controls. They were also made in a time where factories did automation but not planned for the internet.

      With this, I can run real security on my system, and send jobs through an SSH session. That’s a wee bit more secure than “use a real cnc controller”.

      1. Unfortunately, you are incorrect. It appears that only webcams supporting the MJPEG format will work, and only the pricey ones do. The cheapies only do YUYV, which I can’t get to work with ~any~ program on the Pi, not even camorama or cheese. This I learned, of course, after no small amount of frustration.

        After the said trouble, it looks like these cams for sure work. If you know of more, comment:
        HP Webcam HD-2200
        Logitech C310
        Microsoft LifeCam VX-5000 (although no way to turn off low light correction)

        That said, the web interface is quite nice for octoprint, and sets up easily per the instructions on the download page.

        1. FYI: During development I’ve also successfully tested both a Microsoft Lifecam Cinema and a Logitech QuickCam E3500. I’m currently using the former. I also plan to get my hands on the RPi camera module and see what I can do with this.

        2. FYI, for development I’ve been using a Microsoft Lifecam Cinema and also tested a Logitech QuickCam E3500.

          I also plan to get my hands on the RPi camera module and see what’s possible with this.

        3. I got YUYV to run on a PI at 15fps and 320×240 using a very cheap webcam. You need to set YUV to true in mjpg-streamer.sh and I used the flag -y in the command line to test it. Read from Crystal Cowboy’s comments on down in this thread:
          Can’t see the video in Octoprint (brilliant interface!) yet but can see it across a network if I enter the url of the pi followed by /?action=stream
          Hope that helps.

  1. Is this compatible with GRBL? (An open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on a straight Arduino)

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.