<p>Input shaping in 3D printers is typically implemented prior to the actual printing operation, not in real-time. It's based on the known characteristics of the printer rather than dynamic adjustments made during printing. This requires to be set-up and determined before printing. The printer's firmware is where you can define input-shaping.</p>
<h3>3D printer firmware based input shaping</h3>
<p>The resonant frequencies of the printer are determined through test prints and input into the firmware. The firmware then automatically applies the necessary adjustments to the motion commands during the printing process (it reads the G-code and applies the algorithms on motion changes). This is still not real-time adjustment; it's a predefined modification based on the printer's known characteristics.</p>
<h3>Real-time or not?</h3>
<p>Input shaping is not a real-time control system that dynamically adjusts to changing conditions during a print. Instead, it's a method of optimizing the printer's motion commands based on its known mechanical properties and behavior (hardware determined). Why not real-time? Real-time control for input shaping in 3D printing would be complex and would require additional sensors and processing capabilities (controller board). The printer would need to continuously monitor its own vibrations and adjust its movements on the fly, which is not typically feasible with current consumer level 3D printing technology.</p>

CC BY-SA 4.0
2023-11-22T14:56:17.430Z
So, just for my understanding. Even printers that do have an accelerometer for the purpose of input shaping, use it only in a one-time or pre-pint measurement and not real-time? Similar to auto bed leveling action or homing actions? Similarly and in that case, when an accelerometer is available, is it common to include in the top of the gcode an 'input shaping test'?
Bob Ortiz
CC BY-SA 4.0
2023-11-22T19:01:50.337Z
The tests are used to feed the settings to the firmware. Once in the firmware the algorithms work for every print.
0scar
CC BY-SA 4.0
2023-11-22T08:32:09.353Z
2023-11-22T12:48:29.003Z
2023-11-22T12:48:29.003Z
0scar
<p>In addition to my question <a href="https://3dprinting.stackexchange.com/questions/21660/how-to-physically-wire-a-adxl345-accelerometer-for-input-shaping-resonance-co">How to physically wire a (ADXL345) accelerometer for Input Shaping (Resonance Compensation) support on for a Ender 3 V2 printer?</a>.</p>
<p>Does an accelerometer in a Marlin-based Input Shaping setup compensate in real-time (during print) for vibration? Or is it a one time (for example before print) measurement to determine a level of vibration and use that as the compensation scheme during a print, as in &quot;not adapting to unexpected vibration&quot;? Similar to how bed leveling is used.</p>
<p>If it does not do real-time compensation, what is the benefit of having an accelerometer compared to doing Input Shaping test prints instead?</p>

<marlin><input-shaping><resonance-compensation><vibration-compensation>
Does an accelerometer in a Marlin-based Input Shaping setup compensate in real-time (during print) for vibration?
Bob Ortiz
# Does an accelerometer in a Marlin-based Input Shaping setup compensate in real-time (during print) for vibration?

(Asked by: username_0 on 2023-11-21)

In addition to my question [How to physically wire a (ADXL345) accelerometer for Input Shaping (Resonance Compensation) support on for a Ender 3 V2 printer?](https://3dprinting.stackexchange.com/questions/21660/how-to-physically-wire-a-adxl345-accelerometer-for-input-shaping-resonance-co).

Does an accelerometer in a Marlin-based Input Shaping setup compensate in real-time (during print) for vibration? Or is it a one time (for example before print) measurement to determine a level of vibration and use that as the compensation scheme during a print, as in "not adapting to unexpected vibration"? Similar to how bed leveling is used.

If it does not do real-time compensation, what is the benefit of having an accelerometer compared to doing Input Shaping test prints instead?

**Tags:** marlin, input-shaping, resonance-compensation, vibration-compensation

---

## 1 answers

### Answer by username_1 on 2023-11-22. Score: 2 | Accepted answer

Input shaping in 3D printers is typically implemented prior to the actual printing operation, not in real-time. It's based on the known characteristics of the printer rather than dynamic adjustments made during printing. This requires to be set-up and determined before printing. The printer's firmware is where you can define input-shaping.

### 3D printer firmware based input shaping

The resonant frequencies of the printer are determined through test prints and input into the firmware. The firmware then automatically applies the necessary adjustments to the motion commands during the printing process (it reads the G-code and applies the algorithms on motion changes). This is still not real-time adjustment; it's a predefined modification based on the printer's known characteristics.

### Real-time or not?

Input shaping is not a real-time control system that dynamically adjusts to changing conditions during a print. Instead, it's a method of optimizing the printer's motion commands based on its known mechanical properties and behavior (hardware determined). Why not real-time? Real-time control for input shaping in 3D printing would be complex and would require additional sensors and processing capabilities (controller board). The printer would need to continuously monitor its own vibrations and adjust its movements on the fly, which is not typically feasible with current consumer level 3D printing technology.

> **Comments:**
> **username_0**: So, just for my understanding. Even printers that do have an accelerometer for the purpose of input shaping, use it only in a one-time or pre-pint measurement and not real-time? Similar to auto bed leveling action or homing actions? Similarly and in that case, when an accelerometer is available, is it common to include in the top of the gcode an 'input shaping test'?  
> **username_1**: The tests are used to feed the settings to the firmware. Once in the firmware the algorithms work for every print.  

---

