Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add config for Creality E3 free-runs board #995

Merged
merged 6 commits into from
Jan 4, 2024
Merged

add config for Creality E3 free-runs board #995

merged 6 commits into from
Jan 4, 2024

Conversation

mcrossen
Copy link
Contributor

@mcrossen mcrossen commented Dec 24, 2023

A few days ago, support for the Creality "E3 free-runs TMC2209" was added to marlin firmware (PR link) with a bug fix on the way (PR link). Now that support is added, the configs should be similar to other ender 3 configs so I started by copying the configs from the CrealityV427 board.

The main difference between configs for this new board and other Ender 3 boards are the following
#define MOTHERBOARD BOARD_CREALITY_CR4NTXXC10
#define X_DRIVER_TYPE TMC2209
#define Y_DRIVER_TYPE TMC2209
#define Z_DRIVER_TYPE TMC2209
#define E0_DRIVER_TYPE TMC2209

Creality's official repo for the board has an outdated marlin version, but it should still be a good reference to check other config values. I diffed the config in that repo with a newer marlin version to try and find any other config values that should be changed. There was a lot of non-functional changes (like changes to comments and changes to standard config) to sort out but the following seemed relevant so i added it to this PR.
#define X_CURRENT 800
#define Y_CURRENT 800
#define Z_CURRENT 800
#define X_SLAVE_ADDRESS 0
#define Y_SLAVE_ADDRESS 1
#define Z_SLAVE_ADDRESS 2
#define E0_SLAVE_ADDRESS 3

Perhaps someone more familiar with these values can verify that they're necessary. I also found the following differences in Creality's official repo but decided NOT to add them because they didn't seem relevant.
#define BABYSTEPPING // disabled in Creality's repo but not for CrealityV427

I tested this code on my ender 3 pro by applying a few configs specific to my printer (like bltouch), flashing the firmware, and printing a benchy. I'm excited to report that the new [silent] board can't be heard throughout the whole apartment 😄

@ellensp
Copy link
Contributor

ellensp commented Dec 24, 2023

The _CURRENT is dependent on the stepper motors themselves and their peak current settings. Not a independent stepper driver setting

@ellensp
Copy link
Contributor

ellensp commented Dec 24, 2023

One thing you do need to change is
#define X_RSENSE 0.11 // Multiplied x1000 for TMC26X

The circuit diagram shows this board has 0.15 ohm resistors

And Y, Z and E

@ellensp
Copy link
Contributor

ellensp commented Dec 24, 2023

setting _SLAVE_ADDRESS In configuration_adv.h is not required, it is set automatically in Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h

ie

#ifndef X_SLAVE_ADDRESS
    #define X_SLAVE_ADDRESS                   0
  #endif
  #ifndef Y_SLAVE_ADDRESS
    #define Y_SLAVE_ADDRESS                   1
  #endif
  #ifndef Z_SLAVE_ADDRESS
    #define Z_SLAVE_ADDRESS                   2
  #endif
  #ifndef E0_SLAVE_ADDRESS
    #define E0_SLAVE_ADDRESS                  3
  #endif

@mcrossen
Copy link
Contributor Author

alright, thanks @ellensp. I modified my commits with those changes. I might not have understood what you meant for X_RSENSE. can you verify I changed it correctly?

@ellensp
Copy link
Contributor

ellensp commented Dec 24, 2023

Yes that is good.

@mcrossen
Copy link
Contributor Author

mcrossen commented Dec 24, 2023

One other change I forgot to mention is that Creality's repo disabled software fan pulse-width-modulation. Most ender 3 boards have it enabled but this Pull Request disables it to match Creality.

//#define FAN_SOFT_PWM

@mcrossen
Copy link
Contributor Author

mcrossen commented Dec 24, 2023

20231224_003322
here's the results of my tests. The left benchy was printed at the start of this PR. The right benchy includes all recent changes. Notice how the left benchy has a horizontal line on the hull. That is from the power supply cutting out. Fortunately, I have power supply recovery enabled which is why it was able to finish. The right benchy printed without any power issues - likely thanks to @ellensp's suggestions about XYZE_CURRENT and XYZE_RSENSE.

@ellensp
Copy link
Contributor

ellensp commented Dec 24, 2023

you probably want to enable the following, as TMC2209s like this mode. (and halves the stepping load on marlin)

  /**
   * Step on both rising and falling edge signals (as with a square wave).
   */
  #define EDGE_STEPPING

And the following, to reduce controller CPU load

// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
#define ENDSTOP_INTERRUPTS_FEATURE

@mcrossen
Copy link
Contributor Author

I sent @jghboke a config to try on their ender 5 with this board. They say it works so i've added it to this PR.

@mcrossen
Copy link
Contributor Author

mcrossen commented Jan 1, 2024

can anyone review this PR?

@thinkyhead thinkyhead force-pushed the import-2.1.x branch 5 times, most recently from ef3d7e2 to 7f1571e Compare January 3, 2024 15:41
@thinkyhead thinkyhead merged commit f8182fb into MarlinFirmware:import-2.1.x Jan 4, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants