Commit Graph

255 Commits

Author SHA1 Message Date
Yuri D'Elia
2bd4aef23e Temperature model: update R0 estimate
Update the default R0 estimate thanks to a larger dataset.
This improves the error margin during self-check.
2022-09-21 15:05:05 +02:00
Alex Voinea
bb57d99c35 Remove the crashDetection software counters and use sfilt 2022-09-14 07:39:47 +02:00
Yuri D'Elia
b48c698562 TM: Update default C/R0 estimates for MK3/MK3S variants 2022-09-02 15:59:29 +02:00
Alex Voinea
3537024ba2 Remove forgotten config in MK2_minirambo_1.0a 2022-08-30 13:57:43 +02:00
Alex Voinea
8033b65a02 Isolate farm preheat config 2022-08-30 13:57:43 +02:00
Alex Voinea
d049d09623 Isolate FARM_DEFAULT_SAFETYTIMER_TIME_ms 2022-08-30 13:57:43 +02:00
Alex Voinea
bef7b086e3 Isolate the entire farm and statistics code 2022-08-30 13:57:43 +02:00
Yuri D'Elia
49048fdcd6 Add temperature model configuration for MK3 2022-07-25 17:30:22 +02:00
Yuri D'Elia
cc96a47e7f Implement temperature model autotuning
Calibrate C/R values via univariate minimization using golden section.
This is done in several passes:

- Bootstrap C by setting an initial high R value
- Calibrate R at the requested working temperature
- Cooldown
- Refine C to the final value
- Estimate R losses for a subset of fan speeds
- Interpolate remaining values to speed-up the process

This results in robust values which are tailored to the current
filtering constants, and avoid having to sample for an extended
time to reach the required resolution.

The refining pass could avoid cooldown if the recording buffer was at
least twice as large, so that we could record both the heating and the
steady-state, saving _considerable_ time.
2022-07-25 17:30:22 +02:00
Yuri D'Elia
ec74b88ebc Correct pre-warning to just warning 2022-07-25 17:30:22 +02:00
Yuri D'Elia
b0b2ff5f9e Rewrite/modularize the model checker
- Allow all parameters to be changed at runtime through M310
- Move the model prototypes into a separate temp_model.h header
- Allow the checked to be enabled/disabled at runtime
- Introduce a warning threshold
2022-07-25 17:30:22 +02:00
Yuri D'Elia
fabf511b97 Add the ability to log continuously
TEMP_MODEL_LOGGING enables D70 to record precisely each cycle of the
temperature regulation for offline model simulation
2022-07-25 17:30:22 +02:00
Yuri D'Elia
a15f2807d9 Allow to continue printing with TEMP_MODEL_CHECK_WARN_ONLY for debugging 2022-07-25 17:30:22 +02:00
Yuri D'Elia
3eda8b61ee Include the model checker with hard-coded constants 2022-07-25 17:30:22 +02:00
Alex Voinea
8e72470afc
Merge pull request #3435 from leptun/MK3_variant_hotend_name
Use correct filament type in variant files
2022-07-15 15:57:53 +03:00
Alex Voinea
9466945532
Merge pull request #3461 from wavexx/fan_selfcheck_test
Fix/optimize fan selftest
2022-07-05 11:32:57 +02:00
Alex Voinea
19b494a554 Make the fan thresholds configurable 2022-07-05 09:02:47 +02:00
Yuri D'Elia
44fce0696b Make the stop raising distance configurable (Z_CANCEL_LIFT) 2022-07-04 18:21:59 +02:00
Yuri D'Elia
e37435b53f Merge remote-tracking branch 'upstream/MK3_3.11.1' into mk311_sync 2022-07-04 16:14:23 +02:00
3d-gussner
f3adb781a1
Merge pull request #3457 from wavexx/remove_runout_support
Cleanup: remove unused FILAMENT_RUNOUT_SUPPORT define
2022-06-29 08:16:31 +02:00
FormerLurker
6fc8155cbe Add n_arc_correction and enhanced small angle sin/cos approximation. 2022-04-28 14:36:51 +02:00
FormerLurker
4aa5a75301 Enhance arc interpolation and add M214 for controlling arc interpolation settings. 2022-04-28 14:36:51 +02:00
Yuri D'Elia
1949802bea Cleanup: remove unused FILAMENT_RUNOUT_SUPPORT define
FILAMENT_RUNOUT_SUPPORT has never been supported in the MK3 branch, and
contains a ton of horrible and unmaintained code that doesn't even
compile anymore.

Since this code is currently polluting a sizable block inside the G0/G1
code block, simply get rid of it.
2022-03-30 12:49:08 +02:00
Alex Voinea
0896442335 Use correct filament type in variant files 2022-03-02 12:02:17 +01:00
Alex Voinea
a617025d85 Move MK2 variants to obsolete 2022-02-25 11:14:55 +01:00
Alex Voinea
a6331d22c8 Remove ancient SNMM code in the MK3 branch 2022-02-15 15:58:33 +01:00
Alex Voinea
a1711f727e Disable pullup crash test 2022-02-15 09:07:18 +01:00
Alex Voinea
e35b21569d
Merge pull request #3005 from wavexx/remove_mres_limits
Allow all microstep resolutions for all axes
2022-02-09 13:48:51 +01:00
Alex Voinea
916212b597 Add ALLOW_ALL_MRES as requested in PR 2022-02-09 10:28:45 +01:00
3d-gussner
0b8ecfbf7c Add Test Pullup Crash menu 2022-02-07 13:28:48 +01:00
Yuri D'Elia
d2041ee2fe Enable debugging features on all variants
- XFlash crash dumper on MK3+ series
- Online crash dumper on MK2.5+ series
- D2/D6 on MK3+ series
- D2 on MK2.5+ series
2021-06-13 22:35:43 +02:00
Yuri D'Elia
bd57e00448 Implement an online crash dumper for MK2.5 boards
When XFLASH is not available, allow users to request _online_ crash
dumps by using D23 (since these require active user cooperation).

Once enabled, instead of just rebooting, dump memory directly to
the serial.

As similarly done with EMERGENCY_DUMP, we have two features that can be
enabled:

EMERGENCY_SERIAL_DUMP: enables dumping on crash after being requested
MENU_SERIAL_DUMP: allow triggering the same manually through the support
menu.
2021-06-12 13:37:20 +02:00
Yuri D'Elia
f18d4757c6 Introduce STACK_GUARD_MARGIN in all variants
Create a gap between the BSS and the stack guard.
Set this gap (STACK_GUARD_MARGIN) to 32 bytes in all variants.

The gap serves two purposes:

- Detect a stack overflow earlier (falsely triggering in overtight
  situations is OK!), so that we can hopefully avoid smashing
  the heap and have a clean view during the dump.

- Reserve spack space itself for the stack dumping machinery,
  which is going to grow the stack even further.

Remove get_stack_guard_test_value() which was unused.
2021-06-12 12:08:53 +02:00
Yuri D'Elia
c375610668 Move "WDR dump" inside EMERGENGENCY_DUMP 2021-06-10 17:02:41 +02:00
Yuri D'Elia
fab04dbc6c D6: remove option for unsupported models 2021-06-08 19:53:37 +02:00
Yuri D'Elia
dcfdce87c7 Document new applicable build options in the variant files
Document, but don't enable them.
Leave exiting functionality unchanged for now.
2021-06-08 18:17:56 +02:00
Marek Bel
aa45091400
Scale extruder motor current linearly with speed. (#2813)
Scale extruder motor current linearly with speed.

49% less heating when running at low speed and standstill, 4% more torque at maximum extrusion rate (15mm^3/s), 15% more torque in high speed movements (un/retractions).

StealthChop mode is used for low speeds (below 900mm/min)
spreadCycle is used above. Transition speed is well above maximum extrusion rate of 15mm^3/s (275mm/min) so mode transition is not expected to be visible on printed surface.

StealthChop is expected to improve printed surface quality (less artifacts).

Warning you can burn extruder motor if it is not the same impedance as original Prusa i3 Extruder stepper motor. There is no current feedback in low speed so lower impedance motor can be burned by over current.

Even there is no direct current feedback, there is no risk for original motor thermal runaway, as motor resistance increases with temperature, current decreases.

Standstill peak phase current is expected to be 500 mA and linearly increase with speed to 970 mA at 900mm/min where spreadCycle constant current regulation takes over and keeps peak current at 805 mA to maximum speed possible.

As motor heating increases with current squared, lowering low speed current from 700mA to 500mA decreases heating 49% in thate mode, where motor spends most of the time.

Enable E-motor cool mode in farm mode only (and experimental menu) - the experimental menu is visible AND the EEPROM_ECOOL variable has a value of the universal answer to all problems of the universe - i.e. two conditions must be met at the start of the FW to enable the E-cool mode. If the user enables the experimental menu, sets the E-cool mode and disables the menu afterwards, on the next start of the FW the E-cool mode will be DISABLED. This is still subject to discussion how much obscure (security through obscurity) we'd like this option to have .

Additional stuff:
* Add serial debug msg to verify if E-cool mode is on
* Avoid access to E-cool mode switch on machines without TMC2130
* Do not allow only M907 E in case of E-cool mode+warn the user on the serial line that the command was skipped

Co-authored-by: D.R.racer <drracer@drracer.eu>
2021-04-23 16:06:28 +02:00
Alex Voinea
9454f9d8ec Rename w25x20cl to xflash 2021-04-06 10:16:47 +02:00
Yuri D'Elia
5589954b77 Add DEFAULT_TRAVEL_ACCELERATION in all variants
Use the same value as DEFAULT_ACCELERATION for compatibility.
2021-02-03 11:20:28 +01:00
DRracer
42311db5f1
Merge pull request #2789 from wavexx/MK3_TMC2130_DEDGE
Use/enable TMC2130 DEDGE support in MK3/MK3S
2021-01-29 11:13:09 +01:00
DRracer
bfe93d3959
Merge pull request #2951 from DRracer/pvb-08
Add PVB preheat and 0.8mm nozzle presets
2021-01-26 12:09:41 +01:00
DRracer
1a6b6fb491
Merge pull request #1776 from wavexx/unused_tmc_defines
Remove an unused define
2021-01-11 07:43:44 +01:00
D.R.racer
8a083c9970 Add PVB preheat and 0.8mm nozzle presets
minor features reflecting the latest announcement

Needs some 300B of CPU flash though, after 3.9.3 we need to optimize code
size again.
2021-01-08 13:52:39 +01:00
3d-gussner
12f4102272 Group PINDA defines 2020-12-23 21:00:02 +01:00
3d-gussner
4b510fef0a Add PINDA_TEMP_COMP variable to enable SuperPINDA toggle menu/function 2020-12-23 20:59:08 +01:00
3d-gussner
a97587f373 Changed PINDA_MINTEMP having own value
Prevent bad readings/issues if someone changes the bed thermistor that is "better" with lower min values and creates a custom firmware.
The firmware will now be in the range of the PINDAv2 thermistor independant from the bed thermistor (which may change and need adjustments)
2020-12-23 20:58:44 +01:00
3d-gussner
62c36f718b Add SuperPINDA support for MK2.5/S
- Changed DETECT_SUPERPINDA to SUPERPINDA_SUPPORT as on miniRAMo the thermistor readings below 30°C
  aren't accurate egnough to determine if SUPERPINDA is connected or not
- Add LCD toggle menu Settings -> HW Setup -> SuperPINDA [Yes/No] to overwrite SuperPINDA detection
  - If EEPROM_PINDA_TEMP_COMPENSTATION is empty = 0xff then detect SuperPINDA by checking thermistor
  - If EEPROM_PINDA_TEMP_COMPENSTAION is 0 then forec enable for temperature compensation menues and functions
  - If EEPROM_PINDA_TEMP_COMPENSATION is 1 then force disable for temperature compensation menues and functions
2020-12-23 20:56:50 +01:00
Yuri D'Elia
a60ed81a35 Implement MIN/MAX AMBIENT safety checks
Take advantage of the NTC thermistor found on the Einsy as an additional
safety measure, following the steps of the other MIN/MAXTEMP errors.

Introduce two configurable params AMBIENT_MINTEMP and AMBIENT_MAXTEMP
in the variant defines and set them for the MK3/MK3S to -30/+100
respectively.

AMBIENT_MINTEMP is primarily intended to catch a defective board
thermistor (to ensure MAXTEMP would be properly triggered) and thus the
trigger temperature is set just above the sensing limit and well below
the operating range.

AMBIENT_MAXTEMP is set at 100C, which is instead 20C above the maximum
recommended operating temperature of the Einsy. The NTC thermistor is
located just above the main power connector on the bottom of the board,
and could also help in detecting a faulty connection which can result in
rapid overheating of the contacts.

As for MAXTEMP, we cut power to the heaters, print fan and motors to
reduce power draw. Resume is not possible except by resetting the
printer, since the user is highly advised to inspect the board for
problems before attempting to continue.
2020-08-01 17:38:10 +02:00
Yuri D'Elia
1181beffb1 Enable DEDGE stepping on supported variants 2020-06-24 17:58:43 +02:00
Marek Bel
bdf53387b1 Disable temperature compensation and temperature calibration menu if superPINDA is detected.
Even though functionality was added, 20B of flash memory has been saved.
2020-06-16 00:19:06 +02:00