Scripts for measuring and displaying thermal behavior on Voron 3D printers

Overview

Thermal Profiling

Measuring gantry deflection and frame expansion

This script runs a series of defined homing and probing routines designed to characterize how the perceived Z height of the printer changes as the printer frame heats up. It does this by interfacing with the Moonraker API, so you will need to ensure you have Moonraker running.

First, download the script measure_thermal_behavior.py to your printer's Pi. My favorite way to do this is to ssh into the Pi and just clone this git repository:

git clone https://github.com/tanaes/measure_thermal_behavior.git

Edit script for your printer

You'll need to edit the script (please use a vanilla text editer, such as Nano, that doesn't fuck with line endings) to include parameters appropriate for your printer. Please also fill in the META DATA section - this will help us find patterns across printer configurations!

######### META DATA #################
# For data collection organizational purposes
USER_ID = ''            # e.g. Discord handle
PRINTER_MODEL = ''      # e.g. 'voron_v2_350'
HOME_TYPE = ''          # e.g. 'nozzle_pin', 'microswitch_probe', etc.
PROBE_TYPE = ''         # e.g. 'klicky', 'omron', 'bltouch', etc.
X_RAILS = ''            # e.g. '1x_mgn12_front', '2x_mgn9'
BACKERS = ''            # e.g. 'steel_x_y', 'Ti_x-steel_y', 'mgn9_y'
NOTES = ''              # anything note-worthy about this particular run,
                        #     no "=" characters
#####################################

######### CONFIGURATION #############
BASE_URL = 'http://127.0.0.1'       # printer URL (e.g. http://192.168.1.15)
                                    # leave default if running locally
BED_TEMPERATURE = 105               # bed temperature for measurements
HE_TEMPERATURE = 100                # extruder temperature for measurements
MEASURE_INTERVAL = 1
N_SAMPLES = 3
HOT_DURATION = 3                    # time after bed temp reached to continue
                                    # measuring, in hours
COOL_DURATION = 0                   # hours to continue measuring after heaters
                                    # are disabled
SOAK_TIME = 5                       # minutes to wait for bed to heatsoak after reaching temp
MEASURE_GCODE = 'G28 Z'             # G-code called on repeated measurements, single line/macro only
QGL_CMD = "QUAD_GANTRY_LEVEL"       # command for QGL; e.g. "QUAD_GANTRY_LEVEL" or None if no QGL.
MESH_CMD = "BED_MESH_CALIBRATE"

# Full config section name of the frame temperature sensor
FRAME_SENSOR = "temperature_sensor frame"
# chamber thermistor config name. Change to match your own, or "" if none
# will also work with temperature_fan configs
CHAMBER_SENSOR = "temperature_sensor chamber"
# Extra temperature sensors to collect. Use same format as above but seperate
# quoted names with commas (if more than one).
EXTRA_SENSORS = {"frame1": "temperature_sensor frame1",
                 "z_switch": "temperature_sensor z_switch"}

#####################################

Note that if you want to calculate your printers frame expansion coefficient, you will need to include a frame temperature sensor definition.

If you haven't already, copy the modified measure_thermal_behavior.py to the Pi running Klipper/Moonraker.

Modify printer config

You may want to adjust a few elements of your printer configuration to give the most accurate results possible.

In particular, we have found that long/slow bed probing routines can influence results as the bed heats up the gantry extrusion over the course of the mesh probing! This often manifests as an apparent front-to-back slope in the mesh.

For our purposes, a quick probe is usually sufficient. Below are some suggested settings:

[probe]
##  Inductive Probe - If you use this section , please comment the [bltouch] section
##  This probe is not used for Z height, only Quad Gantry Leveling
##  In Z+ position
##  If your probe is NO instead of NC, add change pin to ^PA3
pin: ^PA3
x_offset: 0
y_offset: 18.0
z_offset: 8
speed: 10.0
lift_speed: 10.0
samples: 1
samples_result: median
sample_retract_dist: 1.5
samples_tolerance: 0.05
samples_tolerance_retries: 10


[bed_mesh]
speed: 500
horizontal_move_z: 10
mesh_min: 30,30
mesh_max: 320,320
probe_count: 7,7
mesh_pps: 2,2
relative_reference_index: 24
algorithm: bicubic
bicubic_tension: 0.2
move_check_distance: 3.0
split_delta_z: .010
fade_start: 1.0 
fade_end: 5.0

Adjust printer hardware

There are a couple hardware tips we've found that help to yield repeatable and accurate results.

Make sure nozzle is clean

If you are using a nozzle switch style endstop (as in stock Voron V1/V2), plastic boogers can ruin a profiling run. Make sure it is clean before the run!

Loosen bed screws

We have seen that over-constraint of the bed can severely impact mesh reliability at different temperatures. For optimal results, we suggest only having a single tight bed screw during profiling.

Run data collection

For accurate results, ensure the entire printer is at ambient temp. It can take a couple hours for the frame to cool down completely after a run!

Run the script with Python3:

python3 measure_thermal_behavior.py

You may want to run it using nohup so that closing your ssh connection doesn't kill the process:

nohup python3 measure_thermal_behavior.py > out.txt &

The script will run for about 3 hours. It will home, QGL, home again, then heat the bed up.

While the bed is heating, the toolhead will move up to 80% of maximum Z height. This is to reduce the influence of the bed heater on the X gantry extrusion as much as possible while the bed heats.

Once the bed is at temp, it will take the first mesh. Then it will collect z expansion data once per minute for the next two hours. Finally, it will do one more mesh and then cooldown.

Processing data

The script will write the data to the folder from which it is run.

You have two options to generate plots: run the plotting scripts on the Pi, or run them on your PC.

Running on the RPi

