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
This commit is contained in:
parent
a8ed6cefcf
commit
62c36f718b
11 changed files with 52 additions and 10 deletions
|
@ -4572,7 +4572,7 @@ if(eSoundMode!=e_SOUND_MODE_SILENT)
|
|||
The Original i3 Prusa MK2/s uses PINDAv1 and this calibration improves the temperature drift, but not as good as the PINDAv2.
|
||||
|
||||
superPINDA sensor has internal temperature compensation and no thermistor output. There is no point of doing temperature calibration in such case.
|
||||
If PINDA_THERMISTOR and DETECT_SUPERPINDA is defined during compilation, calibration is skipped with serial message "No PINDA thermistor".
|
||||
If PINDA_THERMISTOR and SUPERPINDA_SUPPORT is defined during compilation, calibration is skipped with serial message "No PINDA thermistor".
|
||||
This can be caused also if PINDA thermistor connection is broken or PINDA temperature is lower than PINDA_MINTEMP.
|
||||
|
||||
#### Example
|
||||
|
@ -10502,9 +10502,9 @@ float temp_comp_interpolation(float inp_temperature) {
|
|||
#ifdef PINDA_THERMISTOR
|
||||
constexpr int start_compensating_temp = 35;
|
||||
temp_C[i] = start_compensating_temp + i * 5; //temperature in degrees C
|
||||
#ifdef DETECT_SUPERPINDA
|
||||
static_assert(start_compensating_temp >= PINDA_MINTEMP, "Temperature compensation start point is lower than PINDA_MINTEMP.");
|
||||
#endif //DETECT_SUPERPINDA
|
||||
#ifdef SUPERPINDA_SUPPORT
|
||||
static_assert(start_compensating_temp >= PINDA_MINTEMP, "Temperature compensation start point is lower than PINDA_MINTEMP.");
|
||||
#endif //SUPERPINDA_SUPPORT
|
||||
#else
|
||||
temp_C[i] = 50 + i * 10; //temperature in C
|
||||
#endif
|
||||
|
|
|
@ -365,6 +365,9 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP
|
|||
| 0x0D2A 3370 | uint8 | EEPROM_EXPERIMENTAL_VISIBILITY | ffh 255 | ffh 255 | Experimental menu visibility unknown state | LCD menu | D3 Ax0d2a C1
|
||||
| ^ | ^ | ^ | 00h 0 | ^ | Experimental menu visibility hidden | ^ | ^
|
||||
| ^ | ^ | ^ | 01h 1 | ^ | Experimental menu visibility visible | ^ | ^
|
||||
| 0x0D29 3369 | uint8 | EEPROM_PINDA_TEMP_COMPENSATION | ffh 255 | ffh 255 | PINDA temp compensation unknown state | LCD menu | D3 Ax0d29 C1
|
||||
| ^ | ^ | ^ | 00h 0 | ^ | PINDA has no temp compensation PINDA v1/2 | ^ | ^
|
||||
| ^ | ^ | ^ | 01h 1 | ^ | PINDA has temp compensation aka SuperPINDA | ^ | ^
|
||||
|
||||
|
||||
| Address begin | Bit/Type | Name | Valid values | Default/FactoryReset | Description | Gcode/Function| Debug code
|
||||
|
@ -569,9 +572,9 @@ static Sheets * const EEPROM_Sheets_base = (Sheets*)(EEPROM_SHEETS_BASE);
|
|||
|
||||
#define EEPROM_ALTFAN_OVERRIDE (EEPROM_UVLO_LA_K-1) //uint8
|
||||
#define EEPROM_EXPERIMENTAL_VISIBILITY (EEPROM_ALTFAN_OVERRIDE-1) //uint8
|
||||
|
||||
#define EEPROM_PINDA_TEMP_COMPENSATION (EEPROM_EXPERIMENTAL_VISIBILITY-1) //uint8
|
||||
//This is supposed to point to last item to allow EEPROM overrun check. Please update when adding new items.
|
||||
#define EEPROM_LAST_ITEM EEPROM_EXPERIMENTAL_VISIBILITY
|
||||
#define EEPROM_LAST_ITEM EEPROM_PINDA_TEMP_COMPENSATION
|
||||
// !!!!!
|
||||
// !!!!! this is end of EEPROM section ... all updates MUST BE inserted before this mark !!!!!
|
||||
// !!!!!
|
||||
|
|
|
@ -2325,11 +2325,21 @@ float unscalePID_d(float d)
|
|||
//!
|
||||
//! @retval true firmware should do temperature compensation and allow calibration
|
||||
//! @retval false PINDA thermistor is not detected, disable temperature compensation and calibration
|
||||
//! @retval true/false when overwritten in LCD menu Settings->HW Setup->SuperPINDA
|
||||
//!
|
||||
bool has_temperature_compensation()
|
||||
{
|
||||
#ifdef DETECT_SUPERPINDA
|
||||
return (current_temperature_pinda >= PINDA_MINTEMP) ? true : false;
|
||||
#ifdef SUPERPINDA_SUPPORT
|
||||
uint8_t pinda_temp_compensation = eeprom_read_byte((uint8_t*)EEPROM_PINDA_TEMP_COMPENSATION);
|
||||
if (pinda_temp_compensation == EEPROM_EMPTY_VALUE) //Unkown PINDA temp compenstation, so check it.
|
||||
{
|
||||
//SERIAL_ECHOLNPGM("Current PINDATEMP:");
|
||||
//SERIAL_ECHO(current_temperature_pinda);
|
||||
//SERIAL_ECHOLN(PINDA_MINTEMP);
|
||||
return (current_temperature_pinda >= PINDA_MINTEMP) ? true : false;
|
||||
}
|
||||
else if (pinda_temp_compensation == 0) return true; //Overwritten via LCD menu SuperPINDA [No]
|
||||
else return false; //Overwritten via LCD menu SuperPINDA [YES]
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
|
|
|
@ -5753,6 +5753,15 @@ void lcd_hw_setup_menu(void) // can not be "static"
|
|||
MENU_ITEM_SUBMENU_P(PSTR("Experimental"), lcd_experimental_menu);////MSG_MENU_EXPERIMENTAL c=18
|
||||
}
|
||||
|
||||
#ifdef SUPERPINDA_SUPPORT
|
||||
//! The SuperPINDA is detected when the PINDA temp is below its defined limit.
|
||||
//! This works well on the EINSY board but not on the miniRAMBo board as
|
||||
//! as a disconnected SuperPINDA will show higher temps compared to an EINSY board.
|
||||
//!
|
||||
//! This menu allows the user to en-/disable the SuperPINDA manualy
|
||||
MENU_ITEM_TOGGLE_P(_N("SuperPINDA"), eeprom_read_byte((unsigned char *)EEPROM_PINDA_TEMP_COMPENSATION) ? _T(MSG_YES) : _T(MSG_NO), lcd_pinda_temp_compensation_toggle);
|
||||
#endif //SUPERPINDA_SUPPORT
|
||||
|
||||
MENU_END();
|
||||
}
|
||||
|
||||
|
@ -9235,3 +9244,13 @@ void lcd_experimental_menu()
|
|||
|
||||
MENU_END();
|
||||
}
|
||||
|
||||
void lcd_pinda_temp_compensation_toggle()
|
||||
{
|
||||
uint8_t pinda_temp_compensation = eeprom_read_byte((uint8_t*)EEPROM_PINDA_TEMP_COMPENSATION);
|
||||
if (pinda_temp_compensation == EEPROM_EMPTY_VALUE)
|
||||
pinda_temp_compensation = 1;
|
||||
else
|
||||
pinda_temp_compensation = !pinda_temp_compensation;
|
||||
eeprom_update_byte((uint8_t*)EEPROM_PINDA_TEMP_COMPENSATION, pinda_temp_compensation);
|
||||
}
|
|
@ -262,4 +262,6 @@ void lcd_wizard(WizState state);
|
|||
extern void lcd_experimental_toggle();
|
||||
extern void lcd_experimental_menu();
|
||||
|
||||
extern void lcd_pinda_temp_compensation_toggle();
|
||||
|
||||
#endif //ULTRALCD_H
|
||||
|
|
|
@ -175,6 +175,8 @@
|
|||
#if BED_MINTEMP_DELAY>USHRT_MAX
|
||||
#error "Check maximal allowed value @ ShortTimer (see BED_MINTEMP_DELAY definition)"
|
||||
#endif
|
||||
#define SUPERPINDA_SUPPORT
|
||||
#define PINDA_MINTEMP BED_MINTEMP //The miniRAMBo thermistor readings below 30°C aren't very accurate
|
||||
|
||||
// Maxtemps
|
||||
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP)
|
||||
|
|
|
@ -176,6 +176,8 @@
|
|||
#if BED_MINTEMP_DELAY>USHRT_MAX
|
||||
#error "Check maximal allowed value @ ShortTimer (see BED_MINTEMP_DELAY definition)"
|
||||
#endif
|
||||
#define SUPERPINDA_SUPPORT
|
||||
#define PINDA_MINTEMP BED_MINTEMP //The miniRAMBo thermistor readings below 30°C aren't very accurate
|
||||
|
||||
// Maxtemps
|
||||
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP)
|
||||
|
|
|
@ -175,6 +175,8 @@
|
|||
#if BED_MINTEMP_DELAY>USHRT_MAX
|
||||
#error "Check maximal allowed value @ ShortTimer (see BED_MINTEMP_DELAY definition)"
|
||||
#endif
|
||||
#define SUPERPINDA_SUPPORT
|
||||
#define PINDA_MINTEMP BED_MINTEMP //The miniRAMBo thermistor readings below 30°C aren't very accurate
|
||||
|
||||
// Maxtemps
|
||||
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP)
|
||||
|
|
|
@ -176,6 +176,8 @@
|
|||
#if BED_MINTEMP_DELAY>USHRT_MAX
|
||||
#error "Check maximal allowed value @ ShortTimer (see BED_MINTEMP_DELAY definition)"
|
||||
#endif
|
||||
#define SUPERPINDA_SUPPORT
|
||||
#define PINDA_MINTEMP BED_MINTEMP //The miniRAMBo thermistor readings below 30°C aren't very accurate
|
||||
|
||||
// Maxtemps
|
||||
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP)
|
||||
|
|
|
@ -294,7 +294,7 @@
|
|||
#if BED_MINTEMP_DELAY>USHRT_MAX
|
||||
#error "Check maximal allowed value @ ShortTimer (see BED_MINTEMP_DELAY definition)"
|
||||
#endif
|
||||
#define DETECT_SUPERPINDA
|
||||
#define SUPERPINDA_SUPPORT
|
||||
#define PINDA_MINTEMP BED_MINTEMP
|
||||
#define AMBIENT_MINTEMP -30
|
||||
|
||||
|
|
|
@ -296,7 +296,7 @@
|
|||
#if BED_MINTEMP_DELAY>USHRT_MAX
|
||||
#error "Check maximal allowed value @ ShortTimer (see BED_MINTEMP_DELAY definition)"
|
||||
#endif
|
||||
#define DETECT_SUPERPINDA
|
||||
#define SUPERPINDA_SUPPORT
|
||||
#define PINDA_MINTEMP BED_MINTEMP
|
||||
#define AMBIENT_MINTEMP -30
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue