Radds 1.6 or due not initializing/booting correctly on 1.0.2

edited August 2018 in Motherboard
Hi, first of all apologies if this is the wrong category.



Quick rundown of my hardware.
Wanhao i3 plus base printer
Radds 1.6 from youprintin3d.de
Radds 4x20 display
TMC2130 steppers from watterott
Arduino Due (Currently clones from Amazon.co.uk)

Quick history
I burned my first two (genuine) arduinos because my printer had a PCB on the hotend sent 24v into ground of hotend thermistor. (burned ADC and shorted some analog pins to gnd and 3.3v)
Then i skipped trying to keep the default cable and hot end PCB setup and went for RC silicone wires and ethernet cable for fans ziptied together. Expensive lesson as I spent about 50euro on each of them.

I have soldered SPI for the TMC2130 on the underside and it worked for some test prints.


Now. The problem.

Short story, I boot printer and display shows this 90% of the time.


Long story.
I've had the problem that the firmware wont boot or the UI wont boot properly 90% of the time see image above. My highest successrate of booting is just running the arduino via USB. then it boots 60% of the time. Previously it never booted first try and would always boot when reset. Now reset does not help.
This affects both my arduinos, happens on basically stock firmware aswell.

So I am currently alternating between two different firmwares (both 1.0.2), one I call "stock" and one I have my settings and such in.

Config.h "Stock"
Config.h "WIP"

Full download
I included the full download because I also did some changes in pinter.cpp as two z stepper drivers thing was a bit broken, something something z2_stepper instead of ext1_stepper.


Honestly "WIP" is still very much a work in progress, I think I've disabled a few things while troubleshooting and honestly this is now my last resort as I don't want to bother people with my uneducated questions. I should have researched more before opting to upgrade my printers motherboard instead of just replacing the one that broke.

Edit: forgot the usual apologies for any misspellings and such, I am not a native speaker but I still should be able to do better than this. I'm also tired from a lot of troubleshooting.

