Friday, April 24, 2020

Better Firmware For A First Gen Polar3D Printer

I was given a Polar3D printer. You know, the old one with a serial number lower than 1000. Polar was offering an upgrade to a new printer for the price of the old printer and $400 extra dollars. That's definitely not worth it to me. I figured I could abandon the Polar Cloud altogether because they don't seem to support the old printer anymore (not shocking) and I can't slice things differently with the onboard software. So let's install and configure OctoPrint on here so I can actually use it in future projects!



This is the printer without the build plate. It's pretty straight forward. Let's see what's inside.


I'm not totally surprised that the brain of this device is a Raspberry Pi. With every USB connector plugged in, this thing is essentially someone's mass produced hobbyist project. Which in some ways makes it easier to work with because everything is open... sort of.

The first thing we need to do is to install OctoPrint onto the Pi. For some reason, I couldn't do it on Raspian, so I opted for a prebuilt OctoPi image. Installing OctoPrint on the printer isn't the point of this post. Configuring it is.

There were many issues with the configuration. For one, it took me a very long time to hack the bounding box into the machine so that it wouldn't hit the back of the machine. I tried to print a nickel test, but something tells me I'm still missing some slicer config:


First off, I'm legitimately surprised that it made a shape. But the issue is very clear: we're using a square coordinate system on a polar coordinate printer. That's why the shape is warped like that.

The first logical thing to do here was to dive into the firmware of the Polar3D firmware. The interface itself is pretty barebones with only a simple NodeJS server running some code to communicate with the cloud and the serial connected printer driver. It also uses Cura onboard to slice the model as expected. So we need to see how exactly Cura does the change to polar coordinates because, as far as I can tell, it's just stock Cura.

The magic happens in a program that's executed called polar3Dconverter. Basically this rewrites the GCODE in place so that it works on the printer. It still doesn't do the magic with build plate placement and whatnot (stock firmware prints close to the edge of the plate, not the center), but at least we're getting somewhere. Letting Cura slice and then running it through the program yielded the following shape for the nickel test:


Well good. It has the size and coordinates right, but something still isn't right about the configuration of the printer. The filament was coming out kinda gross and balled up quite a bit on the top layer of the shell. On stock firmware it was doing just fine with this filament, so there must be a slicer config issue. I also want to do the GCode conversion automatically after slicing or after GCODE upload as well as that plate offset I mentioned earlier (wherever that occurs, maybe slicing?). The idea is at the end is to have a OctoPrint plugin that you can download and run on your printer.

That's the goal, at least. Let's see where we go from here.

The issue with the filament balling up was easy to figure out. Somehow, the default slicer profile got the idea that the filament was twice the thickness it needed to be. Setting it to the correct diameter (1.75mm) was the answer to a nice, smooth print.


Next, I wrote a very, very simple Octoprint Plugin to run the program on new GCode files. My first attempt at this did not go well. It went so poorly, in fact, that I left this project alone for about a year and a half. Recently (this month), I unpacked the printer from my move and decided to take another crack at it.

This time, I managed to write a plugin that successfully transforms all GCode uploaded to the machine. I also had to install this plugin to disable GCode analysis because it sometimes led to what I can only assume was filesystem corruption. It's okay though, because analysis (and the GCode Viewer) don't exactly work well anyway. Tradeoffs.

To make it even more stable, I ended up replacing the Pi's power supply because there wasn't enough power getting to it and it would crash during high CPU load.

I gave up on trying to run the Cura Engine in newer versions of Octoprint. So I just slice the models on my computer. It's better that way anyway. I've also configured a printer in Cura so that it has the correct GCode Preamble and Ending required for this printer. They're included in the plugin instructions.

I've uploaded a zip file of the Polar3D converter and the plugin here. The instructions are included, but are also put here for convenience:

To install this into your Octoprint install:

  1. Copy the polar3Dconverter to /usr/bin and run chmod +x /usr/bin/polar3Dconverter
  2. Copy the python file to ~/.octoprint/plugins
  3. To get this to work, I had to install the plugin linked above to disable GCode Analysis (it'll most likely be wrong anyway).
  4. Restart the print server.

That should be everything you need to do. This printer sucks. But with this software (which also sucks), it actually sums up to suck a little less. And now I have a kinda/sorta functioning printer. So that's neat. I'll keep working to refine the printer's settings and print quality. But at least it's able to print in the correct coordinate space somewhat automatically.

No comments:

Post a Comment