Skip to content

Commit

Permalink
Set lin_adv value, own steps per mm, PID, increased acceleration and …
Browse files Browse the repository at this point in the history
…jerk
  • Loading branch information
TheUnlimited64 committed Apr 21, 2023
1 parent c225e82 commit 63e71da
Show file tree
Hide file tree
Showing 10 changed files with 78 additions and 37 deletions.
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/Kobra_Neo_Firmware.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#### Modified Anycubic Kobra Neo V1.33 Firmware

I modified jokubasver's version of the kobra neo firmware and seems like got Lin_Advance working. Also I increased the acceleration. Can't say if it's safe to run, so run on own risk


## Features
- Increase probing accuracy by doing multiple probes per point
- Increased speed for the first Z-probe approach when double-probing
Expand All @@ -9,9 +12,8 @@
- Enable M73 Gcode for setting progress bar on printer screen
- UI changes - black background, removed ugly yellow text color
- Add personal PID and E-Step values

## Download
https://github.com/jokubasver/Kobra_Neo/releases
- LIN_ADVANCE working (V1.5 Marlin!)
- Increased

## Flashing
Copy firmware.bin to your microSD card, insert the card with the printer off, turn printer on and wait until you get to the home screen. Afterwards, delete the firmware.bin file from your card.
Expand All @@ -36,6 +38,8 @@ Having these values saved in the firmware itself could save a lot of headaches,
https://www.reddit.com/r/anycubic/comments/y2waxu/tutorial_how_to_build_anycubic_marlin_source_code/

## Based on
https://github.com/jokubasver/Kobra_Neo

https://github.com/sjorge/Kobra_Neo_Fw

https://github.com/jojos38/anycubic-kobra-improved-firmware
Expand Down
20 changes: 10 additions & 10 deletions source/Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -519,9 +519,9 @@
#if ENABLED(PID_PARAMS_PER_HOTEND)
// Specify between 1 and HOTENDS values per array.
// If fewer than EXTRUDER values are provided, the last element will be repeated.
#define DEFAULT_Kp_LIST { 22.20, 22.20 }
#define DEFAULT_Ki_LIST { 1.08, 1.08 }
#define DEFAULT_Kd_LIST { 114.00, 114.00 }
#define DEFAULT_Kp_LIST { 16.40, 16.40 }
#define DEFAULT_Ki_LIST { 0.95, 0.95 }
#define DEFAULT_Kd_LIST { 70.80, 70.80 }
#else
#define DEFAULT_Kp 10.08
#define DEFAULT_Ki 0.39
Expand Down Expand Up @@ -564,9 +564,9 @@

// 120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
// from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
#define DEFAULT_bedKp 87.84
#define DEFAULT_bedKi 8.51
#define DEFAULT_bedKd 604.50
#define DEFAULT_bedKp 97.10
#define DEFAULT_bedKi 1.41
#define DEFAULT_bedKd 1675.16

// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED
Expand Down Expand Up @@ -767,7 +767,7 @@
* Override with M92
* X, Y, Z, E0 [, E1[, E2...]]
*/
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 414.68 } //原来是390
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80.630, 80.030, 405.860, 397.96 } //原来是390

/**
* Default Max Feed Rate (mm/s)
Expand All @@ -787,7 +787,7 @@
* Override with M201
* X, Y, Z, E0 [, E1[, E2...]]
*/
#define DEFAULT_MAX_ACCELERATION { 500, 500, 100, 500 }
#define DEFAULT_MAX_ACCELERATION { 1000, 1000, 100, 500 }

//#define LIMITED_MAX_ACCEL_EDITING // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2
#if ENABLED(LIMITED_MAX_ACCEL_EDITING)
Expand Down Expand Up @@ -816,8 +816,8 @@
*/
#define CLASSIC_JERK
#if ENABLED(CLASSIC_JERK)
#define DEFAULT_XJERK 5
#define DEFAULT_YJERK 5
#define DEFAULT_XJERK 8
#define DEFAULT_YJERK 8
#define DEFAULT_ZJERK 5

//#define TRAVEL_EXTRA_XYJERK 0.0 // Additional jerk allowance for all travel moves
Expand Down
4 changes: 2 additions & 2 deletions source/Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1711,10 +1711,10 @@
*
* See https://marlinfw.org/docs/features/lin_advance.html for full instructions.
*/
//#define LIN_ADVANCE
#define LIN_ADVANCE
#if ENABLED(LIN_ADVANCE)
//#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants
#define LIN_ADVANCE_K 0 // Unit: mm compression per 1mm/s extruder speed
#define LIN_ADVANCE_K 0.12 // Unit: mm compression per 1mm/s extruder speed
//#define LA_DEBUG // If enabled, this will generate debug information output over USB.
#define EXPERIMENTAL_SCURVE // Enable this option to permit S-Curve Acceleration
#endif
Expand Down
42 changes: 21 additions & 21 deletions workspace/RTE/_firmware_Release/RTE_Components.h
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@

/*
* Auto generated Run-Time-Environment Configuration File
* *** Do not modify ! ***
*
* Project: 'anycubic'
* Target: 'firmware_Release'
*/

#ifndef RTE_COMPONENTS_H
#define RTE_COMPONENTS_H


/*
* Define the Device Header File:
*/
#define CMSIS_device_header "HC32F460KETA.h"



#endif /* RTE_COMPONENTS_H */

/*
* Auto generated Run-Time-Environment Configuration File
* *** Do not modify ! ***
*
* Project: 'anycubic'
* Target: 'firmware_Release'
*/

#ifndef RTE_COMPONENTS_H
#define RTE_COMPONENTS_H


/*
* Define the Device Header File:
*/
#define CMSIS_device_header "HC32F460KETA.h"



#endif /* RTE_COMPONENTS_H */
2 changes: 1 addition & 1 deletion workspace/anycubic.uvprojx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
<UseExternalTool>0</UseExternalTool>
<RunIndependent>0</RunIndependent>
<UpdateFlashBeforeDebugging>1</UpdateFlashBeforeDebugging>
<Capability>1</Capability>
<Capability>0</Capability>
<DriverSelection>4096</DriverSelection>
</Flash1>
<bUseTDR>1</bUseTDR>
Expand Down

2 comments on commit 63e71da

@jokubasver
Copy link

@jokubasver jokubasver commented on 63e71da Apr 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately it seems that this is not enough to get linear advance to work properly with this version of Marlin and our printer. While the feature itself works, there were issues with lin advance and TMC2208 drivers up until around mid 2022, causing the stepper to stall randomly during prints. This PR seemingly fixes the issue, but merging it to Kobra Neo fork causes weird wobbly stepper movement and prints that look awful. Other options include switching from stealthChop on the extruder to spreadCycle, but that causes the stepper to stall too, there's also SQUARE_WAVE_STEPPING but that reduces the stepper steps in half.

There is a fork of mainline Marlin for HC32F46x MCUs (made to work on an Aquila X2), and I've got a base configuration done for Kobra Neo, but that fork currently does not have support for SoftwareSerial (which is needed for Kobra Neo's TMC2208 drivers that are running in UART mode) and TFT SPI (for our LCD display). Currently looking into it to see if I could port those features over.

@TheUnlimited64
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jokubasver it did work pretty well for me, but could be just luck. What about just copy paste the SoftwareSerial from the Anycubic repo and stick it into 2.1.x? Im not that invested in marlin, but a stupid guess might work xD

Please sign in to comment.