Friday, November 8, 2019

OctoPrint - revised instructions

OctoPrint - changing WiFi AP

  • Plug an Ethernet wire into the RaspberryPi (hearafter RPi), and power it up.  
  • Skip down to the section below headed  "Configuring WiFi" and follow the instructions down as far as, but not including the NB heading, and come back here.
  • you are going to reboot now - type sudo reboot now, and as soon as it starts to shutdown pull out the ethernet cable and wait (perhaps 2 mins) while your DNS allocates a new IP address, and octopi.local get's reassigned to this new address.
  • You can check all is well by clicking here -> http:/octopi.local.
  • DONE!

OctoPrint - revised installation instructions

Octoprint is a server that runs on a RPi.  One can install Raspian (RPi OS) and then use it to install OctoPrint.  This has the advantage that you have a RPi desktop environment for various fiddling later on.  However, then you suck up a lot of space and processor cycles, and there is more to go wrong.  The simplest installation has a simple CLI and the OctoPrint system only.  That's the approach I used.

Useful Links

Preparing the uSD card

I used an RPi 3B+.  There are RPi 4s on the market but they don't seem to be quite patted down yet.  The software runs from a uSD card.  So the task is to use a PC (or equivalent) to install and configure a system on a uSD card.  8Gb is the minimum size recommended, but of course bigger is better.  I went with a SanDisk 32Gb card.  The card should not need formatting!

The normal RPi setup involves dragging and dropping a bunch of files from the Raspian release onto the card.  Forget that! The OctoPrint setup is different.  A freeware program called Etcher is used to create a disk image directly.
  • Download Etcher tool to your PC to flash the uSD card:
  • Download the latest version of OctoPi from:
  • Use Etcher to copy the image to the SD card  (can use .zip directly)
  • This took 7-8 minutes on my creaky old laptop to write and then validate the write.  When it finished the PC suggests that the card needs formatting.  Resist the urge to comply, or you will be sorry.  Just eject the card.

Configure the rest on RPi

  • A word of warning here... Don't ever insert/remove the card when the RPi has power or you will be sorry.
  • Plug an ethernet cable into the RPi
  • Put the SD card in RPi and power it up.

Configuring WiFi

If you don't care about WiFi, i.e. you are always going to have your RPi connected to an ethernet wire then you can skip this section.

You should now be able to login remotely to the RPi.  It seems to take a few minutes before the system is setup and registers itself with the DNS as octopi.local.  If you get impatient then you'll have to root around in your router to find out its IP address.
  • Suggest you use putty to ssh to octopi.local   credentials: pi/raspberry
  • when logged in, type the following commands:
cd /boot
sudo nano octopi-wpa-supplicant.txt

  •  Use the arrow keys to scroll down to the line that says "## WPA/WPA2 secured"
  • Using your considerable experience using screen editors change the following lines to look like this:

# WPA/WPA2 securednetwork={
ssid="put your SSID here"
psk="put your WiFi password here"

  • Control-O, followed by '<cr>'  to write out the changed file
  • Control-X will exit nano 
    Editing the file using the RaspberryPi nano screen editor


This would be a great time to skip ahead and take care of another small edit that may be required if you want to install octolapse.   Look for the sub-heading below  ** Subroutine: Some more putty work **
  • Now reboot the RPi using the command
sudo reboot now

  •  Now unplug the ethernet wire and see if you can connect to the RPi again.  It may be a minute or two before your router is ready.  This time you can use the browser to connect.

Configuring OctoPi 

  • Go to http://octopi.local.  You should see the "setup wizard".
  • Follow the setup instructions
    • I disabled access control, but I changed my password to something short 'p' :-)
    • I enabled anonymous usage reporting
    • Enable connectivity check
    • Enable plugin blacklist processing
    • Skipped the Cura profile
    • Set up the printer profile:  General and Build Volume
Here's what I typed in in the order it was demanded
Prusa i3 (original)MK2.5rectangularlower leftyes250mm210mm200mmX: 0/250, Y: -4/210, Z: 0/200 6000 mm/min 6000 mm/min 200 mm/min 300 mm/min 0.4 mm1
    • Finish and Reload interface
    • Check in top left of Web Interface to see if any Updates are offered, and presumably accept them.

Setting up OctoLapse  GREAT VIDEO!

Now the tedious bit

Click on the gear next to the Printer Profile

Now get the Slic3r up beside the Octolapse window so it's easy to copy stuff across.
Get the Printer tab visible in the slic3r on the left.
Copy the extruder parameters across to Octolapse.
Octolapse/Printer/Extruder on the left - Slic3r/PrintER Settings/Extruder 1 on the right

Now switch the slic3r to the Print tab.
Copy the Print Move parameters in from the slic3r/Print Settings tab/Speed

Octolapse/Printer/Speed for Print Moves on the left - Slic3r/Print Settings/Speed on right

Now scroll down to the Miscellaneous Settings
Set the Snapshot Command to G4 P1

When Octolapse sees one of these commands go by it triggers the camera, so we have to tell OctoPrint to generate this sequence at the right time.  We do this in the SLic3r Printer Settings.  Note that we need to be in Expert mode to be able to change the Custom G-Codes.  We add G4P1 (no space) on the end of the "After layer change G-code".

Now we have to set up the stabilization parameters in Octolapse.  There are a bunch of clever options, but "Extruder at Back Left" is simple and brings the model forward for the snapshot.
Next we setup the Snapshot thingummy to tell it to expect a signal using GCode.

Now we have to tell it the output speed of the video. I'm not sure if there is always one snapshot per frame in the output.  They suggest 40 fps, but 15fps seems a more sedate pace, and it can be speeded up with post processing if required.

Setting up the Camera

Still in Octolapse Settings...

Click on the gear and then notice this setting:

The 8080 in the address is going to be the port of the camera service.   So if we type our server address with the port 8080 we will see the output of the camera.

Here's what I see:

This is the place we focus on to get the camera set up for the run.

** Subroutine: Some more putty work **

Before doing anything else go back to the PuTTY remote shell connected to octopi.local.  Login and use cd to the /boot directory.
cd /boot
sudo nano octopi.txt

scroll down to the end of the file and make these changes.  There is a permission issue if you don't do this before the next bit.

<End of "PuTTY work", return from subroutine!>

The most important parameter is the Snapshot Delay.   This delay allows the who rig to stop shaking around before the picture is taken.  Shorter durations may be OK.

Now we need to set up the exposure parameters etc.  Scroll down to the bottom and check the box.

So now you should try to get the camera image alongside the Octolapse page so that you can tweak the camera parameters and see the result in the video stream.  

Octolapse on the left and real-time video view on the right

You just have to fiddle with these to get them right.  Hit "Apply Now" to see how the video is affected.

JPEG to 100 is good.
Always turn autofocus OFF and adjust it in the box below

Here's some parameters that worked for the image below:

Before trying to make a time-lapse and wasting a lot of plastic, try to debug your settings first.

Make sure to turn OFF the reguslar timelapseNow you can switch to

Other Useful Plugins

Bed Visualizer

This is a plugin that shows a graph of how level the bed is.  It is called Bed Visualizer.   Just install it in the same way as OctoLapse.  

Bed level visualizer


The emergency stop button
M112 is the code you need!   THis will stop the print and disconnect the printer lickety-split.


Lets you alter the order of the tabs at the top of octoprint. It does work, but it seems not to work immediately and ignores some settings until you do something else that I have not yet figured out. Oh... figured it out.  Uninstall, and re-install Themeify if you have already installed that plugin.


Can't make it work!

Another no go!   Shame because it would be useful.

MQTT Publish

To be figured out.


This is worth the effort!  Puts a full res, full rate streaming webcam into it's own tab so it's easier to get to.

Themeify - note this is installed last!

This one seems to impact other installations, so it is out of alphabetical order, and last!  These settings are required to make the window wider so that you can accommodate more tabs like this.  See settings below in gray panel.
Full width OctoPrint Window

Settings to set up above Octoprint window config

Wednesday, October 30, 2019

First Layer Calibration

I've been generating a lot of print failures.

Mostly they show up on the first layer, but some happen much later on.

There seem to be some apparently random things going on.  The same print will work sometimes and not others.


I repeated the First Layer Calibration tests for a whole bunch of different settings.  I wondered what would happen with squish=0

I marked the patch with the squishing factor.

The PLA hardly stuck to the bed, and so when the hot end changed direction it would pull up the recently deposited PLA and drag it to the new position.  The patch was clearly inadequate.  Well at least that all makes sense.


Notice how the PLA has become almost transparent in the zig-zag pattern.  It was pretty hard to remove too.  So I think this can be called "well attached", but perhaps a little too attached?

Other squish factors

I looked end on at patches with different squish factors.

None of them looked like their diagram.

So then I looked at the faces of the patches.

 And their example...

Ability to print right angles cleanly

-1.255 is OK, but the corners are certainly rounded off
-1.4 produced decent corners

-1.000 produces rounded corners.
0.000 is a disaster as I'd expect

And the winner is:

Well since I have to choose, I'd say the appearance of 1.38 is the best.

But the first layer still doesn't stick all the time.

Acetone rocks

So I cleaned the sheet with acetone as they suggest.  It looked quite uniform afterwards, so I think I did manage to remove some residue.

Next I printed the most recalcitrant object. with my 1.38 number.

And this time it stuck.  I'm not saying the result looks good!

Tuesday, October 29, 2019

More "Squishing" - Printing issues again

Everything was printing OK until half-way through today, for no apparent reason I started getting "moth-eaten" prints.

I tried re-calibrating and squishing down a little more but it didn't change a thing.   I cleaned the nozzle, and wiped the bed.  All the settings are as per normal.  What's the problem?


I finally broke down and squished down a whole lot more, until I was getting perfect right angles at the corners of the "First layer calibration" pattern.  That subtracted an extra 0.12  mm from the bed, and seemed to improve things a lot.

But there are still apparently random things going on that I don't yet understand.

Sunday, October 20, 2019

Plant monitor under test again

I have installed my plant (senico radicans) monitor prototype.  Not quite finished yet but I want to see how well it works - if at all, before I decalre the boxes done.

The sensor is connected to the wireless relay which is powered by the solar cell.  The wires lead into the wireless relay via a couple of grommets.  I have not wired up the button/LED yet, and the holes are a little too close to the edge for comfort, so I might remake the cover.

The base station can be hundreds of yards away but it actually only about 4' away.  It receives the moisture and battery data from the base station using LoRa wireless, and then relays it to, a simple cloud service, using WiFi and the internet.

The box didn't print very evenly and has a noticeable band around the side.  Otherwise it turned out well.

I have a standard parametric box design that can be parameterized to handle any PCB.  The PCB is fixed to the base using screws that fit into nurled nuts that are hot-pushed into the plastic holes.  That works really well and is very simple to do.  I need to get some pan-head screws rather than these countersunk screws.

I need to find a better way to pass a USB cable through the plastic shell.  Have to look to see how the pros do it without a bunch more soldering of wires.

Base Station

The cloud service produces graphs that look like this:

Tourbillon Project

Tourbillon Project I was interested to push the limits of 3D printing... basically for the hell of it, and to distract me from being indoors...