You'll need to install some additional libraries to run the plotting scripts on the Pi. First, use apt-get to install pip for python3 and libatlas, which is a requirement for Numpy:

sudo apt-get update
sudo apt-get install python3-pip
sudo apt-get install libatlas-base-dev

Then, you can use pip via python3 to install the plotting script dependencies using the requirements.txt file from this repository:

python3 -m pip install -r requirements.txt

Finally, to generate the plots, just call:

process_meshes.py thermal_quant_{}.json.

You can include as many json-formatted datafiles as you want as positional arguments.

Running on the PC

To run on your PC, download the thermal_quant_{}.json results file.

The rest is left as an exercise to the reader.

Owner
Jon Sanders
Jon Sanders
Play music on Raspberry Pi Pico Without CPU involvement

MicroPython_PIO_Music_DMA Play music on Raspberry Pi Pico Without CPU involvement This is based on PIOBeep (https://github.com/benevpi/pico_pio_buzz)

3 Nov 27, 2022
A circle of LEDs

This repository contains all the design files, production files and example code for a simple circular LED display.

Pim de Groot 15 Aug 21, 2022
Baseline model for Augmented Home Assistant

Dataset Preparation Step 1. Rename the Virtual-Home output directory to 'vh.[name]', for example: 'vh.door' Make sure the directory contains 100+ fram

Stanford HCI 1 Aug 24, 2022
My self-hosting infrastructure, fully automated from empty disk to operating services

Khue's Homelab Current status: ALPHA This project utilizes Infrastructure as Code to automate provisioning, operating, and updating self-hosted servic

Khue Doan 6.4k Dec 31, 2022
Electrolux Pure i9 robot vacuum integration for Home Assistant.

Home Assistant Pure i9 This repository integrates your Electrolux Pure i9 robot vacuum with the smart home platform Home Assistant. The integration co

Niklas Ekman 15 Dec 22, 2022
A Python class for controlling the Pimoroni RGB Keypad for Raspberry Pi Pico

rgbkeypad A Python class for controlling the Pimoroni RGB Keypad for the Raspberry Pi Pico. Compatible with MicroPython and CircuitPython. keypad = RG

Martin O'Hanlon 43 Nov 11, 2022
Home assiatant Custom component: Camera Archiver

Camera archiver Archive your ftp camera meadia files on other ftp with files renaming and event creation. Event can be used for send information to el

1 Jan 06, 2022
Programmable Rainbow Redstone Computer

Programmable Rainbow Redstone Computer Table of contents What is it? Program flasher How to use it What is it? PRRC is Programmable Rainbow Redstone C

Fern H 2 Jun 07, 2022
gdsfactory is an EDA (electronics design automation) tool to Layout Integrated Circuits.

gdsfactory 3.5.5 gdsfactory is an EDA (electronics design automation) tool to Layout Integrated Circuits. It is build on top of phidl gdspy and klayou

147 Jan 04, 2023
LUNA: a USB multitool & nMigen library

LUNA is a full toolkit for working with USB using FPGA technology; and provides hardware, gateware, and software to enable USB applications.

Great Scott Gadgets 750 Dec 28, 2022
Simple Python script to decode and verify an European Health Certificate QR-code

A simple Python script to decode and verify an European Health Certificate QR-code.

Mathias Panzenböck 61 Oct 05, 2022
Blender Camera Switcher

Blender Camera Switcher A simple camera switcher addon for blender. Useful when use reference image for camera. This addon will automatically fix the

Corgice 1 Jan 31, 2022
智能无人机路径规划仿真系统是一个具有操作控制精细、平台整合性强、全方向模型建立与应用自动化特点的软件

Drone智能无人机路径规划仿真系统是一个具有操作控制精细、平台整合性强、全方向模型建立与应用自动化特点的软件。它以A、B两国在C区开展无人机战争为背景,该系统的核心功能是通过仿真平台规划无人机航线,并进行验证输出,数据可导入真实无人机,使其按照规定路线精准抵达战场任一位置,支持多人多设备编队联合行动。

wwy 349 Jan 03, 2023
Micropython-wifimanager-esp8266 - Simple Wifi Manager for ESP8266 using MicroPython

micropython-wifimanager-esp8266 Simple Wifi Manager for ESP8266 using MicroPytho

Abhinuv Nitin Pitale 1 Jan 04, 2022
Cow Feeder is a bot automatically execute trade on cowswap

Cow Feeder is a bot automatically execute trade on cowswap, includes functions: Monitoring Ethereum network gas price and execute trade whe

6 Apr 20, 2022
Monitor Live USB Plug In & Plug Out Events

I/O - Live USB Monitoring Author: Jonathan Scott @jonathandata1 Date: 3/13/2021 CURRENT VERSION 1.0 This is just a simple bash script that calls a pyt

Jonathan Scott 17 Dec 03, 2022
Shotgrid Toolkit Engine for Gaffer

Shotgun toolkit engine for Gaffer Contact : Diego Garcia Huerta Overview Implementation of a shotgun engine for Gaffer. It supports the classic bootst

Diego Garcia Huerta 12 May 21, 2022
Like htop (CPU and memory usage), but for your case LEDs. 😄

Like htop (CPU and memory usage), but for your case LEDs. 😄

Derek Anderson 3 Dec 08, 2021
Yet another automation project because a smart light is more than just on or off.

Automate home Yet another home automation project because a smart light is more than just on or off. Overview When talking about home automation there

Maja Massarini 62 Oct 10, 2022
Robo Arm :: Rigging is a rigging addon for Blender that helps animating industrial robotic arms.

Robo Arm :: Rigging Robo Arm :: Rigging is a rigging addon for Blender that helps animating industrial robotic arms. It construct serial links(a kind

2 Nov 18, 2021