LIN_ADVANCE = better extrusion control

Discussions about ideaMaker and other printing software.
ABH
Posts: 169
Joined: Sun Aug 14, 2016 7:31 pm

Re: LIN_ADVANCE = better extrusion control

Postby ABH » Sat Feb 03, 2018 2:56 pm

@socke. I would like to help you out, but I don't know if you only worked with firespeds fork (which I don't know anything about), or you tried to compile my Raise3D adapted Marlin firmware:
https://github.com/ABH10/Marlin-for-Raise3D-N-series/tree/1.1.x_Raise3D
I don't see that there should be any issue in using another thermistor type for your bed (type 11 for your bed versus type 8 for the std. Raise3D bed). My Marlin fork is based on Marlin 1.1.8 and includes all of the same Raise3D modifications as are in the Raise3D 1.1.6rev.1 motion controller firmware. I didn't include any other Raise3D modifications like run-out sensor support or support for different e-steps in dual printers, but it should be a piece of cake to include that stuff, if needed. I have been using this Marlin firmware for many months (based originally on Marlin 1.1.6 and continuously merged with Marlin 1.1.7 and latest Marlin 1.1.8 from Dec. 2017) and never had any issues.
Note that Raise3D motion controller firmware is extremely old (also Raise3D 1.1.6rev1). It is based on some undocumented snapshot from around Marlin release 1.0.2 from approx. 2 years ago.

socke
Posts: 235
Joined: Mon Mar 21, 2016 2:55 pm

Re: LIN_ADVANCE = better extrusion control

Postby socke » Sat Feb 03, 2018 3:02 pm

@ABH: Thanks, I will try your fork and report back. Before I thought it was only a clone of firespeds repository.

socke
Posts: 235
Joined: Mon Mar 21, 2016 2:55 pm

Re: LIN_ADVANCE = better extrusion control

Postby socke » Sat Feb 03, 2018 4:17 pm

@ABH: You saved my day! The first build of your sources resulted in a successfully printed calibration box with LIN_ADVANCE enabled (looks very promising).
I was just thinking about throwing away the touchscreen and using a clean Marlin...
Thanks for sharing your work!

firesped
Posts: 836
Joined: Mon Mar 21, 2016 9:23 pm
Location: Tucson, AZ

Re: LIN_ADVANCE = better extrusion control

Postby firesped » Tue Feb 06, 2018 12:12 am

What sensor do you have on the bed?
RL name: Michael Nolen
printers:
raise3D N2 kickstarter Early Bird
Trinus Deluxe (running smoothieware on Azteeg X5 GT board)
Monoprice Maker Select v2

firesped
Posts: 836
Joined: Mon Mar 21, 2016 9:23 pm
Location: Tucson, AZ

Re: LIN_ADVANCE = better extrusion control

Postby firesped » Tue Feb 06, 2018 1:13 am

My original fork was released around a year ago. The new one is updated to function with the procedures of marlin. M190 is not 100% the same and I think M109 adds the D stamp at the end of the output. M105 outputs the same.

M190 outputs the same starting calls then outputs the M105 calls after that.

I am curious as to what the issue is so I can fix whatever the problem is as well.

I debugged the firmware with the serial log and the use of the M111 1 command to see what the touchscreen is sending to the marlin board. It echos it back. For instance, the printer send additional gcode when a print job finishes.

Code that I carried over includes

M109
raisetouch displays thermalManager.print_heaterstates then adds the following code after it

Code: Select all

        SERIAL_PROTOCOLPGM(" D:");
        SERIAL_PROTOCOL(thermalManager.degTargetHotend(target_extruder));


M190
raisetouch adds

Code: Select all

          SERIAL_PROTOCOLPGM("T:");
          SERIAL_PROTOCOL(thermalManager.degHotend(active_extruder));
          SERIAL_PROTOCOLPGM(" E:");
          SERIAL_PROTOCOL((int)active_extruder);
          SERIAL_PROTOCOLPGM(" B:");
          SERIAL_PROTOCOL(thermalManager.degBed());
          SERIAL_PROTOCOLPGM(" D:");
          SERIAL_PROTOCOL(thermalManager.degTargetBed());

before executing the thermalManger.print_heaterstates

ok_to_send
at the end raisetouch adds the following code

Code: Select all

    SERIAL_PROTOCOL(':');
     if (planner.block_buffer_tail == planner.block_buffer_head)
        {
          SERIAL_PROTOCOL(0);
        }
     else
        {
          SERIAL_PROTOCOL((planner.block_buffer_head - planner.block_buffer_tail + BLOCK_BUFFER_SIZE)%BLOCK_BUFFER_SIZE);
        }

Note: This is the code that sends the feed back to the raisetouch so the raisetouch knows where the RUMBA board is at. This was confirmed to me by Derrick in my communications with him on firmware development group. Which really has not gone anywhere.

In order to free up memory,
I added this code to the end of MarlinSettings:report in file configuration_store.cpp

Code: Select all

    #if ENABLED(RAISETOUCH)
      #if DISABLED(SDSUPPORT)
        SERIAL_ECHOLNPGM(MSG_SD_INIT_FAIL);
      #endif
    #endif


By using this code, we don't have to dedicate memory and file space to SDSUPPORT and REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER (which needed to be enabled to use SDSUPPORT)

In temperature.h

Temperature::PID_autotune
added code to change exported format
after printing the MSG_BIAS, MSG_D, MSG_T_MIN, MSG_T_MAX, adds SERIAL_EOL

After printing MSG_KP, adds SERIAL_EOL
After printing MSG_KI, adds SERIAL_EOL
After printing MSG_KD, adds SERIAL_EOL

in // Every 2 seonds...
added this code.

Code: Select all

          #if ENABLED(RAISETOUCH)
            SERIAL_PROTOCOLPGM("ok ");
            SERIAL_PROTOCOLPAIR(MSG_T, input);
            SERIAL_PROTOCOLPAIR(MSG_AT, soft_pwm_amount[hotend]);
          #else
            print_heaterstates();
          #endif


In Temperature::print_heaterstates(), in HOTENDS > 1
Added this code after the print_heater_state call

Code: Select all

#if ENABLED(RAISETOUCH)
        SERIAL_PROTOCOLCHAR(" ");
        SERIAL_PROTOCOLCHAR("F");
        #if HOTENDS > 1
          if (e >= 0) SERIAL_PROTOCOLCHAR('0' + e);
        #endif
        SERIAL_PROTOCOLCHAR(":");
        SERIAL_PROTOCOL(planner.flow_percentage[e]);
      #endif


Note: This may be an issue as I did not test the formatted output of the single mode configured firmware. I need to check the a firmware based off the raise3d version to find that output.

After the HOTEND_LOOP closed
alters the following code

Code: Select all

    #if ENABLED(RAISETOUCH)
      SERIAL_PROTOCOLPGM(" S:");
      SERIAL_PROTOCOL(fanSpeeds[0]);
      SERIAL_PROTOCOLPGM(" P:");
      SERIAL_PROTOCOL(feedrate_percentage);
    #else
      SERIAL_PROTOCOLPGM(" @:");
      SERIAL_PROTOCOL(getHeaterPower(target_extruder));
      #if HAS_TEMP_BED
        SERIAL_PROTOCOLPGM(" B@:");
        SERIAL_PROTOCOL(getHeaterPower(-1));
      #endif
      #if HOTENDS > 1
        HOTEND_LOOP() {
          SERIAL_PROTOCOLPAIR(" @", e);
          SERIAL_PROTOCOLCHAR(':');
          SERIAL_PROTOCOL(getHeaterPower(e));
        }
      #endif
    #endif






In the Configuration_Adv.h
You can enable or disable the RAISETOUCH_FILAMENT_RUNOUT_SENSOR
If you don't want that feature, you can turn it off. It is located at the end of the file.
the filament runout sensor adds some functions to M119, M120, and M121.

Code: Select all

inline void gcode_M120() {
  #if ENABLED(RAISETOUCH_FILAMENT_RUNOUT_SENSOR)
   if (parser.seen('S')) {
      int sensor_set = parser.value_ushort();
      SERIAL_ECHO("FRS");
      SERIAL_ECHO(sensor_set);
      SERIAL_ECHO(": ");
      if (sensor_set == 0) {
        SERIAL_ECHOLN("On");
        planner.lack_materia_sensor_state[0] = true;
        }
      else
        if (sensor_set == 1) {
          SERIAL_ECHOLN("On");       
          planner.lack_materia_sensor_state[1] = true;
         }
        else {
          SERIAL_ECHOLN(MSG_INVALID_SENSOR_STATE);
        }
    }
    if (parser.seen('N')) {
      int normally_set = parser.value_ushort();
      SERIAL_ECHO("FRS");
      SERIAL_ECHO(normally_set);
      SERIAL_ECHO(": ");
      if (normally_set == 0) {
        SERIAL_ECHOLN("OPEN");
        planner.lack_materia_sensor_norm[0]=true;
        }
      else
        if (normally_set == 1) {
          SERIAL_ECHOLN("OPEN");
          planner.lack_materia_sensor_norm[1]=true;
         }
        else { SERIAL_ECHOLN(MSG_INVALID_SENSOR_NORMAL); }
    }
    else
      endstops.enable_globally(true);
  #else 
    endstops.enable_globally(true);
  #endif
}


Code: Select all

inline void gcode_M121() {
 #if ENABLED(RAISETOUCH_FILAMENT_RUNOUT_SENSOR)
   if (parser.seen('S')) {
      int sensor_set = parser.value_ushort();
      SERIAL_ECHO("FRS");
      SERIAL_ECHO(sensor_set);
      SERIAL_ECHO(": ");
      if (sensor_set == 0) {
        SERIAL_ECHOLN("Off");
        planner.lack_materia_sensor_state[0] = false;
        }
      else
        if (sensor_set == 1) {
          SERIAL_ECHOLN("Off");       
          planner.lack_materia_sensor_state[1] = false;
         }
        else { SERIAL_ECHOLN(MSG_INVALID_SENSOR_STATE); }
    }
    if (parser.seen('N')) {
      int normally_set = parser.value_ushort();
      SERIAL_ECHO("FRS");
      SERIAL_ECHO(normally_set);
      SERIAL_ECHO(": ");
      if (normally_set == 0) {
        SERIAL_ECHOLN("CLOSED");
        planner.lack_materia_sensor_norm[0]=false;
        }
      else
        if (normally_set == 1) {
          SERIAL_ECHOLN("CLOSE");
          planner.lack_materia_sensor_norm[1]=false;
         }
        else { SERIAL_ECHOLN(MSG_INVALID_SENSOR_NORMAL); }
    }
    else
      endstops.enable_globally(false);
  #else   
    endstops.enable_globally(false);
  #endif
}


In configuration_store.cpp, EEPROM was updated to save off Lack sensor state and Lack Sensor state normal settings, updating EEPROM to V47

In endstops.cpp
Endstops:init()
added the following code

Code: Select all

  #if ENABLED(RAISETOUCH_FILAMENT_RUNOUT_SENSOR)
    #if defined(E0_MATERIAL_LACK_PIN) && E0_MATERIAL_LACK_PIN >= 0
      SET_INPUT(E0_MATERIAL_LACK_PIN);
      #ifdef ENDSTOPPULLUP_E0_LACK
        WRITE(E0_MATERIAL_LACK_PIN,HIGH);
      #endif
    #endif
  #endif

  #if ENABLED(RAISETOUCH_FILAMENT_RUNOUT_SENSOR)
    #if defined(E1_MATERIAL_LACK_PIN) && E1_MATERIAL_LACK_PIN >= 0
      SET_INPUT(E1_MATERIAL_LACK_PIN);
      #ifdef ENDSTOPPULLUP_E1_LACK
       WRITE(E1_MATERIAL_LACK_PIN,HIGH);
      #endif
    #endif
  #endif


In Endstops::report_state()
added the following code

Code: Select all

//
// filament runout sensor code. It will crash if Material lack pins are set to -1
//
 
  #if ENABLED(RAISETOUCH_FILAMENT_RUNOUT_SENSOR)
    static bool lack_checked_e0=0;//lack of materia
    static bool lack_checked_e1=0;//lack of materia
    static unsigned int lack_check=0;//times
    lack_check++;
      if(lack_check>=10)
      {
        lack_check=0;
        //Lack of material testing
        if (planner.lack_materia_sensor_state[0] == true)
        {
          #if defined(E0_MATERIAL_LACK_PIN) && E0_MATERIAL_LACK_PIN > -1
            if(READ(E0_MATERIAL_LACK_PIN)^planner.lack_materia_sensor_norm[0])
            {
              if(lack_checked_e0==0)
              {
                SERIAL_PROTOCOLLN("Custom: Filament Error T0");
                lack_checked_e0=1;
              }
            }
            else
            {
              lack_checked_e0=0;
            }
          #endif 
        }
          #if (EXTRUDERS == 2)
            if (planner.lack_materia_sensor_state[1] == true)
            {
              #if defined(E1_MATERIAL_LACK_PIN) && E1_MATERIAL_LACK_PIN > -1

                if(READ(E1_MATERIAL_LACK_PIN)^planner.lack_materia_sensor_norm[1])
                {
                  if(lack_checked_e1==0)
                  {
                    SERIAL_PROTOCOLLN("Custom: Filament Error T1");
                    lack_checked_e1=1;
                  }
                }
                else
                {
                  lack_checked_e1=0;
                }
              #endif
            }
          #endif
      }
  #endif


Note: I need to move the Custom:Filament Error T# messages to the language file. As other people could use this filament sensor runout code to signal a controlling touchscreen.

In Endstops::M119()
I added this code.

