3dSynth

Tutorials / Custom G-code

Open in the interactive tutorials reader

---
title: Tutorial 21 Pressure Advance Intro
description: Compensating for filament elasticity.
---

Tutorial 21 Pressure Advance Intro

1. Lesson Header

2. Concept Introduction

The Spring Effect.
Filament is not rigid like a metal rod. It acts like a spring inside the Bowden tube (or even direct drive).
When the extruder pushes, pressure builds up in the nozzle before plastic comes out.
When the extruder stops, pressure remains, and plastic continues to ooze out.

Result:
- Start of line: Under-extrusion (waiting for pressure).
- End of line: Over-extrusion (pressure release).
- Corners: Bulging (because the nozzle slows down, but pressure is still high).

Pressure Advance (Linear Advance) predicts this. It pushes extra at the start and retracts at the end of a move to keep nozzle pressure constant.

3. Machine State Explanation

M900 (Linear Advance Factor).
- M900 K0: Disabled (Default).
- M900 K0.1: Low compensation (Direct Drive).
- M900 K1.0: High compensation (Bowden).

Note: This feature must be enabled in firmware (LIN_ADVANCE). If your printer doesn't support it, M900 will be ignored.

4. Command Breakdown

5. Minimal Working Example

The Fast Line.
Print a fast line (100mm/s).
Without Pressure Advance: Starts thin, ends fat.
With Pressure Advance: Uniform width.

G28
G1 Z0.2
; Test 1 (No PA)
M900 K0
G1 X100 E5 F6000 ; Fast move!
; Test 2 (With PA)
M900 K0.5
G1 X0 E5 F6000

6. Visual Representation

Interactive preview is available in the interactive reader.

7. Build Exercise

Task: Build a K-Factor Calibration Pattern.
Print parallel lines at different K-values.
Acceleration must be high (e.g., 3000) to see the effect. Slow printing hides pressure issues.

  1. Set Accel M204 S3000.
  2. Move to Start.
  3. Set M900 K0. Print Line.
  4. Move Y+5.
  5. Set M900 K0.2. Print Line.
  6. Repeat up to K2.0.

8. Deep Insight Section

Why do we need high acceleration?
Pressure Advance only kicks in during changes in speed (acceleration/deceleration).
If you print at constant speed (F1000), pressure is constant.
The error happens during the ramp-up and ramp-down.
High acceleration = Short ramp time = High pressure error = Visible need for PA.

9. Common Failure Modes

  1. Extruder Clicking: If K is too high (e.g., K5.0), the extruder will violently jerk back and forth to compensate. This sounds like a machine gun and can strip filament.
  2. Under-extrusion: If K is too high, it might retract so much at the end of a line that the next line starts with an air gap.

10. Real-World Application

Sharp Corners at Speed.
Without PA, you must slow down (Jerk/Accel) to get sharp corners.
With PA, you can print square corners at 100mm/s because the extruder manages the flow dynamics perfectly.

11. Final Clean Version

; Lesson 21 - K-Factor Pattern
G21
G90
M83
G28
G1 Z0.2 F3000

; Set aggressive acceleration
M204 S3000

; --- Line 1 (K0) ---
M900 K0
G1 X50 Y20 ; Start
G1 X150 E5 F4000 ; Fast print
G1 X160 ; Wipe (Travel)

; --- Line 2 (K0.2) ---
M900 K0.2
G1 X50 Y30
G1 X150 E5 F4000
G1 X160

; --- Line 3 (K0.4) ---
M900 K0.4
G1 X50 Y40
G1 X150 E5 F4000
G1 X160

; --- Line 4 (K0.6) ---
M900 K0.6
G1 X50 Y50
G1 X150 E5 F4000
G1 X160

; --- Line 5 (K0.8) ---
M900 K0.8
G1 X50 Y60
G1 X150 E5 F4000
G1 X160

; --- Line 6 (K1.0) ---
M900 K1.0
G1 X50 Y70
G1 X150 E5 F4000
G1 X160

; Reset
M900 K0
M204 S500
G28 X0 Y0

12. Stretch Challenge

Challenge: Write a "Zig-Zag" test.
Instead of straight lines, print a continuous zig-zag path.
Change K every 2 zig-zags.
Observe the corners.
The correct K value will have corners that are neither rounded (bulging) nor missing (gaps).

Answer Key:
Use a loop! (If using macros).
Otherwise copy-paste the Zig-Zag coordinates 5 times, changing M900 in between.
Look for the corner that looks most like a sharp 90-degree turn.