PINDA2 Offset Tuning. Safety features setup
As per the below investigation I have tuned and tested a more robust PINDA2 Offset Calibration. PINDA2 Investigation Test #2 (20th Jan 2018) Moved PINDA2 Thermistor Cal to bed centre Moved it closer to bed from 150um to 50um bumped bed up 5C each cycle as it wasn’t heating PINDA2 to temp at current settings Results from a cool of 35C start Recv: D8 - Read/Write PINDA Recv: cal_status=1 Recv: temp_pinda=35C temp_shift=0um Recv: temp_pinda=40C temp_shift=0um Recv: temp_pinda=45C temp_shift=30um Recv: temp_pinda=50C temp_shift=105um Recv: temp_pinda=55C temp_shift=187um Recv: temp_pinda=60C temp_shift=350um Test #3 (21st Jan 2018) Moved PINDA2 Thermistor Cal to bed centre with measure in default firmware position. Moved it closer to bed from 150um to 50um bumped bed up 5C each cycle as it wasn’t heating PINDA2 to temp at current settings and toped at 115 for bed temp Enabled 255 hotend for test Made test points [30, 37, 44, 51, 58, 65] Results from a cool of 30C start Recv: D8 - Read/Write PINDA Recv: cal_status=1 Recv: temp_pinda=30C temp_shift=0um Recv: temp_pinda=37C temp_shift=0um Recv: temp_pinda=44C temp_shift=60um Recv: temp_pinda=51C temp_shift=170um Recv: temp_pinda=58C temp_shift=337um Recv: temp_pinda=65C temp_shift=645um Test #4 (21st Jan 2018) Moved PINDA2 Thermistor Cal to bed centre (for all but first probe by mistake) with measure in default firmware position. Moved it closer to bed from 150um to 100um bumped bed up 5C each cycle as it wasn’t heating PINDA2 to temp at current settings and toped at 115 for bed temp Enabled 255 hotend for test Made test points [35, 42, 49, 56, 63, 70] Modified the start skipping code to pickup at additional first point that was being missed Results from a cool of 33C start Recv: D8 - Read/Write PINDA Recv: cal_status=1 Recv: temp_pinda=35C temp_shift=0um Recv: temp_pinda=42C temp_shift=0um Recv: temp_pinda=49C temp_shift=97um Recv: temp_pinda=56C temp_shift=215um Recv: temp_pinda=63C temp_shift=487um Recv: temp_pinda=70C temp_shift=815umTest #5 (21st Jan 2018) Moved PINDA2 Thermistor probe to bed centre Moved it closer to bed from 150um to 100um bumped bed up 5C each cycle as it wasn’t heating PINDA2 to temp at current settings and toped at 115 for bed temp Enabled 255 hotend for test Made test points [35, 42, 49, 56, 63, 70] Modified the start skipping code to pickup at additional first point that was being missed Results from a cool of 32C start Recv: D8 - Read/Write PINDA Recv: cal_status=1 Recv: temp_pinda=35C temp_shift=0um Recv: temp_pinda=42C temp_shift=32753um WTF?? Actual when probed was -30um Recv: temp_pinda=49C temp_shift=82um Recv: temp_pinda=56C temp_shift=200um Recv: temp_pinda=63C temp_shift=450um Recv: temp_pinda=70C temp_shift=835um Send: G75 Recv: 35 0um Recv: 36 0um Recv: 37 0um Recv: 38 0um Recv: 39 0um Recv: 40 0um Recv: 41 0um Recv: 42 0um Recv: 43 0um Recv: 44 4um Recv: 45 18um Recv: 46 33um Recv: 47 50um Recv: 48 66um Recv: 49 82um Recv: 50 97um Recv: 51 111um Recv: 52 126um Recv: 53 141um Recv: 54 158um Recv: 55 178um Recv: 56 200um Recv: 57 225um Recv: 58 254um Recv: 59 286um Recv: 60 322um Recv: 61 361um Recv: 62 404um Recv: 63 450um Recv: 64 498um Recv: 65 550um Recv: 66 604um Recv: 67 660um Recv: 68 718um Recv: 69 776um Recv: 70 835um Recv: 71 893um Recv: 72 951um Recv: 73 1009um Recv: 74 1065um Recv: 75 1119um Recv: 76 1171um Recv: 77 1220um Recv: 78 1265um Recv: 79 1307um Recv: 80 1345um Recv: ok Test #6 (21st Jan 2018) Moved PINDA2 Thermistor probe to bed centre Moved it closer to bed from 150um to 100um bumped bed up 5C each cycle as it wasn’t heating PINDA2 to temp at current settings and toped at 115 for bed temp Enabled 255 hotend for test Made test points [35, 42, 49, 56, 63, 70] Modified the start skipping code to pickup at additional first point that was being missed Hard limits of 0 - 1.5mm offset return in temp_comp_interpolation() Results from a cool of 34C start Recv: D8 - Read/Write PINDA Recv: cal_status=1 Recv: temp_pinda=35C temp_shift=0um Recv: temp_pinda=42C temp_shift=32753um WTF?? Actual when probed was -30um Recv: temp_pinda=49C temp_shift=82um Recv: temp_pinda=56C temp_shift=200um Recv: temp_pinda=63C temp_shift=450um Recv: temp_pinda=70C temp_shift=835um Test #7 (21st Jan 2018) Moved PINDA2 Thermistor probe to bed centre Moved it closer to bed from 150um to 100um bumped bed up 5C each cycle as it wasn’t heating PINDA2 to temp at current settings and toped at 115 for bed temp Enabled 255 hotend for test Made test points [35, 42, 49, 56, 63, 70] Modified the start skipping code to pickup at additional first point that was being missed Hard limits of 0 - 1.5mm offset return in temp_comp_interpolation() Limit probe readings to be positive to prevent float error as in last test at 42C Results from a cool of 34C start Recv: D8 - Read/Write PINDA Recv: cal_status=1 Recv: temp_pinda=35C temp_shift=0um Recv: temp_pinda=42C temp_shift=0um Recv: temp_pinda=49C temp_shift=10um Recv: temp_pinda=56C temp_shift=112um Recv: temp_pinda=63C temp_shift=355um Recv: temp_pinda=70C temp_shift=717um Test #8 21st Jan 2018 Moved it closer to bed from 150um to 100um bumped bed up 5C each cycle as it wasn’t heating PINDA2 to temp at current settings and toped at 115 for bed temp Enabled 255 hotend for test but only for the last two probe times to ensure temp is reached Made test points [35, 42, 49, 56, 63, 70] Modified the start skipping code to pickup at additional first point that was being missed Hard limits of 0 - 1.5mm offset return in temp_comp_interpolation() Limit probe readings to be positive to prevent float errors as in previous tests Recv: D8 - Read/Write PINDA Recv: cal_status=1 Recv: temp_pinda=35C temp_shift=0um Recv: temp_pinda=42C temp_shift=10um Recv: temp_pinda=49C temp_shift=62um Recv: temp_pinda=56C temp_shift=160um Recv: temp_pinda=63C temp_shift=402um Recv: temp_pinda=70C temp_shift=710um
This commit is contained in:
parent
07bc6cc0a4
commit
cc7b252424
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// Firmware version
|
||||
#define FW_VERSION "3.1.1-RC5"
|
||||
#define FW_COMMIT_NR 150
|
||||
#define FW_COMMIT_NR 151
|
||||
#define FW_DEV_VERSION FW_VERSION_RC
|
||||
#define FW_VERSION_FULL FW_VERSION "-" STR(FW_COMMIT_NR)
|
||||
|
||||
|
|
|
|||
|
|
@ -511,7 +511,7 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
|
|||
|
||||
#define PINDA_PREHEAT_X 20
|
||||
#define PINDA_PREHEAT_Y 60
|
||||
#define PINDA_PREHEAT_Z 0.15
|
||||
#define PINDA_PREHEAT_Z 0.10
|
||||
/*
|
||||
#define PINDA_PREHEAT_X 70
|
||||
#define PINDA_PREHEAT_Y -3
|
||||
|
|
|
|||
|
|
@ -353,28 +353,28 @@ void dcode_8()
|
|||
if (i > 0) offs = eeprom_read_word(((uint16_t*)EEPROM_PROBE_TEMP_SHIFT) + (i - 1));
|
||||
float foffs = ((float)offs) / axis_steps_per_unit[Z_AXIS];
|
||||
offs = 1000 * foffs;
|
||||
printf_P(PSTR("temp_pinda=%dC temp_shift=%dum\n"), 35 + i * 5, offs);
|
||||
printf_P(PSTR("temp_pinda=%dC temp_shift=%dum\n"), 35 + i * 7, offs);
|
||||
}
|
||||
}
|
||||
else if (strchr_pointer[1+1] == '!')
|
||||
{
|
||||
cal_status = 1;
|
||||
eeprom_write_byte((uint8_t*)EEPROM_CALIBRATION_STATUS_PINDA, cal_status);
|
||||
eeprom_write_word(((uint16_t*)EEPROM_PROBE_TEMP_SHIFT) + 0, 8); //40C - 20um - 8usteps
|
||||
eeprom_write_word(((uint16_t*)EEPROM_PROBE_TEMP_SHIFT) + 1, 24); //45C - 60um - 24usteps
|
||||
eeprom_write_word(((uint16_t*)EEPROM_PROBE_TEMP_SHIFT) + 2, 48); //50C - 120um - 48usteps
|
||||
eeprom_write_word(((uint16_t*)EEPROM_PROBE_TEMP_SHIFT) + 3, 80); //55C - 200um - 80usteps
|
||||
eeprom_write_word(((uint16_t*)EEPROM_PROBE_TEMP_SHIFT) + 4, 120); //60C - 300um - 120usteps
|
||||
eeprom_write_word(((uint16_t*)EEPROM_PROBE_TEMP_SHIFT) + 0, 8); //42C - 20um - 8usteps
|
||||
eeprom_write_word(((uint16_t*)EEPROM_PROBE_TEMP_SHIFT) + 1, 24); //49C - 60um - 24usteps
|
||||
eeprom_write_word(((uint16_t*)EEPROM_PROBE_TEMP_SHIFT) + 2, 48); //56C - 120um - 48usteps
|
||||
eeprom_write_word(((uint16_t*)EEPROM_PROBE_TEMP_SHIFT) + 3, 80); //63C - 200um - 80usteps
|
||||
eeprom_write_word(((uint16_t*)EEPROM_PROBE_TEMP_SHIFT) + 4, 120); //70C - 300um - 120usteps
|
||||
}
|
||||
else
|
||||
{
|
||||
if (code_seen('P')) // Pinda temperature [C]
|
||||
temp_pinda = code_value();
|
||||
offset_z = temp_compensation_pinda_thermistor_offset(temp_pinda);
|
||||
if (code_seen('Z')) // Z Offset [mm]
|
||||
/*if (code_seen('Z')) // Z Offset [mm]
|
||||
{
|
||||
offset_z = code_value();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
printf_P(PSTR("temp_pinda=%d offset_z=%d.%03d\n"), (int)temp_pinda, (int)offset_z, ((int)(1000 * offset_z) % 1000));
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -3061,10 +3061,11 @@ void process_commands()
|
|||
|
||||
case 75:
|
||||
{
|
||||
for (int i = 40; i <= 110; i++) {
|
||||
for (int i = 35; i <= 80; i++) {
|
||||
MYSERIAL.print(i);
|
||||
MYSERIAL.print(" ");
|
||||
MYSERIAL.println(temp_comp_interpolation(i));// / axis_steps_per_unit[Z_AXIS]);
|
||||
MYSERIAL.print(" -");
|
||||
MYSERIAL.print(int(temp_compensation_pinda_thermistor_offset(i) * 1000));
|
||||
MYSERIAL.println("um");
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
@ -3089,12 +3090,12 @@ void process_commands()
|
|||
int z_shift = 0; //unit: steps
|
||||
float start_temp = 5 * (int)(current_temperature_pinda / 5);
|
||||
if (start_temp < 35) start_temp = 35;
|
||||
if (start_temp < current_temperature_pinda) start_temp += 5;
|
||||
SERIAL_ECHOPGM("start temperature: ");
|
||||
if (start_temp < current_temperature_pinda) start_temp = (int)(current_temperature_pinda);
|
||||
SERIAL_ECHOPGM("Start temperature: ");
|
||||
MYSERIAL.println(start_temp);
|
||||
|
||||
// setTargetHotend(200, 0);
|
||||
setTargetBed(70 + (start_temp - 30));
|
||||
|
||||
|
||||
custom_message = true;
|
||||
custom_message_type = 4;
|
||||
|
|
@ -3133,28 +3134,35 @@ void process_commands()
|
|||
|
||||
int i = -1; for (; i < 5; i++)
|
||||
{
|
||||
float temp = (40 + i * 5);
|
||||
float temp = (42 + i * 7);
|
||||
if (start_temp <= temp) break;
|
||||
SERIAL_ECHOPGM("Step: ");
|
||||
MYSERIAL.print(i + 2);
|
||||
SERIAL_ECHOLNPGM("/6 (skipped)");
|
||||
if (i > -1) {
|
||||
SERIAL_ECHOLNPGM("/6 (skipped)");
|
||||
} else {
|
||||
SERIAL_ECHOLNPGM("/6");
|
||||
}
|
||||
SERIAL_ECHOPGM("PINDA temperature: ");
|
||||
MYSERIAL.print((40 + i*5));
|
||||
MYSERIAL.print((42 + i * 7));
|
||||
SERIAL_ECHOPGM(" Z shift (mm):");
|
||||
MYSERIAL.print(0);
|
||||
SERIAL_ECHOLNPGM("");
|
||||
if (i >= 0) EEPROM_save_B(EEPROM_PROBE_TEMP_SHIFT + i * 2, &z_shift);
|
||||
if (start_temp <= temp) break;
|
||||
//if (start_temp <= temp) break;
|
||||
}
|
||||
|
||||
for (i++; i < 5; i++)
|
||||
{
|
||||
float temp = (40 + i * 5);
|
||||
float temp = (42 + i * 7);
|
||||
SERIAL_ECHOPGM("Step: ");
|
||||
MYSERIAL.print(i + 2);
|
||||
SERIAL_ECHOLNPGM("/6");
|
||||
custom_message_state = i + 2;
|
||||
setTargetBed(50 + 10 * (temp - 30) / 5);
|
||||
// setTargetHotend(255, 0);
|
||||
if ((50 + 10 * (temp - 30) / 5) > 115) {
|
||||
setTargetBed(115);
|
||||
} else setTargetBed(50 + 10 * (temp - 30) / 5);
|
||||
if (i>2) setTargetHotend(255, 0); //Boost to get to the end game (last couple probings)
|
||||
current_position[X_AXIS] = PINDA_PREHEAT_X;
|
||||
current_position[Y_AXIS] = PINDA_PREHEAT_Y;
|
||||
current_position[Z_AXIS] = PINDA_PREHEAT_Z;
|
||||
|
|
@ -3180,9 +3188,8 @@ void process_commands()
|
|||
SERIAL_ECHOPGM(" Z shift (mm):");
|
||||
MYSERIAL.print(current_position[Z_AXIS] - zero_z);
|
||||
SERIAL_ECHOLNPGM("");
|
||||
|
||||
EEPROM_save_B(EEPROM_PROBE_TEMP_SHIFT + i * 2, &z_shift);
|
||||
|
||||
if (z_shift < 0) z_shift = 0; //Ensure that a small negative value doesn't throw out EEPROM word/float
|
||||
EEPROM_save_B(EEPROM_PROBE_TEMP_SHIFT + i * 2, &z_shift);
|
||||
}
|
||||
custom_message_type = 0;
|
||||
custom_message = false;
|
||||
|
|
@ -3196,7 +3203,13 @@ void process_commands()
|
|||
disable_e1();
|
||||
disable_e2();
|
||||
setTargetBed(0); //set bed target temperature back to 0
|
||||
// setTargetHotend(0,0); //set hotend target temperature back to 0
|
||||
setTargetHotend(0,0); //set hotend target temperature back to 0
|
||||
//Move head back out of the way
|
||||
current_position[X_AXIS] = pgm_read_float(bed_ref_points);
|
||||
current_position[Y_AXIS] = pgm_read_float(bed_ref_points + 1);
|
||||
current_position[Z_AXIS] = 5; //Lift head up a little
|
||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 3000 / 60, active_extruder);
|
||||
st_synchronize();
|
||||
lcd_show_fullscreen_message_and_wait_P(MSG_TEMP_CALIBRATION_DONE);
|
||||
lcd_update_enable(true);
|
||||
lcd_update(2);
|
||||
|
|
@ -7263,9 +7276,8 @@ float temp_comp_interpolation(float inp_temperature) {
|
|||
shift[0] = 0;
|
||||
for (i = 0; i < n; i++) {
|
||||
if (i>0) EEPROM_read_B(EEPROM_PROBE_TEMP_SHIFT + (i-1) * 2, &shift[i]); //read shift in steps from EEPROM
|
||||
temp_C[i] = 50 + i * 10; //temperature in C
|
||||
#ifdef PINDA_THERMISTOR
|
||||
temp_C[i] = 35 + i * 5; //temperature in C
|
||||
temp_C[i] = 35 + i * 7; //temperature in C
|
||||
#else
|
||||
temp_C[i] = 50 + i * 10; //temperature in C
|
||||
#endif
|
||||
|
|
@ -7310,9 +7322,11 @@ float temp_comp_interpolation(float inp_temperature) {
|
|||
d = f[i];
|
||||
sum = a*pow((inp_temperature - x[i]), 3) + b*pow((inp_temperature - x[i]), 2) + c*(inp_temperature - x[i]) + d;
|
||||
}
|
||||
|
||||
return sum;
|
||||
|
||||
// Create hard limits to prevent machine damage from error result
|
||||
if (sum < 0) {
|
||||
return 0;
|
||||
} else if ((sum / axis_steps_per_unit[Z_AXIS]) > 1.5) return (1.5 * axis_steps_per_unit[Z_AXIS]);
|
||||
return sum;
|
||||
}
|
||||
|
||||
#ifdef PINDA_THERMISTOR
|
||||
|
|
@ -7370,8 +7384,8 @@ void serialecho_temperatures() {
|
|||
float tt = degHotend(active_extruder);
|
||||
SERIAL_PROTOCOLPGM("T:");
|
||||
SERIAL_PROTOCOL(tt);
|
||||
SERIAL_PROTOCOLPGM(" E:");
|
||||
SERIAL_PROTOCOL((int)active_extruder);
|
||||
SERIAL_PROTOCOLPGM(" P:");
|
||||
SERIAL_PROTOCOL(current_temperature_pinda);
|
||||
SERIAL_PROTOCOLPGM(" B:");
|
||||
SERIAL_PROTOCOL_F(degBed(), 1);
|
||||
SERIAL_PROTOCOLLN("");
|
||||
|
|
|
|||
Loading…
Reference in New Issue