Comments

  • At least I know the not boot on first power up from some arduino due clones. That is caused by a wrongly dimensioned capacitor if I remember right. It causes the processor to start too early and it then crashes. As a test use the normal blink script from arduino. For me it did not work on startup but after a reset. As a test if that is your problem you should also run the blink script with a output that has a led. 13 is default whcih is a led on the arduino board it self.
  • Okay. So today i finally got my genuine DUE in the mail. I still have the same problem. it does not start first time and pushing reset does nothing. :/
  • Please test the blink sketch first. Then firmware with no TMC enabled. In that case it might block if eeprom is not responding. That will cause a lock forever. If that then works you might test with TMC special drivers. If it then blocks it is the SPI making problems most likely.
  • Blink works fine, i flashed with the config I have labeled "stock" as that has no TMC enabled.

    That worked!

    If you don't mind, could you explain a bit more what you mean with "TMC special drivers" 

    Now (later) i am gonna try changing the CL pins, i have no real reasoning behind that though.

    My SPI and CL things are soldered so that may have caused some part of the errors. I'll redo the solderwork, I only had multi-cored copper wire and i will redo it with some single-cored cable (and use some glue to keep em tidy)


    Anyway, thank you for your helpful comments, this one test gave me more information than most of my tinkering these last few weeks (ive mostly done config.h iterations) :)
  • TMC2130 can be programmed with spi if you configure firmware to use TMC2130 drivers. If you do not do that, they will still work but without trying to set current/microstepping. That way you can narrow down the problem to firmware in general or spi not perfectly working.
  • Does SPI still need to be soldered? Like this, or is this not relevant anymore. I had it soldered before so I am currently re-soldering it
  • Yes I think so. That is from the guy who wrote the TMC2130 driver addition. I don't have it used so far. What I mean is when it is not activated as driver it does not set driver settings but will work in step/dir/enable mode with defaut values. That is not for final solution but to test if the spi is causing the problem.
  • edited September 2018
    Okay. I am back. I've re-soldered SPI cables and now it boosts 
    But only when:
    No stepperdrivers are on the board
    0.92 is flashed
    1.0.2 w/o TMC is flashed


    Drivers in with drivers enabled crashes.

    In pins.h there is a segment with HW and SW SPI. Does this need to be changed to be compatible with the TMC2130 resolder?
    "// 10 if using HW SPI. 53 if using SW SPI
    #define SDSS    53"

    Do I need to configure it to use the pins on the SDcard connectors for SPI or is that already how it should be?
    Honestly I've gone through so many different test builds lately to gain more information I can share that I am starting to dream about the Arduino IDE and code. 


    Also I just want to thank you for all your help so far. I very much appreciate it
  • "// 10 if using HW SPI. 53 if using SW SPI
    #define SDSS    53"

    That is not part of radds board definition, so ignore it.

    You should be using hardware spi and there is only one hardware spi. All you need is a CS pin per device so you talk to the right spi device.

    Please try first without display. Not sure if the sd card configuration can make trouble. Should not be a problem because without sd card it will simply use the sd card from the radds, but it adds cable length and all share same MISO/MOSI/CLOCK cable, so that might catch up interference.

    Maybe you should try 1.0.3dev - I reduced spi frequency there. Maybe with the 4mhz spi frequency it works better. Just a try, configuration is the same.

    Since the author of the extension uses a radds for development I wonder that it is so problematic. 
  • Currently testing 2 versions of dev. w/ and w/o LCD enabled. Also tested my old "main" with SDSUPPORT set to 0 and added "#undef SDCARDDETECTINVERTED". Don't know if it was needed but the one I got from the configuration had it.


    Just tried those two versions of dev fw and still no response. I did disable SDSupport in both configs though so that may be an error source. I'm gonna keep trying stuff, will update if I find something that works.


    Just figured i should mention, if I have "mirror Z to other driver" as in I have Z2 I need to change EXT1 to Z2 in Printer.CPP


    Like so:

    #if TMC2130_ON_EXT1 > 0

        Printer::tmc_driver_e1 = new TMC2130Stepper(Z2_ENABLE_PIN, Z2_DIR_PIN, Z2_STEP_PIN, TMC2130_EXT1_CS_PIN);
  • I don't think the modification was really necessary. Z2_ENABLE_PIN was assigned the value of EXT1_ENABLE_PIN in your configuration I guess. So it is still calling it with the same parameter.

    But I looked at the sport and see that the drivers get initialized before firmware sends "start". So there is a simple test to check where and what exactly fails.

    A bit below add after

        Com::printFLN(Com::tStart);

        HAL::showStartReason();

    this line:

    HAL::delayMilliseconds(100);

    it will wait so the "start" message will appear in host log when you connect. At least if initialization works. So if you see "start" in the log you know that the init was ok. If not disable one by one by commenting out the new TMC2130Stepper line together with the following configTMC2130... line . Maybe it is just one driver that is making problems during init. Then you know wiring is bad for that one or it is defect if all others work. Since motors do not get used at startup I think one of these lines causes the blocking. The other parts are only used on special moves or commands but would not prevent start of firmware.
  • Sep 11.
    Okay so I've spent a few hours troubleshooting. So with some tinkering I got it to boot, i got drivers to move (+ only still need to change some settings i think) 

    However i do believe something is still fubar. Its slow to boot. Like we are talking 40+ seconds. sometimes boardering on 5min boot times.
    After flashing it again a few times, now it wont boot again. I am now pretty sure either my RADDS may be damaged or one of the drivers are the cause.

    Sep 12.
    I added your command and further troubleshooting has it in the FW, but it does not seem to have had an effect. 



    Sep 13.
    Okay, a few more hours and I'm pretty sure I have something... Maybe. 

    Basically. It seems LCD encoder position affects boot chance. 
    SOMETIMES (not always, not often but many times) turning the encoder while on "frozen" screen (/w 2 bars as pictured in earlier comment) it starts up
    NOTE. Does not boot w/o screen. May be due to not flashing a FW without screen though.

    Also! removing one stepper driver (the one placed on E1, E1 wiring is okay though and E2 which is connected THROUGH E1 causes no issues.) has increased boot success to around 70% along with the above technique. No steppers give 100% (dont know if it fails 1 in a 100 or not. not that inclined to test)

    Also, don't know if it matters or it is correct behaviour or not.

    While connected to my RADDS pins 50, 48 measure GND (aka ENC_P and ENC_B)

    Tomorrow I will look into removing a resistor and doing a solder join on the stepper motors instead as they said on page 5 here.

    Rep-Host logs
    All drivers connected, wont boot (via only USB), not much to look at
    One stepper removed, wont boot via USB so booted via PSU then connected

    Sorry if the comment is rather long. I've spent a lot of hours the last two days troubleshooting and collecting information. Tomorrow I will also be attempting a dialog with Alexsomesan, but I'm not sure what to hope for as he is probably a busy man.


    Again. Many thanks :)
  • From the logic side having display connected or not should not make a difference. Display lines are just send never received. Input lines stay high (assuming pullup on) so as long as none does trigger reset or a function (switches normally open should work).

    Boot time is normally a few seconds never more or watchdog would trigger. Do you have it disabled? Otherwise it might also explain the high time if oyu are in a reboot loop. Maybe initializing the tmc takes long. The only other thing that would block is reading eeprom on radds. But since it works without tmc enabled I think the tmc init takes so long. Maybe it verifies settings and when something goes wrong it retries until it succeeds.

    Hopefully alex has some time and can say more.
  • I have watchdog enabled I do believe. I've got the printer booting 100% reliably now. There is still a significant difference in boot time now, sometimes it boots in 2sec, other times 50 sec. Honestly don't know whats changed.

    Where do I see if watchdog is enabled, I want it enabled but when I load my config.h into the configurator watchdog isnt on so I assume its not enabled in config.h.


    Ill look into the booting difficulties but meanwhile I'll take this time to see if I can get it stable.


    There seems to be a bit of SW SPI code in the tmc2130 library now so I'll have to check later if that is functional or experimental.
  • Check configuration.h for

    /* A watchdog resets the printer, if a signal is not send within predefined time limits. That way we can be sure that the board

    is always running and is not hung up for some unknown reason. */

    #define FEATURE_WATCHDOG 1

    1 is on 0 is off.

    Good that it working now also such difference in boot time is strange.
  • edited September 2018
    Watchdog is on, ill try and disable it and see if it may be a cause for boot time.
    Boot time may be something like some capacitator or such hasnt discharged completely. i dont know. Would kinda explain my previous weirdness with the encoder boot.

    Turning off watchdog did nothing for boot times, atleast first time. First boot took about 1 min 20 sec. Then second about 20 sec, third 9 sec.
    Now it consistenltly boots in about 4 seconds

    Does it take a few boots to "flush" out the old flash?

    Ill flash again with watchdog and see if that was a cause.
    Flashed with watchdog back turned on
    1st boot: 19 sec. 2nd: 9 sec. 3rd: 30 sec.
    After this its back to consistently booting in 4 sec.

    Maybe also bootloop until perfect storm conditions allows it to boot.


    Also, is the movespeed for "move z fast" set anywhere? I increased max feedrate and homing feedrate from 2 to 20(max) 10(home) yet it still moves INCREADIBLY slow. Homing from around 3 cm up takes about a minute or so.
    Takes about 3 seconds to turn 1/4th rotation of stepper

    is max feedrate mm/s or steps?

    Steps/mm     Leadscrew pitch   Step angle    Stepping
    400.00   8 mm/revolution1.8°     1/16th

    #define XAXIS_STEPS_PER_MM 80
    #define YAXIS_STEPS_PER_MM 80
    #define ZAXIS_STEPS_PER_MM 400
    #define MAX_FEEDRATE_X 200 #define MAX_FEEDRATE_Y 200 #define MAX_FEEDRATE_Z 20 #define HOMING_FEEDRATE_X 40 #define HOMING_FEEDRATE_Y 40 #define HOMING_FEEDRATE_Z 10
  • Really strange thing the different boot times. Flash is not the problem. 
    What is your definition of boot time? Until you see "start" in log?

    Regarding speed did you check settings in eeprom? They do not get overwritten with new flashing so it may contain older values.

    Speeds are in mm/s in configuration.
  • Was away for a few hours. First "cold" boot took 2 minutes. If I leave the printer on for a while the boot is then it boots faster next time.


    As for Z move. I missed EEPROM
  • edited September 2018
    Boot time is time from seeing this to display showing printer FW version and printer name.

    Here is a vid of printer boot. Only thing I do off camera is switching PSU on.
    (skip to 00:45 if you don't want to wait)
  • See what you mean. Looking into setup in printer.cpp

        EEPROM::initBaudrate();

        HAL::serialSetBaudrate(baudrate);

        Com::printFLN(Com::tStart);

        HAL::showStartReason();

        Extruder::initExtruder();

        // sets auto leveling in eeprom init

        EEPROM::init(); // Read settings from eeprom if wanted

        UI_INITIALIZE;

        for(uint8_t i = 0; i < E_AXIS_ARRAY; i++) {

            currentPositionSteps[i] = 0;

        }

        currentPosition[X_AXIS] = currentPosition[Y_AXIS] = currentPosition[Z_AXIS] =  0.0;

        //Commands::printCurrentPosition();

    #if DISTORTION_CORRECTION

        distortion.init();

    #endif // DISTORTION_CORRECTION


        updateDerivedParameter();

        Commands::checkFreeMemory();

        Commands::writeLowestFreeRAM();

        HAL::setupTimer();


    #if FEATURE_WATCHDOG

        HAL::startWatchdog();

    #endif // FEATURE_WATCHDOG


    You see it writes start, inits display then starts watchdog. That is why you do not get a watchdog loop with this long boot time. So it really looks like it is the stepper initialization that is taking that long. I have now a prusa MK3 which also has these stepper drivers, but it starts much faster. So no idea what is so problematic, but I guess we should be happy that it works at least.
  • Ah thanks for the insight! :) 


    I might try getting new stepper motors... These have been through a lot of seating, reseating and changes.
    I mean ive killed 2 arduinos and reflashed 3 arduinos countless times.



    Anyway! Video is withou sound, but it does not matter since THERE IS NO SOUND. Not the first time I got it moving but its the first time ive been able to move it 

    Super many thanks

    The printer moves, ill post my finished FW sometime tomorrow. Im able to answer any questions if anyone in the future have. I am no expert but I've learned a lot and currently my printer works so there is that.
  • Here is my printer firmware. More than a year later.

    Summary of what is done:
    1.0.4 dev
    Wanhao i3 plus (from 2016/17 somewhere)
    Radds 1.6 (1.5 with a bugfix IIRC) + due with TMC2130 WITH SPI (soldered on the back, correct pins to your solderjob)
    microswiss hotend
    DIFFERENT Z axis SCREWS, not stock wanhao steps/mm
    bl touch
    mosfet for bed (moved from bed port to hot end port because i at some time suspected the built in mosfet to be dead, was wiring issue)
    Some extra fans
    From stock repetier I also have changed to have 2 z steppers with individual drivers
    current for steppers isnt correctly tuned, they get very warm and Extruder can click sometimes but that is somewhat fixable
    Fans are not correctly set up ATM, mostly because RADDS SWITCHES FANS ON AND OFF ON THE NEGATIVE, meaning for controlling the fans, the board pushes a CONSTANT +12v out the +port. And simply controlls on/off my opening/closing ground(negative), PWM is pulsing negative open/closed. I originally set up my fans with individual buck/boost conv for 24->12v on the positive with a shared negative. Have not changed it so every fan is permanently on when the hotend reaches 50c.

    I have not gotten mesh-bed leveling to work (with octoprint atleast) but I am a master of manual leveling and my screws are stiff AF so I dont even level Z at the begining of prints (with glass bed)
    Tweaked thermal runaway settings so that printer doesnt shut off if its cooling down from previous print and I start a new one (start heating from maybe 150c to 210, takes a while for heater to affect temp, causing thermal runaway alarm to trigger)


    Last of all, HEAVILY MODIFIED CHASSI. 450 (minimum, more like 650) Z height, only 165 X because I messed up the design cuz i borked, and 205-ish Y (in slicer)

    notes. stepper motor and cable can introduce EMI in temp sensor wire, causing wildly varying temp and watchdog.

    Might have some more mods in the firmware and on the printer that I simply dont remember, I have some issues with ringing. Sorry for the rambling and that it took a year to upload, Project was on ICE for a long time since I was rebuilding the printer monstrosity and severe ADHD causes many, many delays. 
  • 
    /*
        1.0.4DEV Testing - Current 18-12-2019
        This file is part of Repetier-Firmware.
    
        Repetier-Firmware is free software: you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
        the Free Software Foundation, either version 3 of the License, or
        (at your option) any later version.
    
        Repetier-Firmware is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU General Public License for more details.
    
        You should have received a copy of the GNU General Public License
        along with Repetier-Firmware.  If not, see <http://www.gnu.org/licenses/>.
    
    */
    
    #ifndef CONFIGURATION_H
    #define CONFIGURATION_H
    
    /**************** READ FIRST ************************
    
       This configuration file was created with the configuration tool. For that
       reason, it does not contain the same informations as the original Configuration.h file.
       It misses the comments and unused parts. Open this file file in the config tool
       to see and change the data. You can also upload it to newer/older versions. The system
       will silently add new options, so compilation continues to work.
    
       This file is optimized for version 1.0.4dev
       generator: http://www.repetier.com/firmware/dev/
    
       If you are in doubt which named functions use which pins on your board, please check the
       pins.h for the used name->pin assignments and your board documentation to verify it is
       as you expect.
    
    */
    
    #define NUM_EXTRUDER 1
    #define MOTHERBOARD 402
    #define RFSERIAL SerialUSB
    #include "pins.h"
    
    // ################## EDIT THESE SETTINGS MANUALLY ################
    #define MICROSTEP_MODES { 16,16,16,16,16,16,16,16 } // [1,2,4,8,16]
    
    // ################ END MANUAL SETTINGS ##########################
    
    #define HOST_RESCUE 1
    #undef FAN_PIN
    #define FAN_PIN ORIG_FAN2_PIN
    #undef FAN_BOARD_PIN
    #define FAN_BOARD_PIN -1
    #define BOARD_FAN_SPEED 255
    #define BOARD_FAN_MIN_SPEED 0
    #define FAN_THERMO_PIN -1
    #define FAN_THERMO_MIN_PWM 128
    #define FAN_THERMO_MAX_PWM 255
    #define FAN_THERMO_MIN_TEMP 45
    #define FAN_THERMO_MAX_TEMP 60
    #define FAN_THERMO_THERMISTOR_PIN -1
    #define FAN_THERMO_THERMISTOR_TYPE 1
    
    //#define EXTERNALSERIAL  use Arduino serial library instead of build in. Requires more ram, has only 63 byte input buffer.
    // Uncomment the following line if you are using Arduino compatible firmware made for Arduino version earlier then 1.0
    // If it is incompatible you will get compiler errors about write functions not being compatible!
    //#define COMPAT_PRE1
    #define BLUETOOTH_SERIAL  -1
    #define BLUETOOTH_BAUD  115200
    #define MIXING_EXTRUDER 0
    
    #define DRIVE_SYSTEM 0
    #define XAXIS_STEPS_PER_MM 80
    #define YAXIS_STEPS_PER_MM 80
    #define ZAXIS_STEPS_PER_MM 400
    #define EXTRUDER_FAN_COOL_TEMP 50
    #define PDM_FOR_EXTRUDER 0
    #define PDM_FOR_COOLER 0
    #define DECOUPLING_TEST_MAX_HOLD_VARIANCE 20
    #define DECOUPLING_TEST_MIN_TEMP_RISE 1
    #define KILL_IF_SENSOR_DEFECT 0
    #define RETRACT_ON_PAUSE 2
    #define PAUSE_START_COMMANDS ""
    #define PAUSE_END_COMMANDS ""
    #define SHARED_EXTRUDER_HEATER 0
    #define EXT0_X_OFFSET 0
    #define EXT0_Y_OFFSET 0
    #define EXT0_Z_OFFSET 0
    #define EXT0_STEPS_PER_MM 98
    #define EXT0_TEMPSENSOR_TYPE 14
    #define EXT0_TEMPSENSOR_PIN TEMP_0_PIN
    #define EXT0_HEATER_PIN HEATER_0_PIN
    #define EXT0_STEP_PIN ORIG_E0_STEP_PIN
    #define EXT0_DIR_PIN ORIG_E0_DIR_PIN
    #define EXT0_INVERSE 1
    #define EXT0_ENABLE_PIN ORIG_E0_ENABLE_PIN
    #define EXT0_ENABLE_ON 0
    #define EXT0_MIRROR_STEPPER 0
    #define EXT0_STEP2_PIN ORIG_E0_STEP_PIN
    #define EXT0_DIR2_PIN ORIG_E0_DIR_PIN
    #define EXT0_INVERSE2 0
    #define EXT0_ENABLE2_PIN ORIG_E0_ENABLE_PIN
    #define EXT0_MAX_FEEDRATE 50
    #define EXT0_MAX_START_FEEDRATE 20
    #define EXT0_MAX_ACCELERATION 1500
    #define EXT0_HEAT_MANAGER 1
    #define EXT0_PREHEAT_TEMP 0
    #define EXT0_WATCHPERIOD 1
    #define EXT0_PID_INTEGRAL_DRIVE_MAX 230
    #define EXT0_PID_INTEGRAL_DRIVE_MIN 40
    #define EXT0_PID_PGAIN_OR_DEAD_TIME 9.52
    #define EXT0_PID_I 0.14
    #define EXT0_PID_D 46.7
    #define EXT0_PID_MAX 255
    #define EXT0_ADVANCE_K 0
    #define EXT0_ADVANCE_L 0
    #define EXT0_ADVANCE_BACKLASH_STEPS 0
    #define EXT0_WAIT_RETRACT_TEMP 150
    #define EXT0_WAIT_RETRACT_UNITS 0
    #define EXT0_SELECT_COMMANDS ""
    #define EXT0_DESELECT_COMMANDS ""
    #define EXT0_EXTRUDER_COOLER_PIN ORIG_FAN_PIN
    #define EXT0_EXTRUDER_COOLER_SPEED 255
    #define EXT0_DECOUPLE_TEST_PERIOD 12000
    #define EXT0_JAM_PIN -1
    #define EXT0_JAM_PULLUP 0
    
    #define FEATURE_RETRACTION 1
    #define AUTORETRACT_ENABLED 0
    #define RETRACTION_LENGTH 1
    #define RETRACTION_LONG_LENGTH 13
    #define RETRACTION_SPEED 40
    #define RETRACTION_Z_LIFT 0
    #define RETRACTION_UNDO_EXTRA_LENGTH 0
    #define RETRACTION_UNDO_EXTRA_LONG_LENGTH 0
    #define RETRACTION_UNDO_SPEED 20
    #define FILAMENTCHANGE_X_POS 0
    #define FILAMENTCHANGE_Y_POS 0
    #define FILAMENTCHANGE_Z_ADD  2
    #define FILAMENTCHANGE_REHOME 1
    #define FILAMENTCHANGE_SHORTRETRACT 5
    #define FILAMENTCHANGE_LONGRETRACT 50
    #define JAM_METHOD 1
    #define JAM_STEPS 220
    #define JAM_SLOWDOWN_STEPS 320
    #define JAM_SLOWDOWN_TO 70
    #define JAM_ERROR_STEPS 500
    #define JAM_MIN_STEPS 10
    #define JAM_ACTION 1
    
    #define RETRACT_DURING_HEATUP true
    #define PID_CONTROL_RANGE 20
    #define SKIP_M109_IF_WITHIN 2
    #define SCALE_PID_TO_MAX 0
    #define TEMP_HYSTERESIS 0
    #define EXTRUDE_MAXLENGTH 160
    #define NUM_TEMPS_USERTHERMISTOR0 0
    #define USER_THERMISTORTABLE0 {}
    #define NUM_TEMPS_USERTHERMISTOR1 0
    #define USER_THERMISTORTABLE1 {}
    #define NUM_TEMPS_USERTHERMISTOR2 0
    #define USER_THERMISTORTABLE2 {}
    #define GENERIC_THERM_VREF 5
    #define GENERIC_THERM_NUM_ENTRIES 33
    #define TEMP_GAIN 0
    #define HEATER_PWM_SPEED 0
    #define COOLER_PWM_SPEED 0
    
    // ############# Heated bed configuration ########################
    
    #define HAVE_HEATED_BED 1
    #define HEATED_BED_PREHEAT_TEMP 0
    #define HEATED_BED_MAX_TEMP 120
    #define SKIP_M190_IF_WITHIN 3
    #define HEATED_BED_SENSOR_TYPE 14
    #define HEATED_BED_SENSOR_PIN TEMP_1_PIN
    #define HEATED_BED_HEATER_PIN HEATER_2_PIN
    #define HEATED_BED_SET_INTERVAL 5000
    #define HEATED_BED_HEAT_MANAGER 0
    #define HEATED_BED_PID_INTEGRAL_DRIVE_MAX 255
    #define HEATED_BED_PID_INTEGRAL_DRIVE_MIN 80
    #define HEATED_BED_PID_PGAIN_OR_DEAD_TIME   196
    #define HEATED_BED_PID_IGAIN   33
    #define HEATED_BED_PID_DGAIN 290
    #define HEATED_BED_PID_MAX 255
    #define HEATED_BED_DECOUPLE_TEST_PERIOD 300000
    #define MIN_EXTRUDER_TEMP 120
    #define MAXTEMP 275
    #define MIN_DEFECT_TEMPERATURE -10
    #define MAX_DEFECT_TEMPERATURE 290
    #define MILLISECONDS_PREHEAT_TIME 30000
    
    // ##########################################################################################
    // ##                             Laser configuration                                      ##
    // ##########################################################################################
    
    /*
    If the firmware is in laser mode, it can control a laser output to cut or engrave materials.
    Please use this feature only if you know about safety and required protection. Lasers are
    dangerous and can hurt or make you blind!!!
    
    The default laser driver only supports laser on and off. Here you control the intensity with
    your feedrate. For exchangeable diode lasers this is normally enough. If you need more control
    you can set the intensity in a range 0-255 with a custom extension to the driver. See driver.h
    and comments on how to extend the functions non invasive with our event system.
    
    If you have a laser - powder system you will like your E override. If moves contain a
    increasing extruder position it will laser that move. With this trick you can
    use existing fdm slicers to laser the output. Laser width is extrusion width.
    
    Other tools may use M3 and M5 to enable/disable laser. Here G1/G2/G3 moves have laser enabled
    and G0 moves have it disables.
    
    In any case, laser only enables while moving. At the end of a move it gets
    automatically disabled.
    */
    
    #define SUPPORT_LASER 0
    #define LASER_PIN -1
    #define LASER_ON_HIGH 1
    #define LASER_WARMUP_TIME 0
    #define LASER_PWM_MAX 255
    #define LASER_WATT 2
    
    // ##                              CNC configuration                                       ##
    
    /*
    If the firmware is in CNC mode, it can control a mill with M3/M4/M5. It works
    similar to laser mode, but mill keeps enabled during G0 moves and it allows
    setting rpm (only with event extension that supports this) and milling direction.
    It also can add a delay to wait for spindle to run on full speed.
    */
    
    #define SUPPORT_CNC 0
    #define CNC_WAIT_ON_ENABLE 300
    #define CNC_WAIT_ON_DISABLE 0
    #define CNC_ENABLE_PIN -1
    #define CNC_ENABLE_WITH 1
    #define CNC_DIRECTION_PIN -1
    #define CNC_DIRECTION_CW 1
    #define CNC_PWM_MAX 255
    #define CNC_RPM_MAX 8000
    #define CNC_SAFE_Z 150
    
    #define DEFAULT_PRINTER_MODE 0
    
    // ################ Endstop configuration #####################
    
    #define MULTI_ZENDSTOP_HOMING 0
    #define ENDSTOP_PULLUP_X_MIN false
    #define ENDSTOP_X_MIN_INVERTING false
    #define MIN_HARDWARE_ENDSTOP_X true
    #define ENDSTOP_PULLUP_Y_MIN false
    #define ENDSTOP_Y_MIN_INVERTING false
    #define MIN_HARDWARE_ENDSTOP_Y true
    #define ENDSTOP_PULLUP_Z_MIN true
    #define ENDSTOP_Z_MIN_INVERTING false
    #define MIN_HARDWARE_ENDSTOP_Z true
    #define ENDSTOP_PULLUP_Z2_MINMAX true
    #define ENDSTOP_Z2_MINMAX_INVERTING false
    #define MINMAX_HARDWARE_ENDSTOP_Z2 false
    #define ENDSTOP_PULLUP_X_MAX true
    #define ENDSTOP_X_MAX_INVERTING false
    #define MAX_HARDWARE_ENDSTOP_X false
    #define ENDSTOP_PULLUP_Y_MAX true
    #define ENDSTOP_Y_MAX_INVERTING false
    #define MAX_HARDWARE_ENDSTOP_Y false
    #define ENDSTOP_PULLUP_Z_MAX true
    #define ENDSTOP_Z_MAX_INVERTING false
    #define MAX_HARDWARE_ENDSTOP_Z false
    #define ENDSTOP_PULLUP_X2_MIN true
    #define ENDSTOP_PULLUP_Y2_MIN true
    #define ENDSTOP_PULLUP_Z2_MINMAX true
    #define ENDSTOP_PULLUP_X2_MAX true
    #define ENDSTOP_PULLUP_Y2_MAX true
    #define ENDSTOP_X2_MIN_INVERTING false
    #define ENDSTOP_Y2_MIN_INVERTING false
    #define ENDSTOP_X2_MAX_INVERTING false
    #define ENDSTOP_Y2_MAX_INVERTING false
    #define MIN_HARDWARE_ENDSTOP_X2 false
    #define MIN_HARDWARE_ENDSTOP_Y2 false
    #define MAX_HARDWARE_ENDSTOP_X2 false
    #define MAX_HARDWARE_ENDSTOP_Y2 false
    #define X2_MIN_PIN -1
    #define X2_MAX_PIN -1
    #define Y2_MIN_PIN -1
    #define Y2_MAX_PIN -1
    #define Z2_MINMAX_PIN -1
    
    
    
    #define max_software_endstop_r true
    
    #define min_software_endstop_x false
    #define min_software_endstop_y false
    #define min_software_endstop_z false
    #define max_software_endstop_x true
    #define max_software_endstop_y true
    #define max_software_endstop_z true
    #define DOOR_PIN -1
    #define DOOR_PULLUP 1
    #define DOOR_INVERTING 0
    #define ENDSTOP_X_BACK_MOVE 2
    #define ENDSTOP_Y_BACK_MOVE 2
    #define ENDSTOP_Z_BACK_MOVE 2
    #define ENDSTOP_X_RETEST_REDUCTION_FACTOR 1
    #define ENDSTOP_Y_RETEST_REDUCTION_FACTOR 1
    #define ENDSTOP_Z_RETEST_REDUCTION_FACTOR 1
    #define ENDSTOP_X_BACK_ON_HOME 1
    #define ENDSTOP_Y_BACK_ON_HOME 1
    #define ENDSTOP_Z_BACK_ON_HOME 0
    #define ALWAYS_CHECK_ENDSTOPS 0
    #define MOVE_X_WHEN_HOMED 0
    #define MOVE_Y_WHEN_HOMED 0
    #define MOVE_Z_WHEN_HOMED 0
    
    // ################# XYZ movements ###################
    
    #define X_ENABLE_ON 0
    #define Y_ENABLE_ON 0
    #define Z_ENABLE_ON 0
    #define DISABLE_X 0
    #define DISABLE_Y 0
    #define DISABLE_Z 0
    #define DISABLE_E 0
    #define INVERT_X_DIR 1
    #define INVERT_X2_DIR 0
    #define INVERT_Y_DIR 1
    #define INVERT_Y2_DIR 0
    #define INVERT_Z_DIR 0
    #define INVERT_Z2_DIR 0
    #define INVERT_Z3_DIR 0
    #define INVERT_Z4_DIR 0
    #define X_HOME_DIR -1
    #define Y_HOME_DIR -1
    #define Z_HOME_DIR -1
    #define X_MAX_LENGTH 165
    #define Y_MAX_LENGTH 210
    #define Z_MAX_LENGTH 450
    #define X_MIN_POS 0
    #define Y_MIN_POS 9
    #define Z_MIN_POS 0
    #define PARK_POSITION_X 0
    #define PARK_POSITION_Y 5
    #define PARK_POSITION_Z_RAISE 10
    
    
    #define DISTORTION_CORRECTION 1
    #define DISTORTION_CORRECTION_POINTS 5
    #define DISTORTION_LIMIT_TO 2
    #define DISTORTION_CORRECTION_R 100
    #define DISTORTION_PERMANENT 1
    #define DISTORTION_UPDATE_FREQUENCY 15
    #define DISTORTION_START_DEGRADE 0.5
    #define DISTORTION_END_HEIGHT 1
    #define DISTORTION_EXTRAPOLATE_CORNERS 1
    #define DISTORTION_XMIN 50
    #define DISTORTION_YMIN 60
    #define DISTORTION_XMAX 160
    #define DISTORTION_YMAX 200
    
    // ##########################################################################################
    // ##                           Movement settings                                          ##
    // ##########################################################################################
    
    #define FEATURE_BABYSTEPPING 1
    #define BABYSTEP_MULTIPLICATOR 1
    
    #define DELTA_SEGMENTS_PER_SECOND_PRINT 180 // Move accurate setting for print moves
    #define DELTA_SEGMENTS_PER_SECOND_MOVE 70 // Less accurate setting for other moves
    #define EXACT_DELTA_MOVES 1
    
    // Delta settings
    #define DELTA_HOME_ON_POWER 0
    
    #define DELTASEGMENTS_PER_PRINTLINE 20
    #define STEPPER_INACTIVE_TIME 360L
    #define MAX_INACTIVE_TIME 0L
    #define MAX_FEEDRATE_X 200
    #define MAX_FEEDRATE_Y 90
    #define MAX_FEEDRATE_Z 20
    #define HOMING_FEEDRATE_X 70
    #define HOMING_FEEDRATE_Y 40
    #define HOMING_FEEDRATE_Z 10
    #define HOMING_ORDER HOME_ORDER_XYTZ
    #define ZHOME_PRE_RAISE 2
    #define ZHOME_PRE_RAISE_DISTANCE 10
    #define RAISE_Z_ON_TOOLCHANGE 0
    #define ZHOME_MIN_TEMPERATURE 0
    #define ZHOME_HEAT_ALL 1
    #define ZHOME_HEAT_HEIGHT 20
    #define ZHOME_X_POS 83
    #define ZHOME_Y_POS 114
    #define ENABLE_BACKLASH_COMPENSATION 0
    #define X_BACKLASH 0
    #define Y_BACKLASH 0
    #define Z_BACKLASH 0
    #define RAMP_ACCELERATION 1
    #define STEPPER_HIGH_DELAY 1
    #define DIRECTION_DELAY 0
    #define STEP_DOUBLER_FREQUENCY 80000
    #define ALLOW_QUADSTEPPING 0
    #define DOUBLE_STEP_DELAY 0 // time in microseconds
    #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_X 800
    #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Y 600
    #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Z 100
    #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_X 1000
    #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Y 800
    #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Z 100
    #define INTERPOLATE_ACCELERATION_WITH_Z 0
    #define ACCELERATION_FACTOR_TOP 100
    #define MAX_JERK 8
    #define MAX_ZJERK 0.3
    #define PRINTLINE_CACHE_SIZE 16
    #define MOVE_CACHE_LOW 10
    #define LOW_TICKS_PER_MOVE 250000
    #define EXTRUDER_SWITCH_XY_SPEED 100
    #define DUAL_X_AXIS 0
    #define DUAL_X_RESOLUTION 0
    #define X2AXIS_STEPS_PER_MM 100
    #define FEATURE_TWO_XSTEPPER 0
    #define X2_STEP_PIN   ORIG_E1_STEP_PIN
    #define X2_DIR_PIN    ORIG_E1_DIR_PIN
    #define X2_ENABLE_PIN ORIG_E1_ENABLE_PIN
    #define FEATURE_TWO_YSTEPPER 0
    #define Y2_STEP_PIN   ORIG_E1_STEP_PIN
    #define Y2_DIR_PIN    ORIG_E1_DIR_PIN
    #define Y2_ENABLE_PIN ORIG_E1_ENABLE_PIN
    #define FEATURE_TWO_ZSTEPPER 1
    #define Z2_STEP_PIN   ORIG_E1_STEP_PIN
    #define Z2_DIR_PIN    ORIG_E1_DIR_PIN
    #define Z2_ENABLE_PIN ORIG_E1_ENABLE_PIN
    #define FEATURE_THREE_ZSTEPPER 0
    #define Z3_STEP_PIN   ORIG_E2_STEP_PIN
    #define Z3_DIR_PIN    ORIG_E2_DIR_PIN
    #define Z3_ENABLE_PIN ORIG_E2_ENABLE_PIN
    #define FEATURE_FOUR_ZSTEPPER 0
    #define Z4_STEP_PIN   ORIG_E3_STEP_PIN
    #define Z4_DIR_PIN    ORIG_E3_DIR_PIN
    #define Z4_ENABLE_PIN ORIG_E3_ENABLE_PIN
    #define FEATURE_DITTO_PRINTING 0
    #define USE_ADVANCE 1
    #define ENABLE_QUADRATIC_ADVANCE 0
    
    #define DRV_TMC2130
    
    // Uncomment if you use the stall guard for homing. Only for cartesian printers and xy direction
    #define SENSORLESS_HOMING
    
    // The drivers with set CS pin will be used, all others are normal step/dir/enable drivers
    #define TMC2130_X_CS_PIN 27
    #define TMC2130_Y_CS_PIN 29
    #define TMC2130_Z_CS_PIN 31
    #define TMC2130_EXT0_CS_PIN 33
    #define TMC2130_EXT1_CS_PIN 35
    #define TMC2130_EXT2_CS_PIN -1
    #define TMC2130_EXT3_CS_PIN -1
    #define TMC2130_EXT4_CS_PIN -1
    
    // Per-axis current setting in mA { X, Y, Z, E0, E1, E2}
    #define MOTOR_CURRENT { 1020,1020,290,1020,290,1000 }
    
    /**  Global settings - these apply to all configured drivers
    Per-axis values will override these
    */
    #define TMC2130_STEALTHCHOP         0  // Enable extremely quiet stepping
    #define TMC2130_INTERPOLATE_256  1  // Enable internal driver microstep interpolation
    #define TMC2130_STALLGUARD          5  // Sensorless homing sensitivity (between -63 and +64)
    
    /** PWM values for chopper tuning
    only change if you know what you're doing
    */
    #define TMC2130_PWM_AMPL          255
    #define TMC2130_PWM_GRAD            1
    #define TMC2130_PWM_AUTOSCALE    1
    #define TMC2130_PWM_FREQ            2
    #define TMC2130_STEALTHCHOP_Z         1
    #define TMC2130_STEALTHCHOP_EXT1      1
    /**  Per-axis parameters
    
    To define different values for certain parameters on each axis,
    append either _X, _Y, _Z, _EXT0, _EXT1 or _EXT2
    to the name of the global parameter.
    
    Examples for the X axis:
    
    #define TMC2130_STEALTHCHOP_X         1
    #define TMC2130_INTERPOLATE_256_X  true
    */
    
    /** Minimum speeds for stall detection.
    
    These values may need to be adjusted if SENSORLESS_HOMING is enabled,
    but endstops trigger prematurely or don't trigger at all.
    The exact value is dependent on the duration of one microstep,
    but good approximations can be determined by experimentation.
    */
    #define TMC2130_TCOOLTHRS_X 305
    #define TMC2130_TCOOLTHRS_Y 300
    #define TMC2130_TCOOLTHRS_Z 300
    
    // ################# Misc. settings ##################
    
    #define BAUDRATE 250000
    #define ENABLE_POWER_ON_STARTUP 1
    #define POWER_INVERTING 0
    #define AUTOMATIC_POWERUP 0
    #define KILL_METHOD 1
    #define ACK_WITH_LINENUMBER 1
    #define KEEP_ALIVE_INTERVAL 2000
    #define WAITING_IDENTIFIER "wait"
    #define ECHO_ON_EXECUTE 1
    #define EEPROM_MODE 1
    #undef PS_ON_PIN
    #define PS_ON_PIN ORIG_PS_ON_PIN
    #define JSON_OUTPUT 0
    
    /* ======== Servos =======
    Control the servos with
    M340 P<servoId> S<pulseInUS>   / ServoID = 0..3  pulseInUs = 500..2500
    Servos are controlled by a pulse width normally between 500 and 2500 with 1500ms in center position. 0 turns servo off.
    WARNING: Servos can draw a considerable amount of current. Make sure your system can handle this or you may risk your hardware!
    */
    #define FEATURE_SERVO 1
    #define SERVO0_PIN 5
    #define SERVO1_PIN -1
    #define SERVO2_PIN -1
    #define SERVO3_PIN -1
    #define SERVO0_NEUTRAL_POS  -1
    #define SERVO1_NEUTRAL_POS  -1
    #define SERVO2_NEUTRAL_POS  -1
    #define SERVO3_NEUTRAL_POS  -1
    #define UI_SERVO_CONTROL 0
    #define FAN_KICKSTART_TIME  200
    #define MAX_FAN_PWM 255
    
            #define FEATURE_WATCHDOG 1
    
    // #################### Z-Probing #####################
    
    #define Z_PROBE_Z_OFFSET 0
    #define Z_PROBE_Z_OFFSET_MODE 1
    #define UI_BED_COATING 1
    #define FEATURE_Z_PROBE 1
    #define EXTRUDER_IS_Z_PROBE 0
    #define Z_PROBE_DISABLE_HEATERS 0
    #define Z_PROBE_BED_DISTANCE 22
    #define Z_PROBE_PIN ORIG_Z_MIN_PIN
    #define Z_PROBE_PULLUP 0
    #define Z_PROBE_ON_HIGH 1
    #define Z_PROBE_X_OFFSET 33
    #define Z_PROBE_Y_OFFSET 45
    #define Z_PROBE_WAIT_BEFORE_TEST 1
    #define Z_PROBE_SPEED 2
    #define Z_PROBE_XY_SPEED 120
    #define Z_PROBE_SWITCHING_DISTANCE 4
    #define Z_PROBE_REPETITIONS 2
    #define Z_PROBE_USE_MEDIAN 0
    #define Z_PROBE_HEIGHT 1.46
    #define Z_PROBE_DELAY 100
    #define Z_PROBE_START_SCRIPT "M340 P0 S650"
    #define Z_PROBE_FINISHED_SCRIPT "M340 P0 S1475"
    #define Z_PROBE_RUN_AFTER_EVERY_PROBE ""
    #define Z_PROBE_REQUIRES_HEATING 0
    #define Z_PROBE_MIN_TEMPERATURE 150
    #define FEATURE_AUTOLEVEL 1
    #define FEATURE_SOFTWARE_LEVELING 0
    #define Z_PROBE_X1 36
    #define Z_PROBE_Y1 50
    #define Z_PROBE_X2 160
    #define Z_PROBE_Y2 50
    #define Z_PROBE_X3 36
    #define Z_PROBE_Y3 190
    #define BED_LEVELING_METHOD 1
    #define BED_CORRECTION_METHOD 0
    #define BED_LEVELING_GRID_SIZE 7
    #define BED_LEVELING_REPETITIONS 5
    #define BED_MOTOR_1_X 0
    #define BED_MOTOR_1_Y 0
    #define BED_MOTOR_2_X 200
    #define BED_MOTOR_2_Y 0
    #define BED_MOTOR_3_X 100
    #define BED_MOTOR_3_Y 200
    #define BENDING_CORRECTION_A 0
    #define BENDING_CORRECTION_B 0
    #define BENDING_CORRECTION_C 0
    #define FEATURE_AXISCOMP 1
    #define AXISCOMP_TANXY 0
    #define AXISCOMP_TANYZ 0
    #define AXISCOMP_TANXZ 0
    
    #ifndef SDSUPPORT  // Some boards have sd support on board. These define the values already in pins.h
    #define SDSUPPORT 0
    #undef SDCARDDETECT
    #define SDCARDDETECT -1
    #undef SDCARDDETECTINVERTED
    #define SDCARDDETECTINVERTED 0
    #endif
    #define SD_EXTENDED_DIR 1 /** Show extended directory including file length. Don't use this with Pronterface! */
    #define SD_RUN_ON_STOP ""
    #define SD_STOP_HEATER_AND_MOTORS_ON_STOP 1
    #define ARC_SUPPORT 1
    #define FEATURE_MEMORY_POSITION 1
    #define FEATURE_CHECKSUM_FORCED 0
    #define FEATURE_FAN_CONTROL 1
    #define FEATURE_FAN2_CONTROL 0
    #define FEATURE_CONTROLLER 7
    #define ADC_KEYPAD_PIN -1
    #define LANGUAGE_EN_ACTIVE 1
    #define LANGUAGE_DE_ACTIVE 0
    #define LANGUAGE_NL_ACTIVE 0
    #define LANGUAGE_PT_ACTIVE 0
    #define LANGUAGE_IT_ACTIVE 0
    #define LANGUAGE_ES_ACTIVE 0
    #define LANGUAGE_FI_ACTIVE 0
    #define LANGUAGE_SE_ACTIVE 0
    #define LANGUAGE_FR_ACTIVE 0
    #define LANGUAGE_CZ_ACTIVE 0
    #define LANGUAGE_PL_ACTIVE 0
    #define LANGUAGE_TR_ACTIVE 0
    #define LANGUAGE_RU_ACTIVE 0
    #define UI_PRINTER_NAME "Yggdrasil"
    #define UI_PRINTER_COMPANY "Zibbe"
    #define UI_PAGES_DURATION 4000
    #define UI_SPEEDDEPENDENT_POSITIONING 0
    #define UI_DISABLE_AUTO_PAGESWITCH 1
    #define UI_AUTORETURN_TO_MENU_AFTER 30000
    #define FEATURE_UI_KEYS 0
    #define UI_ENCODER_SPEED 1
    #define UI_REVERSE_ENCODER 0
    #define UI_KEY_BOUNCETIME 10
    #define UI_KEY_FIRST_REPEAT 500
    #define UI_KEY_REDUCE_REPEAT 50
    #define UI_KEY_MIN_REPEAT 50
    #define FEATURE_BEEPER 0
    #define CASE_LIGHTS_PIN -1
    #define CASE_LIGHT_DEFAULT_ON 1
    #define UI_START_SCREEN_DELAY 1000
    #define UI_DYNAMIC_ENCODER_SPEED 1
            /**
    Beeper sound definitions for short beeps during key actions
    and longer beeps for important actions.
    Parameter is delay in microseconds and the secons is the number of repetitions.
    Values must be in range 1..255
    */
    #define BEEPER_SHORT_SEQUENCE 2,2
    #define BEEPER_LONG_SEQUENCE 8,8
    #define UI_SET_MIN_HEATED_BED_TEMP  30
    #define UI_SET_MAX_HEATED_BED_TEMP 120
    #define UI_SET_MIN_EXTRUDER_TEMP   170
    #define UI_SET_MAX_EXTRUDER_TEMP   260
    #define UI_SET_EXTRUDER_FEEDRATE 2
    #define UI_SET_EXTRUDER_RETRACT_DISTANCE 3
    
    
    #define NUM_MOTOR_DRIVERS 0
    
    
    
    #endif
    
    /* Below you will find the configuration string, that created this Configuration.h
    
    ========== Start configuration string ==========
    {
        "editMode": 1,
        "processor": 1,
        "baudrate": 250000,
        "bluetoothSerial": -1,
        "bluetoothBaudrate": 115200,
        "xStepsPerMM": 80,
        "yStepsPerMM": 80,
        "zStepsPerMM": 80,
        "xInvert": "0",
        "x2Invert": 0,
        "xInvertEnable": 0,
        "eepromMode": 1,
        "yInvert": "0",
        "y2Invert": 0,
        "yInvertEnable": 0,
        "zInvert": "1",
        "z2Invert": "1",
        "z3Invert": 0,
        "z4Invert": 0,
        "zInvertEnable": 0,
        "extruder": [
            {
                "id": 0,
                "heatManager": 1,
                "pidDriveMin": 40,
                "pidDriveMax": 230,
                "pidMax": 255,
                "sensorType": 14,
                "sensorPin": "TEMP_0_PIN",
                "heaterPin": "HEATER_0_PIN",
                "maxFeedrate": 50,
                "startFeedrate": 20,
                "invert": "1",
                "invertEnable": "0",
                "acceleration": 5000,
                "watchPeriod": 1,
                "pidP": 7,
                "pidI": 0.14,
                "pidD": 46.7,
                "advanceK": 0,
                "advanceL": 0,
                "waitRetractTemp": 150,
                "waitRetractUnits": 0,
                "waitRetract": 0,
                "stepsPerMM": 98,
                "coolerPin": "ORIG_FAN_PIN",
                "coolerSpeed": 255,
                "selectCommands": "",
                "deselectCommands": "",
                "xOffset": 0,
                "yOffset": 0,
                "zOffset": 0,
                "xOffsetSteps": 0,
                "yOffsetSteps": 0,
                "zOffsetSteps": 0,
                "stepper": {
                    "name": "Extruder 0",
                    "step": "ORIG_E0_STEP_PIN",
                    "dir": "ORIG_E0_DIR_PIN",
                    "enable": "ORIG_E0_ENABLE_PIN"
                },
                "advanceBacklashSteps": 0,
                "decoupleTestPeriod": 12,
                "jamPin": -1,
                "jamPullup": "0",
                "mirror": "0",
                "invert2": "0",
                "stepper2": {
                    "name": "Extruder 0",
                    "step": "ORIG_E0_STEP_PIN",
                    "dir": "ORIG_E0_DIR_PIN",
                    "enable": "ORIG_E0_ENABLE_PIN"
                },
                "preheat": 190
            }
        ],
        "uiLanguage": 0,
        "uiController": 0,
        "xMinEndstop": 4,
        "yMinEndstop": 4,
        "zMinEndstop": 4,
        "xMaxEndstop": 0,
        "yMaxEndstop": 0,
        "zMaxEndstop": 0,
        "x2MinEndstop": 0,
        "y2MinEndstop": 0,
        "x2MaxEndstop": 0,
        "y2MaxEndstop": 0,
        "motherboard": 402,
        "driveSystem": 0,
        "xMaxSpeed": 200,
        "xHomingSpeed": 40,
        "xTravelAcceleration": 1000,
        "xPrintAcceleration": 1000,
        "yMaxSpeed": 200,
        "yHomingSpeed": 40,
        "yTravelAcceleration": 1000,
        "yPrintAcceleration": 1000,
        "zMaxSpeed": 2,
        "zHomingSpeed": 2,
        "zTravelAcceleration": 100,
        "zPrintAcceleration": 100,
        "xMotor": {
            "name": "X motor",
            "step": "ORIG_X_STEP_PIN",
            "dir": "ORIG_X_DIR_PIN",
            "enable": "ORIG_X_ENABLE_PIN"
        },
        "yMotor": {
            "name": "Y motor",
            "step": "ORIG_Y_STEP_PIN",
            "dir": "ORIG_Y_DIR_PIN",
            "enable": "ORIG_Y_ENABLE_PIN"
        },
        "zMotor": {
            "name": "Z motor",
            "step": "ORIG_Z_STEP_PIN",
            "dir": "ORIG_Z_DIR_PIN",
            "enable": "ORIG_Z_ENABLE_PIN"
        },
        "enableBacklash": "0",
        "backlashX": 0,
        "backlashY": 0,
        "backlashZ": 0,
        "stepperInactiveTime": 360,
        "maxInactiveTime": 0,
        "xMinPos": 0,
        "yMinPos": 9,
        "zMinPos": 0,
        "xLength": 165,
        "yLength": 210,
        "zLength": 450,
        "alwaysCheckEndstops": "0",
        "disableX": "0",
        "disableY": "0",
        "disableZ": "0",
        "disableE": "0",
        "xHomeDir": "-1",
        "yHomeDir": "-1",
        "zHomeDir": "-1",
        "xEndstopBack": 1,
        "yEndstopBack": 1,
        "zEndstopBack": 0,
        "deltaSegmentsPerSecondPrint": 180,
        "deltaSegmentsPerSecondTravel": 70,
        "deltaDiagonalRod": 445,
        "deltaHorizontalRadius": 209.25,
        "deltaAlphaA": 210,
        "deltaAlphaB": 330,
        "deltaAlphaC": 90,
        "deltaDiagonalCorrA": 0,
        "deltaDiagonalCorrB": 0,
        "deltaDiagonalCorrC": 0,
        "deltaMaxRadius": 150,
        "deltaFloorSafetyMarginMM": 15,
        "deltaRadiusCorrA": 0,
        "deltaRadiusCorrB": 0,
        "deltaRadiusCorrC": 0,
        "deltaXOffsetSteps": 0,
        "deltaYOffsetSteps": 0,
        "deltaZOffsetSteps": 0,
        "deltaSegmentsPerLine": 20,
        "stepperHighDelay": 0,
        "directionDelay": 0,
        "stepDoublerFrequency": 80000,
        "allowQuadstepping": "0",
        "doubleStepDelay": 0,
        "maxJerk": 8,
        "maxZJerk": 0.3,
        "moveCacheSize": 16,
        "moveCacheLow": 10,
        "lowTicksPerMove": 250000,
        "enablePowerOnStartup": "1",
        "echoOnExecute": "1",
        "sendWaits": "1",
        "ackWithLineNumber": "1",
        "killMethod": 1,
        "useAdvance": "0",
        "useQuadraticAdvance": "0",
        "powerInverting": 0,
        "mirrorX": 0,
        "mirrorXMotor": {
            "name": "Extruder 1",
            "step": "ORIG_E1_STEP_PIN",
            "dir": "ORIG_E1_DIR_PIN",
            "enable": "ORIG_E1_ENABLE_PIN"
        },
        "mirrorY": 0,
        "mirrorYMotor": {
            "name": "Extruder 1",
            "step": "ORIG_E1_STEP_PIN",
            "dir": "ORIG_E1_DIR_PIN",
            "enable": "ORIG_E1_ENABLE_PIN"
        },
        "mirrorZ": "1",
        "mirrorZMotor": {
            "name": "Extruder 1",
            "step": "ORIG_E1_STEP_PIN",
            "dir": "ORIG_E1_DIR_PIN",
            "enable": "ORIG_E1_ENABLE_PIN"
        },
        "mirrorZ3": "0",
        "mirrorZ3Motor": {
            "name": "Extruder 2",
            "step": "ORIG_E2_STEP_PIN",
            "dir": "ORIG_E2_DIR_PIN",
            "enable": "ORIG_E2_ENABLE_PIN"
        },
        "mirrorZ4": "0",
        "mirrorZ4Motor": {
            "name": "Extruder 3",
            "step": "ORIG_E3_STEP_PIN",
            "dir": "ORIG_E3_DIR_PIN",
            "enable": "ORIG_E3_ENABLE_PIN"
        },
        "dittoPrinting": "0",
        "featureServos": "1",
        "servo0Pin": 11,
        "servo1Pin": -1,
        "servo2Pin": -1,
        "servo3Pin": -1,
        "featureWatchdog": "1",
        "hasHeatedBed": "1",
        "enableZProbing": "1",
        "extrudeMaxLength": 160,
        "homeOrder": "HOME_ORDER_ZXYTZ",
        "featureController": 7,
        "uiPrinterName": "RepRap",
        "uiPrinterCompany": "Home made",
        "uiPagesDuration": 4000,
        "uiHeadline": "",
        "uiDisablePageswitch": "1",
        "uiAutoReturnAfter": 30000,
        "featureKeys": "0",
        "uiEncoderSpeed": 1,
        "uiReverseEncoder": "0",
        "uiKeyBouncetime": 10,
        "uiKeyFirstRepeat": 500,
        "uiKeyReduceRepeat": 50,
        "uiKeyMinRepeat": 50,
        "featureBeeper": "0",
        "uiMinHeatedBed": 30,
        "uiMaxHeatedBed": 120,
        "uiMinEtxruderTemp": 170,
        "uiMaxExtruderTemp": 260,
        "uiExtruderFeedrate": 2,
        "uiExtruderRetractDistance": 3,
        "uiSpeeddependentPositioning": "0",
        "maxBedTemperature": 120,
        "bedSensorType": 14,
        "bedSensorPin": "TEMP_1_PIN",
        "bedHeaterPin": "HEATER_2_PIN",
        "bedHeatManager": 0,
        "bedPreheat": 55,
        "bedUpdateInterval": 5000,
        "bedPidDriveMin": 80,
        "bedPidDriveMax": 255,
        "bedPidP": 196,
        "bedPidI": 33,
        "bedPidD": 290,
        "bedPidMax": 255,
        "bedDecoupleTestPeriod": 300,
        "caseLightPin": -1,
        "caseLightDefaultOn": "1",
        "bedSkipIfWithin": 3,
        "gen1T0": 25,
        "gen1R0": 100000,
        "gen1Beta": 4036,
        "gen1MinTemp": -20,
        "gen1MaxTemp": 300,
        "gen1R1": 0,
        "gen1R2": 4700,
        "gen2T0": 25,
        "gen2R0": 100000,
        "gen2Beta": 4036,
        "gen2MinTemp": -20,
        "gen2MaxTemp": 300,
        "gen2R1": 0,
        "gen2R2": 4700,
        "gen3T0": 25,
        "gen3R0": 100000,
        "gen3Beta": 4036,
        "gen3MinTemp": -20,
        "gen3MaxTemp": 300,
        "gen3R1": 0,
        "gen3R2": 4700,
        "userTable0": {
            "r1": 0,
            "r2": 4700,
            "temps": [],
            "numEntries": 0
        },
        "userTable1": {
            "r1": 0,
            "r2": 4700,
            "temps": [],
            "numEntries": 0
        },
        "userTable2": {
            "r1": 0,
            "r2": 4700,
            "temps": [],
            "numEntries": 0
        },
        "tempHysteresis": 0,
        "pidControlRange": 20,
        "skipM109Within": 2,
        "extruderFanCoolTemp": 50,
        "minTemp": 120,
        "maxTemp": 275,
        "minDefectTemp": -10,
        "maxDefectTemp": 290,
        "arcSupport": "1",
        "featureMemoryPositionWatchdog": "1",
        "forceChecksum": "0",
        "sdExtendedDir": "1",
        "featureFanControl": "1",
        "fanPin": "ORIG_FAN2_PIN",
        "featureFan2Control": "0",
        "fan2Pin": "ORIG_FAN2_PIN",
        "fanThermoPin": -1,
        "fanThermoMinPWM": 128,
        "fanThermoMaxPWM": 255,
        "fanThermoMinTemp": 45,
        "fanThermoMaxTemp": 60,
        "fanThermoThermistorPin": -1,
        "fanThermoThermistorType": 1,
        "scalePidToMax": 0,
        "zProbePin": "ORIG_Z_MIN_PIN",
        "zProbeBedDistance": 10,
        "zProbeDisableHeaters": "0",
        "zProbePullup": "0",
        "zProbeOnHigh": "1",
        "zProbeXOffset": 33,
        "zProbeYOffset": 45,
        "zProbeWaitBeforeTest": "0",
        "zProbeSpeed": 2,
        "zProbeXYSpeed": 150,
        "zProbeHeight": 1.46,
        "zProbeStartScript": "M340 P0 S700",
        "zProbeFinishedScript": "M350 P0 S1500",
        "featureAutolevel": "1",
        "zProbeX1": 35,
        "zProbeY1": 44,
        "zProbeX2": 160,
        "zProbeY2": 44,
        "zProbeX3": 35,
        "zProbeY3": 160,
        "zProbeSwitchingDistance": 4,
        "zProbeRepetitions": 2,
        "zProbeMedian": "0",
        "zProbeEveryPoint": "",
        "sdSupport": "0",
        "sdCardDetectPin": -1,
        "sdCardDetectInverted": "0",
        "uiStartScreenDelay": 1000,
        "xEndstopBackMove": 5,
        "yEndstopBackMove": 5,
        "zEndstopBackMove": 2,
        "xEndstopRetestFactor": 3,
        "yEndstopRetestFactor": 3,
        "zEndstopRetestFactor": 3,
        "xMinPin": "ORIG_X_MIN_PIN",
        "yMinPin": "ORIG_Y_MIN_PIN",
        "zMinPin": "ORIG_Z_MIN_PIN",
        "xMaxPin": "ORIG_X_MAX_PIN",
        "yMaxPin": "ORIG_Y_MAX_PIN",
        "zMaxPin": "ORIG_Z_MAX_PIN",
        "x2MinPin": -1,
        "y2MinPin": -1,
        "x2MaxPin": -1,
        "y2MaxPin": -1,
        "deltaHomeOnPower": "0",
        "fanBoardPin": -1,
        "heaterPWMSpeed": 0,
        "featureBabystepping": "1",
        "babystepMultiplicator": 1,
        "pdmForHeater": "0",
        "pdmForCooler": "0",
        "psOn": "ORIG_PS_ON_PIN",
        "mixingExtruder": "0",
        "decouplingTestMaxHoldVariance": 20,
        "decouplingTestMinTempRise": 1,
        "featureAxisComp": "1",
        "axisCompTanXY": 0,
        "axisCompTanXZ": 0,
        "axisCompTanYZ": 0,
        "retractOnPause": 2,
        "pauseStartCommands": "",
        "pauseEndCommands": "",
        "distortionCorrection": "1",
        "distortionCorrectionPoints": 6,
        "distortionCorrectionR": 100,
        "distortionPermanent": "1",
        "distortionUpdateFrequency": 15,
        "distortionStartDegrade": 0.5,
        "distortionEndDegrade": 1,
        "distortionExtrapolateCorners": "0",
        "distortionXMin": 10,
        "distortionXMax": 150,
        "distortionYMin": 10,
        "distortionYMax": 190,
        "sdRunOnStop": "",
        "sdStopHeaterMotorsOnStop": "1",
        "featureRetraction": "1",
        "autoretractEnabled": "0",
        "retractionLength": 1,
        "retractionLongLength": 13,
        "retractionSpeed": 40,
        "retractionZLift": 0,
        "retractionUndoExtraLength": 0,
        "retractionUndoExtraLongLength": 0,
        "retractionUndoSpeed": 20,
        "filamentChangeXPos": 0,
        "filamentChangeYPos": 0,
        "filamentChangeZAdd": 2,
        "filamentChangeRehome": 1,
        "filamentChangeShortRetract": 5,
        "filamentChangeLongRetract": 50,
        "fanKickstart": 200,
        "servo0StartPos": -1,
        "servo1StartPos": -1,
        "servo2StartPos": -1,
        "servo3StartPos": -1,
        "uiDynamicEncoderSpeed": "1",
        "uiServoControl": 0,
        "killIfSensorDefect": "0",
        "jamSteps": 220,
        "jamSlowdownSteps": 320,
        "jamSlowdownTo": 70,
        "jamErrorSteps": 500,
        "jamMinSteps": 10,
        "jamAction": 1,
        "jamMethod": 1,
        "primaryPort": 2,
        "numMotorDrivers": 0,
        "motorDrivers": [
            {
                "t": "None",
                "s": "",
                "invertEnable": "0",
                "invertDirection": "0",
                "stepsPerMM": 100,
                "speed": 10,
                "dirPin": -1,
                "stepPin": -1,
                "enablePin": -1,
                "endstopPin": -1,
                "invertEndstop": "0",
                "minEndstop": "1",
                "endstopPullup": "1",
                "maxDistance": 20
            },
            {
                "t": "None",
                "s": "",
                "invertEnable": "0",
                "invertDirection": "0",
                "stepsPerMM": 100,
                "speed": 10,
                "dirPin": -1,
                "stepPin": -1,
                "enablePin": -1,
                "endstopPin": -1,
                "invertEndstop": "0",
                "minEndstop": "1",
                "endstopPullup": "1",
                "maxDistance": 20
            },
            {
                "t": "None",
                "s": "",
                "invertEnable": "0",
                "invertDirection": "0",
                "stepsPerMM": 100,
                "speed": 10,
                "dirPin": -1,
                "stepPin": -1,
                "enablePin": -1,
                "endstopPin": -1,
                "invertEndstop": "0",
                "minEndstop": "1",
                "endstopPullup": "1",
                "maxDistance": 20
            },
            {
                "t": "None",
                "s": "",
                "invertEnable": "0",
                "invertDirection": "0",
                "stepsPerMM": 100,
                "speed": 10,
                "dirPin": -1,
                "stepPin": -1,
                "enablePin": -1,
                "endstopPin": -1,
                "invertEndstop": "0",
                "minEndstop": "1",
                "endstopPullup": "1",
                "maxDistance": 20
            },
            {
                "t": "None",
                "s": "",
                "invertEnable": "0",
                "invertDirection": "0",
                "stepsPerMM": 100,
                "speed": 10,
                "dirPin": -1,
                "stepPin": -1,
                "enablePin": -1,
                "endstopPin": -1,
                "invertEndstop": "0",
                "minEndstop": "1",
                "endstopPullup": "1",
                "maxDistance": 20
            },
            {
                "t": "None",
                "s": "",
                "invertEnable": "0",
                "invertDirection": "0",
                "stepsPerMM": 100,
                "speed": 10,
                "dirPin": -1,
                "stepPin": -1,
                "enablePin": -1,
                "endstopPin": -1,
                "invertEndstop": "0",
                "minEndstop": "1",
                "endstopPullup": "1",
                "maxDistance": 20
            }
        ],
        "manualConfig": "",
        "zHomeMinTemperature": 0,
        "zHomeXPos": 82,
        "zHomeYPos": 95,
        "zHomeHeatHeight": 20,
        "zHomeHeatAll": "1",
        "zProbeZOffsetMode": 1,
        "zProbeZOffset": 0,
        "zProbeDelay": 100,
        "uiBedCoating": "1",
        "langEN": "1",
        "langDE": "0",
        "langNL": "0",
        "langPT": "0",
        "langIT": "0",
        "langES": "0",
        "langFI": "0",
        "langSE": "0",
        "langFR": "0",
        "langCZ": "0",
        "langPL": "0",
        "langTR": "0",
        "langRU": "0",
        "interpolateAccelerationWithZ": 0,
        "accelerationFactorTop": 100,
        "bendingCorrectionA": 0,
        "bendingCorrectionB": 0,
        "bendingCorrectionC": 0,
        "preventZDisableOnStepperTimeout": "0",
        "supportLaser": "0",
        "laserPin": -1,
        "laserOnHigh": "1",
        "laserWarmupTime": 0,
        "defaultPrinterMode": 0,
        "laserPwmMax": 255,
        "laserWatt": 2,
        "supportCNC": "0",
        "cncWaitOnEnable": 300,
        "cncWaitOnDisable": 0,
        "cncEnablePin": -1,
        "cncEnableWith": "1",
        "cncDirectionPin": -1,
        "cncDirectionCW": "1",
        "cncPwmMax": 255,
        "cncRpmMax": 8000,
        "cncSafeZ": 150,
        "startupGCode": "",
        "jsonOutput": "0",
        "bedLevelingMethod": 1,
        "bedCorrectionMethod": 0,
        "bedLevelingGridSize": 6,
        "bedLevelingRepetitions": 5,
        "bedMotor1X": 0,
        "bedMotor1Y": 0,
        "bedMotor2X": 200,
        "bedMotor2Y": 0,
        "bedMotor3X": 100,
        "bedMotor3Y": 200,
        "zProbeRequiresHeating": "0",
        "zProbeMinTemperature": 150,
        "adcKeypadPin": -1,
        "sharedExtruderHeater": "0",
        "extruderSwitchXYSpeed": 100,
        "dualXAxis": "0",
        "boardFanSpeed": 255,
        "keepAliveInterval": 2000,
        "moveXWhenHomed": "0",
        "moveYWhenHomed": "0",
        "moveZWhenHomed": "0",
        "preheatTime": 30000,
        "multiZEndstopHoming": "0",
        "z2MinMaxPin": -1,
        "z2MinMaxEndstop": 0,
        "extruderIsZProbe": "0",
        "boardFanMinSpeed": 0,
        "doorPin": -1,
        "doorEndstop": 0,
        "zhomePreRaise": 0,
        "zhomePreRaiseDistance": 5,
        "dualXResolution": "0",
        "x2axisStepsPerMM": 100,
        "coolerPWMSpeed": 0,
        "maxFanPWM": 255,
        "raiseZOnToolchange": 0,
        "distortionLimitTo": 3,
        "automaticPowerup": 0,
        "hasTMC2130": "1",
        "TMC2130Sensorless": "1",
        "TMC2130Steathchop": "1",
        "TMC2130Interpolate256": "1",
        "TMC2130StallguardSensitivity": 0,
        "TMC2130PWMAmpl": 255,
        "TMC2130PWMGrad": 1,
        "TMC2130PWMAutoscale": "1",
        "TMC2130PWMFreq": 2,
        "TMC2130CSX": 27,
        "TMC2130CSY": 29,
        "TMC2130CSZ": 31,
        "TMC2130CSE0": 33,
        "TMC2130CSE1": 35,
        "TMC2130CSE2": -1,
        "TMC2130CSE3": -1,
        "TMC2130CSE4": -1,
        "TMC2130CurrentX": 1020,
        "TMC2130CurrentY": 1020,
        "TMC2130CurrentZ": 290,
        "TMC2130CurrentE0": 1020,
        "TMC2130CurrentE1": 290,
        "TMC2130CurrentE2": 1000,
        "TMC2130CurrentE3": 1000,
        "TMC2130CurrentE4": 1000,
        "TMC2130CoolstepTresholdX": 300,
        "TMC2130CoolstepTresholdY": 300,
        "TMC2130CoolstepTresholdZ": 300,
        "microstepX": 16,
        "microstepY": 16,
        "microstepZ": 16,
        "microstepE0": 16,
        "microstepE1": 16,
        "microstepE2": 16,
        "microstepE3": 16,
        "microstepE4": 16,
        "parkPosX": 0,
        "parkPosY": 0,
        "parkPosZ": 10,
        "emergencyParser": -1,
        "hostRescue": "1",
        "MAX31855SwCS": -1,
        "MAX31855SwCLK": -1,
        "tempGain": "0",
        "hasMAX6675": false,
        "hasMAX31855": false,
        "hasGeneric1": false,
        "hasGeneric2": false,
        "hasGeneric3": false,
        "hasUser0": false,
        "hasUser1": false,
        "hasUser2": false,
        "numExtruder": 1,
        "version": 100.4,
        "primaryPortName": "SerialUSB",
        "hasMAX31855SW": false
    }
    ========== End configuration string ==========
    
    */
    
    Could not add codebox in edit comment mode (or something)
  • Also somewhere around line 1273 in printer.cpp i had to edit EXT1 to Z2 to be able to compile correctly
    Like so:
    #if TMC2130_ON_EXT1 > 0
        Printer::tmc_driver_e1 = new TMC2130Stepper(Z2_ENABLE_PIN, Z2_DIR_PIN, Z2_STEP_PIN, TMC2130_EXT1_CS_PIN);
        configTMC2130(Printer::tmc_driver_e1, TMC2130_STEALTHCHOP_EXT1, TMC2130_STALLGUARD_EXT1,
                      TMC2130_PWM_AMPL_EXT1, TMC2130_PWM_GRAD_EXT1, TMC2130_PWM_AUTOSCALE_EXT1, TMC2130_PWM_FREQ_EXT1);
    #endif
    
Sign In or Register to comment.