Code: Select all

 #if ENABLED(RAISETOUCH_FILAMENT_RUNOUT_SENSOR)
    #if defined(E0_MATERIAL_LACK_PIN) && E0_MATERIAL_LACK_PIN > -1
      SERIAL_PROTOCOLPGM("e0_lack: ");
      SERIAL_PROTOCOLLN(((READ(E0_MATERIAL_LACK_PIN)^planner.lack_materia_sensor_norm[0])?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
      SERIAL_PROTOCOLPGM("Sensor State: ");
      if (planner.lack_materia_sensor_state[0] == false) { SERIAL_PROTOCOLLN(MSG_SENSOR_STATE_OFF); }
      if (planner.lack_materia_sensor_state[0] == true) { SERIAL_PROTOCOLLN(MSG_SENSOR_STATE_ON); }
      SERIAL_ECHO("Normal State: ");
      if (planner.lack_materia_sensor_norm[0] == false) { SERIAL_PROTOCOLLN(MSG_SENSOR_NORMAL_STATE_CLOSED); }
      if (planner.lack_materia_sensor_norm[0] == true) { SERIAL_PROTOCOLLN(MSG_SENSOR_NORMAL_STATE_OPEN); }
    #endif
    #if EXTRUDERS == 2
      #if defined(E1_MATERIAL_LACK_PIN) && E1_MATERIAL_LACK_PIN > -1
        SERIAL_PROTOCOLPGM("e1_lack: ");
        SERIAL_PROTOCOLLN(((READ(E1_MATERIAL_LACK_PIN)^planner.lack_materia_sensor_norm[1])?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
        SERIAL_PROTOCOLPGM("Sensor State: ");
        if (planner.lack_materia_sensor_state[0] == false) { SERIAL_PROTOCOLLN(MSG_SENSOR_STATE_OFF); }
        if (planner.lack_materia_sensor_state[0] == true) { SERIAL_PROTOCOLLN(MSG_SENSOR_STATE_ON); }
        SERIAL_ECHO("Normal State: ");
        if (planner.lack_materia_sensor_norm[0] == false) { SERIAL_PROTOCOLLN(MSG_SENSOR_NORMAL_STATE_CLOSED); }
        if (planner.lack_materia_sensor_norm[0] == true) { SERIAL_PROTOCOLLN(MSG_SENSOR_NORMAL_STATE_OPEN); }
      #endif
    #endif
  #endif


Also added stuff to the planner so the varibles can be changes, #defines are static.

in PIN_RUMBA.h pins were changes as follows.
Z_MIN_PROBE_PIN set to 36 (X_MAX socket)
E0_MATERIAL_LACK_PIN set to 34 (Y_MAX socket)
E1_MATERIAL_LACK_PIN set to 32 (Z_MAX socket)

really need to create a PIN_R3D_RUMBA.h file that is standard pinout for the board due to the added functions. It would be interesting to find out if some of the other sockets, such as the cold end cooling fans, have PINs. you could actually make them turn on and off automatically in this firmware if they do.

Other code that was altered was in the configuration.h for the raise3d version to make easier configuration.

There is a distinc E factor setup when DUAL printer is called. near the beginning of the configuration file, you can set the EXT0_STEPE and EXT1_STEPE. The configuration is documented with settings for the standard and the 3 bondtech types that I know of. #define N1,N2,N2PLUS does the same as the raise firmware. I added a CUSTOM_Z_SIZE to change the bed height as well. mine can't travel the same distance due to mods done to the printer.
RL name: Michael Nolen
printers:
raise3D N2 kickstarter Early Bird
Trinus Deluxe (running smoothieware on Azteeg X5 GT board)
Monoprice Maker Select v2

firesped
Posts: 836
Joined: Mon Mar 21, 2016 9:23 pm
Location: Tucson, AZ

Re: LIN_ADVANCE = better extrusion control

Postby firesped » Tue Feb 06, 2018 1:43 am

If you have a single extruder. That could also be causing an issue due to the expected format not outputting for the hotends. the firmware won't display the T0: current temp / target temp line. I need to fix that. Do you have a single extruder?
RL name: Michael Nolen
printers:
raise3D N2 kickstarter Early Bird
Trinus Deluxe (running smoothieware on Azteeg X5 GT board)
Monoprice Maker Select v2

socke
Posts: 235
Joined: Mon Mar 21, 2016 2:55 pm

Re: LIN_ADVANCE = better extrusion control

Postby socke » Tue Feb 06, 2018 6:28 am

Yes, I configured the printer via touch screen as single extruder. I could PM you my configuration?

jvingaard
Posts: 35
Joined: Sat Nov 12, 2016 10:01 am

Re: LIN_ADVANCE = better extrusion control

Postby jvingaard » Wed Feb 07, 2018 5:31 pm

Is there a firmware for N2Dual with BLtouch and LIN_ADVANCE

Phife
Posts: 72
Joined: Thu May 12, 2016 3:47 pm

Re: LIN_ADVANCE = better extrusion control

Postby Phife » Wed Feb 07, 2018 6:01 pm

jvingaard wrote:Is there a firmware for N2Dual with BLtouch and LIN_ADVANCE


Yes please, I too am looking for N2+ Dual w/BLTouch and LIN_ADVANCE, Also, if possible to have Filament Sensor as well?

ABH
Posts: 169
Joined: Sun Aug 14, 2016 7:31 pm

Re: LIN_ADVANCE = better extrusion control

Postby ABH » Thu Feb 08, 2018 6:20 am

I will be happy to compile these versions for you, but as I am not using BLtouch myself, I will not be able to test it (I prefer a straight bed, - not mitigation of mechanical defects).
There is a compilation flag in Marlin called "BLtouch" that needs to be enabled, but what else is needed?
How is the sensor connected to the Motion Controller Board, i.e. which MCU pins are used for the sensor?
Do you need EEPROM support?
As you see, I didn't study this myself, so more information is needed.

The filament sensor option, as provided by Raise3D, should be straight forward to add.
Last edited by ABH on Thu Feb 08, 2018 10:30 am, edited 1 time in total.

User avatar
Zon
Posts: 10
Joined: Wed Feb 01, 2017 2:04 am

Re: LIN_ADVANCE = better extrusion control

Postby Zon » Thu Feb 08, 2018 9:46 am

Could you please provide N1 Dual BondTech precompiled firmware?
Thanks in advance.
You don't own a device until you void it's warranty.

Squenz
Posts: 140
Joined: Fri Dec 01, 2017 11:18 pm
Location: Stuttgart/Germany

Re: LIN_ADVANCE = better extrusion control

Postby Squenz » Thu Feb 08, 2018 3:26 pm

I'd second that, it would be great to have the updated firmware, but honestly, i don't have enough time nor personal computing resources to learn how to compile it myself. Too much on each of those dozens of plates around here.

I wouldn't go for it before i feel myself comfortable enough to be not afraid of bricking the board or, even more unwishful, doing something wrong in process and chasing he fall out from firmware ghosts for weeks.

Phife
Posts: 72
Joined: Thu May 12, 2016 3:47 pm

Re: LIN_ADVANCE = better extrusion control

Postby Phife » Thu Feb 08, 2018 5:00 pm

Hey ABH,

Thanks for the offer, There are a few things that need to be setup for the BLtouch to work. I dont remember exactly what it was though. I have attached a copy of the firmware I am currently running that works with my BLtouch so maybe you can see what things were changed to make it work? I dont think it was too much, Ive listed what I think was changed below.

I do know that having BLtouch enabled breaks the Power Loss resume function as when you try to resume a print it will begin by probing the bed with the BLtouch and obviously this wont work as there is a partial print on the bed. Maybe there is a solution to this as well? like keeping the original leveling or fading out the leveling early on so when power is lost it is no longer adjusting the leveling. So its eventually printing flat again? I think Fade Bed Level was a recent option on new versions of Marlin. Or some way to save the bed leveling through a power outage so it doesnt need to relevel after power resume.

I really love my BLtouch, since installing it on my N2+ Dual I havent had to level the bed and its been over a year. So I want to keep using it, but also want to have a filament runout sensor and linear advance.

-The BLtouch connects to the control board on various pins. I think its the ZMin, a 5V header and a single pin on EXP3 which is the Servo pin.
See here for more details on the pins. viewtopic.php?f=4&t=1030&hilit=pins
-EEPROM is enabled
-Servos are Enabled
-the XY and Z offset Position of the BLtouch sensor has to be entered into the firmware, this will be different for each mount. The individual user will need to set this up themselves.

If you can figure this out It would be greatly appreciated!

Thanks ABH

ABH wrote:I will be happy to compile these versions for you, but as I am not using BLtouch myself, I will not be able to test it (I prefer a straight bed, - not mitigation of mechanical defects).
There is a compilation flag in Marlin called "BLtouch" that needs to be enabled, but what else is needed?
How is the sensor connected to the Motion Controller Board, i.e. which MCU pins are used for the sensor?
Do you need EEPROM support?
As you see, I didn't study this myself, so more information is needed.

The filament sensor option, as provided by Raise3D, should be straight forward to add.
Attachments
N2Plus_Dual_1_1_6_Rev_1_BLTouch.zip
Old firmware
(329.03 KiB) Downloaded 23 times


ABH
Posts: 169
Joined: Sun Aug 14, 2016 7:31 pm

Re: LIN_ADVANCE = better extrusion control

Postby ABH » Thu Feb 08, 2018 9:43 pm

Hi Phife,
I took a look at the BLTouch feature and realize that this is very specific to the BLTouch sensor mounting etc., so it doesn't make sense to provide precompiled firmware for this feature.
I think however, that you only need to do modifications to Configuration.h to get it to work. I made some changes to the Marlin 1.1.8 Configuration.h file that I think will give you the same functionality of BLTouch, as in your current Raise3D v.1.1.6_rev1 BLTouch firmware.
What you have in the old firmware is "AUTO_BED_LEVELING_LINEAR" (= tilted plane compensation). There are more advanced compensations available in Marlin 1.1.8 like "AUTO_BED_LEVELING_BILINEAR" (mesh compensation) that you might want to try.
As I indicated before, I don't have BLTouch and have no interest in experimenting with this, so I guess you need to take this Configuration.h file as a starting point. It might work, but I cannot test it.
Your specific configurations are under "PHIFE" compilation flag and all BLTouch changes are marked with /* Raise3D BLTouch */.
Download the GIT branch from here:
https://github.com/ABH10/Marlin-for-Raise3D-N-series/tree/1.1.x_Raise3D_BLTouch
This includes all the files of the Marlin 1.1.8 for Raised3D with LIN_ADVANCE, and you will find the Configuration.h there, that I have updated for BLTouch.

Phife
Posts: 72
Joined: Thu May 12, 2016 3:47 pm

Re: LIN_ADVANCE = better extrusion control

Postby Phife » Thu Feb 08, 2018 9:58 pm

I dont plan on using Raise3D's very expensive "Lack of material" sensor. I will make my own from some endstops.

Would it be possible to also have the firmware allow our own Filament runout sensors? I know Marlin has a filament runout section, does this work with Raise3D printers?

Thanks for the special configuration. I will give it a shot when Im not printing and let you guys know how it works with BLtouch.

Squenz
Posts: 140
Joined: Fri Dec 01, 2017 11:18 pm
Location: Stuttgart/Germany

Re: LIN_ADVANCE = better extrusion control

Postby Squenz » Thu Feb 08, 2018 11:03 pm

Thank so much, great work !!

I'll give the this firmware a shot over the weekend.

ABH
Posts: 169
Joined: Sun Aug 14, 2016 7:31 pm

Re: LIN_ADVANCE = better extrusion control

Postby ABH » Fri Feb 09, 2018 11:19 am

@Phife: No, the Marlin filament runout system doesn't work for us. We just need the motion controller to send a message to the Raise Touch-computer when the filament runs out. That is all the motion controller is supposed to do, when triggered by the sensor. The Raise Touch-computer will then pause the printing, when it receives the message. The Raise Touch-computer would get confused if the motion controller paused printing by itself.
So, in reality, it would be more intuitive if the runout sensor was directly connected to the Raise Touch-computer, as it is the Raise Touch-computer that needs the runout trigger, to pause printing.

Phife
Posts: 72
Joined: Thu May 12, 2016 3:47 pm

Re: LIN_ADVANCE = better extrusion control

Postby Phife » Fri Feb 09, 2018 6:34 pm

Hey ABH, So do you think there is any way to make a generic filament runout sensor work on these machines? I think I read somewhere that someone had got it working with a regular endstop. Surely there is a way to make this work, Can someone look into it?

Ive had a chance to play with this custom firmware for a bit now.

I enabled Bi-Linear Leveling, seems to work well. I also had to enable Z_Safe_Homing so that the Z would home in the center of the bed During G28 commands. G29 initiates the BLTouch Leveling and it works well. I have it set to 4x4 points.

Once the Z offset was adjusted I was able to print correctly. I needed to change my Start Gcode. I use Simplify3D so I added in the Linear Advance Command, the Z Fade command and some code for resetting the BLTouch.

Im still testing the Linear Advance to find the correct setting, I couldnt get the Marlin Calibration Pattern to work on my machine, it would error out the touchscreen when I tried to print it. Must have some bad code or something.

Some issues to note.

I can no longer stop a print correctly. Pressing Stop Print on the touchscreen does stop the print, but the screen gets stuck on showing "Stopping Print" and The machine just stops dead in its position. It no longer goes to the home position like it used to. I can switch screen tabs but It will not do anything else until a full restart. Something must be broken in the Stop code, perhaps the touchscreen is waiting for a response from the firmware (MCU) to acknowledge the stop had completed? Can someone look into this? Is anyone else having this problem?

The other issue, Power outage resume is working better, it no longer tries to probe the bed after restart, Just homes X and Y and resumes printing the correct spot, except for some reason it is now printing 4mm higher than the last layer. There must be a command that is dropping the Z axis 4mm before it resumes printing.

Jetguy
Posts: 2487
Joined: Tue Mar 22, 2016 1:40 am
Location: In a van, down by the river

Re: LIN_ADVANCE = better extrusion control

Postby Jetguy » Fri Feb 09, 2018 7:22 pm

there is any way to make a generic filament runout sensor work on these machines? I think I read somewhere that someone had got it working with a regular endstop. Surely there is a way to make this work, Can someone look into it?


That's exactly what I am testing now. I'll just flat out tell you, yes, it's going to work. All you have to do is load a firmware with detection enabled, then a few gcode print files to set it on and a few other details, and then it just works.
Also, FWIW, unlike some other stuff I bought, these $10 for 2 sensors are injection molded and have very nice inlet and outlet wear guides.
It took about 2 weeks to arrive, but completely worth it. It's as simple as changing the plug on the end from a 3 wire to a 2 wire JST-XH socket.
I ordered these on 23 Jan and they arrived on 5 Feb https://www.amazon.com/gp/product/B074ZB1B2Z

I will post a full tutorial after more testing.


Return to “Software”

Who is online

Users browsing this forum: No registered users and 2 guests