prusa3d / Prusa-Firmware-Buddy

Firmware for the Original Prusa MINI, Original Prusa MK4 and the Original Prusa XL 3D printers by Prusa Research.
Other
1.17k stars 229 forks source link

[FEATURE REQUEST] Device lockout #4090

Open nyckidryan opened 4 months ago

nyckidryan commented 4 months ago

Printer model

No response

Describe the feature

I'm looking for a way to lock out a printer from printing anything until an external authorization is presented, possibly by way of a GPIO pin or a serial command. Something similar to a copier in an office that requires an account number before operating.

I work with a maker space and we have a farm of 13 printers, 8 Minis, 4 MK4s, and an XL. We've been having some issues with untrained members using the machines. I've looked through forums and pinout tables trying to find something that stuck out, but I haven't come up with anything. While custom firmware for the machines would be an option, I believe this would be useful for other maker spaces, libraries and schools.

Expected functionality

The user would be authorized by way of a device next to each printer that would read a member's card / PIN / key switch (for admin bypass) and if authorized, close a relay connecting a GPIO pin to VCC / GND, or perhaps by sending some gcode or other command through the serial port to unlock the machine. A simple auth check at the beginning of the print sequence would be sufficient - simply ignore the print request. Or for more feedback, return a "Not authorized" / "Printer not ready" message - perhaps something that could be set by gcode or PrusaLink and stored in eeprom.

There is a system that exists from Fabman which uses a member's card to enable a device, however it works by connecting and disconnecting power to the device, and monitoring for a low current draw to indicate the is done and forgot to log out. Great for equipment like soldering irons, table saws, drill presses, and this would work for the most part, but we don't like to just pull the power from a printer, especially if the access box would potentially interpret a printer waiting for a filament change as a completed print and just shutting down.

bkerler commented 3 months ago

This should be possible with the new gpio board, at least for the mk4s :)

nyckidryan commented 3 months ago

This should be possible with the new gpio board, at least for the mk4s :)

Still would require custom firmware to read a GPIO port and disable print functionality, though this is a start as it gives an easy interface for an external authentication module.