I need to look into vibration making code for my stepper vibro project.
I tried some libs for arduino but they are very slow.
My 3d printer Input Shaping calibration does it perfectly. Up to 100Hz
Point me where to look, please!
# A utility class to test resonances of the printer
#
# Copyright (C) 2020-2024 Dmitry Butyugin <dmbutyugin@google.com>
#
# This file may be distributed under the terms of the GNU GPLv3 license.
import logging, math, os, time
from . import shaper_calibrate
class TestAxis:
def __init__(self, axis=None, vib_dir=None):
if axis is None:
self._name = "axis=%.3f,%.3f" % (vib_dir[0], vib_dir[1])
else:
self._name = axis
if vib_dir is None:
self._vib_dir = (1., 0.) if axis == 'x' else (0., 1.)
else:
s = math.sqrt(sum([d*d for d in vib_dir]))
self._vib_dir = [d / s for d in vib_dir]
def matches(self, chip_axis):
This file has been truncated. show original
You can start there.
Hope that helps.