Added PT100 support for Ultiboard2

This commit is contained in:
daid 2014-01-06 11:20:03 +01:00
parent 380144c20f
commit df194f75e1
4 changed files with 79 additions and 3 deletions

View file

@ -23,7 +23,7 @@
#define PROTOCOL_VERSION "1.0" #define PROTOCOL_VERSION "1.0"
#if MOTHERBOARD == 7 || MOTHERBOARD == 71 #if MOTHERBOARD == 7 || MOTHERBOARD == 71 || MOTHERBOARD == 72
#define MACHINE_NAME "Ultimaker" #define MACHINE_NAME "Ultimaker"
#define FIRMWARE_URL "http://firmware.ultimaker.com" #define FIRMWARE_URL "http://firmware.ultimaker.com"
#elif MOTHERBOARD == 80 #elif MOTHERBOARD == 80

View file

@ -1355,6 +1355,7 @@
#define MOTOR_CURRENT_PWM_E_PIN 46 #define MOTOR_CURRENT_PWM_E_PIN 46
//Motor current PWM conversion, PWM value = MotorCurrentSetting * 255 / range //Motor current PWM conversion, PWM value = MotorCurrentSetting * 255 / range
#define MOTOR_CURRENT_PWM_RANGE 2000 #define MOTOR_CURRENT_PWM_RANGE 2000
#define DEFAULT_PWM_MOTOR_CURRENT {1300, 1300, 1250}
//arduino pin witch triggers an piezzo beeper //arduino pin witch triggers an piezzo beeper
#define BEEPER 18 #define BEEPER 18

View file

@ -1039,7 +1039,7 @@ ISR(TIMER0_COMPB_vect)
static unsigned long raw_temp_1_value = 0; static unsigned long raw_temp_1_value = 0;
static unsigned long raw_temp_2_value = 0; static unsigned long raw_temp_2_value = 0;
static unsigned long raw_temp_bed_value = 0; static unsigned long raw_temp_bed_value = 0;
static unsigned char temp_state = 0; static unsigned char temp_state = 8;
static unsigned char pwm_count = (1 << SOFT_PWM_SCALE); static unsigned char pwm_count = (1 << SOFT_PWM_SCALE);
static unsigned char soft_pwm_0; static unsigned char soft_pwm_0;
#if (EXTRUDERS > 1) || defined(HEATERS_PARALLEL) #if (EXTRUDERS > 1) || defined(HEATERS_PARALLEL)
@ -1181,6 +1181,9 @@ ISR(TIMER0_COMPB_vect)
temp_state = 0; temp_state = 0;
temp_count++; temp_count++;
break; break;
case 8: //Startup, delay initial temp reading a tiny bit so the hardware can settle.
temp_state = 0;
break;
// default: // default:
// SERIAL_ERROR_START; // SERIAL_ERROR_START;
// SERIAL_ERRORLNPGM("Temp measurement error!"); // SERIAL_ERRORLNPGM("Temp measurement error!");

View file

@ -564,6 +564,78 @@ const short temptable_10[][2] PROGMEM = {
}; };
#endif #endif
#if (THERMISTORHEATER_0 == 20) || (THERMISTORHEATER_1 == 20) || (THERMISTORHEATER_2 == 20) || (THERMISTORBED == 20) // PT100 with INA826 amp on Ultimaker v2.0 electronics
/* The PT100 in the Ultimaker v2.0 electronics has a high sample value for a high temperature.
This does not match the normal thermistor behaviour so we need to set the following defines */
#if (THERMISTORHEATER_0 == 20)
# define HEATER_0_RAW_HI_TEMP 16383
# define HEATER_0_RAW_LO_TEMP 0
#endif
#if (THERMISTORHEATER_1 == 20)
# define HEATER_1_RAW_HI_TEMP 16383
# define HEATER_1_RAW_LO_TEMP 0
#endif
#if (THERMISTORHEATER_2 == 20)
# define HEATER_2_RAW_HI_TEMP 16383
# define HEATER_2_RAW_LO_TEMP 0
#endif
#if (THERMISTORBED == 20)
# define HEATER_BED_RAW_HI_TEMP 16383
# define HEATER_BED_RAW_LO_TEMP 0
#endif
const short temptable_20[][2] PROGMEM = {
{ 0*OVERSAMPLENR , 0 },
{ 227*OVERSAMPLENR , 1 },
{ 236*OVERSAMPLENR , 10 },
{ 245*OVERSAMPLENR , 20 },
{ 253*OVERSAMPLENR , 30 },
{ 262*OVERSAMPLENR , 40 },
{ 270*OVERSAMPLENR , 50 },
{ 279*OVERSAMPLENR , 60 },
{ 287*OVERSAMPLENR , 70 },
{ 295*OVERSAMPLENR , 80 },
{ 304*OVERSAMPLENR , 90 },
{ 312*OVERSAMPLENR , 100 },
{ 320*OVERSAMPLENR , 110 },
{ 329*OVERSAMPLENR , 120 },
{ 337*OVERSAMPLENR , 130 },
{ 345*OVERSAMPLENR , 140 },
{ 353*OVERSAMPLENR , 150 },
{ 361*OVERSAMPLENR , 160 },
{ 369*OVERSAMPLENR , 170 },
{ 377*OVERSAMPLENR , 180 },
{ 385*OVERSAMPLENR , 190 },
{ 393*OVERSAMPLENR , 200 },
{ 401*OVERSAMPLENR , 210 },
{ 409*OVERSAMPLENR , 220 },
{ 417*OVERSAMPLENR , 230 },
{ 424*OVERSAMPLENR , 240 },
{ 432*OVERSAMPLENR , 250 },
{ 440*OVERSAMPLENR , 260 },
{ 447*OVERSAMPLENR , 270 },
{ 455*OVERSAMPLENR , 280 },
{ 463*OVERSAMPLENR , 290 },
{ 470*OVERSAMPLENR , 300 },
{ 478*OVERSAMPLENR , 310 },
{ 485*OVERSAMPLENR , 320 },
{ 493*OVERSAMPLENR , 330 },
{ 500*OVERSAMPLENR , 340 },
{ 507*OVERSAMPLENR , 350 },
{ 515*OVERSAMPLENR , 360 },
{ 522*OVERSAMPLENR , 370 },
{ 529*OVERSAMPLENR , 380 },
{ 537*OVERSAMPLENR , 390 },
{ 544*OVERSAMPLENR , 400 },
{ 614*OVERSAMPLENR , 500 },
{ 681*OVERSAMPLENR , 600 },
{ 744*OVERSAMPLENR , 700 },
{ 805*OVERSAMPLENR , 800 },
{ 862*OVERSAMPLENR , 900 },
{ 917*OVERSAMPLENR , 1000 },
{ 968*OVERSAMPLENR , 1100 }
};
#endif
#if (THERMISTORHEATER_0 == 51) || (THERMISTORHEATER_1 == 51) || (THERMISTORHEATER_2 == 51) || (THERMISTORBED == 51) #if (THERMISTORHEATER_0 == 51) || (THERMISTORHEATER_1 == 51) || (THERMISTORHEATER_2 == 51) || (THERMISTORBED == 51)
// 100k EPCOS (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!) // 100k EPCOS (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!)
// Verified by linagee. // Verified by linagee.