Industrial Stack Light Keeps An Eye On Prusa Mini

When most people want to keep tabs on what their 3D printer is up to while they’re out and about, they’ll install OctoPrint on a Pi and be done with it. But what if you’re just on the other side of the room? Inspired by the stack lights used on factory floors, [Jeff Glass] decided to add a similar system to his Prusa Mini so he could see what it’s up to at a glance.

It turns out you can get these lights pretty cheaply online from the usual retailers, and as [Jeff] explains in the video after the break, driving them is about as easy as it gets. Rather than being some kind of addressable device, they generally have a single common 12 or 24 volt DC wire and ground lines for each color. With a USB controlled relay board, kicking on the appropriate light is simple from your operating system of choice.

What ended up being a bit harder was finding out what the Prusa Mini was up to. The printer offers up a simple status web page, but it has a few oddball quirks that make it difficult to scrape; such as presenting a little pop-up message that you have to manually close each time you load the page. But after spending some time with the powerful Selenium library for Python, he was able to create a script that worked its way through the UI and pulled the relevant status messages. Obviously the resulting code is Prusa specific, but the general concept would work on other printers assuming you can find a reliable way to pull the device’s current status.

After coming up with a wall mounted enclosure for the electronics that doubles as a mount for the light itself, [Jeff] can now see if his printer needs attention from clear across the room. An especially nice feature when the printer is all buttoned up inside of its enclosure.

17 thoughts on “Industrial Stack Light Keeps An Eye On Prusa Mini

      1. If they have some kind of web interface, they most likely do/have to. Do they? You could just get a few bucks and add an ESP3D setup to any controller too, there are options around. Smoothie does make it more convenient though :)

        1. So the API is currently very limited, hence the goofy workaround here. You basically get one (two?) endpoint, and it’s got the information for powering the web UI encapsulated in a single request. There are stubs and TODOs to add a more fully featured API, though, so I’m hopeful. I’ve put in a small UI pull request for a feature on the LCD, maybe this is a good future project to hack on.

  1. As an industrial sparkie, would like to point out a few things about stacklights. ( or tower lights as we call them here)
    They are modular so you can put the colours in any order and run then base up as well as down. the light modules are avail in white and blus as well as red,amber.green..
    Sound modules are availablre as well if you want a sound warning. Just put them in the stack with the light modules. Yes they are available in LED as well as filament globes.

  2. Creator here – just chiming in to contribute to what everyone is thinking: “Why not just put a window in the enclosure?”

    The boring answer is I was concerned about the (old, brittle) plastic rollers and guides in that enclosure, and didn’t want to compromise the structural integrity of the door.

    Was this the easiest/fastest/cheapest/best way to solve the problem after that? Probably not. Lots of fun though.

    1. There are a couple, particularly on the expansion header (PB0 and PE5). Both in theory are addressable via an M42 command, but I don’t quite grok how the Prusa firmware was naming those pins/pin mappings internally, to be honest. That would be a neat thing to chase down, though.

    1. Yeah it’s ultimately pretty silly huh? The only thing that’s not in the telemetry is the “Printing” vs “Idle” determination, which is just whether the print gcode title is empty or not… I’m using the API to get the Z-height to determine whether the printer is truly printing or paused already as well.

  3. Hey guys I find the idea really amazing but want to put out gpio commands for WS281b LEDs. I am still not that smart regarding programming. Does anyone of you has an advice of how I can implement this idea of reading the UI with putting out commands to the GPIOs of the raspberry?

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.