I've got an Ender 3 Pro connected to latest OctoPi / Octoprint running on Raspi Pi 4 B (8gb)
For complicated gcode running jobs through Octoprint => Printer USB (serial connection with 250k baud rate) printing time usally increased by ~20-25%.
Even for (a lot of) small prints while "prototyping" I was quite annoyed with a few minutes longer printing times.
I ended up with saving everything on the SD card and print it from there.
As saving on SD is of course very slow through OctoPrint (thx to serial connection again), I was juggling SD cards in and out.
Trying to solve it the easy way...:
I looked for WiFi enabled SD cards and use such a thing with a SD to MicroSD adapter.
Two things prevented my doing it:
- Toshiba FlashAir Card are not available at all in germany or even more expensive that the solution I came up with.
- Bad reviews for all the chinese crap cards - I tried it anyway with different cards and couldnt get it working.
So I gave up this idea and had in mind that there should be some kind SD Emlulator / adapter... what ever.
And I found the interesing (open hardware) project SDWire: https://wiki.tizen.org/SDWire
The idea is quite simple:
- MicroSD card slot for the media
- USB connection to the host system
- MicroSD shaped part of the board goes to the "client" (printer)
By a piece of software you can switch the card access between host and printer.
As I'm completly incapable of soldering I checked for preassembled version and found exaclty what I was looking for ... in an blog entry: OctoPrint.org - Automating OctoPrint's release tests
It's referring to a kind of expensive (tiny) piece of hardware, but exactly what I was looking for:
The USB-SD-Mux switches a SD-Card between your Device Under Test (DUT) and a host PC. Therefore plugin the SD-Card manually is no longer necessary.
Orderd, arrived fast, connected, tested manually on console - working!
But as my laziness is endless, of course I made a very simple bash script for automate that stuff.
A plugin for OctoPrint would have been the better solution, but I wanted something that I can realize I a few minutes.
The final hardware setup:
- Ender 3 connected by USB to Raspi / OctoPrint
- USB SD Mux inside of Ender 3 MicroSD slot
- USB SD Mux connected to Raspi by USB
- Standard OctoPrint
- Incron monitoring Octoprints upload folder
- Bash script transfering incoming files to printer SD card
I made some simple "rules" just based on the uploaded filenames.
When a file is moved to the upload folder Incron triggers my bash script.
If filename is prefixed with "sd-" or "ap-" script will run (if printer is idle):
- Switch SD Mux to host
- Mount SD card volume
- Copy renamed file to SD card
- Unmount SD card
- Switch SD Mux to printer
- Some API calls to OctoPrint (Init printer sd card, load file, start printing if filename started with "ap-")
Runtime for that process is about ~8-10 seconds.
From Cura to printer SD card and direct start of the print with just seconds of transfer time is now possible and exactly what I was looking for.
Hopefully this will also work with a MicroSD to SD adapter (although SD Mux manual says it shouldn't be done because of possible EMC issues) as I already ordered and waiting for my new printer (Prusa i3 MK3S)