Firmware upgrade from version 1.x to 2.x. User experience.

edited December 2019 in Repetier-Firmware

Back in October I volunteered to participate in Repetier firmware version 2 testing and the last weekend I finally started upgrading my printer’s firmware from dev. version 1 to version 2. In the following series of posts I will share my experience. Hopefully, this will save other users time and help developers to understand end-user’s experience and how to improve it.

 I consider myself being advanced user. I have years of software developing experience, worked in the field of designing electronic boards and PCBs. I bought my first 3d printer almost 4 years ago, which I run on Marlin, Clipper and later on 0.9x and 1.x versions of Repetier firmware. If you are new to any of these areas, your experience may be different, but the good thing is – Repetier developers and other members of these forums are extremely helpful and I never had a case when my question here left unanswered. So, if you got a question – just post it here.

Now about my test environment. After countless upgrades done to my first 3d-printer Velleman Vertex K8400, I reached the point when I was ready to build my own 3d printer from scratch. I decided to go big with IDEX (Independent Dual EXtrusion) design that has 2 print-heads moving independently along X-axis. I may publish the photos later, once the printer is complete, but for now here are the specs of the printer that I am upgrading:


Kinematics:  Cartesian
Mainboard: Ultratronics Pro 1.0 with 32bit CPU
Number of steppers: 7 (2-X, 1-Y, 2-Z, 2-Ext. Z-motors are working in sync, but each has own stepper driver)
Number of steppers drivers: 7  (4 - TMC2100 - E0, E1, E2(Z2), Z,    3 - DRV8825 -  X, Y, E3(A) ) . Will be upgraded later.
Number of hot-ends: 2 (e3d-v6)
Number of fans:  4 (2 - filament, 2 - e3d-s)
Additional fans: 2 (1- mainboard fan directly connected to +12V, 1- Raspberry PI CPU fan PWM-controlled by RPI via custom extension PCB)
Print bed: 40x40cm heated by 110V AC. Moves along Z with Z-Max at the bottom.
Print surface: 3mm borosilicate glass
Network access: via Raspberry PI 3B+ (RPI) and Octoprint
Solid State Relays (SSR): 2 (one for mainboard power supply, controlled by RPI, another for heated bed). Control voltage 3V-32V DC.
End-stops: 4 - Optical,  custom PCB based, use ITR9606-F sensor (schematically similar to Vertex K8400 end-stops)
Z-probe: 1 - Optical with a pin touching the bed (my own design), the sensor is the same as in end-stops. Attached to the right side of left printhead. Activated/deactivated by rear-earth magnets when printhead moves to specific X,Y coordinates.
Servos: None
Thermocouples: None
Filament jam sensors: None
Filament sensors: None
LCD: None (to be added later)
Mainboard power supply: 12V 
Additional power supplies: 2 (RPI power supply and 5V DC supply for controlling main power supply’s SSR

Mainboard connections (plug – connects to):

XMOT – X-motor (Left print-head)
YMOT – Y-motor
ZMOT – Z1-motor
ZMOT1 – Not used
E0MOT – Left Extruder-motor
E1MOT – Right Extruder-motor
E2MOT – Z2-motor
E3MOT – A-Motor (Right print-head)
E0 – Left print-head heater
E1 – Right print-head heater
E2 – Left print-head e3d fan
E3 – Right print-head e3d fan
HB – Heat bed SSR
HBIN – 12V from main power supply
Fan1 - Left print-head filament fan
Fan2 - Right print-head filament fan
T0 - Left print-head e3d thermistor
T1 – Heated bed thermistor
T2 - Right print-head e3d thermistor
T3 – Not used
T4 – Not used
X- – X-stop at the left end of X-axis activated by left print-head
X+ – X-stop at the right end of X-axis activated by right print-head
Y- – Not used
Y+ – Y-stop at the rear end of the printer activated by X1/X2 gantry
Z- – Z-probe sensor
Z+ – Connected to one of 3 Z-max sensors installed at heights 150mm, 300mm and 450mm. Sensor/height selection is done by electronic switch on custom PCB controlled by RPI. For these tests Zmax=150mm was used.
USBP (Programming port) – Connected to RPI, or to PC when firmware update is required.
USB (Native port) – Not used (never worked by some reason)
Ethernet port – Not used
TC1-TC4 - Not used

To be continued…


  • edited December 2019
    Software used during upgrade:
    - Visual Studio Code (VSC) for compiling the code
    - Platform IO IDE extension for Visual Studio (required for building firmware) 
    - Notepad++ to look at version 1 configuration files and search text within multiple files in src directory
    - Pronterface to connect to the board and run GCode commands (The same can be done with Repetier Host)
    - Repetier Host to read and import/export content of EEPROM into a file
    - WinMerge to compare text files
    - Windows 10 OS running on laptop PC
    - Octoprint running on Raspberry Pi for remote access to the printer

    Out of the above list all items except the first 2 can be replaced with other similar software that you are more familiar with. Visual Studio Code is available also for Linux and Mac.

    The steps/actions listed below are numbered to make it easier for readers to ask questions about specific step and for me when referring to previous steps. The first number represents the day of upgrade, the number after "." is the step/action number taken at that day. Don't be discouraged, it took me several days to complete upgrade because I was among the first ones who tried it. The purpose of this thread is to make it easier for you and others.

    Before you start, read the description of version 2 available from here ; This section explains how to install and configure VSC and PlatformIO. Please note that api-doc folder included into dev2 zip file available from Github, still contains documentation for version 1.

    Couple of notes about using VSC: This could be specific to my installation, but on every start, VSC was trying and failing to update certain files. I changed VSC properties to 'Always run as Administrator' and the error went away. Another issue I had was related to the location of the source files. VSC does not like if they are on a network drive and the path starts with \\192.168.x.x\... As soon as I copied the files to my local drive this issue was gone. 

    I had all aforementioned software pre-installed before I started this upgrade.

    Upgrade Steps

    1.1 Made sure the printer is fully functional running current firmware. In my case it was development branch of 1.x

    1.2 Backed up the content of EEPROM into a file using Repetier Host and made sure I have my current firmware files handy in case I need to roll back.

    1.3 Downloaded the latest revision of version 2 from unzipped and saved on local drive. 

    1.4 Opened src/Repetier folder and compiled default set of files without making any changes. During compilation got several warnings, but no errors, which was good indication that my VSC and Platform IO setup is correct. 

    1.5 Flashed the board with newly compiled code - no issues. 

    1.6 Following suggestion from @Repetier replaced Configuration.h and Configuration_io.h files with the files from \src\SampleSystems\Dual-X-Axis\Stacker X2 folder. These files would better fit my IDEX printer than the default configuration files. Compiled again - no issues.

    1.7 Changed MOTHERBOARD in Configuration.h from 412 to 409, which is Ultratronics. Compilation failed with 18 problems and hundreds of errors. 

    1.8 The first set of problems was related to Display controller. Since I currently don't have LCD, replaced FEATURE_CONTROLLER value from CONTROLLER_SPARKLCD to NO_CONTROLLER.

    1.9 Number of problems went down to 16. Commented out in Configuration_io.h all lines related to caseLightPin/HEATER_6_PIN and BoardFan/HEATER_7_PIN, since my case light and board fan are not controlled by mainboard.

    1.10 Number of problems went down to 10. Many remaining problems are about UI_ENCODER, which is strange, since I've already set FEATURE_CONTROLLER to NO_CONTROLLER.

    1.11 Added the following lines to Configuration.h right after FEATURE_CONTROLLER definition 
          #define UI_ENCODER_CLICK -1
          #define UI_ENCODER_A -1
          #define UI_ENCODER_B -1
          #define UI_BACK_PIN -1
          #define UI_RESET_PIN -1 

    1.12 Down to 3 problems and 3 errors.
          src\PrinterTypes\Printer.cpp:94:10: error: 'TonePacket' in 'class Printer' does not name a type
           Printer::TonePacket toneQueueBuf[Printer::toneBufSize];
          src\PrinterTypes\Printer.cpp: In static member function 'static void Printer::addToToneQueue(TonePacket)':
          src\PrinterTypes\Printer.cpp:1494:5: error: 'toneQueueBuf' was not declared in this scope
               toneQueueBuf[seekToneIndex] = packet;
          src\PrinterTypes\Printer.cpp: In static member function 'static void Printer::processToneQueue()':
          src\PrinterTypes\Printer.cpp:1509:41: error: 'toneQueueBuf' was not declared in this scope
                   if ((curTime - lastToneTime) >= toneQueueBuf[curToneIndex].duration) {
          *** [.pio\build\due\src\PrinterTypes\Printer.cpp.o] Error 1

    1.13 Commented out #define BEEPER_PIN 27 in ultratronics.h file. Got several warnings, but no errors. Why BEEPER_PIN causes errors needs to be looked at later.

    1.14 Do I need to disable TMC drivers? Would be nice to have On/Off option. Will post question in forums.

    1.15 ultratronics.h file contains pin assignments that appear to be duplicate. For example
        #define TEMP_1_PIN 6
        #define HEATER_3_PIN 6
        #define TEMP_0_PIN 7
        #define HEATER_3_PIN 7
        Discovered that, TEMP pins are actually not the pin numbers but Analog channel numbers, that's why reused numbers not causing issues.
    1.16 Loaded firmware into the board. Connected via Pronterface. Got errors 
         Heater E0 seems to be defect. Sensor reported unusual values.
         Heater E1 seems to be defect. Sensor reported unusual values.

    1.17 Found and updated these lines in Configuration_io.h
            IO_ANALOG_INPUT(IOAnalogExt1, THERMOCOUPLE_1_PIN, 5)
            IO_ANALOG_INPUT(IOAnalogExt2, THERMOCOUPLE_2_PIN, 5)   
        Replaced with         
            IO_ANALOG_INPUT(IOAnalogExt1, TEMP_0_PIN, 5)
    IO_ANALOG_INPUT(IOAnalogExt2, TEMP_2_PIN, 5)

    1.18 No heater errors anymore, but M105 shows both nozzle temperatures at 379.3 degrees. Bed temperature looks correct.

    1.19 Replaced in Configuration_io.h
            IO_TEMPERATURE_TABLE(TempExt1, IOAnalogExt1, TempTablePT100)
            IO_TEMPERATURE_TABLE(TempExt2, IOAnalogExt2, TempTablePT100)
            IO_TEMPERATURE_TABLE(TempExt1, IOAnalogExt1, TempTableATC_104GT) 
            IO_TEMPERATURE_TABLE(TempExt2, IOAnalogExt2, TempTableATC_104GT)
        Commented out
            IO_TEMP_TABLE_PTC(TempTablePT100, PT100_STACKER)    
    1.20 Re-flashed. Now M105 reports correct temperatures.

    1.21 Trying to read the state of end-stops. Entered M119. Got OK that is followed by 'busy:processing' message that keeps repeating. No expected output. Had to reset the board to kill this endless busy loop.

    1.22 Tried few other commands G28 X, T1, T0 - they all return OK and then get stuck showing 'busy:processing' message.

    1.23 M205 works, shows content of EEPROM, but most values are either not set or contain invalid numbers. Ultratronics board stores EEPROM on SD card. I did not format SD before switching from version 1 to version 2, that may be one of the reasons. Tried to change EEPROM_MODE from 2 to 1. No difference.

    1.24 Updated ENDSTOP_SWITCH_HW settings in Configuration_io.h. Set values:
           ENDSTOP_SWITCH_HW(endstopXMin, IOEndstopXMin, X_AXIS, true)
           ENDSTOP_SWITCH_HW(endstopYMax, IOEndstopYMax, Y_AXIS, true)
           ENDSTOP_SWITCH_HW(endstopZMax, IOEndstopZMax, Z_AXIS, true)
           ENDSTOP_SWITCH_HW(endstopAMax, IOEndstopAMax, A_AXIS, true)
        also updated these lines 
    1.25 No difference, M119 still hangs.

    1.26 Set EEPROM_MODE to 0. Got lots of warnings but not errors. Now M205 shows correct values!

    1.27 M119 also started to work!! All 4 end-stops trigger as expected.

    1.28 Until now the board was getting the power from PC via USB cable. Turned on printer's power supply. Executed G28 X. No movement, one of the motors makes strange noise.

    1.29 Tried G28 Y. Motor made similar noise, but then gantry moved towards Y min. It supposed to home in opposite direction.

    1.20 Changed the direction of Y, i.e now it is opposite of what I had in version 1.x
           IO_OUTPUT(IOY1Dir, ORIG_Y_DIR_PIN) 
    1.21 Now Y homes towards Y-max, but Y-max end-stop does not trigger.

    1.22 Replaced few lines in Configuration_io.h starting 
        This did not help. Y motor keeps running after reaching Y-max end-stop. Reverted the last change.
    1.23 At this point I am realizing that this upgrade will be much more complicated than I thought. Back to reading documentation...

    1.24 Updated these lines:
        STEPPER_SIMPLE(XMotor, IOX1Step, IOX1Dir, IOX1Enable, endstopXMin, endstopNone)
        STEPPER_SIMPLE(AMotor, IOAStep, IOADir, IOAEnable, endstopNone, endstopXMax)
        STEPPER_SIMPLE(YMotor, IOY1Step, IOY1Dir, IOY1Enable, endstopNone, endstopYMax)
        STEPPER_SIMPLE(ZMotor, IOZ1Step, IOZ1Dir, IOZ1Enable, endstopNone, endstopZMax)
        Initially they contained only endstopNone in both Min and Max positions.
    1.25 No change. Commented out 
         #define NO_MOTOR_ENDSTOPS
        After this change the strange noise went away. The movement towards Y-home is smooth, but end-stop still has no effect. Also tried G28 X and discovered the X homes towards X-max. 
    1.26 Inverted X and A directions. Tested, weird noise is back. X does not move at all. Y moves but end-stop still does not trigger.

    1.27 Found that Y-direction and Y-homing directions were set incorrectly. Changed to inverse. 
        #define Y_HOME_DIR 1
        So we are back to the same direction as in version 1.

    1.28 After the last change Y-max end-stop started to work!!!

    1.29 Discovered that the strange noise are caused by Z-motors. I have 2 Z-motors - one on each side of the bed. They are connected to separate stepper drivers. In version 1 there was an option to configure them to work in sync. Here in version 2 - I don't know if this has been implemented. For now connecting both motors to the same driver and also changing below settings to zeros
        #define ZHOME_PRE_RAISE 2
        #define ZHOME_PRE_RAISE_DISTANCE 10
    1.30 Set correct Y_MAX_LENGTH. Movement along Y axis is nice and smooth. Used the same step/mm value as in previous firmware version. 

    1.31 Tested G28 X. Left print-head homes towards X-min and end-stop works correctly. Then tried G28. Left print-head moved to home, right print-head did not move at all. Discovered also that Z-homing direction is incorrect.

    1.32 Found out that right X motor pin assignment was incorrect. I had ORIG_E2 instead of ORIG_E3.
        With the following settings it started to works correctly
    1.33 Now both X motors any Y motor with corresponding end-stops work correctly. Successfully tested ditto mode with 
        M280 S1 R0 and M280 S1 R1 commands.
    The values of XAXIS_STEPS_PER_MM and AAXIS_STEPS_PER_MM are the same as in version 1.x
    1.34 Tested filament fan with M106. Works for the Left print-head. Increased the number of fans and updated fan list
            #define NUM_FANS 2
            #define FAN_LIST \
                { &Fan1PWM, &Fan2PWM }
        Defined fans as following
            IO_OUTPUT(IOFan1, ORIG_FAN_PIN)
            IO_OUTPUT(IOFan2, ORIG_FAN2_PIN)
            IO_PWM_SOFTWARE(Fan1NoKSPWM, IOFan1, 0)
            IO_PWM_SOFTWARE(Fan2NoKSPWM, IOFan2, 0)
            IO_PWM_KICKSTART(Fan1PWM, Fan1NoKSPWM, 20)
            IO_PWM_KICKSTART(Fan2PWM, Fan2NoKSPWM, 20)   
    1.35 Tested both fans with M106 P0 and M106 P1. Both worked.

    1.36 Tested heater with M104 S100. Got error:
            Error:A heater did not rise while under full power, so we disabled the heater.
    1.37 After correcting heater pin assignment heaters started to work
            IO_OUTPUT(IOExtr1, HEATER_0_PIN)
            IO_OUTPUT(IOExtr2, HEATER_2_PIN)
            IO_OUTPUT(IOBed1, HEATER_1_PIN)        
    1.38 Tested heated bed with M190 S65. Worked fine. 

    1.39 Reported Beeper bug from step 1.12 at Support Forums and asked question about dual Z-motor configuration

    1.40 Called it a day

    To be continued

  • edited January 3
    2.1 Got response from @Repetier - the errors from step 1.12 have been fixed and updated files are available from Github. 

    2.2 Configured e3d cooling fans as following
          IO_OUTPUT(IOCoolerFan1, HEATER_3_PIN)
          IO_OUTPUT(IOCoolerFan2, HEATER_4_PIN)
          IO_PWM_SOFTWARE(CoolerFan1, IOCoolerFan1, 0)
          IO_PWM_SOFTWARE(CoolerFan2, IOCoolerFan2, 0)
          COOLER_MANAGER_SENSOR(ExtruderCooler1, TempHottestExtruder, CoolerFan1, 70, 200, 150, 255)
          COOLER_MANAGER_SENSOR(ExtruderCooler2, TempHottestExtruder, CoolerFan2, 70, 200, 150, 255)
       Tested - both fans worked. 70 in COOLER_MANAGER_SENSOR arguments is minimum temperature when fan turns on. Looks like it overwrites another setting 
          #define EXTRUDER_FAN_COOL_TEMP 80

    2.3   For dual Z-axis motor support, following advice from @Repetier replaced Z-motor section with this
             // ZMotor 1
             IO_OUTPUT(IOZ1Step, ORIG_Z_STEP_PIN)
             IO_OUTPUT(IOZ1Dir, ORIG_Z_DIR_PIN)
             // ZMotor 2
             IO_OUTPUT(IOZ2Step, ORIG_E2_STEP_PIN)
             IO_OUTPUT(IOZ2Dir, ORIG_E2_DIR_PIN)
             STEPPER_SIMPLE(Z1Motor, IOZ1Step, IOZ1Dir, IOZ1Enable, endstopNone, endstopZMax)
             STEPPER_SIMPLE(Z2Motor, IOZ2Step, IOZ2Dir, IOZ2Enable, endstopNone, endstopZMax)
             STEPPER_MIRROR2(ZMotor, Z1Motor, Z2Motor, endstopNone, endstopZMax);

    2.4 Had to reduce MAX_FEEDRATE_Z from 7 that I used in version 1 to 5. Otherwise the motors would start turning and then stuck making that strange noise I experienced earlier.

    2.5 Changed homing priorities to ZYX. This order is specific to my printer's design. It appears that the higher is the priority for an axis, the later homing will take place for it. A bit counterintuitive, but it's OK.
             #define X_HOME_PRIORITY 2
             #define Y_HOME_PRIORITY 1
             #define Z_HOME_PRIORITY 0
             #define A_HOME_PRIORITY 2 
    2.6 Discovered that Z-steps per mm value had to be set to half of what I used in version 1. Changed from 3182 to 1591. This allowed to revert MAX_FEEDRATE_Z to 7. At this point all motors on all axes and all stop sensors are working.

    2.7 Re-enabled EEPROM. Still lots of values appear to be incorrect or random. Once again reverted EEPROM_MODE to 0. Compiled and installed firmware. Connected via Repetier Host and read EEPROM. All values are correct. Exported EEPROM content into file. Re-flashed firmware with  EEPROM_MODE=1, then Imported EEPROM content from the file using Repetier Host. That did not help - after disconnecting printer, then reconnecting and re-reading EEPROM, the values appeared to be the original, not what I imported from the file. Will disable EEPROM for now and get back to it later.

    2.8 Connected to Octoprint. Tested homing, movements, heaters, fan and tool change. Homing and all moves worked correctly. When heating up the nozzle to 210 degrees the temperature first went up to 217 then down to 207 and finally stabilized at 210. The second nozzle did the same. This is new behavior, I don't recall seeing it in older versions. Could be configurable. Will look at this later. When switching to Tool 1, right printhead moves to X=0 and hits the left printhead that is in parked position. Will need to fine tune X axes related settings. Also, when switching the tools, printhead move extremely fast. Hopefully there is a way to reduce this speed. 

    2.9 Was able to properly read content of EEPROM with Octoprint's EEprom Repetier Plugin. Save EEPROM function of the plugin did not work since EEPROM_MODE is 0, i.e. technically I don't have EEPROM at the moment, but it is still readable.

    2.10 Discovered that the right extruder motor rotates in wrong direction. Replaced 

    2.11 Looks like both e3d fans go on and off together. Will need to further tune their configuration.

    2.12 Manually leveled the bed and tried the 1st test print. Observed 2.66 times over-extrusion. Tried to check the value of steps per mm for extruders, but it was absent from configuration. Added lines
         #define EXT0_STEPS_PER_MM 140.190
         #define EXT1_STEPS_PER_MM 140.190
    The values were taken from my version 1 configuration.     

    Also changed 
          COOLER_MANAGER_SENSOR(ExtruderCooler1, TempHottestExtruder, CoolerFan1, 70, 200, 150, 255)
          COOLER_MANAGER_SENSOR(ExtruderCooler2, TempHottestExtruder, CoolerFan2, 70, 200, 150, 255)
          COOLER_MANAGER_SENSOR(ExtruderCooler1, TempExt1, CoolerFan1, 90, 200, 150, 255)
          COOLER_MANAGER_SENSOR(ExtruderCooler2, TempExt2, CoolerFan2, 90, 200, 150, 255)
    2.13 E3D fans are now controlled separately. Extrusion amount did not change. Reduced  STEPS_PER_MM from 140.190 to 52.7 and re-flashed firmware.

    2.14 Still no difference. Looks like EXT0_STEPS_PER_MM and EXT1_STEPS_PER_MM values have no effect. Searched the code and found this line      
      Motion1::resolution[E_AXIS] = LC_STEPS_PER_MM;
    Initially thought LC_STEPS_PER_MM might be the value to change, but then discovered that LC stands for LEVELING_CORRECTOR, thus it does not apply.

    2.15 Replaced
          STEPPER_ADJUST_RESOLUTION(E1Motor, E1MotorFinal, 500, 367)
          STEPPER_ADJUST_RESOLUTION(E2Motor, E2MotorFinal, 500, 367)    
          STEPPER_ADJUST_RESOLUTION(E1Motor, E1MotorFinal, 500, 140.19)
          STEPPER_ADJUST_RESOLUTION(E2Motor, E2MotorFinal, 500, 140.19)   
        Got the result opposite to what I expected - old extrusion was 266mm instead of 100mm. Now it is 366mm.

    2.16 Commented out both STEPPER_ADJUST_RESOLUTION lines. Replaced
        STEPPER_SIMPLE(E1MotorFinal, IOE1Step, IOE1Dir, IOE1Enable, endstopNone, endstopNone)
        STEPPER_SIMPLE(E2MotorFinal, IOE2Step, IOE2Dir, IOE2Enable, endstopNone, endstopNone)
        STEPPER_SIMPLE(E1Motor, IOE1Step, IOE1Dir, IOE1Enable, endstopNone, endstopNone)
        STEPPER_SIMPLE(E2Motor, IOE2Step, IOE2Dir, IOE2Enable, endstopNone, endstopNone)
    also replaced 
        TOOL_EXTRUDER(ToolExtruder1, 0, 0, 0, HeaterExtruder1, E1Motor, 1.75, 500, 5, 30, 5000, 177, "M117 Extruder 1", "", &Fan1PWM)
        TOOL_EXTRUDER(ToolExtruder2, 0, 0.1, 0, HeaterExtruder2, E2Motor, 1.75, 500, 5, 30, 5000, 177, "M117 Extruder 2", "", &Fan2PWM)
        TOOL_EXTRUDER(ToolExtruder1, 0, 0, 0, HeaterExtruder1, E1Motor, 1.75, 140, 5, 30, 5000, 177, "M117 Extruder 1", "", &Fan1PWM)
        TOOL_EXTRUDER(ToolExtruder2, 0, 0, 0, HeaterExtruder2, E2Motor, 1.75, 140, 5, 30, 5000, 177, "M117 Extruder 2", "", &Fan2PWM)
    This fixed extrusion problem. Manually leveled the bed and successfully completed the 1st test print!!! At the same time got response from @RAyWB on my question in Support forums confirming that the change needs to be done to TOOL_EXTRUDER line.

    2.17 Downloaded the latest Printer.cpp file that contains beeper error fix. No more compilation errors. Ultratronics on-board beeper works correctly. Tested with M300 S392 P250

    2.18 Added Z-probe and ABL configuration. Tested G32 command. It resulted in homing along Z, Y, X1 and A axis, then slowly moved print-head with probe to the starting position of 5x5 grid, then made quick move towards X=0 Y=0 and restarted the board. Reported issue in Support forums. Immediately received 2 replies. One of them was pointing out that my A-stop does not function properly. After running several tests discovered that indeed one of the wires connected to A-stop sensor (X-max stop) was broken. Fixed the issue.  By some kind of strange coincidence the wire failed at the same time when I activated ABL.

    2.18 Once the wire was fixed, checked configuration files one more time and discovered few lines that looked incorrect:
            #define ZPROBE_ADDRESS nullptr
            #define ZPROBE_ADDRESS &endstopZMin
       Commented out 
            #define NO_AMAX_ENDSTOP_TEST  
    FEATURE_Z_PROBE was still set to 0. Changed it to 1 and compiled the code. Got multiple errors. The 1st was saying that NUM_EXTRUDER is not defined. I already had line #define NUM_TOOLS 2, looks like separate definition of extruder number is required. Added #define NUM_EXTRUDER 2 to Configuration.h file. This took care of the 1st error, but few other errors did not go away. Here is the entire list:
    src\communication\GCodes.cpp: In function 'void GCode_134(GCode*)':
    src\communication\GCodes.cpp:725:25: error: 'Extruder' has not been declared
         int startExtruder = Extruder::current->id;
    src\communication\GCodes.cpp:726:5: error: 'extruder' was not declared in this scope
         extruder[p].zOffset = 0;
    src\communication\GCodes.cpp:726:5: note: suggested alternative: 'BitOrder'
         extruder[p].zOffset = 0;
    src\communication\GCodes.cpp:759:14: error: 'startProbing' is not a member of 'Printer'
    src\communication\GCodes.cpp:761:9: error: 'Extruder' has not been declared
    src\communication\GCodes.cpp:762:36: error: 'runZProbe' is not a member of 'Printer'
             float refHeight = Printer::runZProbe(false, false);
    src\communication\GCodes.cpp:773:13: error: 'Extruder' has not been declared
    src\communication\GCodes.cpp:774:37: error: 'runZProbe' is not a member of 'Printer'
                 float height = Printer::runZProbe(false, false);
    src\communication\GCodes.cpp:806:5: error: 'Extruder' has not been declared
    src\communication\GCodes.cpp:807:14: error: 'finishProbing' is not a member of 'Printer'
    src\communication\MCodes.cpp: In function 'void MCode_890(GCode*)':
    src\communication\MCodes.cpp:1376:28: error: 'bendingCorrectionAt' is not a member of 'Printer'
             float c = Printer::bendingCorrectionAt(com->X, com->Y);
    *** [.pio\build\due\src\communication\GCodes.cpp.o] Error 1

    2.19 Reported these errors to developers and provided current version of my configuration files. Looking forward to get help.
    To be continued
  • 3.1 Got response advising not to use EXTRUDER and Z-PROBE settings as they belong to the old code left from ver.1

    3.2 Continued troubleshooting not working z-probe sensor. Updated Configuration_io.h. Reverted 
       #define ZPROBE_ADDRESS &endstopZMin        
       #define ZPROBE_ADDRESS nullptr
       Configuration.h still contains 
       CONFIG_VARIABLE_EQ(EndstopDriver, *ZProbe, &endstopZMin)
    3.3 Compiled, no errors. Tested with M119 and observed the strange behavior. When I connect to the board with Pronterface while Z-probe is activated, i.e. optical sensor is not covered and the output signal is Low I get correct reading
           Printer is now online.
           Free RAM:76520
           Card successfully initialized.
           EEPROM read from sd card.
           ok 0
           ok 0
           endstops hit: x_min:L y_max:L z_min:L z_max:L a_max:L Z-probe state:L 
    Then when I lift the probe and cover the sensor the signal changes to High
           ok 0
           endstops hit: x_min:L y_max:L z_min:H z_max:L a_max:L Z-probe state:H
       All good until now. But if I release the probe the signal does not return to Low.

       When I connect to the printer while Z-probe is deactivated, i.e. the output is High, it never switches to Low.

    3.4 Tried to run G32. Got these errors:
           Error:z-probe triggered before starting probing.
           [ERROR] Error:z-probe triggered before starting probing.
           You need at least 3 valid points for correction!
           fatal:Leveling failed! - Printer stopped and heaters disabled due to this error. Fix error and restart with M999.
           X:10.00 Y:46.00 Z:15.000 E:0.0000 A:406.00
           fatal:Leveling failed! - Printer stopped and heaters disabled due to this error. Fix error and restart with M999.
           ok 0         
           This makes sense because the signal was High while firmware was expecting Low.
    3.5 Replaced
           STEPPER_MIRROR2(ZMotor, Z1Motor, Z2Motor, endstopNone, endstopZMax);
           STEPPER_MIRROR2(ZMotor, Z1Motor, Z2Motor, endstopZMin, endstopZMax);
           I don't expect this to fix Z-probe readings, but I am just out of other ideas, so decided to try...
    3.6 No compilation errors and no change in behavior. Reverted the last change.

    3.7 Tried to replace
       This did not help either. Reverted the change.

    To be continued
  • Had to put upgrade on back burner for the last 10 days and address few hardware issues - relocated X stop sensors, redesigned print head mounts, replaced temporary wiring with permanent, etc. Now ready to move on with the upgrade.
Sign In or Register to comment.