Welcome! Log In Create A New Profile

Advanced

Nophead\Marlin vs main Marlin...

Posted by NumberSix 
Nophead\Marlin vs main Marlin...
September 11, 2013 05:51PM
Hi all,
I like the way Nophead\Marlin has the HOME_POS and other settings tuned to the Mendel 90 design.

But, there is a new feature in the main release of Marlin that I also very much like and want to try out. It's the "Automatic operation of extruder/cold-end cooling fans based on nozzle temperature" feature. I think feature will work with my Azteeg X3 board which I have on my Mendel 90.

I currently have Chris' tuned Marlin (https://github.com/nophead/Marlin) installed on the Azteeg and it works, but I'd like the new feature from the new Marlin version.

Any suggestions on what I can do to get the best of both worlds?

I've a basic understanding of Marlin settings, but can't figure what I might need to move from one version to the other to get the benefit of both. The new "Auto-operation of cooling fan" feature is set in a section of Configuration_Adv.h tab. With my limited knowledge of this I've no way of knowing if there are other depend entries in other tabs that I'd also need to copy, if I try copy/pasting from one to the other.

Would it be easier for me to move Chris' changes into a downloaded current Marlin and get that going? (I'm fine with setting EndStops, Directions, E_Steps and that kind of stuff).

Any suggestions welcome.
NumberSix


[numbersixreprap.blogspot.com]
Re: Nophead\Marlin vs main Marlin...
September 12, 2013 09:10AM
It is not just a case of changing configuration settings. Code will have been added to support the new feature.

To do this cleanly you would have to do the following:
(1) Find the differences between nopheads firmware and the original firmware he worked from.
(2) Merge the differences from (1) into the latest firmware version.

You would use a tool called diff to perform step (1) but step (2) is probably best done by visual inspection and manual application. It is not possible to assume that a tool like patch would automate this step successfully because sufficient code may have been added or removed between the two versions to prevent it. If you are feeling brave you could try that approach.

This is not a trivial undertaking and requires a good deal of care and testing of the end result.
Re: Nophead\Marlin vs main Marlin...
September 12, 2013 11:33AM
The only code changes I made were to make homing to Z max work. I think those fixes got integrated back into Marlin.

The other thing I did was add new thermistor tables to match those supplied in the kit accurately. They will need to be integrated into the later version but the tables numbers will have been reused so they will need to change.

The problem with Marlin, Pronterface, Slic3r, etc is they get ever more complicated and have more and more bugs. That is why I stick with the old ones. The exception is OpenScad which has much better regression tests and only a few clever developers so generally gets better over time rather than worse.


[www.hydraraptor.blogspot.com]
Re: Nophead\Marlin vs main Marlin...
September 12, 2013 01:07PM
There is a more recent version of Marlin with (what I hope are the relevant) changes from nophead merged. It's here: [github.com] .

Gerv
Re: Nophead\Marlin vs main Marlin...
September 13, 2013 11:58AM
Neil,
Good tip about the "diff" tool. I tried out "ExamDiff" and compared some files from both Marlin versions, but I think as you probably suspected it would be a tedious job to get one good consolidation. Gerv has the merging done for me in the version of Marlin he maintains it seems.

Chris,
I hear what you are saying about Marlin, lots of complication and growing pains. Thanks for your input.

Gerv,
Thanks a million. Your Marlin version has the new stuff I want to try out and the Nophead stuff in there also. I'm going to use your version. Problem solved!

Thanks again to all.
Ivor.
a.k.a. NumberSix


[numbersixreprap.blogspot.com]
Re: Nophead\Marlin vs main Marlin...
September 14, 2013 06:37AM
HI Gerv,
"Not out of the woods yet" :-(

I downloaded from your Github link above, did a quick "Verify" in Aaduio but hit some "not declared in this scope" errors off the bat.

Marlin_main.cpp:169: error: 'Z_MAX_POS' was not declared in this scope
Marlin_main.cpp:222: error: 'analogInputToDigitalPin' was not declared in this scope
Marlin_main.cpp:669: error: 'Z_MAX_POS' was not declared in this scope
Marlin_main.cpp:670: error: 'Z_HOME_POS' was not declared in this scope
Marlin_main.cpp:671: error: 'Z_MAX_POS' was not declared in this scope

Did you encounter these issues? Are they resolved in some lcoal copy you use?
Tks,
Ivor


[numbersixreprap.blogspot.com]
Re: Nophead\Marlin vs main Marlin...
September 14, 2013 07:13AM
The Z_MAX_POS and Z_HOME_POS variables create a circular reference in some branches of the firmware because some code has been added for manual homing that derives Z_MAX_POS from Z_HOME_POS. I remember getting this exact error when I was merging the Nophead fork into the T3P3 Panelolu fork.

The workaround is to hard-code both of these values to be independent in the configuration.h; from memory, there's a line that reads
define Z_MAX_POS (Z_HOME_POS - 0.1)
which you can just set to
define Z_MAX_POS ([whatever you set Z_HOME_POS to higher up in the config] - 0.1)

Just remember to change both places if you ever recalibrate the bed and want to update the Z_HOME_POS value in the firmware.
Re: Nophead\Marlin vs main Marlin...
September 15, 2013 07:17AM
Hi QuackingPlums,
I can confirm that changing "define Z_MAX_POS (Z_HOME_POS - 0.1)" with "define Z_MAX_POS (203.0 - 0.1)" has allowed Verification/Compiling to complete successfully.
Thanks,
Ivor


[numbersixreprap.blogspot.com]
Re: Nophead\Marlin vs main Marlin...
September 15, 2013 12:12PM
Quick update. Above Marlin downloaded to Azteeg X3 board and desired feature (Automatic operation of extruder insulator cooling fan based on hot-end nozzle temperature) tested and functions nicely. Chris' (Nophead's) changes are also present and functioning, but I had to explicitly state the Z_MAX_POS line (e.g. 203) to overcome the "'Z_MAX_POS' was not declared in this scope" error that was preventing compiling.

Feature enabled by setting "EXTRUDER_0_AUTO_FAN_PIN -1" to "EXTRUDER_0_AUTO_FAN_PIN 5". This is for the Azteeg x3 board, when the fan return wire (-) is connected to the second middle pin from the left (D5) on the low power pin set.

The fan now cuts in once the temperature at the hot-end exceeds the temperature specified in the line "#define EXTRUDER_AUTO_FAN_TEMPERATURE 50". The fan switches off again once the temperature drops down. This is good for unattended printing as once the job finishes and the extruder hot-end is switched off the fan will continue to run, cooling the PEEK insulator and underside of the x-carriage, and eventually will automatically switch off, once the hot-end temp drops down to the specified setting. It's also good because all of this is firmware based, so you don't have to have anything in the End Gcode to get complete fan switch off. Neat!

The relevant Marlin section is found in the ConfigurationAdv.h tab.
---------------------------------
// Extruder cooling fans
// Configure fan pin outputs to automatically turn on/off when the associated
// extruder temperature is above/below EXTRUDER_AUTO_FAN_TEMPERATURE.
// Multiple extruders can be assigned to the same pin in which case
// the fan will turn on when any selected extruder is above the threshold.
#define EXTRUDER_0_AUTO_FAN_PIN -1
#define EXTRUDER_1_AUTO_FAN_PIN -1
#define EXTRUDER_2_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed
--------------------------------

Tks for input from various people.
Ivor


[numbersixreprap.blogspot.com]
Sorry, only registered users may post in this forum.

Click here to login