kliment / Sprinter

Firmware for RepRap printers and similar devices
432 stars 329 forks source link

Problem connecting to RepRap depending on THERMISTORHEATER value #212

Closed hexdoll closed 11 years ago

hexdoll commented 11 years ago

Trying to set up RepRap to use new hotend with a different thermistor, firmware uploads OK but depending on the value of THERMISTORHEATER Pronterface either connects fine or fails to connect. With value of 1-4 the printer can be connected to fine, a value of 5-7 causes Pronterface to get stuck on "Connecting..." I have been able to reproduce this consistently. I can make it connect with THERMISTORHEATER = 5 if I also set THERMISTORBED to 5. I am using commit de2feb0caccf05b0e70a9deaac462f8023f9a635 with the following changes --- a/Sprinter/Configuration.h +++ b/Sprinter/Configuration.h @@ -17,7 +17,7 @@ // Gen 3 Plus = 21 // gen 3 Monolithic Electronics = 22 // Gen3 PLUS for TechZone Gen3 Remix Motherboard = 23 -#define MOTHERBOARD 33 +#define MOTHERBOARD 62

//// Thermistor settings: // 1 is 100k thermistor @@ -27,12 +27,12 @@ // 5 is ParCan supplied 104GT-2 100K // 6 is EPCOS 100k // 7 is 100k Honeywell thermistor 135-104LAG-J01 -#define THERMISTORHEATER 1 +#define THERMISTORHEATER 5

define THERMISTORBED 1

//// Calibration variables // X, Y, Z, E steps per unit - Metric Prusa Mendel with Wade extruder: -#define _AXIS_STEP_PER_UNIT {80, 80, 3200/1.25,700} +#define _AXIS_STEP_PER_UNIT {40, 40, 1600/1.25,364.22} // Metric Prusa Mendel with Makergear geared stepper extruder: //#define _AXIS_STEP_PER_UNIT {80,80,3200/1.25,1380} // MakerGear Hybrid Prusa Mendel: @@ -45,9 +45,9 @@ // The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins. //If your axes are only moving in one direction, make sure the endstops are connected properly. //If your axes move in one direction ONLY when the endstops are triggered, set [XYZ]_ENDSTOP_INVERT to true here: -const bool X_ENDSTOP_INVERT = false; -const bool Y_ENDSTOP_INVERT = false; -const bool Z_ENDSTOP_INVERT = false; +const bool X_ENDSTOP_INVERT = true; +const bool Y_ENDSTOP_INVERT = true; +const bool Z_ENDSTOP_INVERT = true;

// This determines the communication speed of the printer

define BAUDRATE 115200

@@ -117,10 +117,10 @@ const bool DISABLE_E = false; //----------------------------------------------------------------------- // Inverting axis direction //----------------------------------------------------------------------- -const bool INVERT_X_DIR = false; -const bool INVERT_Y_DIR = false; +const bool INVERT_X_DIR = true; +const bool INVERT_Y_DIR = true; const bool INVERT_Z_DIR = true; -const bool INVERT_E_DIR = false; +const bool INVERT_E_DIR = true;

//----------------------------------------------------------------------- //// ENDSTOP SETTINGS:

kliment commented 11 years ago

I think it might have something to do with some thermistor tables being bigger than others and thus using more memory. The atmega 644 is very memory-constrained, so a small change like that might cause this to happen. Can you reduce the serial buffer size or the planner buffer size by half and see if that helps?

On 01/14/2013 05:11 AM, Gemma Peter wrote:

Trying to set up RepRap to use new hotend with a different thermistor, firmware uploads OK but depending on the value of THERMISTORHEATER Pronterface either connects fine or fails to connect. With value of 1-4 the printer can be connected to fine, a value of 5-7 causes Pronterface to get stuck on "Connecting..." I have been able to reproduce this consistently. I can make it connect with THERMISTORHEATER = 5 if I also set THERMISTORBED to 5. I am using commit de2feb0 https://github.com/kliment/Sprinter/commit/de2feb0caccf05b0e70a9deaac462f8023f9a635 with the following changes --- a/Sprinter/Configuration.h +++ b/Sprinter/Configuration.h @@ -17,7 +17,7 @@ // Gen 3 Plus = 21 // gen 3 Monolithic Electronics = 22 // Gen3 PLUS for TechZone Gen3 Remix Motherboard = 23 -#define MOTHERBOARD 33 +#define MOTHERBOARD 62

//// Thermistor settings: // 1 is 100k thermistor @@ -27,12 +27,12 @@ // 5 is ParCan supplied 104GT-2 100K // 6 is EPCOS 100k // 7 is 100k Honeywell thermistor 135-104LAG-J01 -#define THERMISTORHEATER 1 +#define THERMISTORHEATER 5

define THERMISTORBED 1

//// Calibration variables // X, Y, Z, E steps per unit - Metric Prusa Mendel with Wade extruder: -#define _AXIS_STEP_PER_UNIT {80, 80, 3200/1.25,700} +#define _AXIS_STEP_PER_UNIT {40, 40, 1600/1.25,364.22} // Metric Prusa Mendel with Makergear geared stepper extruder: //#define _AXIS_STEP_PER_UNIT {80,80,3200/1.25,1380} // MakerGear Hybrid Prusa Mendel: @@ -45,9 +45,9 @@ // The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins. //If your axes are only moving in one direction, make sure the endstops are connected properly. //If your axes move in one direction ONLY when the endstops are triggered, set [XYZ]_ENDSTOP_INVERT to true here: -const bool X_ENDSTOP_INVERT = false; -const bool Y_ENDSTOP_INVERT = false; -const bool Z_ENDSTOP_INVERT = false; +const bool X_ENDSTOP_INVERT = true; +const bool Y_ENDSTOP_INVERT = true; +const bool Z_ENDSTOP_INVERT = true;

// This determines the communication speed of the printer

define BAUDRATE 115200

@@ -117,10 +117,10 @@ const bool DISABLE_E = false; //----------------------------------------------------------------------- // Inverting axis direction //----------------------------------------------------------------------- -const bool INVERT_X_DIR = false; -const bool INVERT_Y_DIR = false; +const bool INVERT_X_DIR = true; +const bool INVERT_Y_DIR = true; const bool INVERT_Z_DIR = true; -const bool INVERT_E_DIR = false; +const bool INVERT_E_DIR = true;

//----------------------------------------------------------------------- //// ENDSTOP SETTINGS:

— Reply to this email directly or view it on GitHub https://github.com/kliment/Sprinter/issues/212.

midopple commented 11 years ago

Hi, to reduce the Commandbuffer search in sprinter.pde after #define BUFSIZE 6 //8 (Line 350) and replace it with #define BUFSIZE 5

hexdoll commented 11 years ago

Yes, with a BUFSIZE of 3 I can now connect and control the printer as expected. Thanks :+1: