I’ve spent a lot of time recently trying to improve the speed and quality of my vcore core xy printer recently and much of that time has been spent measuring and improving resonance. To keep things short, I found that using an accelerometer, whether on the print head, nozzle, frame or bed, did not give me the full picture when using klipper’s built-in resonance test. I would run the test and see one thing on the PSD charts generated and then I would print the resonance test print and see ringing at a different frequency entirely. Specifically, throughout printhead changes I would get varying frequency peaks for both X and Y axes when looking at the frequency response, but I had a fairly consistent ringing at about 50 Hz. So I found that the frequency sweep done by the resonance test was incapable of exciting this resonance that I saw in actual prints.
I do have a solution although it’s a rough workaround method right now. I’m sure someone else could easily work this into a klipper script but I’m not familiar with python and pretty much a noob when it comes to doing anything on raspi. I’ll include the specific instructions to do the test but the gist of it is I move the print head in a square pattern with high acceleration at the corners which is basically an impulse input. This excites the full range of frequencies seen when actually printing. I measure this for 1-2 minutes and do the post processing with klipper’s graphing script. I think duet users had a similar way of measuring resonances for some time but it used single impulse movements instead of continuous. This also allows for capturing acceleration data in both axes when moving in both axes which I believe gives better data for actual prints.
To run test:
• Attach accelerometer to nozzle, print head, frame or bed. Results will vary based on location.
Be careful to make sure the wiring to the adxl is long enough and secure if attached to print head.
• Print large cube in vase mode with low layer height at high speed and acceleration.
• Recommend 20k accel, 10k accel-decel, 120mm/s and 120mm square.
• Using other values may not give usable results.
• This can be done without actually extruding. Set nozzle temp to 40-50C, bed to 0, and take out filament.
• Min extrusion temp in config file will have to eb reduced to below the nozzle temp or you will get an error.
• Make sure fans are off and no extra sources of noise are present.
• Make sure to turn off pressure advance and input shaping before beginning:
SET_PRESSURE_ADVANCE ADVANCE=0
SET_INPUT_SHAPER SHAPER_FREQ_X=0 SHAPER_FREQ_Y=0
• When started, use the command below to start collection and then stop 2min later:
ACCELEROMETER_MEASURE
• Then use klipper scripts to process data into graphs. You will need to ssh into the pi using a client like putty. Past the script command and enter.
• In the kliper console, a /tmp/ file will be created after the measurement. Copy paste that into the script command below.
• Also make sure to change the output file name when doing multiple tests.
• The second script is for plotting a spectrogram.
~/klipper/scripts/graph_accelerometer.py /tmp/adxl345-paste_your_file_name_here.csv -o /tmp/output_file_name.png -a x
~/klipper/scripts/graph_accelerometer.py /tmp/adxl345- paste_your_file_name_here.csv -s -o /tmp/output_file_name2.png
• Once completed, the graphs can be viewed by downloading the files to your computer via winscp or another ssh based client gui.
I’m not necessarily saying this should replace the frequency sweep method. I think that will work in a wide range of circumstances and I don’t think my method would be beneficial to bed slingers, but I think it is very important for high performance core-xy printers. From asking around, I found that many others didn’t realize the current resonance test doesn’t fully characterize the system’s mechanical response when printing. I think for many, the print head isn’t all that rigid and cheap rails have slop so they’re not at the speed and acceleration levels where the frame, motor and other sources of resonance come in.