2016-06-27

Getting started with the Raspberry Pi 3 OctoPrint Bundle




After upgrading to the low friction spool holder,
I just got myself the Raspberry Pi 3 OctoPrint Bundle from Watterott.
It shall be the center component of my Ultimate Filament sensor.

Since it doesn't come with any instructions, here is what you need to do:

Setup


Don't plug it in yet!
Insert the SD card into a regular computer and edit the file octopi-network.txt .


Then insert the 2 transparent elements into the 2 holes near the micro USB socket.
(Yes, there are 2 plugs for 4 holes and no instructions.)


Now insert the Raspberry Pi and then insert the SD card.
The contacts should face upwards.
(It is near impossible to the the cards out again.)

After switching it on, you can connect to it via http://octopi.local .

SSH

You can also access the raspberry via SSH
ssh pi@octopi.local
The default password is "raspberry.
The SD card is mounted as /boot
The OctoPrint config file is at "/home/pi/.octoprint/config.yaml"
You can restart the server via "sudo /etc/init.d/octoprint restart"

If your Wifi access point via
sudo sudo iwlist wlan0 scanning | grep ESSID
can't be seen by Linux, run
sudo raspi-config 
and select "5 internationalization options" -> "I4 select Wifi locale"
to enable the Raspberry to see all Wifi channels that are legal in your country.

The Raspian I got was very old. I had to provide Internet via Ethernet and do
sudo apt-get update
sudo apt-get dist-upgrade
then it was able to see Wifi networks on Channel 40 (5GHz) and 12+13 (2.4GHz).

GPIO fun 

While at the shell, you can have fun with the GPIO pins in Bash.
Sadly you can't set the pull-up resistors from the shell.
However my image came with WiringPi already installed.
It doesn't have a "--help" or a man page on the Pi itself, so here are the basics:
  • gpio readall
  • gpio mode (pin) in/out
  • gpio mode (pin) up/down/tri         (set pull up resistors)
  • gpio read (pin)
  • gpio write (pin) 0/1
  • gpio wfi (pin) rising/falling/both    (non-busy waiting for a state change)
  • (more)
  • (reading multiple gpios )
  • ...including timeout via read -t (seconds) || echo "timeout detected"  ...still in bash ;) 

Camera


Sorry, there is no hole for the Raspberry Pi camera. The best place to cut one is probably on the side (so you don't damage the cool logo), above the camera connector.

This longer cable (Reichelt) may be helpful.

Cura slicing

Luckily the Bundle comes with thje CuraEngine plugin preinstalled. So slicing it not much of a problem.You can imort your existing 15.x profiles (but not 2.1.1 profiles) in Settings->Plugins->CuraEngine->import profile.

BTW, there are "send to Octoprint" plugins for Cura on the desktop!

Ultimaker II setup

The Ultimaker series is not supported out of the box.

Settings->printer profile:

Profile  (UM2 extended)

  • Color: default
  • (X) Rectangular 
  • Origin: lower left
  • X: 223mm
  • Y: 223mm
  • Z: 315mm
  • (X) heated bed

Profile  (UM2 go)

  • Color: default
  • (X) Rectangular 
  • Origin: lower left
  • X: 120mm
  • Y: 120mm
  • Z: 115mm
  • (X) heated bed

Profile  (UM2)

  • Color: default
  • (X) Rectangular 
  • Origin: lower left
  • X: 223mm
  • Y: 223mm
  • Z: 205mm
  • (X) heated bed

 G-Code

After "after abort of a print job" enter:
;fans off
M107
;extruder heater off
M104 S0
;heated bed heater off (if you have it)
M140 S0
;metric values
G21
;absolute positioning
G90
;move Z and X/Y to min endstops
G28 Z0 X0 Y0
;relative positioning
G91
;retract the filament
G1 E-5 F300
;steppers off
M84
;absolute positioning
G90


Cura 15

in Cura set: GCode Type = RepRap (Marlin/Sprinter)
start.gcode (first line must be blank)

;Sliced at: {day} {date} {time}
;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}
;Print time: {print_time}
;Filament used: {filament_amount}m {filament_weight}g
;Filament cost: {filament_cost}
;M190 S{print_bed_temperature} ;Uncomment to add your own bed temperature line
;M109 S{print_temperature} ;Uncomment to add your own temperature line
G21        ;metric values
G90        ;absolute positioning
M82        ;set extruder to absolute mode
M107       ;start with the fan off
G28 X0 Y0  ;move X/Y to min endstops
G28 Z0     ;move Z to min endstops
G0 X20 Y20 F{travel_speed} ;bring extruder to the front
G1 Z25.0 F{travel_speed} ;move the platform down 25mm
G92 E0                  ;zero the extruded length
G1 F200 E25              ;extrude 25mm of feed stock
G92 E0                  ;zero the extruded length again
G1 F{travel_speed}
;Put printing message on LCD screen
M117 Printing...
end.gcode (first line must be blank)
;End GCode
M107 ;fans off
M104 S0                     ;extruder heater off
M140 S0                     ;heated bed heater off (if you have it)
G21 ;metric values
G90 ;absolute positioning
G28 Z0 X0 Y0 ;move Z and  X/Y to min endstops
G91                                    ;relative positioning
G1 E-15 F300 ;retract the filament
M84                         ;steppers off
G90                         ;absolute positioning
;{profile_string}

Cura 2.1


The documentation should be here However that's not the whole picture incomplete.
You need an Ultimaker2extended, Ultimaker2Go or Ultimaker2 profile with the reprap g-code flavor to have start and end added to your gcode files including material temperatures, homing and shutdown. Like this one.
To avoid adding files to Cura itself (and keeping them after updating Cura),
you can put your .json files for a new machine definition here:
  • Cura 2.1 (Linux) ~/.local/share/cura/machines
  • Cura 2.2 (Linux) ~/.local/share/cura/definitions 
  • Cura 2.1 (OSX) ~/.cura/machines for 2.1 or ~/Library/Application Support/cura/definitions
  • Cura 2.1 (Windows) ~/AppData/Local/cura/machines
  • Cura 2.2 (Windows) ~/AppData/Local/cura/definitions for 2.2 
Due to bug #850, you need to copy the fdmprinter.json, Ultimaker2.json and other files you inherit from into the same directory.

You can also add additional materials (use the existing materials in Cura 2.1.2.app/Contents/Resources/cura/resources/profiles/materials as a reference) to
~/.cura/profiles/materials (OSX)
but be careful, the file structure is identical to the MATERIALS.txt that the firmware imports from an SD card but the property and section names inside are different. Strange design decision.

Ultimaker II attachment

mechanical

It looks like self adhesive Velcro is the best option to attach the box to the back of your Ultimaker II.

Electrical


Having a Raspberry Pi permanently connected to your printer, that has ample 5V and 12V, it is kind of silly to power it via a separate wall wart. So we should see about powering it from the Ultimaker.

Settings

g-code for "after pause"
G91 ;relative positioning
G1 E-25 F200 ;retract the filament before lifting the nozzle, to release some of the pressure
G1 Z20 F15000 ;move the platform down 20mm
G90 ;absolute positioning
G0 X20 Y20 ;bring extruder to the front
g-code for "resume after pause":
G91 ;relative positioning
G92 E0 ;zero the extruded length
G1 F200 E55 ;extrude 55mm of feed stock
G92 E0 ;zero the extruded length again
G1 Z-20 F15000 ;move the platform up 20mm again
G90  ;back to absolute positioning
G1 F600 ; set travel speed

Links:

Keine Kommentare: