# Move exceeds maximum extrusion (AA mm^2 vs BB mm^2)

**URL:** <https://klipper.discourse.group/t/move-exceeds-maximum-extrusion-aa-mm-2-vs-bb-mm-2/6636>\
**Category:** Knowledge Base\
**Created:** [February 13, 2023, 11:18am UTC](https://klipper.discourse.group/t/move-exceeds-maximum-extrusion-aa-mm-2-vs-bb-mm-2/6636 "2023-02-13T11:18:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [February 13, 2023, 11:18am UTC](https://klipper.discourse.group/t/move-exceeds-maximum-extrusion-aa-mm-2-vs-bb-mm-2/6636/1 "2023-02-13T11:18:27Z")

</div>

## Move exceeds maximum extrusion (AA mm^2 vs BB mm^2)

### Background

Klipper has a safety mechanism that checks if a single move extrudes an unhealthy amount of filament or if the extrusion of multiple moves add up to such an amount.

This limit is calculated according to following formula:  
`Maximum Extrusion = 4.0 x Nozzle_Diameter^2 = 4.0 x 0.4^2 = 0.640 mm²`

For the standard 0.4 mm nozzle the default values calculates to:  
`Maximum Extrusion = 4.0 x 0.4^2 = 0.640 mm²`

### Reasons

- Misplaced `M83` (Relative Extrusion). This by far the most common reason
- Too extreme prime lines, e.g. high `E` values across a short movement
- Too extreme purge settings during filament change
- Weird Slicer settings affecting the extrusion or flow rate
- Mismatching extrusion modes (absolute / relative) between slicer and Klipper
- Changed nozzle for a higher diameter but not adapting the configuration

### Potential solutions

- Usually working with `M82` (Absolute Extrusion) is preferred
  - Check start-gcode, start macro etc. for `M83` commands and remove them
  - Check slicer setting and verify that the slicer is set to absolute extrusion

- Check prime line / purge gcode if a high volume is extruded over a short distance
- Check for slicer settings that may affect the extrusion logic
- Check the `printer.cfg` if the `nozzle_diameter` setting is correct
- Cranking up the `max_extrude_cross_section` setting in `[extruder]` section is **not** a solution. The underlying problem may cause issues later

### Additional Background

If there is interest, how for example a prime line is calculated in the context of this error message, this is the math:

#### Input Parameters

- Nozzle Diameter: 0.4 mm
- Filament Diameter: 1.75 mm
- Extrusion Width: 0.48 mm
- Layer Height: 0.2 mm
- Print Speed: 80 mm/s
- Extruded Length: 15 mm
- Movement Length: 30 mm

#### Calculation

`max_extrude_cross_section [mm²] = 4.0 x Nozzle_Diameter^2 = 4.0 x 0.4^2 = 0.640 mm²`

`Extruded_Volume [mm³] = Extruded_Length [mm] x (Filament_Diameter [mm] / 2)^2 x Pi = 15 mm x (1.75 mm / 2)^2 x 3.14 = 36.1 mm³`

`Actual_Extruded_Cross_Section [mm²] = Extruded_Volume [mm³] / Movement_Length [mm] = 36.1 mm³ / 30 mm = 1.2 mm²`

- If one single gcode command (e.g. starting at X=0 / Y=0: `G1 X0 Y30.0 Z0.3 F1500.0 E15`), would request a movement of 30 mm while trying to extrude 15 mm filament (gcode: `E15`) it would result in a `Actual_Extruded_Cross_Section` of 1.2 mm²
- Klipper would react with an error message saying `Move exceeds maximum extrusion (1.2mm^2 vs 0.640mm^2)`
- To solve the issue, either the `Movement_Length` needs to be increased by a factor of 1.875 to minimum 56,25 mm or the `Extruded_Length` decreased by the same factor to `E8`
