24 Commits
1.0.1 ... 1.0.4

Author SHA1 Message Date
Oliver Köster
3114326d53 Fix typo 2020-06-08 09:10:52 +02:00
Oliver Köster
c58743be56 Update README.md 2020-06-08 08:38:46 +02:00
Oliver Köster
2ef316b70c Update README.md 2020-06-08 08:29:49 +02:00
Oliver Köster
105eb83168 Update README.md 2020-06-07 22:05:24 +02:00
Oliver Köster
3bfa7c855f Add english translation 2020-06-07 22:04:18 +02:00
Knutwurst
a0cba42b41 Update README.md with some images. 2020-06-07 13:10:39 +02:00
Knutwurst
d772a6abac Add exit to default page in special menu. 2020-06-07 09:40:56 +02:00
Knutwurst
b9a135b6af Bump version number for next release. 2020-06-07 09:31:56 +02:00
Knutwurst
8ea2ae36ad Add 0.02 and 0.01 Z-Stepping for mesh leveling purpose. 2020-06-07 09:27:31 +02:00
Knutwurst
eaf291bf05 Bugfix for nozzle positioning via touchscreen, which was absolute instead of relative. 2020-06-06 23:55:40 +02:00
Knutwurst
3bbe852b3e Bump Version to 1.0.3 for next release 2020-06-06 23:08:31 +02:00
Knutwurst
fb927ee602 Optimized MEGA S extruder feedrate and acceleration values. 2020-06-06 23:04:49 +02:00
Knutwurst
33f611d0cc Update README.md regarding filament runout sensor. 2020-06-06 21:53:45 +02:00
Knutwurst
f93857edb1 Filament runout sensor can be disabled via special menu. 2020-06-06 21:51:19 +02:00
Knutwurst
b1dfd1fec5 Update README.md 2020-06-06 20:14:57 +02:00
Knutwurst
b6ad592a8d Automatically initialize EEPROM on any errors. 2020-06-06 20:13:26 +02:00
Oliver Köster
ecb83dcc13 Fix typo 2020-06-06 15:07:10 +02:00
Knutwurst
e1ca8ee7b3 Bump Version to 1.0.2 2020-06-06 14:38:56 +02:00
Knutwurst
a11043e5bc Bugfixes for almost every common Touchscreen problem, regarding freezes and lockups by substituting the GCodeQueue.enqueue_now_P method with the correct inject function, which also clears the current queue and ensures, our command is processed. 2020-06-06 14:32:04 +02:00
Oliver Köster
38fdba59ed Update README.md 2020-06-06 14:22:59 +02:00
Oliver Köster
bebffb6823 Update README.md 2020-06-06 13:52:25 +02:00
Knutwurst
a3b291f1cf Disable advanced pause feature, because resume does not work reliably. 2020-06-06 13:51:17 +02:00
Knutwurst
0486080289 - Remove unneccessary bed heating information.
- Disable debug information via serial console.
2020-06-06 12:53:11 +02:00
Oliver Köster
c20481ae96 Update README.md 2020-06-06 12:10:48 +02:00
11 changed files with 306 additions and 127 deletions

View File

@@ -771,7 +771,15 @@
* Override with M203
* X, Y, Z, E0 [, E1[, E2...]]
*/
#if ENABLED(KNUTWURST_MEGAS)
#define DEFAULT_MAX_FEEDRATE { 500, 500, 6, 30 }
#endif
#if DISABLED(KNUTWURST_MEGAS)
#define DEFAULT_MAX_FEEDRATE { 500, 500, 6, 60 }
#endif
//#define LIMITED_MAX_FR_EDITING // Limit edit via M203 or LCD to DEFAULT_MAX_FEEDRATE * 2
#if ENABLED(LIMITED_MAX_FR_EDITING)
@@ -799,10 +807,18 @@
* M204 R Retract Acceleration
* M204 T Travel Acceleration
*/
#if ENABLED(KNUTWURST_MEGAS)
#define DEFAULT_ACCELERATION 1600 // X, Y, Z and E acceleration for printing moves
#define DEFAULT_RETRACT_ACCELERATION 1500 // E acceleration for retracts
#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves
#endif
#if DISABLED(KNUTWURST_MEGAS)
#define DEFAULT_ACCELERATION 1600 // X, Y, Z and E acceleration for printing moves
#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts
#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves
#endif
/**
* Default Jerk limits (mm/s)
* Override with M205 X Y Z E
@@ -1500,9 +1516,9 @@
#define EEPROM_SETTINGS // Persistent storage with M500 and M501
//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
#define EEPROM_BOOT_SILENT // Keep M503 quiet and only give errors during first load
//#define EEPROM_BOOT_SILENT // Keep M503 quiet and only give errors during first load
#if ENABLED(EEPROM_SETTINGS)
//#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors.
#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors.
#endif
//
@@ -2334,9 +2350,10 @@
* The new version is to be identified by a "TRIGORILLA1.1" lettering
* on the upper left of the PCB silkscreen.
*/
#define TRIGORILLA_VERSION 1
#define TRIGORILLA_VERSION 0
// Enable Anycubic TFT
#define ANYCUBIC_TOUCHSCREEN
#define ANYCUBIC_FILAMENT_RUNOUT_SENSOR
#define ANYCUBIC_TFT_DEBUG
//#define ANYCUBIC_TFT_DEBUG

View File

@@ -1867,7 +1867,7 @@
* Requires NOZZLE_PARK_FEATURE.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/
#define ADVANCED_PAUSE_FEATURE
//#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
#define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
#define PAUSE_PARK_RETRACT_LENGTH 4 // (mm) Initial retract.

View File

@@ -43,10 +43,7 @@
#include "../../feature/leds/leds.h"
#endif
#if ENABLED(ANYCUBIC_TOUCHSCREEN)
#include "../../lcd/anycubic_touchscreen.h"
#endif
#include "../../MarlinCore.h" // for wait_for_heatup and idle()
#include "../../MarlinCore.h" // for wait_for_heatup, idle, startOrResumeJob
/**
* M140: Set bed temperature
@@ -83,15 +80,9 @@ void GcodeSuite::M190() {
}
else return;
#ifdef ANYCUBIC_TOUCHSCREEN
AnycubicTouchscreen.BedHeatingStart();
#endif
ui.set_status_P(thermalManager.isHeatingBed() ? GET_TEXT(MSG_BED_HEATING) : GET_TEXT(MSG_BED_COOLING));
thermalManager.wait_for_bed(no_wait_for_cooling);
//SERIAL_FLUSH();
}
#endif // HAS_HEATED_BED

View File

@@ -38,7 +38,7 @@
* Defines the version of the Marlin build. Not to be confused with
* Marlin's own build number, e.g. 2.0.x.
*/
#define CUSTOM_BUILD_VERSION "1.0.1"
#define CUSTOM_BUILD_VERSION "1.0.4"
#ifndef STRING_DISTRIBUTION_DATE
#define STRING_DISTRIBUTION_DATE "2020-03-31"
@@ -71,7 +71,7 @@
/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
*/
#define MACHINE_NAME "Anycubic i3 MEGA S"
#define MACHINE_NAME "Knutwurst's Anycubic i3 MEGA"
/**
* The SOURCE_CODE_URL is the location where users will find the Marlin Source

View File

@@ -108,7 +108,7 @@ void AnycubicTouchscreenClass::Setup()
#if ENABLED(ANYCUBIC_FILAMENT_RUNOUT_SENSOR)
pinMode(19, INPUT);
WRITE(19, HIGH);
if (READ(19) == true)
if ((READ(19) == true) && FilamentSensorEnabled)
{
HARDWARE_SERIAL_PROTOCOLPGM("J15"); //J15 FILAMENT LACK
HARDWARE_SERIAL_ENTER();
@@ -120,6 +120,7 @@ void AnycubicTouchscreenClass::Setup()
SelectedDirectory[0] = 0;
SpecialMenu = false;
FilamentSensorEnabled = true;
#ifdef STARTUP_CHIME
buzzer.tone(250, 554); // C#5
@@ -131,12 +132,12 @@ void AnycubicTouchscreenClass::Setup()
void AnycubicTouchscreenClass::WriteOutageEEPromData()
{
int pos = E2END - 256;
//int pos = E2END - 256;
}
void AnycubicTouchscreenClass::ReadOutageEEPromData()
{
int pos = E2END - 256;
//int pos = E2END - 256;
}
void AnycubicTouchscreenClass::KillTFT()
@@ -166,7 +167,7 @@ void AnycubicTouchscreenClass::StartPrint()
break;
case 1:
// regular sd pause
queue.enqueue_now_P(PSTR("M24")); // unpark nozzle
queue.inject_P(PSTR("M24")); // unpark nozzle
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOPAIR(" DEBUG: AI3M Pause State: ", ai3m_pause_state);
SERIAL_EOL();
@@ -197,7 +198,7 @@ void AnycubicTouchscreenClass::StartPrint()
break;
case 3:
// paused by filament runout
queue.enqueue_now_P(PSTR("M24")); // unpark nozzle and resume
queue.inject_P(PSTR("M24")); // unpark nozzle and resume
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOLNPGM("DEBUG: M24 Resume from Filament Runout");
#endif
@@ -258,9 +259,9 @@ void AnycubicTouchscreenClass::PausePrint()
SERIAL_ECHOLNPGM("DEBUG: Filament Runout Pause");
#endif
// filament runout, retract and beep
queue.enqueue_now_P(PSTR("G91")); // relative mode
queue.enqueue_now_P(PSTR("G1 E-3 F1800")); // retract 3mm
queue.enqueue_now_P(PSTR("G90")); // absolute mode
queue.inject_P(PSTR("G91")); // relative mode
queue.inject_P(PSTR("G1 E-3 F1800")); // retract 3mm
queue.inject_P(PSTR("G90")); // absolute mode
buzzer.tone(200, 1567);
buzzer.tone(200, 1174);
buzzer.tone(200, 1567);
@@ -269,7 +270,7 @@ void AnycubicTouchscreenClass::PausePrint()
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOLNPGM("DEBUG: Filament runout - Retract, beep and park.");
#endif
queue.enqueue_now_P(PSTR("M25")); // pause print and park nozzle
queue.inject_P(PSTR("M25")); // pause print and park nozzle
ai3m_pause_state = 3;
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOLNPGM("DEBUG: M25 sent, parking nozzle");
@@ -318,7 +319,7 @@ void AnycubicTouchscreenClass::StopPrint()
void AnycubicTouchscreenClass::FilamentChangeResume()
{
// call M108 to break out of M600 pause
queue.enqueue_now_P(PSTR("M108"));
queue.inject_P(PSTR("M108"));
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOLNPGM("DEBUG: M108 Resume called");
#endif
@@ -345,7 +346,7 @@ void AnycubicTouchscreenClass::FilamentChangePause()
#endif
// call M600 and set display state to paused
queue.enqueue_now_P(PSTR("M600"));
queue.inject_P(PSTR("M600"));
TFTstate = ANYCUBIC_TFT_STATE_SDPAUSE_REQ;
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOLNPGM("DEBUG: M600 Pause called");
@@ -357,14 +358,14 @@ void AnycubicTouchscreenClass::ReheatNozzle()
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOLNPGM("DEBUG: Send reheat M108");
#endif
queue.enqueue_now_P(PSTR("M108"));
queue.inject_P(PSTR("M108"));
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOLNPGM("DEBUG: Resume heating");
#endif
// enable heaters again
HOTEND_LOOP()
thermalManager.reset_hotend_idle_timer(e);
//thermalManager.reset_hotend_idle_timer(e);
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOLNPGM("DEBUG: Clear flags");
#endif
@@ -402,8 +403,8 @@ void AnycubicTouchscreenClass::ParkAfterStop()
SERIAL_ECHOLNPGM("DEBUG: SDSTOP: Park XY");
#endif
}
queue.enqueue_now_P(PSTR("M84")); // disable stepper motors
queue.enqueue_now_P(PSTR("M27")); // force report of SD status
queue.inject_P(PSTR("M84")); // disable stepper motors
queue.inject_P(PSTR("M27")); // force report of SD status
ai3m_pause_state = 0;
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOPAIR(" DEBUG: AI3M Pause State: ", ai3m_pause_state);
@@ -431,61 +432,71 @@ void AnycubicTouchscreenClass::HandleSpecialMenu()
else if (strcmp(SelectedDirectory, "<pid tune hotend>") == 0)
{
SERIAL_ECHOLNPGM("Special Menu: PID Tune Hotend");
queue.enqueue_now_P(PSTR("M106 S204\nM303 E0 S210 C15 U1"));
queue.inject_P(PSTR("M106 S204\nM303 E0 S210 C15 U1"));
}
else if (strcmp(SelectedDirectory, "<pid tune ultrabase>") == 0)
{
SERIAL_ECHOLNPGM("Special Menu: PID Tune Ultrabase");
queue.enqueue_now_P(PSTR("M303 E-1 S60 C6 U1"));
queue.inject_P(PSTR("M303 E-1 S60 C6 U1"));
}
else if (strcmp(SelectedDirectory, "<save eeprom>") == 0)
{
SERIAL_ECHOLNPGM("Special Menu: Save EEPROM");
queue.enqueue_now_P(PSTR("M500"));
queue.inject_P(PSTR("M500"));
buzzer.tone(105, 1108);
buzzer.tone(210, 1661);
}
else if (strcmp(SelectedDirectory, "<load fw defaults>") == 0)
{
SERIAL_ECHOLNPGM("Special Menu: Load FW Defaults");
queue.enqueue_now_P(PSTR("M502"));
queue.inject_P(PSTR("M502"));
buzzer.tone(105, 1661);
buzzer.tone(210, 1108);
}
else if (strcmp(SelectedDirectory, "<preheat ultrabase>") == 0)
{
SERIAL_ECHOLNPGM("Special Menu: Preheat Ultrabase");
queue.enqueue_now_P(PSTR("M140 S60"));
queue.inject_P(PSTR("M140 S60"));
}
else if (strcmp(SelectedDirectory, "<start mesh leveling>") == 0)
{
SERIAL_ECHOLNPGM("Special Menu: Start Mesh Leveling");
queue.enqueue_now_P(PSTR("G29 S1"));
queue.inject_P(PSTR("G29 S1"));
}
else if (strcmp(SelectedDirectory, "<next mesh point>") == 0)
{
SERIAL_ECHOLNPGM("Special Menu: Next Mesh Point");
queue.enqueue_now_P(PSTR("G29 S2"));
queue.inject_P(PSTR("G29 S2"));
}
else if (strcmp(SelectedDirectory, "<z up 0.1>") == 0)
{
SERIAL_ECHOLNPGM("Special Menu: Z Up 0.1");
queue.enqueue_now_P(PSTR("G91\nG1 Z+0.1\nG90"));
}
else if (strcmp(SelectedDirectory, "<z up 0.02>") == 0)
{
SERIAL_ECHOLNPGM("Special Menu: Z Up 0.02");
queue.enqueue_now_P(PSTR("G91\nG1 Z+0.02\nG90"));
}
else if (strcmp(SelectedDirectory, "<z down 0.02>") == 0)
{
SERIAL_ECHOLNPGM("Special Menu: Z Down 0.02");
queue.enqueue_now_P(PSTR("G91\nG1 Z-0.02\nG90"));
queue.inject_P(PSTR("G91\nG1 Z+0.1\nG90"));
}
else if (strcmp(SelectedDirectory, "<z down 0.1>") == 0)
{
SERIAL_ECHOLNPGM("Special Menu: Z Down 0.1");
queue.enqueue_now_P(PSTR("G91\nG1 Z-0.1\nG90"));
queue.inject_P(PSTR("G91\nG1 Z-0.1\nG90"));
}
else if (strcmp(SelectedDirectory, "<z up 0.02>") == 0)
{
SERIAL_ECHOLNPGM("Special Menu: Z Up 0.02");
queue.inject_P(PSTR("G91\nG1 Z+0.02\nG90"));
}
else if (strcmp(SelectedDirectory, "<z down 0.02>") == 0)
{
SERIAL_ECHOLNPGM("Special Menu: Z Down 0.02");
queue.inject_P(PSTR("G91\nG1 Z-0.02\nG90"));
}
else if (strcmp(SelectedDirectory, "<z up 0.01>") == 0)
{
SERIAL_ECHOLNPGM("Special Menu: Z Up 0.01");
queue.inject_P(PSTR("G91\nG1 Z+0.01\nG90"));
}
else if (strcmp(SelectedDirectory, "<z down 0.01>") == 0)
{
SERIAL_ECHOLNPGM("Special Menu: Z Down 0.01");
queue.inject_P(PSTR("G91\nG1 Z-0.01\nG90"));
}
else if (strcmp(SelectedDirectory, "<filamentchange pause>") == 0)
{
@@ -497,6 +508,21 @@ void AnycubicTouchscreenClass::HandleSpecialMenu()
SERIAL_ECHOLNPGM("Special Menu: FilamentChange Resume");
FilamentChangeResume();
}
else if (strcmp(SelectedDirectory, "<disable fil. sensor>") == 0)
{
SERIAL_ECHOLNPGM("Special Menu: Disable Filament Sensor");
FilamentSensorEnabled = false;
buzzer.tone(105, 1108);
buzzer.tone(105, 1108);
buzzer.tone(105, 1108);
}
else if (strcmp(SelectedDirectory, "<enable fil. sensor>") == 0)
{
SERIAL_ECHOLNPGM("Special Menu: Enable Filament Sensor");
FilamentSensorEnabled = true;
buzzer.tone(105, 1108);
buzzer.tone(105, 1108);
}
else if (strcmp(SelectedDirectory, "<exit>") == 0)
{
SpecialMenu = false;
@@ -531,7 +557,20 @@ void AnycubicTouchscreenClass::Ls()
HARDWARE_SERIAL_PROTOCOLLNPGM("<Z Down 0.1>");
break;
case 8: // Page 3
HARDWARE_SERIAL_PROTOCOLLNPGM("<Z Up 0.02>");
HARDWARE_SERIAL_PROTOCOLLNPGM("<Z Up 0.02>");
HARDWARE_SERIAL_PROTOCOLLNPGM("<Z Down 0.02>");
HARDWARE_SERIAL_PROTOCOLLNPGM("<Z Down 0.02>");
HARDWARE_SERIAL_PROTOCOLLNPGM("<Z Up 0.01>");
HARDWARE_SERIAL_PROTOCOLLNPGM("<Z Up 0.01>");
HARDWARE_SERIAL_PROTOCOLLNPGM("<Z Down 0.01>");
HARDWARE_SERIAL_PROTOCOLLNPGM("<Z Down 0.01>");
break;
case 12: // Page 4
HARDWARE_SERIAL_PROTOCOLLNPGM("<PID Tune Hotend>");
HARDWARE_SERIAL_PROTOCOLLNPGM("<PID Tune Hotend>");
HARDWARE_SERIAL_PROTOCOLLNPGM("<PID Tune Ultrabase>");
@@ -541,6 +580,18 @@ void AnycubicTouchscreenClass::Ls()
HARDWARE_SERIAL_PROTOCOLLNPGM("<Load FW Defaults>");
HARDWARE_SERIAL_PROTOCOLLNPGM("<Load FW Defaults>");
break;
case 16: // Page 5
HARDWARE_SERIAL_PROTOCOLLNPGM("<Disable Fil. Sensor>");
HARDWARE_SERIAL_PROTOCOLLNPGM("<Disable Fil. Sensor>");
HARDWARE_SERIAL_PROTOCOLLNPGM("<Enable Fil. Sensor>");
HARDWARE_SERIAL_PROTOCOLLNPGM("<Enable Fil. Sensor>");
HARDWARE_SERIAL_PROTOCOLLNPGM("<Exit>");
HARDWARE_SERIAL_PROTOCOLLNPGM("<Exit>");
break;
/*
case 12: // Fourth Page
HARDWARE_SERIAL_PROTOCOLLNPGM("<Z Up 0.1>");
@@ -715,7 +766,7 @@ void AnycubicTouchscreenClass::StateHandler()
#ifdef SDSUPPORT
if (!card.isPrinting())
{
// It seems that we are to printing anymore... pause or stopped?
// It seems that we are not printing anymore... pause or stopped?
if (card.isFileOpen())
{
// File is still open --> paused
@@ -769,7 +820,7 @@ void AnycubicTouchscreenClass::StateHandler()
if (!IsParked)
{
// park head and retract 2mm
queue.enqueue_now_P(PSTR("M125 L2"));
queue.inject_P(PSTR("M125 L2"));
IsParked = true;
}
}
@@ -796,7 +847,7 @@ void AnycubicTouchscreenClass::StateHandler()
HARDWARE_SERIAL_ENTER();
if ((!card.isPrinting()) && (!planner.movesplanned()))
{
// enter idle display state
queue.clear();
TFTstate = ANYCUBIC_TFT_STATE_IDLE;
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOLNPGM("TFT Serial Debug: SD print stopped... J16");
@@ -810,7 +861,7 @@ void AnycubicTouchscreenClass::StateHandler()
// did we park the hotend already?
if ((!IsParked) && (!card.isPrinting()) && (!planner.movesplanned()))
{
queue.enqueue_now_P(PSTR("G91\nG1 E-1 F1800\nG90")); //retract
queue.inject_P(PSTR("G91\nG1 E-1 F1800\nG90")); //retract
ParkAfterStop();
IsParked = true;
}
@@ -823,68 +874,71 @@ void AnycubicTouchscreenClass::StateHandler()
void AnycubicTouchscreenClass::FilamentRunout()
{
#if ENABLED(ANYCUBIC_FILAMENT_RUNOUT_SENSOR)
FilamentTestStatus = READ(19) & 0xff;
if (FilamentTestStatus > FilamentTestLastStatus)
if(FilamentSensorEnabled == true)
{
// filament sensor pin changed, save current timestamp.
const millis_t fil_ms = millis();
static millis_t fil_delay;
#if ENABLED(ANYCUBIC_FILAMENT_RUNOUT_SENSOR)
FilamentTestStatus = READ(19) & 0xff;
// since this is inside a loop, only set delay time once
if (FilamentSetMillis)
if (FilamentTestStatus > FilamentTestLastStatus)
{
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOLNPGM("DEBUG: Set filament trigger time");
#endif
// set the delayed timestamp to 3000ms later
fil_delay = fil_ms + 3000UL;
// this doesn't need to run until the filament is recovered again
FilamentSetMillis = false;
}
// filament sensor pin changed, save current timestamp.
const millis_t fil_ms = millis();
static millis_t fil_delay;
// if three seconds passed and the sensor is still triggered,
// we trigger the filament runout status
if ((FilamentTestStatus > FilamentTestLastStatus) && (ELAPSED(fil_ms, fil_delay)))
{
if (!IsParked)
// since this is inside a loop, only set delay time once
if (FilamentSetMillis)
{
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOLNPGM("DEBUG: 3000ms delay done");
#endif
if (card.isPrinting())
{
ai3m_pause_state = 3;
; // set runout pause flag
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOPAIR(" DEBUG: AI3M Pause State: ", ai3m_pause_state);
SERIAL_EOL();
#endif
PausePrint();
}
else if (!card.isPrinting())
{
HARDWARE_SERIAL_PROTOCOLPGM("J15"); //J15 FILAMENT LACK
HARDWARE_SERIAL_ENTER();
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOLNPGM("TFT Serial Debug: Filament runout... J15");
#endif
FilamentTestLastStatus = FilamentTestStatus;
}
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOLNPGM("DEBUG: Set filament trigger time");
#endif
// set the delayed timestamp to 3000ms later
fil_delay = fil_ms + 3000UL;
// this doesn't need to run until the filament is recovered again
FilamentSetMillis = false;
}
// if three seconds passed and the sensor is still triggered,
// we trigger the filament runout status
if ((FilamentTestStatus > FilamentTestLastStatus) && (ELAPSED(fil_ms, fil_delay)))
{
if (!IsParked)
{
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOLNPGM("DEBUG: 3000ms delay done");
#endif
if (card.isPrinting())
{
ai3m_pause_state = 3;
; // set runout pause flag
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOPAIR(" DEBUG: AI3M Pause State: ", ai3m_pause_state);
SERIAL_EOL();
#endif
PausePrint();
}
else if (!card.isPrinting())
{
HARDWARE_SERIAL_PROTOCOLPGM("J15"); //J15 FILAMENT LACK
HARDWARE_SERIAL_ENTER();
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOLNPGM("TFT Serial Debug: Filament runout... J15");
#endif
FilamentTestLastStatus = FilamentTestStatus;
}
}
FilamentTestLastStatus = FilamentTestStatus;
}
FilamentTestLastStatus = FilamentTestStatus;
}
else if (FilamentTestStatus != FilamentTestLastStatus)
{
FilamentSetMillis = true; // set the timestamps on the next loop again
FilamentTestLastStatus = FilamentTestStatus;
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOLNPGM("TFT Serial Debug: Filament runout recovered");
#endif
}
#endif
}
else if (FilamentTestStatus != FilamentTestLastStatus)
{
FilamentSetMillis = true; // set the timestamps on the next loop again
FilamentTestLastStatus = FilamentTestStatus;
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOLNPGM("TFT Serial Debug: Filament runout recovered");
#endif
}
#endif
}
void AnycubicTouchscreenClass::GetCommandFromTFT()
@@ -1171,7 +1225,7 @@ void AnycubicTouchscreenClass::GetCommandFromTFT()
else if ((CodeSeen('C')) && (!planner.movesplanned()))
{
if ((current_position[Z_AXIS] < 10))
queue.enqueue_now_P(PSTR("G1 Z10")); //RASE Z AXIS
queue.inject_P(PSTR("G1 Z10")); //RASE Z AXIS
tempvalue = constrain(CodeValue(), 0, 275);
thermalManager.setTargetHotend(tempvalue, 0);
}
@@ -1233,14 +1287,14 @@ void AnycubicTouchscreenClass::GetCommandFromTFT()
if (CodeSeen('X') || CodeSeen('Y') || CodeSeen('Z'))
{
if (CodeSeen('X'))
queue.enqueue_now_P(PSTR("G28 X"));
queue.inject_P(PSTR("G28 X"));
if (CodeSeen('Y'))
queue.enqueue_now_P(PSTR("G28 Y"));
queue.inject_P(PSTR("G28 Y"));
if (CodeSeen('Z'))
queue.enqueue_now_P(PSTR("G28 Z"));
queue.inject_P(PSTR("G28 Z"));
}
else if (CodeSeen('C'))
queue.enqueue_now_P(PSTR("G28"));
queue.inject_P(PSTR("G28"));
}
break;
case 22: // A22 move X/Y/Z or extrude
@@ -1330,7 +1384,7 @@ void AnycubicTouchscreenClass::GetCommandFromTFT()
if ((!planner.movesplanned()) && (TFTstate != ANYCUBIC_TFT_STATE_SDPAUSE) && (TFTstate != ANYCUBIC_TFT_STATE_SDOUTAGE))
{
if ((current_position[Z_AXIS] < 10))
queue.enqueue_now_P(PSTR("G1 Z10")); // RAISE Z AXIS
queue.inject_P(PSTR("G1 Z10")); // RAISE Z AXIS
thermalManager.setTargetBed(50);
thermalManager.setTargetHotend(200, 0);
HARDWARE_SERIAL_SUCC_START;
@@ -1341,7 +1395,7 @@ void AnycubicTouchscreenClass::GetCommandFromTFT()
if ((!planner.movesplanned()) && (TFTstate != ANYCUBIC_TFT_STATE_SDPAUSE) && (TFTstate != ANYCUBIC_TFT_STATE_SDOUTAGE))
{
if ((current_position[Z_AXIS] < 10))
queue.enqueue_now_P(PSTR("G1 Z10")); //RAISE Z AXIS
queue.inject_P(PSTR("G1 Z10")); //RAISE Z AXIS
thermalManager.setTargetBed(80);
thermalManager.setTargetHotend(240, 0);

View File

@@ -117,6 +117,7 @@ private:
char SelectedDirectory[30];
uint8_t SpecialMenu = false;
uint8_t FilamentSensorEnabled = true;
#if ENABLED(ANYCUBIC_FILAMENT_RUNOUT_SENSOR)
char FilamentTestStatus = false;

134
README.md
View File

@@ -1,8 +1,8 @@
# Knutwurst's i3 MEGA S Firmware (based on Marlin 2.0.5.3)
## Readme - German (english below)
<span style="color: red;">(BITTE GENAU DURCHLESEN! / PLEASE READ CAREFULLY!)</span>
---
## Readme - German (english below)
Diese Firmwarekonfiguration aktiviert viele neue erweitere Funktionen der Marlin Firmware:
@@ -10,21 +10,29 @@ Diese Firmwarekonfiguration aktiviert viele neue erweitere Funktionen der Marlin
* S-Kurven Beschleunigung
* "Juction Deviation" statt des klassischen "Jerk"
* Babystepping während des Druckvorgangs
* Biliniar Bed Leveling (BBL)
* Bilinear Bed Leveling (BBL)
* Manuelles Editieren der Messpunkte
* Volle Anycubic Touchscreen Unterstützung
* Spannung vom Bauteillüfter von 8V auf 12V
* Pause & Filamentwechselfunktion
* Automatische EEPROM Initialisierung
* Filament Runout Sensor kann im Menü deaktiviert werden
* Wiederaufnahme des Drucks nach Stromausfall (WiP)
Besser im Vergleich zu anderen Firmwares:
Besser im Vergleich zu anderen Firmwares (Bugfixes):
* Aufgeräumtes Special-Menü
* Drucker hängt sich nicht auf, wenn man Dateien mit Sonderzeichen (oder Chinesisch) auf der SD Karte hat
* Drucker hängt sich nicht auf, wenn man Dateien mit Sonderzeichen (Umlaute, Chinesisch etc.) auf der SD Karte hat
* Kein dummes "wackeln" der Düse nach Stoppen eines Druckvorgangs
* Kein Abstürzen bei zu vielen Dateien auf der SD Karte
* Kein Abstürzen bei SD-Karten über 16 GB
* Fehler "Melodie" bei Thermal Runaway Protection
* Kein Aufhängen, wenn SD Karte + USB gleichzeitig genutzt wird
* Kein Aufhängen wenn man Pause drückt
* Kein Aufhängen, wenn das Filament leer ist.
Bevor du irgendwas machst, nachdem du die Firmware geupdated hast, gehe zu `Special Menu > Load FW Defaults` um alte Einstellungen zu löschen!
Bekannte Bugs:
* Filament Runout Sensor wird bei jedem Neustart wieder aktiviert
* Wiederaufnahme nach Stromausfall funktioniert nur sehr unzuverlässig
---
@@ -32,8 +40,11 @@ Bevor du irgendwas machst, nachdem du die Firmware geupdated hast, gehe zu `Spec
>Knutwurst, wieso machst du auch noch so eine Firmware? Es gibt doch schon so viele?
Weil ich bisher keine gesehen habe, die nicht die blöden Bugs enthält, wie z.B. dass sie abszürzt, wenn man Dateien mit Sonderzeichen auf der SD Karte hat.
Weil ich bisher keine gesehen habe, die nicht die blöden Bugs enthält, wie z.B. dass sie abstürzt, wenn man Dateien mit Sonderzeichen auf der SD Karte hat.
>Wieso ist mein Drucker plötzlich lauter als vorher?
Dein Bauteillüfter läuft jetzt mit voller Drehzahl, was er vorher nicht tat. Stelle im Slicer (z.B. Cura) die Geschwindigkeit einfach auf 70% und schon hast du die alte Lautstärke wieder. Diese Modifikation ist notwendig, falls man den Lüfter tauschen möchte und viele Lüfter mit den originalen 8V nicht oder nur unzureichend laufen.
>Ist deine Firmware besser als andere?
@@ -64,6 +75,15 @@ Nein. Du hast die Treiber falsch herum eingebaut. Jetzt ist die Z-Diode (733A) v
Nein, lade dir einfach die korrekte Version herunter. Trotzdem solltest du die Steps noch kalibrieren.
---
### Bilder
![Manual Mesh Bed Leveling](images/Mesh_Level.jpg)
![Ultra Fine mesh tuning](images/Fine_Tuning.jpg)
![Enable or Disable Filament Runout Sensor](images/Filament_Sensor_on_off.jpg)
---
@@ -80,8 +100,104 @@ Du kannst die fertigen Binärdateien hier herunterladen: https://github.com/knut
-> `i3_Mega_S_TMC.hex` benutzt du, wenn du sowohl die "S" Version mit Titan-Extruder und TMC Motortreiber verwendest.
---
## Readme - English
- coming soon -
This firmware configuration activates many new features of the Marlin firmware:
* Mesh bed calibration
* S-curve acceleration
* "Juction Deviation" instead of the classic "Jerk"
* Baby stepping during printing
* Bilinear Bed Leveling (BBL)
* Manual editing of the measuring points
* Full Anycubic touchscreen support
* Pause & filament change function
* Automatic EEPROM initialization
* Filament Runout Sensor can be deactivated in the menu
* Power outage support
What's better in coparison to other firmwares (bug fixes):
* Tidy special menu
* Printer does not freeze if you have files with special characters (umlauts, Chinese..) on your SD card
* No stupid "wobble" of the nozzle after stopping printing
* No firmware crash when there are too many files on the SD card
* No crash with SD cards over 16 GB
* Acoustic alarm in case of a thermal runaway
* No freezing when SD card + USB is used at the same time
* No freezing when you press pause and try to resume
* No freezing when the filament is empty
Known bugs:
* Filament Runout Sensor is reactivated with every reboot
* Power outage support does not work reliably
---
### FAQ:
> Knutwurst, why are you still doing such a firmware? Aren't there already so many?
Because I've never seen one that doesn't contain the stupid bugs like the crashes when you have files with special characters on the SD card.
>Why is my printer so much louder than before?
Your component fan is now running at full speed, which it did no before. Simply set the speed to 70% in the slicer (e.g. Cura) and you will have the old speed again. This modification is necessary if you want to replace the fan. Many aftermarket fans do not run properly or at all with the original 8V.
> Is your firmware better than others?
No. But certainly not worse either.
> Where are the downloads?
Further down.
> Do I have to turn the plugs for TMC drivers?
Nope, just download the correct version.
> Which TMC motor drivers should I buy? The V2 or the Bigtreetech V3?
Neither! There is no "V2" or "V3". The official last version of Trinamic is v1.2 and the two major primary manufacturers for the real SilentStepSticks are FYSTEC and WATTERROTT. Just stay away from Bigtreetech.
> When I installed the drivers, my mainboard gave me the "magic smoke". Is that normal?
No. You installed the drivers the wrong way round. Now the Zener diode (733A) is burned. Exchange it and everything works again. You can probably throw away your wrongly inserted drivers.
> As with other firmwares, do I still have to set the E-Steps if I have a Mega S?
No, just download the correct version. Nevertheless, you should still calibrate the e-steps.
---
### Pictures
![Manual Mesh Bed Leveling](images/Mesh_Level.jpg)
![Ultra Fine mesh tuning](images/Fine_Tuning.jpg)
![Enable or Disable Filament Runout Sensor](images/Filament_Sensor_on_off.jpg)
---
### Download
You can download the precompiled binary files from here: https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/releases. Of course you can also compile the firmware yourself with PlatformIO or the Arduino IDE.
-> `i3_Mega.hex` is for the unmodified original Anycubic i3 MEGA (without S).
-> `i3_Mega_TMC.hex` has optimizations and inverted outputs for TMC2100 and TMC2208 motor drivers.
-> `i3_Mega_S.hex` is used if you use the newer "S" version with titan extruder.
-> `i3_Mega_S_TMC.hex` you use if you use both the "S" version with titan extruder and TMC motor driver.

View File

@@ -2224,4 +2224,4 @@
// Enable Anycubic TFT
#define ANYCUBIC_TOUCHSCREEN
#define ANYCUBIC_FILAMENT_RUNOUT_SENSOR
#define ANYCUBIC_TFT_DEBUG
//#define ANYCUBIC_TFT_DEBUG

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

BIN
images/Fine_Tuning.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
images/Mesh_Level.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB