Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] Support for KUSBA accelerometer for Input Shaping on Marlin #4912

Open
JaneX8 opened this issue Nov 28, 2023 · 4 comments
Open

[Request] Support for KUSBA accelerometer for Input Shaping on Marlin #4912

JaneX8 opened this issue Nov 28, 2023 · 4 comments
Labels
plugin idea Idea for a plugin request Feature request

Comments

@JaneX8
Copy link

JaneX8 commented Nov 28, 2023

Is your feature request related to a problem? Please describe.

Not having a reliable, easy to setup accelerometer for doing input shaping measurements on Marlin printers. As discussed here https://3dprinting.stackexchange.com/questions/21660/how-to-physically-wire-a-adxl345-accelerometer-for-input-shaping-resonance-co and on many other sites.

Describe the solution you'd like

https://github.com/xbst/KUSBA is probably the best, most accurate, cheapest, and easy-to-install (plug-and-play) accelerometer. I think such devices could make input shaping easily accessible to most users, even for Marlin, without the need to do test prints. For most users, a USB accelerometer connected to the host is the way to go because no soldering or custom wiring is required for the printer; one simply plugs into the printer host.

It would be great if OctoPrint supports KUSBA natively (in OctoPi) or via a plugin. I think it could be as simple as adding hardware support and having an 'input shaping test' button in the UI, where the test is performed, the graph is shown and the best algorithm is suggested (as explained here https://youtu.be/aHQju3e2guE?si=GUOkMU7BC-XhmNBJ&t=289 for Klipper and supported in Marlin by M493 [S<0|1|10|11|12|13|14|15>]).
Then, send the M593 codes to the printer as documented by Marlin: https://marlinfw.org/docs/gcode/M593.html and the proper algorithm is set using the M493 G-code as documented https://marlinfw.org/docs/gcode/M493.html.

It's also greatly described here: https://www.youtube.com/watch?v=aHQju3e2guE.

Describe alternatives you've considered

Test print, manual. Takes long. Defeats the purpose. Accelerometers are the way to go.

Additional context

Added as an issue for OctoPrint because I believe adding the accelerometer to the host (OctoPi/OctoPrint) is the easiest to achieve. Basic support for Input Shaping in Marlin is enough and already exists. The host (OctoPrint) can simply use the accelerometer to perform a measurement and then to send the proper values to the printer.

@jneilliii
Copy link
Contributor

jneilliii commented Nov 28, 2023

I think I saw someone on the Discord server working on something related to this already maybe. I'm pretty sure it was some kind of accelerometer sensor.

https://discord.com/channels/704958479194128507/708230829050036236/1176630030852444212

@JaneX8
Copy link
Author

JaneX8 commented Nov 30, 2023

Could you share the contents of it? I cannot open the channel and it's also unclear which server it even belongs to.

@jneilliii
Copy link
Contributor

It's the OctoPrint Discord server.

https://discord.octoprint.org/

@rubienr
Copy link

rubienr commented Dec 3, 2023

Hello @JaneX8,

W.r.t. what @jneilliii mentioned, you can find an entry point to the project here: https://github.com/3dp-accelerometer but i fear it is of no help if you want exactly the KUSBA accelerometer supported. However, at the time of writing the plugin is in an very early stage and i wouldn't recommend it for productive use. The 3dp-accelerometer approach is to measure once (probably after service, belt adjustments, etc ...). It does not steadily monitor while printing neither does it automatically find the harmonics (on purpose, since the sensor data may contain unexpected things rather than only vibration from the print-head). For the moment it is limited to printers running Marlin with Input Shaping enabled.

Here is a preview of the current plugin tab in OP:
image

In theory you could install the plugin.zip via the Plugin Maganger + URL but you cannot sample data unless you have the controller + accelerometer. Unfortunately i had no time to implement a fake-controller so far.

Note that the plugin is highly under construction and you might check out a buggy version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin idea Idea for a plugin request Feature request
Projects
Status: Todo
Development

No branches or pull requests

3 participants