• printHAT

    • explore
    • buy

  • Prerequisites
  • Setup wi-fi
  • Initialize printHAT
  • Connect the printer
  • Connect to OctoPrint
  • Klipper configuration
  • Cartesian config file
  • Delta config file
  • Apply Changes
  • OctoPrint configuration
  • Advanced settings
  • How to update

Make sure to check out our YouTube channel where you can find tutorials to guide you trough the process! Let’s start now, what you need:

  1. printHAT control board
  2. Raspberry Pi 0/1/2/3 (RPi 2/3 are recommended for a smooth user experience)
  3. (micro) SD card, at least 8GB

Download the SD image from here and use Etcher to flash the image onto the the SD card as recommended on the Official Raspberry Pi documentation. In short:

  1. Download Etcher and install it.
  2. Insert your SD card
  3. Open Etcher and select from your hard drive the Wrecklab .img file you want to write on the SD card.
  4. Select your SD card
  5. Review your selections and click ‘Flash!’ to begin writing data to the SD card.

If you would like to configure the Raspberry PI to connect to your wi-fi, this is the right time to do it.

Etcher automatically disconnect the media after it’s been flashed, therefore you should disconnect and reconnect the SD card reader and then do the following:

## WPA/WPA2 secured
network = {
ssid="put SSID here"
psk="put password here"
}
  1. Open the removable drive named “boot”
  2. Open the file “octopi-wpa-supplicant.txt” with a text editor
  3. Replace YOURSSID with the name of your wi-fi network
  4. Replace YOURPASSWORD with your wi-fi password
  5. Make sure the lines are uncommented (remove the ‘#’ symbol in front) as shown in the picture

printHAT and Raspberry Pi alignment
Spacers mounting
Boot jumper location

During the first boot the printHAT image takes care of installing all the required software. Connect the printHAT to the Raspberry Pi following the procedure:

  1. Connect the board making sure that the printHAT connector is aligned with the right end of the Raspberry Pi header (see picture)
  2. Mount the spacers as shown on the picture
  3. Mount the jumper on the BOOT pins
  4. Power the Raspberry PI via the Micro USB port with a suitable power supply
  5. The initialization starts automatically and it takes a couple of minutes.
  6. Upon completion the Raspberry Pi goes into shutdown and the ACT led stops blinking. Now it’s possible to power off the Raspberry Pi.
  7. Remove the BOOT jumper

Next, install the printHAT and the Raspberry Pi on your 3D printer and connect the cables according to the diagram below. The mating connectors are on the datasheet

Cartesian printer connection diagram
Delta printer connection diagram
Microcontroller pin names

You can use the original Wrecklab enclosure. Download it for free from our GitHub.

The printHAT can be connected to your home network via Wi-Fi or LAN. If there’s no network available the Raspberry Pi will generate its own hot-spot.

Install “Bonjour” to be able to easily find your Octoprint instance without having to remember the IP address.

On Linux and Mac OS the Bonjour software is already integrated. Windows users need to download and install it from here. More information can be found at this link.


Wifi or Ethernet

If the wi-fi details have been entered in the wpa-supplicant or the Raspberry Pi has been connected with an Ethernet cable, then it can be reached via http://octopi.local/

Hot-spot

The Rasperry Pi creates its own hot-spot when it doesn’t find the wi-fi network configured or when there’s no configuration. The 2.4 Ghz wireless network has the following characteristics:

SSID: OctoHotspot
Password: 1234567890

Once you are connected to it you can reach Octoprint via http://octopi.local/

Klipper comes pre-configured to control a cartesian printer. The configuration can be changed via the Octoprint interface as follow:

  1. Connect to Octoprint via http://octopi.local/
  2. Click the settings button
  3. Click on the “OctoKlipper” plugin
  4. Click on the “Klipper Configuration” Tab

The “printer.cfg” file, where the configuration parameters are stored, can be edited manually or copy/pasting the content of one of the available templates.

Configuration file

The configuration file contains few sections that need to be updated. Some sections are general and are described described below.
Some others are specific to a your 3D printer architecture and are described in the next steps (pick the one that matches your printer type)

Extruder

The extruder section contains also some basic parameters to be configured:

  1. step_distance: defines the length in mm of a single step. If you are unsure check the Klipper FAQ
  2. nozzle_diameter: Diameter of the nozzle orifice (in mm)
  3. filament_diameter: The nominal diameter of the raw filament (in mm) as it enters the extruder
  4. sensor_type: Type of sensor – this may be “EPCOS 100K B57560G104F”, “ATC Semitec 104GT-2”, “NTC 100K beta 3950”, “Honeywell 100K 135-104LAG-J01”, “NTC 100K MGB18-104F39050L32”, “AD595”, “PT100″, INA826”, “MAX6675”, “MAX31855”, “MAX31856”, or “MAX31865”.
[extruder]
step_distance: .0022
nozzle_diameter: 0.400
filament_diameter: 1.750
sensor_type: ATC Semitec 104GT-2

Optional: Heated bed

Should you have a heated bed on your machine, then the following section should be added to your configuration file. Make sure the sensor type matches the temperature sensor you have on your bed.

[heater_bed]
heater_pin: !PA0
sensor_type: ATC Semitec 104GT-2
sensor_pin: PB0
pullup_resistor: 10000
control: watermark
min_temp: 0
max_temp: 120

The [stepper] sections requires the following parameters to be set:

  1. step_distance: defines the length in mm of a single step. If you are unsure check the Klipper FAQ
  2. position_endstop: Location of the endstop (in mm)
  3. position_max : Maximum valid distance (in mm) the user may command the stepper to move to
  4. dir_pin: Specifies the stepper direction. The direction can be inverted adding “!” in front of the pin name. For instance, stepper_a is inverted by configuring the dir_pin to !PA6
[stepper_x]
step_distance: .0125
position_endstop: 0
position_max: 200
dir_pin: PA6

[stepper_y]
step_distance: .0125
position_endstop: 0
position_max: 200
dir_pin: PA15

[stepper_z]
step_distance: .000625
position_endstop: 0
position_max: 200
dir_pin: PC8

The [printer] section that you will find in your configuration file if you have selected the cartesian file. The default values should work on every machine, but can very well be adjusted:

  1. max_velocity, max_accel: define the performance of the X and Y moves (in mm/s and mm/s2)
  2. max_z_velocity, max_z_accel: define the performance of the Z moves (in mm/s and mm/s2)
[printer]
kinematics: cartesian
max_velocity: 500
max_accel: 1000
max_z_velocity: 25
max_z_accel: 30

The [stepper] sections requires the following parameters to be set:

  1. step_distance: defines the length in mm of a single step. If you are unsure check the Klipper FAQ
  2. position_endstop: distance (in mm) between the nozzle and the bed when the nozzle is centred and touching the bed
  3. arm_length: length (in mm) of the diagonal rod that connects this tower to the print head.
  4. dir_pin: Specifies the stepper direction. The stepper motors direction depends on your printer configuration. The direction can be inverted adding “!” in front of the pin name. For instance, stepper_a is inverted by configuring the dir_pin to !PA6
[stepper_a]
step_distance: .0125
position_endstop: 297.05
arm_length: 333.0
dir_pin: PA6

[stepper_b]
step_distance: .0125
position_endstop: 297.05
arm_length: 333.0
dir_pin: PA15

[stepper_c]
step_distance: .0125
position_endstop: 297.05
arm_length: 333.0
dir_pin: PC8

The [printer] section that you will find in your configuration file if you have selected the Delta file. The default values should work on every machine, but delta_radius shall be updated to the one of your machine.

  1. max_velocity, max_accel: define the performance of the X and Y moves (in mm/s and mm/s2)
  2. max_z_velocity: define the performance of the Z moves (in mm/s)
  3. delta_radius: projection of the diagonal rod onto the XY plane, when the effector is centred (in mm)
[printer]
kinematics: delta
max_velocity: 300
max_accel: 3000
max_z_velocity: 150

delta_radius: 174.75

Once all the changes have been made Klipper needs to be restarted. This can be done from the web interface in the Klipper tab:

  1. Start by restarting the “Firmware” first and then restart the “Host”.
  2. If everything worked well you should get the message “Klipper state: Ready”. You can also probe the status by clicking the “Get Status” button.

When the printer is up and running it is advisable to run through the Klipper configuration check-list

Once Klipper has been configured correctly the Octoprint printer profile needs to be adjusted accordingly. You can do so in the “Printer Profile” section of Octoprint settings.

The Klipper Wiki is the starting point to learn about all the Klipper functionalities and advanced features: Wiki

Morover, here are some resources we found useful:

  1. All the extended functionalities are documented in the example-extras.cfg and they can be added to the configuration file.
  2. List of Klipper supported commands and G-CODES: G-Codes
  3. Klipper implements the “End stop phase detection” which greatly improves the accuracy of the end stop switches. This aspect is very critical for Delta printers to achieve consistent first layers. The functionality is documented in the Klipper Wiki: Endstop_Phase
  4. Klipper implements a Delta Calibration Procedure which is documented here
  5. Klipper implements a Bed Levelling Procedure which is documented here
  6. The printHAT is designed to support Sensorless homing. If you are willing to activate it follow the instructions on the wiki page.We do not reccomend to use it on Delta printers due to the lower accuracy compared to regular end-stop switches.

There are essentially two ways of updating the control software on your printHAT:

  1. Flash the updated image and repeat the initialisation procedure
  2. Pull the latest version from the Klipper repository and flash the printHAT with the new firmware

The first option is simpler and safer, since we test the Klipper release when we build the image


Update via the Wrecklab image

Before flashing the new image, you should save your configuration file. Using the Octoklipper interface copy the content and save it on your PC to be able to restore it later. The software can be updated by flashing the SD card with latest image and following the steps described in the “Initialize printHAT” tab.

Update via the klipper repository

If you wish to update the software by pulling the latest version from the klipper repository, be aware that there might regressions or bugs which could affect, or even damage, the board.

The klipper repository in the Wrecklab image points directly at the official Klipper repository. Therefore, it is sufficient to follow these steps:

  1. Use SSH to connect to your Raspberry Pi (Windows, Linux/Mac)
  2. Login with the standard Pi credentials (username: pi, password: raspberry)
  3. Navigate to the klipper folder
  4. Pull the latest version: git pull
  5. Create the firstrun file: sudo touch /boot/firstrun

At this point you already have the latest version of klipper and you just need to reflash the microcontroller. It is sufficient to shut the printer down and follow the steps described in the “Initialize printHAT” tab.

×