OctoPi Tutorial for Zim

So we have recommended scripts for Octoprint:

When conncting to the Printer:

M1202 ; LED lights on
M84 S600 ; set inactivity timer to 600 seconds

When a Programm is started:

G17  ;set plane to XY (not really necessary...)
G21  ;set units to mm (or G20 for inches)
G90  ;set to absolute positioning (or G91 for incremental/relative)
M82  ;set extruder to absolute mode (or M83 for relative)
M107 ;fan off
M203 X10000 Y10000 Z600 E250 ;set max feedrates
G28 ;home all Axes

When a G-code is aborted:

M104 S0 T0 ; set temperature of EX0 to 0, no wait
M104 S0 T1 ; set temperature of EX1 to 0, no wait
M140 S0 ; set heated bed temperature to 0, no wait
G0 Z150 F600 ; lower the platform completely (could be Z140, depending on thickness of your Platform)
G84 ;turn off stepper drives

…And in the Beginning of a G-Code Program:

;Set hotends and bed to their temperatures and continue
M140 S{print_bed_temperature}  ;set bed temperature, no wait
M104 T0 S{print_temperature}   ;set EX0 temperature, no wait
M104 T1 S{print_temperature2}  ;set EX1 temperature, no wait
;set temps again and wait
M190 S{print_bed_temperature}  ;set bed temp and wait
M109 T0 S{print_temperature}   ;set EX0 temp and wait
M109 T1 S{print_temperature2}  ;set EX1 temp and wait

–>The commands {print_temperature}, {…} work with cura slicer. Other slicers may have other parameters.

Please correct me if I made a mistake

1 Like

Hey looks great Jürgen, thanks for consolidating this. Do you know of a quick tutorial on setting up the Octoprint Cura for onboard slicing?

@jpod do you think you could share your simplify3d profile? Trying it out for the first time and want to see what others have been using for the Zim

Sure thing, I’ll stick it somewhere accessible this evening.

still does the same thing after the codes, just crashes right before a print.

@jpod
Sure, that´s pretty easy!
Most of the steps are only necessary once, so don´t be alarmed of so many steps.
Just download Cura (15.02.1) and install on your PC.

1: in Cura Add a machine using the following settings:

  • Kind of machine: Other -->Next
  • Other machine information: Custom -->Next
  • machine name: ZIM
    -with, depth, height: 150/150/150, Nozzle:0.35

Then click Machine --> Machine settings… and check the following:

Step 2:
Click Expert --> switch to full settings (but you can also continue with the quickprint if you´re not familiar with the advanced settings)

Step 3:
Go through all the tabs and check every setting. Most of them are set very good by default.


Note that the scripts “start2.gcode” and “end2.gcode” are only available if you have a second extruder.

Step 4:
Click File --> save Profile and save the settings profile to your Harddisk
You can make as many profiles as you want, so it is good to make profiles for PLA and ABS, as well as for different qualities

Step 5:
Go to octoprint settings --> Plugin manager … and install the plugin “cura engine” --> after that, reboot your Pi

Step 6:
Go ot Octoprint settings --> Cura Engine --> Import Profile.
open the Profile that you saved in Cura and… thats all.
Octoprint will now use the settings for slicing.

@Kr3 Sure looks like the inactivity timer. You can watch the terminal and see if you see any new M84 commands after your M84 S600.

@J_Schmidt Hey thanks!

@jpod I can probably figure put the timeout issue. I’ll try to set it to 6000 lol. And I will try to follow those new cura settings because that’s probably the reason it’s not extruding right. All of the codes seem to be working just fine so I have no idea why it’s still timing out. It just stops heating all together about at the 3 or 4 layer mark but keeps following the tool path, I stop the print when the temp gets Down to 170.

It went from temp dropping after 4 layers while printing very very very thin to printing way too much and stopping at the certain points that are globbed up. And yes the globbed up print is after the new cura settings thats copied exactly like above. So it’s a feed rate issue right? It was extruding so fast the gear was “clicking” on the filament itself.

Jep, that looks really strange. The right print looks exactly like my absolute/relative extrusion issue. But that is no explanation for your temerature problems. Could you post your g-code, please? I would take a look at it regarding your feed problems.
@jpod: Do you have an idea for his temperature-drops?

EDIT:
Right now I realized something strange on the pic you posted. Your temperature-graph starts to go up when your Code set the M109 command. Then the graph stays at about 60°C, and pops up two minutes later? Could it be a communication problem?
Obviously the temperature of your hotend does not really stay at 60°C and heats up in a second to 140°C. So Octoprint seems to have had no temperature information in the meantime. Maybe Octoprint stopped the print due to lack of information?

Yeah that looks strange. It can do that if the active extruder changes to T1, but then why would it fix itself part way through the heating. The only other thing that would come to mind is an intermittent thermister connection.

@Kr3 If you are printing PLA, your temperature profile is a bit hot. Try using 190-205C and see if there is any improvement. If you are trying ABS, well, it a little cold, but try PLA first. Check the wires leading to the thermister and heating element by gently tugging on them while your at it. These have been known to have poor connections (one of mine was only held together by the heatshrink). Can you post your gcode file and the terminal output during that heating phase? Try turning on the serial logging in octoprint and grab the file from the raspberry pi. Let us know if you need help getting a log.

Jpod, did you find that your latest Marlin Firmware resolved most of your blobbing/pausing issues? Also are the directions above still the best way to go about updating the firmware now that the A10 board is disconnected? Thanks for the help!

It resolved my pausing issue (short pauses due to lots of short moves in the gcode). Part of my blobbing turned out to be retract settings and random startpoints (zits as they call them). I resolved this with the simplify3d start location option, which creates a seam but no blobs.

Yes, the instructions to upload using the Arduino IDE are still the right way to do it. The A10 board wasn’t really ever in the picture.

Things are definitely looking better and better :smiley:

Came home, installed jpod’s firmware and wow, so much better!

52 minutes 36 second print, no supports, scaled down Skull Box
Gotta slow things down a bit but having a ton of fun. Thank you all for the great advice and help!

1 Like

I will be attempting this OctoPi conversion tonight, wish me luck!

Good luck! Let us know if you have any troubles, I’m sure we can work through them. :beers:

This conversion went so well, I can hardly believe it! I have more feedback and questions when I get some rest :smile:

I printed the skullbox at 40% with supports at 69 minutes and it turned out pretty good. 220C PLA. The hooks were kind of too small to break free without breaking a bit of the mount, but the head hinged fine.

Ok so here’s my OctoPi conversion notes:

The first thing I did was test my Zim once last time with Zeepro firmware. When I powered it on it got an update to 1.8.3. I loaded a very small test piece that should normally load and slice very quickly. The machine was pretty laggy even just loading the part and then very laggy to slice a tiny little piece (smaller than a toothpick), but it did work and the part printed as it always did before. My theory on this is that Zeepro is possibly using a scalable cloud platform like Heroku or Cloud9 to run their cloud slicer, and now that they are defunct they turned off all of the extra dynos (CPUs and RAM) that you’d normally pay big bucks for each month and just have it still running on the free tier (which will work but be really slow). If that’s what happened, kudos to them for not completely shutting it down and rending the Zim utterly useless.

So I started by trying to unload my filament (probably didn’t need to do this but I thought I might need the room or soemthing… turned out to be a good learning experience) the zeepro way and the left cartridge worked fine but the right cartridge’s filament was broken down by the base so I had to get crazy with it to unload this side. Long story short, as part of this work I found that the filament gets caught as it enters the teflon tube right past the microswitch at the cartridge bay. Something it probably always did in the past but I never noticed. So now I figure it’s a good idea to manually shove about 6-12 inches of filament into the tube to make sure it’s gets past this snag, and then push the cartridge in. Pretty soon I will replace these with the new bottom loader assembly.

Once the filament was out, I looked for a document that had the screws to remove for the baseplate so that I could get more room to pull cables off of the cubieboard which was getting replaced by the RasPi2 and get access to the zimboard. I’ll save you the trouble, here’s the pic:

Once the bottom tray was down, I decided to work on getting access to the USB connector on the zimboard. I figured for sure I would have to desolder one from my Arduino to put on here. Before I even tried to pry mine off, I unscrewed the zimboard from the baseplate. Bad idea. The screws and spacers that hold the zimboard down are a PITA and in my opinion a bad design, easy enough to take apart… hard to replace. Once I got it off though, as I pulled the zimboard away from the backplane, the USB connector cover just fell off. I was shocked, it wasn’t glued in at all! I got one of the earlier units so they might have not started gluing these yet… but a win nonetheless. I removed the cubieboard and saved all of the hardware for it.

Now it was time to write the octopi image to the flash card. I ended up getting this complete starter kit from amazon, and everything was great except for the power supply, which wasn’t not UL approved and does not snap into the USB connector on the Pi like all of my other micro usb cables do… it’s just a loose unsettling feeling but it works (for now)… I’m going to replace it with a proper power supply.

I used Apple Pi Baker to write the image using my Mac, and it worked great.

There were a few stumbling points in the tutorial video, like I did not have a ~/etc/network/interfaces path, but the file can be edited via an absolute path by sudo nano /etc/network/interfaces from anywhere. I edited the interfaces file with my home Wi-Fi credentials and it connected right away. Something to note is if you forget your Pi’s IP address, you can look in your router at connected wireless devices and it should come up with a name of octopi.

I didn’t see a reason why I needed the ethernet cable plugged in, but I did have one plugged in. You could probably omit that step?

You can SSH into the PI super easily with a Mac:
ssh pi@192.168.1.x (whatever your Pi’s IP address) was, then give it the “raspberry” password.

My Octopi was at version 1.2.2 and needed to update to v1.2.6, but it kept failing to update for some reason. So I SSH’d into the Pi, and cd OctoPrint/, from here you can simply run git fetch && git checkout 1.2.6 and this will pull the tags and checkout the github commit tagged as version 1.2.6 ( which was the current newest version of OctoPrint ). After rebooting the Pi and loading up OctoPrint, it was still v1.2.2… but now running the Software Update command worked and I ended up with v1.2.6.

I went straight for updating my zimboard firmware to jpod’s modified firmware, which was super easy. I would suggest renaming the Marlin.ino to marlin-zeepro.ino so there is just one less step to do when you have to rename the folder to marlin. Since we are clearly diverged from the original marlin firmware at this point, there is little reason to keep that file named simply Marlin.ino :wink: Great work on digging into this firmware jpod! I see references to driving an LCD from the zimboard, and I’m wondering if that’s useful and what is displayed on it.

I went through jpod’s tutorials on how to add simple fixes to the default gantry speeds and z-axis inversion and the camera worked perfectly. Another thing to note is that the camera is WAY LESS laggy than when running on the cubieboard. It’s almost real-time now verses a 30 second lag!! I went through the advanced scripting tutorial and created the Lights on/off buttons and load/unloadFilament scripts. I used Filezilla on windows with the SFTP protocol (port 22) and was able to load these files easily. When I tried the loadFilament script, it didn’t load nearly long enough to run filament all of the way up into the extruder. I found through manual control that 1400mm was about right for both cartridges, so I’ll have to edit this in the script once I figure out where to put the right commands.

Once I was ready to print, I was hung up by the fact that I could not do onboard slicing before I uploaded a Cura profile. Only recently did @J_Schmidt add screenshots of his profile, which I tried to initially re-create with the lastest Cura on Mac… but everything was looking too different, so I downloaded the exact version he used for Windows and was able to get something going. That said, I wish a file was available!!.. so here’s mine:
T0 and T1
T0 only
T1 only

About this Cura profile, it heats up BOTH extruders regardlessly, and I cannot find a way to select tool0 or tool1 dynamically. Is this something we need to create individual profiles for? I’d love to see your profiles for this if you guys have figured this out. BTW, on my Zim, T0 is the right extruder, and T1 is the left extruder. Not sure how you guys have it, but my LEFT cartridge feeds the LEFT extruder (which we all know is driven by the LEFT lower and RIGHT upper steppers). Not sure if this is different from what you guys have, but I might have done that to make it more intuitive when I had all of my teflon tubes removed.

I didn’t have any issues with my 69 minute long print timing out (see skull in previous post). This is really fantastic and I couldn’t have asked for a better end result. Thanks @jpod for putting the tutorials together, and thanks everyone for contributing to this epic and necessary collaboration! It’s really quite thrilling to be in control again of our printers.

Also figured out how to change the background image on the graph… the octoprint octopus is cute and all, but he more so creeps me out. This is the image you need to change:
./home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.2.6-py2.7.egg/octoprint/static/img/graph-background.png
I like to just keep this file in my home/pi directory so after new updates I can run this easy command without having to SFTP the file every time:
cp graph-background.png oprint/lib/python2.7/site-packages/OctoPrint-1.2.8-py2.7.egg/octoprint/static/img/graph-background.png
and after running this command and refreshing your web browser you’ll see it:
sudo service octoprint restart

Time to get designing and printing a simple hub for CD/DVD mousetrap car wheels for an upcoming meetup I’m doing for the kids :mouse2: :car:

1 Like

well guys i finally got it to work. i re made an entire cura profile and set my timeout time to 60k seconds. and i got a great print out of it with no stops, pauses, over temp, dropping temp, or feeding issues. i used these settings over on the “speed” section instead of the other settings posted. that plus keeping the temp at 210 for PLA and 100% infill. thank you guys for putting up with my noobness and maybe my settings may help someone esle. oh and can you tell me how i can make the head home and drop the bed all the way down after a print. that would be much appreciated.

Try:
M2001 ; Zeepro’s “End Print” (drops platform, centers head, retracts filament slightly, and turns off heat)
G28 X Y ; home x and y axis (to zero head instead of centering from above command)