<p>Currently Marlin does not provide a way to get the resonance frequencies by using an accelerometer and possibly never will because of the lack of resources in current printer boards. You can get those values by other medium and save them as Marlin IS parameters. It is possible to estimate the resonance frequencies by test prints.</p>

CC BY-SA 4.0
2023-11-28T07:22:15.993Z
Thank you. I use OctoPrint on a Raspberry Pi (OctoPi), do you know if there is a way to hook up the accelerometer to the Pi instead and 'calibrate' and send the values to the printer from OctoPi?
Bob Ortiz
CC BY-SA 4.0
2023-11-28T07:37:07.037Z
Basically what they also discuss here: https://community.octoprint.org/t/accelerometer-resonance-testing/51470
Bob Ortiz
CC BY-SA 4.0
2023-11-28T08:20:03.790Z
Ideally using KUSBA v2 via USB to Raspberry Pi (OctoPi). https://github.com/xbst/KUSBA
Bob Ortiz
CC BY-SA 4.0
2023-11-28T01:23:28.260Z
2023-11-28T01:23:28.260Z
Miguel Risco-Castillo
<p>I'm looking into Input Shaping (Resonance Compensation) to compensate for vibration on an Ender 3 V2. I found the &quot;Official Creality G-Sensor ADXL345 Vibration Compensation Sensor for Sonic Pad 3D Printed Smart Pad&quot; which I guess, unlike the name suggests, can work on more than just the Sonic Pad.</p>
<p><a href="https://i.sstatic.net/l48Mas.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/l48Mas.png" alt="Official Creality G-Sensor ADXL345 Vibration Compensation Sensor for Sonic Pad 3D Printed Smart Pad" /></a></p>
<p>I have a fairly stock Creality Ender 3 V2 printer running the Marlin based mriscoc firmware. Marlin Firmware supports <a href="https://marlinfw.org/docs/gcode/M593.html" rel="nofollow noreferrer">Input Shaping (M593)</a> and so does the <a href="https://github.com/mriscoc/Ender3V2S1/wiki/Input-Shaping-(IS)" rel="nofollow noreferrer">mriscoc firmware</a>.</p>
<p>The Marlin documentation states:</p>
<blockquote>
<p>It’s not always easy to attach an accelerometer to most printer boards, so Marlin doesn’t provide accelerator-based tuning. If you have that information you can use it.</p>
</blockquote>
<p>The mriscoc firmware documentation, which is specifically for Ender 3 V2 and Marlin based, states:</p>
<blockquote>
<p>The IS parameters are the resonance frequencies of your printer’s X and Y axes, which <strong>can be measured using an accelerometer</strong> or a test print</p>
</blockquote>
<p>I'm thinking to buy the bare ADXL345 accelerometer. Is it possible to wire this up, and if so, how do I wire this accelerometer to my 4.2.2 board? I guess I can than continue by simply flashing the IS enabled firmware of mriscoc to get it supported in the firmware.</p>

<creality-ender-3><input-shaping><resonance-compensation><mriscoc><vibration-compensation>
How to physically wire a (ADXL345) accelerometer for Input Shaping (Resonance Compensation) support on for a Ender 3 V2 printer?
Bob Ortiz
# How to physically wire a (ADXL345) accelerometer for Input Shaping (Resonance Compensation) support on for a Ender 3 V2 printer?

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

I'm looking into Input Shaping (Resonance Compensation) to compensate for vibration on an Ender 3 V2. I found the "Official Creality G-Sensor ADXL345 Vibration Compensation Sensor for Sonic Pad 3D Printed Smart Pad" which I guess, unlike the name suggests, can work on more than just the Sonic Pad.

[![Official Creality G-Sensor ADXL345 Vibration Compensation Sensor for Sonic Pad 3D Printed Smart Pad](https://i.sstatic.net/l48Mas.png)](https://i.sstatic.net/l48Mas.png)

I have a fairly stock Creality Ender 3 V2 printer running the Marlin based mriscoc firmware. Marlin Firmware supports [Input Shaping (M593)](https://marlinfw.org/docs/gcode/M593.html) and so does the [mriscoc firmware](https://github.com/mriscoc/Ender3V2S1/wiki/Input-Shaping-(IS)).

The Marlin documentation states:

> It’s not always easy to attach an accelerometer to most printer boards, so Marlin doesn’t provide accelerator-based tuning. If you have that information you can use it.

The mriscoc firmware documentation, which is specifically for Ender 3 V2 and Marlin based, states:

> The IS parameters are the resonance frequencies of your printer’s X and Y axes, which **can be measured using an accelerometer** or a test print

I'm thinking to buy the bare ADXL345 accelerometer. Is it possible to wire this up, and if so, how do I wire this accelerometer to my 4.2.2 board? I guess I can than continue by simply flashing the IS enabled firmware of mriscoc to get it supported in the firmware.

**Tags:** creality-ender-3, input-shaping, resonance-compensation, mriscoc, vibration-compensation

---

## 1 answers

### Answer by username_1 on 2023-11-28. Score: 1 | Accepted answer

Currently Marlin does not provide a way to get the resonance frequencies by using an accelerometer and possibly never will because of the lack of resources in current printer boards. You can get those values by other medium and save them as Marlin IS parameters. It is possible to estimate the resonance frequencies by test prints.

> **Comments:**
> **username_0**: Thank you. I use OctoPrint on a Raspberry Pi (OctoPi), do you know if there is a way to hook up the accelerometer to the Pi instead and 'calibrate' and send the values to the printer from OctoPi?  
> **username_0**: Basically what they also discuss here: https://community.octoprint.org/t/accelerometer-resonance-testing/51470  
> **username_0**: Ideally using KUSBA v2 via USB to Raspberry Pi (OctoPi). https://github.com/xbst/KUSBA  

---

