-
Notifications
You must be signed in to change notification settings - Fork 187
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
X Axis home fails #8
Comments
Hi and thanks for the feedback, sadly I cannot reproduce this issue. To troubleshoot further, can you please send me your complete output of |
Output from octoprint terminal is not very helpful:
M503
|
Note that if I send the home request twice at the start of a print - all is okay. |
note that this only happens "sometimes". Here's the output of a good x home:
|
Please try again with the newest release and reset your EEPROM after ( |
Have tried this. Still the same issue unfortunately. I'm wondering if this is the way anycubic have wired the end stop sensors (perhaps lack of pulldowns/ups) + the v1.1.9 sensing change. May be time to get out the oscilloscope... |
There is an option to enable electromagnetic interference filtering in Marlin, described as follows:
Which version of the firmware are you using (TMC2208, reversed, stock)? I can enable it and compile it on a test build for you. |
Thanks, I'm using TMC2208 reversed. If you send me the config I can play around with different settings as well. |
Alright, maybe this one works for you: https://kore.cc/i3mega/download/testing/notching-190103-TMC2208_reversed-TEST.hex The complete source is included in this repository, so feel free to tinker around. For this build I have reversed the motor direction from line 857 to 865 and uncommented line 590 to enable the noise filter. |
Thanks David. This has (after 30 or so checks) fixed the issue. |
Glad this issue is fixed for now, though I am surprised I have never encountered this issue and never got a similar bug report. I'll close this issue for now but please keep me updated if you decide to investigate further. |
Had already replaced the switch :-). If the Trigorilla is based on the Ramps board (think it is) - then there's no pullup/down resistors, just the internal CPU resistor. This is likely to be weak, making the likelihood of noise introducing issues high - especially if the wires are placed next to current carrying ones - like the stepper motors. Suspect this will affect a proportion of units - probably depends how close the current carrying wires are to the endstop sense wires. We may want to consider including this feature in the main branch if others report the same issues. |
If you already ruled out the switch itself it is safe to say it's just a matter of time since we get another report on this. Especially with the addition of PWM powered heatbed, this is just asking for EMI issues. I am surprised you're the first one since this FW is at over 1200 downloads so far. Any mods on your end that might be a source of interference? Please let me know if you run into any CPU overhead issues while printing - e.g. frequent |
If I'm reading the changes in the source code - it seems that v1.1.9 code is only checking the value once. This is just bad programming practise for an unfiltered input on a microcontroller. There must be a way of checking this more frequently (-0.2mm is quite a bit of CPU time). I guess this was changed for some other reason, a compromise likely. I'm planning on introducing the BL-touch sensor - an additional 0.2mm won't work for this sigh. Actually worried about Z levelling now as well! May just be better to add caps for v1.1.9 on other alternative is to "fix" the 0.2mm v1.1.9 issue in firmware - if even possible. I'll let you know how I get on with this, If I see any issues etc |
0.2mm is definitely concerning, especially on a dual Z endstop machine, even without a BLtouch. Not so much for X and Y, but I like my nozzle not to crash into the bed because of this inaccuracy. Didn't think that through, now I am very hesitant to ship this as default in the firmware. Maybe decreasing the number of samples used to detect a faulty trigger might at least reduce the travel over/undershoot by a bit? Referencing https://github.com/davidramiro/Marlin-AI3M/blob/master/Marlin/endstops.cpp#L540 |
Wouldn't a better way to be stop the stepper on the first endstop signal, then check the signal again a number of times. If the signal is no longer present, start the stepper up again, and repeat (up to 3x) until the endstop signal is good? Perhaps thats too drastic a change. Assuming that 50% of samples is bad is a little silly IMHO. Usually it's an outlier or two. If we set endstop_poll_count = 2 or 3 should get rid of most of the issues - but this still leaves us with 0.1mm? |
OR - perhaps - we slow down the speed of the steppers when homing? Longer to home but more accurate. |
Might be a good way, though I reckon this would better be suggested to the Marlin team themselves.
0.1mm on Z is still unacceptable for me. Reducing the speed is a good suggestion, but even decreasing the speed by tenfold (and it's pretty slow by default already!) would still result in 0.01mm inaccuracy which is still 25% of the distance I level my bed to. Homing feedrate is an easily adjustable variable in Configuration.h, maybe even adjusting the max feedrate by GCode with After all, we can't blame Marlin though. Maybe their software filtering is not easily adjustable for our case, but adding a 100nF cap is not too much to ask from a printer manufacturer, even more so when it seems to be common practice for microswitch based endstops. Makes me wonder why this doesn't seem to be a common issue, their default firmware is based on Marlin 1.1.1 which didn't even have an option for noise filtering. Maybe the way endstop states get polled got changed somehow within these versions? You mentioned a sensing change, mind showing me what you found? |
Hi guys! I have exactly the same issue! I'm running on stock fw again, but sucks without thermal protection and PID for hotbed. Thx. |
Somebody got the noise filter to work only on X and Y over at MarlinFirmware/Marlin#11224, let's hope he can chime in on this. |
Thanks david! @notching Can you try too for proof? |
Glad it works for you, though I am still concerned about Z accuracy - I don't want to sacrifice accuracy, even if only a slight chance. Disabling noise filtering on the Z endstops would be the best way to do it, so I am curious if @Patrick60 can show us his way of doing that. For now, I will reopen this issue since we can be sure now this isn't an isolated issue even though the majority of users has probably not encountered it. |
Hi, I just want to chime in - I am running Marlin 1.1.9 on Anycubic i3 Mega with TMC2208 and my X homing is also broken - sometimes it works, but usually after a print it detects the X endspot incorrectly. |
For now, I have created another branch to troubleshoot this issue. Since my printer doesn't have these kind of issues, please feel free to try this out and report back on possible inaccuracy on the Z axis. Thanks a lot so far for the constructive discussion! |
That's what I thought of doing as well (hence my now purged commit 98dc813), though a value of 1 might not be enough to ensure reliable filtering. After doing some more digging, it seems to be obvious now that the noise filtering was always on at Marlin <=1.1.8, with a polling rate of 2. See MarlinFirmware/Marlin#11907 (comment) and MarlinFirmware/Marlin#11626. Since there were no drastic inaccuracies on the default manufacturer firmware, I think this is pretty much safe to push onto master branch if I'm not mistaken here - proper testing of course still required. But since a single poll would result in even less delay, @md66pt, I am very curious if your settings really filter the noise reliably. Please do some testing and report back. |
Just a note that noise can still be induced if the 100nf cap is placed at the switch. Ideally, the cap should be as close to the pin of the microcontroller as possible. In practise, the endstop header on the Trigorialla PCA should be acceptable. |
At least to get things back to the state of the default firmware, I guess it's the closest we can get. I suppose the +-0.2mm inaccuracy is quoted from the 7ms delay (1KHz polling and default 7 samples) and possible fast homing movements of X and Y. Considering how slow the Z axis moves, a 2ms delay would not induce any noticeable inaccuracy. Anyways, if you have some time to spare, please feel free to get out your oscilloscope, I am extremely curious to have a look at the noisy signal. I suspect either the proximity of the endstop wires to the X axis stepper motor or the heatbed PWM with its substancial amount of current to be responsible for the noise. |
@davidramiro I tested a lot and did some prints too. So far i didn't have a single error and seems to be absolutely accurate. Homing works everytime, tried from different positions and stops allways at the exact same point as far as i am measuring. Don't know if its only the poll count or the combination with the caps i soldered, but i will continue with value 1 for now. I will report if troubles occur! |
After some extensive testing, two polls don't seem to affect Z homing accuracy at all. I pushed it onto the master branch, though I am still leaving this issue open to encourage further examination. |
Due to EMI some machines might experience false endstop triggers when homing. By reducing the endstop_poll_count to two samples, we are closely matching the behaviour of Marlin 1.1.8 and earlier. Hopefully fixing issue #8 for good. Other updates: - Enabling printcounter, show statistics using the M78 command Co-Authored-By: notching <[email protected]> Co-Authored-By: md66pt <[email protected]>
After another ~40 hours of printing without any issue and the first layer looking perfect every time, I consider 2 endstop polls to be a good solution that doesn't interfere with homing accuracy. I'll close this for now, thanks for the feedback everybody. |
Seemingly having an issue where X axis home is not working. Steps to reproduce:
May be related to: MarlinFirmware/Marlin#11224
(although this turned into a Z axis issue).
Does not happen with original Anycubic FW.
The text was updated successfully, but these errors were encountered: