-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
On the March branch enabling Input shaping makes steppers noisy #27
Comments
hm I will look into what differences may have caused this. otherwise just input shaping enabled? have you tried changing the values associated with input shaping? I may make a new branch with changes, TBA |
I just made a branch @oloendithas let me know if you still experience this issue, or any differences. or if you have any ideas what may need to be changed. I'll continue to look into this. |
I since updated the March branch to the current Marlin, see if that has helped. if you can post your config files or changes made ill see if I can duplicate and find what the issue is. if you like you can upload your workspace to a repository to make it easier to look it over. as for the so you had no issue with the steppers using the Feb branch? ill compare the file changes related to them and post them in that new IS-steppers-noisy branch. if you can upload or attach your config files and any other changes ill try to get this fixed. |
ok i uploaded the changes to the |
check out the new 2023-March_ branch. So i tried it out and haven't had any issues. I have yet to try input shaping enabled so I cant comment yet, but I have noticed something. I recently got myself an aftermarket stepper motor, upon plugging it in it started making a weird grinding noise. all the other steppers work fine. I swapped the two inside wires of the connector and it started working like normal. then when i plugged the old stepper in that one started making a grinding noise. it appears some steppers are made differently than others. this may be a cause of issue. otherwise if it does continue and is software related, my only guess is could do with timing. |
from this open Issue in MarlinFirmware/Marlin
Mr. Marlin himself @thinkyhead posted this great reply as to finding a fix for this kind of issue. if anyone needs experiences the issue and needs help with what to do next please let us know and make your replies here. |
Hi,
Tried it now and yes? I was able to build and run it. Now the stepper's noise is gone. But I wasn't able to connect OctoPrint on 250K as usually.
Tried to build this one and found out that the N32F103RET6 section is gone from the stm32f1-maple.ini. Added it manually and built. Though, this time could not connect OctoPrint on any baud rate.
Yeap, rolling back commits one by one - is a good idea for debugging this) |
I've spent almost a whole day trying to manually flash a firmware bypassing the bootloader. |
as for the encoder being reversed that may be my fault having different configuration.h files of different boards I was testing. that is good to hear the stepper noise is gone away, however im not sure at the moment which exact parameter change caused it, ill look into it. what had happened to me was I installed an aftermarket stepper motor, and immediately got noisy. it did not sound good at all and did not work at all, just grinding noise. so I swapped the inner two pins on the 6pin connector (only 4 are used) and the motor started working normal again. this led me to believe was Marlin software designed for specific stepper motors to be wired that way? or was it just this specific brand of motor which had the 2 wires backwards and not the fault of the firmware? it seems as though the noisy motors happens sometimes and not for every board because I haven't had this issue using the creality 4.2.7. and for my G32 I test with, i haven't always been able to reproduce. as for your ST-Link, what are you trying to do? are you not able to flash firmware on the board through the SD card slot? I have one of those the STLINK v2, and was able to connect my board using the 4 pinout by the display port connector on the board. to upload, in the .ini file look for or what is it you are trying to do? |
Yes, if you swap polarity, the motor will just shake and scream) I guess, this is between the motor's and the driver's pins correlation. The noise I've faced was much like the one I had when first attached the 3D Touch sensor and was trying to make it work: the noise comes from all three motors, but they able to move. It's some kind of vibration.
No-no, flashing from SD card is just fine. I just wanted to override that 228KB limit.
Oh! Didn't know that. Will definitely try. Thanks for the clue! Should I walk through some boot switching procedure or just unplug the power cable, connect that SWD and use that PlatformIO Upolad? |
im not so sure if that would be such a good idea, technically i think you would connect the pins and either VCC or GND can be left unplugged, im not sure the exact details, however I would stick with the normal SD card way of flashing. because yeah the mainboard chips are limited 256k, and you could technically bypass the bootloader and flash directly with stlink or whatever, I would really advise you do not and just flash using the normal micro SD and .bin file. I uploaded some prerelease if you wanted to check it out here its updated to the most recent Marlin and should work fine. this is the 2023-April branch. let me know if u use it and if the steppers are still an issue. otherwise what worked fine before? Alex's firmware on his repo? i might take some of those values of parameters and use them with the newer build. |
Isn't STM32F103RET and it's clone N32G452 have 512k of flash?
Oh, yeap, already tried that from b19c0cb Update 4/15 - config files and got steppers noise. But this time it was different: noise only on acceleration/deceleration and as if the pulley gears are skipping teethes. |
update : I uploaded the |
Hi, Andrew. Thanks for not giving up on me! |
OK thank you for trying. I made one change which I believe should work. you will see I set |
Hi/ Just got my hands to try this and sadly it's still the same issue. Really want to update and get all the latest goodies. Is there any thing I can do to help you to debug this? Maybe you can provide me some list of options/changes/patches to try in combinations? |
hey, I uploaded a recent release with the newest Marlin updates. I tested it for myself and can't seem to recreate any issue with the stepper motors. have you tried the most recent firmware release? the most updated branch is 2023-May. everything is working fine on my end, that is with GD32 board and Creality 427. I haven't heard back of any issues, perhaps this can be N32 specific? the main difference for N32 is in this file Marlin/src/HAL/STM32F1/HAL.cpp the ini file enables DVOXELAB_N32 and the following code after line 392. it could be that because of the updates to Marlin and the rest of the HAL, that this portion needs to be updated as well? I'm not sure where this source code is, I copied it from Alex's since this is the only thing different when compiling for N32. if you're compiling your own what you can try doing, is delete the downloaded library folders. in Windows, if that's what you're using, I think they are in C:/Users/<User_Name>/.platformio/packages/ before u do that have you tried the firmware I compiled and released? https://github.com/classicrocker883/MriscocProUI/releases/tag/2.1.3c1 |
Forgot to mention, yes, I tried that one also and it also gives me that issue.
I remember that huge block of custom code. Maybe you could give me a clue, what word pay attention to? Finally managed to record a video of the noise.
Yeap, tried N32_UBL-7x7-NoPro-IS-MPC.bin. No luck. |
I'll try to help you out my friend, but I really don't think this has to be an issue with the firmware. Im asking someone who had N32 to look at the video if they also have that. what I'm thinking is a couple things... first is the acceleration. have you changed the Max default acceleration in the settings? ti's in the Control/Motion menu. I believe you can enter a command, and M503 will view all the settings. second, is the belt fine? that can also cause a noise - which you can turn it around incase the gears strip the belt. or is the motor all good? have you tried swapping? because this is only with the X axis? or also Y or Z? so I would increase the acceleration in the settings and see if that works, because if the settings are low and you're moving it faster, maybe it's not keeping up and that's why it makes the noise. I think I mentioned this before, but I had a similar issue with the same kind of noise when I swapped my motor for aftermarket, swapping the two inner pins fixed that. but it would always make the sound no matter what, it's because it was wired differently. I'll look back though the code anyway and see if there is updates, but I'll let u know if other N32 printers have this. |
Do those people use Input Shaping? This issue appears only with it enabled. Acceleration? Yes, I set it to 1500. But I'm using it on the February build with IS and it running fine. But I'll try to play with acceleration and maybe jerk on the new build.
Belts and motors completely are fine with your February branch with IS on. I doubt, this could be a pure mechanical issue. On your February branch I can go really high speeds and was running acceleration 3000 for some time, but not happy with the quality.
Yes, I remember you mentioned that, but when I have messed with pins once, the motor just blocked and produced some shaking noise, not like the pulley spinning of the belt. Actually, it looks like on acceleration/deceleration motor spins faster than no movement, and because of that skipping teethes. |
the skipping of teeth had me thinking that was cause the motor noise. so I asked the other person with N32 they said it is silent, but I forgot to mention the Input Shaping, I don't think they have IS enabled. so I'll try to recreate the same code with mine even though it's not N32. and I wonder why the Feb branch is silent but it gives less quality? I do know input shaping is relativity new and there are always updates to the code. for now I want to say if anyone wants to use it with this firmware, there may be a limit. So just to make sure I understand, to print at faster speeds, acceleration and jerk have to be increased. but when those increase, ringing can occur in the parts printed. Input shaping helps counter the frequency of the shaking of the printer at the speeds. for you, the noise it makes happens at these higher speeds. what would benefit everyone is if you are able to find the point where this happens so I can then pass that information on like in a README or something. most of us don't usually print at high speeds anyway, so I'm wondering what mm/s are you printing at? and say you print at slow speeds but have high acceleration, does the sound happen? or vice versa, if u try to print at high speed with low acceleration, does the sound happen? I know it may be a lot to do, but if you are around doing testing this is good information to record. or if there are any other things to test? I also wonder - does having different frequencies in settings have an effect? I'm not all that familiar with input shaping, I'd like to try it out when I figure out how and what I may need to get it working. but say I dont try any of that, would I be able to recreate the sound issue if I do a fresh install with IS enabled? or is the calibration required? |
on more thing I just realized.. your voltage reference, vref. have you adjusted that or increased it? |
So I've made some investigations and results are surprising and sad.
Even more (and even worse), I decided to give up on IS in a benefit of all new goodies and build a version without IS. So the conclusion is that the issue is more pronounced with IS on, but it's still here even without the IS.
Yes, I have changed the Amps in the configuration-adv according to motors' specs, and tuned vref (and retuned again now) to find points of leas vibration. |
I uploaded https://github.com/classicrocker883/Marlin/tree/bugfix-2.1.x-N32 which is Marlin bugfix with N32 support. I haven't touched anything else. you can use DWIN_LCD_PROUI or JyersUI and see if you still experience the issue. if you do at all then its to do with the Marlin firmware itself. let me know how it goes, you should be able to copy paste your configurations, just beaware the backlight_timeout_mins in _adv.h should be disabled. im not sure if these iterations of ProUI or JyersUI have inputshaping menu, but you can enter it in the command terminal. |
Tried this one and yeap, this performs even worse( Finally got my hands to rollback commits from the March branch and found out that issue is first introduced by this commit: While "172 changed files with 21,633 additions and 1,495 deletions" looks terrifying, I'm planning to investigate further. |
I posted the issue on Marlin to see what they say. it's suggested to lower MULTISTEPPING_LIMIT to 8. I'm not actually sure the differences are. I mean if it's fixed with OLD_ADAPTIVE_MULTISTEPPING, great. but if you don't mind one more test, to disable OLD_ADAPTIVE_MULTISTEPPING and set MULTISTEPPING_LIMIT to 8 and see if that actually fixes as well. |
This is the reply I got. so basically what I'm guessing is with all these new things the Aquila board doesn't seem to like it all at once. so if you use input shaping, it's best to dial back the MULTISTEPPING_LIMIT, or perhaps disable LIN_ADVANCE? |
Oh, this looks promising. Had no chance to get my hands on it today (but brewed a batch of Pale Ale 🍺😎) |
Tried to add Played with MULTISTEPPING_LIMIT 8,4,2,1, but doesn't help. 1 changes the sound, but doesn't resolve the issue completely.
Huh. This FT_MOTION looks promising but seems not ready to every day usage? Regarding the investigetion of stepper.cpp: I've been trying to add something like but none of these conditions seems to fire. Thus, it's something about time_spent_out_isr, but I don't know how to debug it further. |
I think this means if you had a stepper motor that were different - made for the specific application, there could be less issue or noise. these motors are limited by their hardware - maybe a bigger motor you will have better success? (less noise). there are quite a few motors you can choose from. - list of them here I wonder if having a bigger motor, or even the same motor so close in specs, but different by one or two things, like torque and inductance has an effect. its possible that however they test the firmware for updating the code may not be universal for every motor. whoever is testing and writing the code must have it work for them, but since their testing hardware may not be the exact same, then the code may not work for a different motor. I'll look into what about adaptive smoothing? I've been trying to see if how it makes a difference, but haven't noticed any. if I can make the time_spent_out_isr change in the menu that should help you set it. like I did with the encoder rate - have you noticed in the advanced settings menu? that may be one thing I could use a 2nd opinion on; how does the encoder knob feel? you can change those values. I want to ask if they are good as they are, or should be a different value. |
After some looking through the code, I have a thought that have you tried the different sub-defines?
also |
@oloendithas without having looked through this whole thing, but it appears IS - input shaping issue has been fixed? after a quick read, it seems like someone else had similar experience, not sure if the most recent commit related to this PR actually fixes the issue that was described, but im working on fixing the little bugs with the current build and ill implement the newer marlin code of this. |
I have 34mm X motor and 40mm Y motor and still they both suffer from stuttering. Also, the X one was MOONS' but the Y was a no-name from Creality. Recently I replaced Y and dual-Z on MOONS', as they give less vibrations, but that didn't change anything regarding the issue. So not sure if this is motor related. But also have no idea, what else. Controller of driver? On N32 related code?
Yes, in works and even able to print fine. I suppose, that makes it much alike that OLD_ADAPTIVE... if not the same.
I tried to untick Motion - Steps smoothing (if that refers to the adaptive smoothing) and that didn't changed anything.
Yes, I recall, at some point the encoder acceleration was too high, but recent values are pretty much perfect as they are. I have tinkered with them and returned to the your values)
Hmm... Gonna try this today.
I'm not sure if I understand, what they say, but would be nice to try, yes. |
I could do the same tests with my creality 4.2.7 board, however I dont have stock motors except for Z and E. im not sure the difference between Input Shaping and FT_Motion (fixed-time motion) or how they are related. I wasn't sure what I read exactly in that pull request link @ MarlinFirmware, it seemed like they fixed an issue with the frequency. is there a difference between Input Shaping and FT_Motion (fixed-time motion) or how they are related? and is one better? but I think since input shaping is still new to Marlin it will take some time to get it perfect. heres some other links for reference incase you need it. https://marlinfw.org/docs/gcode/M593.html so should I close this issue out? im not sure what else we could do but either not use Input Shaping for now, or becareful using it a specific way. |
As far as I understand, FT_Motion is an alternative approach for IS, Lin advance, baby stepping(?) - all the motion control stuff. Regarding that PR MarlinFirmware/Marlin#25719, it looks to be entirely related to FT_Motion, which none of us is using yet. So, I don't think this could help right now. Maybe, when it get more stable, it could change lots... something. |
Yeap, let's just close this. For now OLD_ADAPTIVE does the job. I'll be trying turning it off in new releases to see, if the issue went away. |
hey I just uploaded a new July branch, it has the newest Marlin updates. I dont recall there being anything stepper related changes, but I just like to let you know i switched it to the default branch from June. I know I have yet to test it myself before creating the new branch, but thats okay everything so far compiles successfully. |
I'm glad that we included the I'm not sure what the exact differences might be that would lead to noisy steppers, but I have one hypothesis. It could be that switching to a different level of multi-stepping makes the ISR take longer, which leads to a calculation that it should change to a lower level of multi-stepping, and then under the new conditions it calculates that it can change to a higher level of multi-stepping … and so on … leading to a continuous oscillation between different levels of multi-stepping, and therefore more irregular stepping. I believe we did look at that and determined that it shouldn't occur, but we may want to revisit that under a wider variety of conditions. CC: @tombrazier |
Yes, @thinkyhead, I think this is exactly what is happening. And we did talk about it and I thought there was enough hysteresis to prevent continuous switching. However, I have seen someone else with this problem somewhere. (Can't remember where - I suspect an issue request where I responded saying "try X" and heard no more.) It would be easy enough to verify whether this is the cause. Change the code at the start of function
|
@tombrazier would this be the comment you are referring to? Originally posted by @tombrazier in MarlinFirmware/Marlin#25912 (comment) I would be able to test anything out, just on the bench though, but I haven't been able to recreate the issue myself. as these issues seem to only be with certain mainboards such as Voxelab Aquila GD32 or N32. or it could be just the _Maple environment. I know others have mentioned it a problem. but if it's anything I can do just name it. |
Oh, I will gladly test this next week and report here, how it goes. |
Oh, yes, that will be it. So I take it your Marlin issue request is in response to this issue request. The behaviour will be very dependent on mainboard and will also only happen at certain speeds. I look forward to seeing what @oloendithas finds. |
I notice that in both the old and new adaptive code we always use doubling and halving. I wonder if we could get more fluid behavior by incrementing and decrementing instead. This would add more complexity, and with 1x and 2x it would still amount to doubling and halving, but as the step rate starts to increase to 3x, 4x, and up it could start to make a difference. There's also a hanging question about the way the regular stepper pulse phase is separated from the ZV shaper phase, such that it can generate up to double the amount of pulse delay time applied in a single call to the ISR. This tends to have more of an effect on time allocated to the main loop, but it might also be leading to irregular timing of ISR invocations. If we could combine both the regular and the shaping pulse phases in a single block that might help to optimize the amount of time spent in any single ISR invocation, and it should also lead to more accurate timing of shaping pulses. That would mean moving the Outside of that more disruptive change, one minor optimization we could make would be to track the last pulse start time for each axis in a global structure, and then we could avoid adding unnecessary delays to any stepper in all procedures that use stepping. A straightforward way to do that would be to make a stateful |
I just came across in Configuration_adv.h // Microstep settings (Requires a board with pins named X_MS1, X_MS2, etc.)
#define MICROSTEP_MODES { 16, 16, 16, 16, 16, 16 } // [1,2,4,8,16] is this something that needs to be defined? I havent noticed the pins for Creality_V4 boards mention |
So I've played with it. Tried:
That didn't changed anything. Then I tried to play with this part:
Tried to set |
@oloendithas I have another idea about this. I observed last week that just multistepping by iteself can make motors sound really noisy. May be the issue is not that the printner has been flipping between multistepping levels. Maybe it is just that it is going to a level that is noisy for your printer. Could you try disabling the logic that reduces multistepping, i.e. comment out
And then try different values for MULTISTEPPING_LIMIT to see whether there is some value that causes the noise. |
Had noticed the increase in motor noise as well - it was nearly like going back to pre silent driver days. Even the probe on my CR touch was rattling just making the move to probe at 100mm/s. Tried all the fixes above but none made anything better. Made sure belts weren't too tight. They can certainly cause nasty vibrations when too tight. The vibrations were actually strong enough to show on the outer skin of prints. Bummer. I'm using SKR mini e3v3 on upgraded Creality enders. I noticed that in the TMC driver submenu that motor driver step mode and max current can be adjusted. Played around with those. Made sure stealth chop was enabled. Creality motors max amp ratings are shown in the clip below. The nightly bug fix BTT config go by has all the motors set to 580ma. I played around with those numbers for each axis and found that (naturally) they have a dramatic effect on motor noise - especially when set too low. Anyhoo in the end I chose 780ma for all motors as that was FAR and away the quietest. Now everything is running silent again. Please let me know if I did anything stupid! :) Motors are all running cool. Oh and on edit - I did set Multistep to 8 (tried all the way down to 1) but couldn't really tell a difference. |
I think that is the right idea. Increasing current is like (with Stock Aquila/Creality boards) changing the Voltage Reference. the downside with too little voltage/current is skipped steps - and from the sound of it - more motor noise. I really think the 42-34 stepper motors are much too undersized even for these printers. maybe not for the Z (with dual Z is fine), but especially for the Y axis... because this is the axis that moves the most Mass around. so naturally that calls for a larger motor. I maybe said this before but I highly suggest anyone with these printers to upgrade their motors. stepperonline has a great deal - 3 motors for ~$20 bucks, Model: anyway, say you want to upgrade to a direct drive... having a bigger motor will help the hotend having more weight, so you can use the same extruder motor and not worry with added weight. plus the shafts are a bit longer so you can add those nema 17 vibration dampers |
This issue has had no activity in the last 60 days. Please add a reply if you want to keep this issue active, otherwise it will be automatically closed within 10 days. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
On the March branch enabling Input shaping makes steppers noisy
Steps to reproduce the behavior:
Version (please complete the following information):
Running Aquila S2 N32 (3D Touch)
Probe works fine.
February branch build with the same options doesn't suffer from this issue.
commit.patch
The text was updated successfully, but these errors were encountered: