-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
[BUG][TAZ6] PWM fan control not working in RC41+ #41
Comments
I have determined that the following commit introduces the problem: I will further note that the configuration files used by LulzBot printers will enable
So, while enabling |
In commit da830e6 in
To:
I assume this was meant as a refactoring step, but algebraically, it is incorrect. UPDATE: A fix to this was provided by additional work in commit 125310d |
It looks like additional work may have been done in commit 125310d, which fixed the bug I had posted about above. I now tested a lot of additional intermediate commits, as such: bc9479e - Oct 15th - PWM Okay So right now, the latest commit with PWM verified working is 761b1b9. From that point on, something gets broken in the dwin lcd code which doesn't allow me compile until commit 9086082, at which point the PWM is broken again. So it looks like the PWM was broken somewhere between December 27th and January 12th, but I had to fix the dwin_lcd stuff before I can narrow it down any further |
Okay, I've conducted a few more tests: 6d1eaa0 - Dec 28th - Won't compile; cherry pick a058a8a; PWM Okay At this point, it appears as if commit 07bffdf caused yet another regression in PWM. |
Okay, I have managed to narrow down an error in commit 07bffdf. The prototype of the following function was changed from:
To:
This causes the following expressions later in the function to perform a subtraction of unsigned values, which gives incorrect values:
After changing the function prototype, it would also be necessary to change the expressions to:
I now need to see how this code was subsequently modified in commit 2cfde39 to see whether the fix is still applicable. |
So I've gone through commit 2cfde39 line-by-line and it looks like the breaking change is indeed a sign error of some sort. Here is the non-working code:
This is code that works, based on previous commits:
I still haven't gotten my head around why this makes a difference. |
I have created a PR for a fix in upstream MarlinFirmware#25005 |
Did you test the latest
bugfix-2.1.x
code?I have not yet tested the configuration against the base / non-drunken-octopus branch.
Bug Description
This issue has been tested on Oliveoil_TAZ6/Tilapia_SingleExtruder
In RC41 and above, the part cooling fan only works at full speed. Setting the fan with
M106 S255
correctly sets the fan to full speed.M106 S254
stops the fan entirely. When reflashing the board back to RC40, variable fan speed is possible through commands such asM106 S128
. This issue has been tested up to RC52. The timing of the issue allows us to correlate this with an upstream change to the Marlin firmware which occurred between RC40 and RC41.MarlinFirmware#23048
And introduced a similar issue in other boards as can be seen by MarlinFirmware#23094
A subsequent change MarlinFirmware#23102
While it may not be the correct or ideal fix, enabling
FAN_SOFT_PWM
in the Oliveoil_TAZ6/Tilapia_SingleExtruder config resolves the issue and allows variable fan speeds in RC52.I've not yet verified this issue with the stock marlin 2.1.x branch
Bug Timeline
RC41+
Expected behavior
Fan control should be variable throughout the duty cycle range -
M106 S128
should set the fan to %50.M106 S254
should set the fan to %99.6 of full speed.Actual behavior
Any value below 255 will cause the fan to stop.
Steps to Reproduce
M106 S255
=> fan turns on at full speedM106 S254
=> fan stopsVersion of Marlin Firmware
https://github.com/drunken-octopus/drunken-octopus-marlin/releases/tag/v2.1.x-rc52
Printer model
LULZBOT TAZ6
Electronics
Stock RAMBo (1.3?)
Add-ons
No response
Bed Leveling
ABL Bilinear mesh
Your Slicer
Prusa Slicer
Host Software
Pronterface
Don't forget to include
Configuration.h
andConfiguration_adv.h
.Additional information & file uploads
...
The text was updated successfully, but these errors were encountered: