TEST_RESONANCES on Z-Axis

Hi,

I have been researching for an hour but it seems like you can’t do TEST_RESONANCES on the z-axis? It seems really odd to me because I don’t really see the reason why this should not work. Is it just not implemented yet?
I see that it’s more useful for the X/Y-axis for input shaping, I’m don’t know if this will work on z or if it will be useful. I mean if you are using a bed_mesh profile the z-axis will also have some movement during printing. Bambulab X1C does frequency tests on X,Y and Z on homing, for some reason.

I’m particularly interested on TEST_RESONANCES AXIS=Z because I’m currently running tests for loadcell probing with an underbed loadcell setup, see Strain Gauge/Load Cell based Endstops. We have discovered a frequency on my probe data and I was trying to figure out the resonance frequency of the z-axis to compare it to my data. Getting data on the Z-Axis might improve the probing by adding custom software filters to loadcell_probe. The filter parameters could even be auto-generated doing some math.

I hope this is the correct category to post my question.

1 Like

Is your Z moving that fast that resonances occur?

Not during printing, but as mentioned above, I’m trying to filter out a lot of noise from the loadcell bed probing. That noise comes from different places - electrical and mechanical. If the resonance frequency of the bed is known I might be able to achieve better probing results.

This is an example loadcell probe where the nozzle touches the bed (which is moving).

221313d4ada093ab86792dd54cf868318044914a_2_626x500

Have you tried figuring out which of these are electrical?
I would assume they all are as the moving bed while not contacting the probe should not cause enough vibration to warrant this, whereas stepper currents and bed pwm could easily create enough noise.
Where/how is your loadcell read? How do you create the reference voltage? If you’re going all the way back to your MCU to read the voltage you essentially have a long antenna going from your maimboard all the way to the toolhead and back.
Electrically speaking, how much voltage variation is this and how many units of ADC resolution?

Looking at the graph I don’t understand how that impacts your measurements though, the peak is very prominent and far outdimensions the noise.

Hi,
thanks for your reply. This turns slightly off-topic as it might look like an XY problem type post, but its actually not. It would just have been handy to know the frequency response for research.

Mechanically:
As I mentioned, these are underbed loadcells. I have four half bridge loadcells under the bed, one in each corner. The bed is currently a 355x355x8mm aluminium sheet I just had here. The sensors are between bed and the z-frame that is lifted up and down. The build plate has some some weight and therefore inertia. During acceleration you can measure a force on the load cell. Because the stepper movement is not 100% constant I assume I get the noise of ±40g. You can clearly see a harmonic damped oscillation after the bed hit the nozzle and it stopped.

Electrically; I have made a custom HX717 board inlcuding filter, meaning I have 16 bit, reference voltage is created from the chip itself. This is a prototype, so there are no heaters attached (no bed pwm). The A/B-Stepeprs are much closer to the bed, they do not interfere with my measurements, so I really do not think the z-steppers will.
The HX717-Board is directly mounted on the moving frame of the bed, so the wires to the loadcell are as short as possible. I have used a shielded cable, shield is on one side connected to the negative pole. I have seen the effect of the shield, I got instant less noise.

It works, I think I get reasonable results, but I have to use a rather high trigger force and slow movement. So we are currently experimenting with filtering stuff out and fine tuning.
If you know about the frequency repsonse I might be able to figure out an optimal probing speed, also you could filter out planned acceleration or deceleration and vibrations from z-movement.

But it looks like its not implemented because it’s not really needed yet. I don’t know if it has a great impact on print quality - I just think using bed_mesh or nonplanar you have some z-acceleration going on and a little smoothing might not hurt.

I think Bambulab does a lot of compensation through a bed mesh, i think this might be the reason they also do it on z. They also released a really crazy update where you could fine tune your motors so they are dead silent, barely hearable.

Thank you for your detailed response.

Just to verify it’s strictly mechanical you can obviously add some weight to the bed and see if anything changes.

I don’t know how loadcells are currently implemented (if at all, it is a recent change) but based in the graph itself I see no issue determining nozzle touching, though having to exceed 40 gramms to get a response is quite a lot.

You could further brace the bed to limit vibrations.

I don’t know how bampoo does things, and I’m generally skeptical about their claims. I do not know if they have a loadcell in the hotend as well.

What you could also try, is monitoring the accelerometer on the printhead at the same time, if there is one, and see if contacting the bed, besides the loadcell changes, will introduce changes in the noise of the accelerometer readings (the oscillation of the bed should also transfer to the hotend then) or even angle the hotend enough that it will barely get picked up.
In theory, it could be enough get a z offset by raising the bed while oszillating the printhead sideways in very very miniscule amounts, just to create a vibration as high frequency as possible. As soon as the nozzle touches the bed, some of that vibration will transfer onto the bed, altering the accelerometer measurements.

In either way, after an initial measurement you are best to redo the measurement, but more slowly, to get a more precise reading, as it is done with most probes currently as well.

I would also always keep in mind how accurate and repeatable your results are already (besides probing time needed and avoiding damage to the bed and nozzle), and make sure you’re not optimizing unneccessarily. The best mesh reading you can get is a really fresh one with as little time in between the reading and the printhead laying down filament there as possible.

What you could do is using Klipper’s capability to run raw measurements. Something along the lines of:

  1. Mount the IMU to your bed
  2. Invoke ACCELEROMETER_MEASURE CHIP=... → This will start the raw measurement
  3. Move z as you would for your probing
  4. Invoke ACCELEROMETER_MEASURE CHIP=... NAME=abc → This will write the raw data to the filename abc and stop the measurement
3 Likes