Merge branch 'master' of git://github.com/kliment/Sprinter

This commit is contained in:
James Churchill 2011-07-09 23:00:03 +10:00
commit 03751180d0
23 changed files with 776 additions and 940 deletions

162
Sprinter/Configuration.h Normal file
View file

@ -0,0 +1,162 @@
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
// BASIC SETTINGS: select your board type, thermistor type, axis scaling, and endstop configuration
//// The following define selects which electronics board you have. Please choose the one that matches your setup
// MEGA/RAMPS up to 1.2 = 3,
// RAMPS 1.3 = 33
// Gen6 = 5,
// Sanguinololu up to 1.1 = 6
// Sanguinololu 1.2 and above = 62
#define MOTHERBOARD 3
//// Thermistor settings:
// 1 is 100k thermistor
// 2 is 200k thermistor
// 3 is mendel-parts thermistor
#define THERMISTORHEATER 1
#define THERMISTORBED 1
//// Calibration variables
// X, Y, Z, E steps per unit - Metric Prusa Mendel with Wade extruder:
float axis_steps_per_unit[] = {80, 80, 3200/1.25,700};
// Metric Prusa Mendel with Makergear geared stepper extruder:
//float axis_steps_per_unit[] = {80,80,3200/1.25,1380};
//// Endstop Settings
#define ENDSTOPPULLUPS 1 // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
const bool ENDSTOPS_INVERTING = false; //set to true to invert the logic of the endstops
// This determines the communication speed of the printer
#define BAUDRATE 115200
// Comment out (using // at the start of the line) to disable SD support:
#define SDSUPPORT 1
//// ADVANCED SETTINGS - to tweak parameters
#include "thermistortables.h"
// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
const bool X_ENABLE_ON = 0;
const bool Y_ENABLE_ON = 0;
const bool Z_ENABLE_ON = 0;
const bool E_ENABLE_ON = 0;
// Disables axis when it's not being used.
const bool DISABLE_X = false;
const bool DISABLE_Y = false;
const bool DISABLE_Z = true;
const bool DISABLE_E = false;
// Inverting axis direction
const bool INVERT_X_DIR = false;
const bool INVERT_Y_DIR = false;
const bool INVERT_Z_DIR = true;
const bool INVERT_E_DIR = false;
//// ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN
const int X_HOME_DIR = -1;
const int Y_HOME_DIR = -1;
const int Z_HOME_DIR = -1;
const bool min_software_endstops = false; //If true, axis won't move to coordinates less than zero.
const bool max_software_endstops = true; //If true, axis won't move to coordinates greater than the defined lengths below.
const int X_MAX_LENGTH = 200;
const int Y_MAX_LENGTH = 200;
const int Z_MAX_LENGTH = 100;
//// MOVEMENT SETTINGS
const int NUM_AXIS = 4; // The axis order in all axis related arrays is X, Y, Z, E
float max_feedrate[] = {200000, 200000, 240, 500000};
bool axis_relative_modes[] = {false, false, false, false};
// Min step delay in microseconds. If you are experiencing missing steps, try to raise the delay microseconds, but be aware this
// If you enable this, make sure STEP_DELAY_RATIO is disabled.
//#define STEP_DELAY_MICROS 1
// Step delay over interval ratio. If you are still experiencing missing steps, try to uncomment the following line, but be aware this
// If you enable this, make sure STEP_DELAY_MICROS is disabled. (except for Gen6: both need to be enabled.)
//#define STEP_DELAY_RATIO 0.25
// Comment this to disable ramp acceleration
#define RAMP_ACCELERATION 1
//// Acceleration settings
#ifdef RAMP_ACCELERATION
// X, Y, Z, E maximum start speed for accelerated moves. E default values are good for skeinforge 40+, for older versions raise them a lot.
float max_start_speed_units_per_second[] = {25.0,25.0,0.2,10.0};
long max_acceleration_units_per_sq_second[] = {1000,1000,50,10000}; // X, Y, Z and E max acceleration in mm/s^2 for printing moves or retracts
long max_travel_acceleration_units_per_sq_second[] = {500,500,50,500}; // X, Y, Z max acceleration in mm/s^2 for travel moves
#endif
//// AD595 THERMOCOUPLE SUPPORT UNTESTED... USE WITH CAUTION!!!!
//// PID settings:
// Uncomment the following line to enable PID support. This is untested and could be disastrous. Be careful.
//#define PIDTEMP 1
#ifdef PIDTEMP
#define PID_MAX 255 // limits current to nozzle
#define PID_INTEGRAL_DRIVE_MAX 220
#define PID_PGAIN 180 //100 is 1.0
#define PID_IGAIN 2 //100 is 1.0
#define PID_DGAIN 100 //100 is 1.0
#endif
// How often should the heater check for new temp readings, in milliseconds
#define HEATER_CHECK_INTERVAL 500
#define BED_CHECK_INTERVAL 5000
// Comment the following line to enable heat management during acceleration
#define DISABLE_CHECK_DURING_ACC
#ifndef DISABLE_CHECK_DURING_ACC
// Uncomment the following line to disable heat management during moves
//#define DISABLE_CHECK_DURING_MOVE
#endif
// Uncomment the following line to disable heat management during travel moves (and extruder-only moves, eg: retracts), strongly recommended if you are missing steps mid print.
// Probably this should remain commented if are using PID.
// It also defines the max milliseconds interval after which a travel move is not considered so for the sake of this feature.
#define DISABLE_CHECK_DURING_TRAVEL 1000
//// Temperature smoothing - only uncomment this if your temp readings are noisy (Gen6 without EvdZ's 5V hack)
//#define SMOOTHING 1
//#define SMOOTHFACTOR 16 //best to use a power of two here - determines how many values are averaged together by the smoothing algorithm
//// Experimental watchdog and minimal temp
// The watchdog waits for the watchperiod in milliseconds whenever an M104 or M109 increases the target temperature
// If the temperature has not increased at the end of that period, the target temperature is set to zero. It can be reset with another M104/M109
//#define WATCHPERIOD 5000 //5 seconds
//// The minimal temperature defines the temperature below which the heater will not be enabled
#define MINTEMP 5
//// Experimental max temp
// When temperature exceeds max temp, your heater will be switched off.
// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
// You should use MINTEMP for thermistor short/failure protection.
#define MAXTEMP 275
// Select one of these only to define how the nozzle temp is read.
#define HEATER_USES_THERMISTOR
//#define HEATER_USES_AD595
//#define HEATER_USES_MAX6675
// Select one of these only to define how the bed temp is read.
#define BED_USES_THERMISTOR
//#define BED_USES_AD595
// Uncomment the following line to enable debugging. You can better control debugging below the following line
//#define DEBUG
#ifdef DEBUG
//#define DEBUG_PREPARE_MOVE //Enable this to debug prepare_move() function
//#define DEBUG_BRESENHAM //Enable this to debug the Bresenham algorithm
//#define DEBUG_RAMP_ACCELERATION //Enable this to debug all constant acceleration info
//#define DEBUG_MOVE_TIME //Enable this to time each move and print the result
//#define DEBUG_HEAT_MGMT //Enable this to debug heat management. WARNING, this will cause axes to jitter!
//#define DEBUG_DISABLE_CHECK_DURING_TRAVEL //Debug the namesake feature, see above in this file
#endif
#endif

View file

@ -33,7 +33,7 @@
# $Id$
TARGET = $(notdir $(CURDIR))
INSTALL_DIR = /home/chris/arduino-0022
INSTALL_DIR = ../../arduino22/arduino-0022/
UPLOAD_RATE = 38400
AVRDUDE_PROGRAMMER = stk500v1
PORT = /dev/ttyUSB0
@ -52,7 +52,7 @@ ARDUINO = $(INSTALL_DIR)/hardware/arduino/cores/arduino
AVR_TOOLS_PATH = /usr/bin
SRC = $(ARDUINO)/pins_arduino.c $(ARDUINO)/wiring.c \
$(ARDUINO)/wiring_analog.c $(ARDUINO)/wiring_digital.c \
$(ARDUINO)/wiring_pulse.c $(ARDUINO)/wiring_serial.c \
$(ARDUINO)/wiring_pulse.c \
$(ARDUINO)/wiring_shift.c $(ARDUINO)/WInterrupts.c
CXXSRC = $(ARDUINO)/HardwareSerial.cpp $(ARDUINO)/WMath.cpp \
$(ARDUINO)/Print.cpp ./SdFile.cpp ./SdVolume.cpp ./Sd2Card.cpp
@ -142,7 +142,7 @@ applet_files: $(TARGET).pde
test -d applet || mkdir applet
echo '#include "WProgram.h"' > applet/$(TARGET).cpp
cat $(TARGET).pde >> applet/$(TARGET).cpp
cat $(ARDUINO)/main.cxx >> applet/$(TARGET).cpp
cat $(ARDUINO)/main.cpp >> applet/$(TARGET).cpp
elf: applet/$(TARGET).elf
hex: applet/$(TARGET).hex

View file

@ -1,7 +1,8 @@
// Tonokip RepRap firmware rewrite based off of Hydra-mmm firmware.
// Licence: GPL
#include <WProgram.h>
extern "C" void __cxa_pure_virtual();
void __cxa_pure_virtual(){};
void get_command();
void process_commands();
@ -18,7 +19,8 @@ void ClearToSend();
void get_coordinates();
void prepare_move();
void linear_move(unsigned long x_steps_remaining, unsigned long y_steps_remaining, unsigned long z_steps_remaining, unsigned long e_steps_remaining);
void linear_move(unsigned long steps_remaining[]);
void do_step_update_micros(int axis);
void disable_x();
void disable_y();
void disable_z();
@ -27,10 +29,7 @@ void enable_x();
void enable_y();
void enable_z();
void enable_e();
void do_x_step();
void do_y_step();
void do_z_step();
void do_e_step();
void do_step(int axis);
void kill(byte debug);

View file

@ -23,6 +23,8 @@
* +----+
****************************************************************************************/
#if MOTHERBOARD == 0
#define KNOWN_BOARD 1
#ifndef __AVR_ATmega168__
#error Oops! Make sure you have 'Arduino Diecimila' selected from the boards menu.
#endif
@ -60,7 +62,7 @@
#define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
#endif
@ -93,7 +95,9 @@
* +--------+
*
****************************************************************************************/
#elif MOTHERBOARD == 1
#if MOTHERBOARD == 1
#define KNOWN_BOARD 1
#ifndef __AVR_ATmega644P__
#error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
#endif
@ -134,14 +138,16 @@
#endif
/****************************************************************************************
* RepRap Motherboard ****---NOOOOOO RS485/EXTRUDER CONTROLLER!!!!!!!!!!!!!!!!!---*******
*
****************************************************************************************/
#elif MOTHERBOARD == 2
#if MOTHERBOARD == 2
#define KNOWN_BOARD 1
#ifndef __AVR_ATmega644P__
#error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
#endif
@ -192,13 +198,19 @@
#endif
/****************************************************************************************
* Arduino Mega pin assignment
*
****************************************************************************************/
#elif MOTHERBOARD == 3
#if MOTHERBOARD == 33
#define MOTHERBOARD 3
#define RAMPS_V_1_3
#endif
#if MOTHERBOARD == 3
#define KNOWN_BOARD 1
//////////////////FIX THIS//////////////
#ifndef __AVR_ATmega1280__
#ifndef __AVR_ATmega2560__
@ -210,7 +222,6 @@
// #define RAMPS_V_1_3
// #define RAMPS_V_1_0
#ifdef RAMPS_V_1_3
#define X_STEP_PIN 54
@ -307,12 +318,14 @@
#endif
#endif
/****************************************************************************************
* Duemilanove w/ ATMega328P pin assignment
*
****************************************************************************************/
#elif MOTHERBOARD == 4
#if MOTHERBOARD == 4
#define KNOWN_BOARD 1
#ifndef __AVR_ATmega328P__
#error Oops! Make sure you have 'Arduino Duemilanove w/ ATMega328' selected from the 'Tools -> Boards' menu.
#endif
@ -350,13 +363,14 @@
#define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
#endif
/****************************************************************************************
* Gen6 pin assignment
*
****************************************************************************************/
#elif MOTHERBOARD == 5
#if MOTHERBOARD == 5
#define KNOWN_BOARD 1
#ifndef __AVR_ATmega644P__
#error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
@ -393,7 +407,7 @@
#define SDPOWER -1
#define SDSS -1
#define SDSS 17
#define LED_PIN -1 //changed @ rkoeppl 20110410
#define TEMP_1_PIN -1 //changed @ rkoeppl 20110410
#define FAN_PIN -1 //changed @ rkoeppl 20110410
@ -406,60 +420,63 @@
#define TX_ENABLE_PIN 12
#define RX_ENABLE_PIN 13
#endif
/****************************************************************************************
* Sanguinololu pin assignment
*
****************************************************************************************/
#elif MOTHERBOARD == 6
#if MOTHERBOARD == 62
#define MOTHERBOARD 6
#define SANGUINOLOLU_V_1_2
#endif
#if MOTHERBOARD == 6
#define KNOWN_BOARD 1
#ifndef __AVR_ATmega644P__
#error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
#endif
// uncomment the following line for Sanguinololu v1.2, comment for 1.1 or earlier.
// #define SANGUINOLOLU_V_1_2
#define X_STEP_PIN 15
#define X_DIR_PIN 21
#define X_ENABLE_PIN -1
#define X_MIN_PIN 18
#define X_MAX_PIN -2 //2
#define X_MAX_PIN -2
#define Y_STEP_PIN 22
#define Y_DIR_PIN 23
#define Y_ENABLE_PIN -1
#define Y_MIN_PIN 19
#define Y_MAX_PIN -1 //17
#define Y_MAX_PIN -1
#define Z_STEP_PIN 3
#define Z_DIR_PIN 2
// zenable defined by platform below
#define Z_MIN_PIN 20
#define Z_MAX_PIN -1 //19
#define Z_MAX_PIN -1
#define E_STEP_PIN 1
#define E_DIR_PIN 0
#define E_ENABLE_PIN -1
#define LED_PIN -1
#define FAN_PIN -1 // THIS LINE FOR V1.0
#define FAN_PIN -1
#define PS_ON_PIN -1
#define KILL_PIN -1
#define HEATER_0_PIN 13 // THIS LINE FOR V1.0+ (extruder)
#define HEATER_0_PIN 13 // (extruder)
#ifdef SANGUINOLOLU_V_1_2
#define HEATER_1_PIN 12 // (bed)
#define X_ENABLE_PIN 14
#define Y_ENABLE_PIN 14
#define Z_ENABLE_PIN 26
#define E_ENABLE_PIN 14
#else
#define HEATER_1_PIN 14 // (bed)
#define X_ENABLE_PIN -1
#define Y_ENABLE_PIN -1
#define Z_ENABLE_PIN -1
#define E_ENABLE_PIN -1
#endif
@ -468,9 +485,9 @@
#define SDPOWER -1
#define SDSS 31
#else
#ifndef KNOWN_BOARD
#error Unknown MOTHERBOARD value in configuration.h
#endif
#endif

159
Sprinter/thermistortables.h Normal file
View file

@ -0,0 +1,159 @@
#ifndef THERMISTORTABLES_H_
#define THERMISTORTABLES_H_
#if (THERMISTORHEATER == 1) || (THERMISTORBED == 1) //100k bed thermistor
#define NUMTEMPS_1 61
const short temptable_1[NUMTEMPS_1][2] = {
{ 23 , 300 },
{ 25 , 295 },
{ 27 , 290 },
{ 28 , 285 },
{ 31 , 280 },
{ 33 , 275 },
{ 35 , 270 },
{ 38 , 265 },
{ 41 , 260 },
{ 44 , 255 },
{ 48 , 250 },
{ 52 , 245 },
{ 56 , 240 },
{ 61 , 235 },
{ 66 , 230 },
{ 71 , 225 },
{ 78 , 220 },
{ 84 , 215 },
{ 92 , 210 },
{ 100 , 205 },
{ 109 , 200 },
{ 120 , 195 },
{ 131 , 190 },
{ 143 , 185 },
{ 156 , 180 },
{ 171 , 175 },
{ 187 , 170 },
{ 205 , 165 },
{ 224 , 160 },
{ 245 , 155 },
{ 268 , 150 },
{ 293 , 145 },
{ 320 , 140 },
{ 348 , 135 },
{ 379 , 130 },
{ 411 , 125 },
{ 445 , 120 },
{ 480 , 115 },
{ 516 , 110 },
{ 553 , 105 },
{ 591 , 100 },
{ 628 , 95 },
{ 665 , 90 },
{ 702 , 85 },
{ 737 , 80 },
{ 770 , 75 },
{ 801 , 70 },
{ 830 , 65 },
{ 857 , 60 },
{ 881 , 55 },
{ 903 , 50 },
{ 922 , 45 },
{ 939 , 40 },
{ 954 , 35 },
{ 966 , 30 },
{ 977 , 25 },
{ 985 , 20 },
{ 993 , 15 },
{ 999 , 10 },
{ 1004 , 5 },
{ 1008 , 0 } //safety
};
#endif
#if (THERMISTORHEATER == 2) || (THERMISTORBED == 2) //200k bed thermistor
#define NUMTEMPS_2 21
const short temptable_2[NUMTEMPS_2][2] = {
{1, 848},
{54, 275},
{107, 228},
{160, 202},
{213, 185},
{266, 171},
{319, 160},
{372, 150},
{425, 141},
{478, 133},
{531, 125},
{584, 118},
{637, 110},
{690, 103},
{743, 95},
{796, 86},
{849, 77},
{902, 65},
{955, 49},
{1008, 17},
{1020, 0} //safety
};
#endif
#if (THERMISTORHEATER == 3) || (THERMISTORBED == 3) //mendel-parts
#define NUMTEMPS_3 28
const short temptable_3[NUMTEMPS_3][2] = {
{1,864},
{21,300},
{25,290},
{29,280},
{33,270},
{39,260},
{46,250},
{54,240},
{64,230},
{75,220},
{90,210},
{107,200},
{128,190},
{154,180},
{184,170},
{221,160},
{265,150},
{316,140},
{375,130},
{441,120},
{513,110},
{588,100},
{734,80},
{856,60},
{938,40},
{986,20},
{1008,0},
{1018,-20}
};
#endif
#if THERMISTORHEATER == 1
#define NUMTEMPS NUMTEMPS_1
#define temptable temptable_1
#elif THERMISTORHEATER == 2
#define NUMTEMPS NUMTEMPS_2
#define temptable temptable_2
#elif THERMISTORHEATER == 3
#define NUMTEMPS NUMTEMPS_3
#define temptable temptable_3
#elif defined HEATER_USES_THERMISTOR
#error No heater thermistor table specified
#endif
#if THERMISTORBED == 1
#define BNUMTEMPS NUMTEMPS_1
#define bedtemptable temptable_1
#elif THERMISTORBED == 2
#define BNUMTEMPS NUMTEMPS_2
#define bedtemptable temptable_2
#elif THERMISTORBED == 3
#define BNUMTEMPS NUMTEMPS_3
#define bedtemptable temptable_3
#elif defined BED_USES_THERMISTOR
#error No bed thermistor table specified
#endif
#endif //THERMISTORTABLES_H_

View file

@ -1,85 +0,0 @@
#ifndef THERMISTORTABLE_H_
#define THERMISTORTABLE_H_
// Thermistor lookup table for RepRap Temperature Sensor Boards (http://make.rrrf.org/ts)
// See this page:
// http://dev.www.reprap.org/bin/view/Main/Thermistor
// for details of what goes in this table.
// Made with createTemperatureLookup.py (http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py)
// ./createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=4066 --max-adc=1023
// r0: 100000
// t0: 25
// r1: 0
// r2: 4700
// beta: 4066
// max adc: 1023
#define BNUMTEMPS 61
const short bedtemptable[BNUMTEMPS][2] = {
{ 23 , 300 },
{ 25 , 295 },
{ 27 , 290 },
{ 28 , 285 },
{ 31 , 280 },
{ 33 , 275 },
{ 35 , 270 },
{ 38 , 265 },
{ 41 , 260 },
{ 44 , 255 },
{ 48 , 250 },
{ 52 , 245 },
{ 56 , 240 },
{ 61 , 235 },
{ 66 , 230 },
{ 71 , 225 },
{ 78 , 220 },
{ 84 , 215 },
{ 92 , 210 },
{ 100 , 205 },
{ 109 , 200 },
{ 120 , 195 },
{ 131 , 190 },
{ 143 , 185 },
{ 156 , 180 },
{ 171 , 175 },
{ 187 , 170 },
{ 205 , 165 },
{ 224 , 160 },
{ 245 , 155 },
{ 268 , 150 },
{ 293 , 145 },
{ 320 , 140 },
{ 348 , 135 },
{ 379 , 130 },
{ 411 , 125 },
{ 445 , 120 },
{ 480 , 115 },
{ 516 , 110 },
{ 553 , 105 },
{ 591 , 100 },
{ 628 , 95 },
{ 665 , 90 },
{ 702 , 85 },
{ 737 , 80 },
{ 770 , 75 },
{ 801 , 70 },
{ 830 , 65 },
{ 857 , 60 },
{ 881 , 55 },
{ 903 , 50 },
{ 922 , 45 },
{ 939 , 40 },
{ 954 , 35 },
{ 966 , 30 },
{ 977 , 25 },
{ 985 , 20 },
{ 993 , 15 },
{ 999 , 10 },
{ 1004 , 5 },
{ 1008 , 0 },
};
#endif

View file

@ -1,42 +0,0 @@
#ifndef THERMISTORTABLE_H_
#define THERMISTORTABLE_H_
// Thermistor lookup table for RepRap Temperature Sensor Boards (http://make.rrrf.org/ts)
// See this page:
// http://dev.www.reprap.org/bin/view/Main/Thermistor
// for details of what goes in this table.
// Made with createTemperatureLookup.py (http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py)
// ./createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=4066 --max-adc=1023
// r0: 100000
// t0: 25
// r1: 0
// r2: 4700
// beta: 4066
// max adc: 1023
#define BNUMTEMPS 20
const short bedtemptable[BNUMTEMPS][2] = {
{1, 848},
{54, 275},
{107, 228},
{160, 202},
{213, 185},
{266, 171},
{319, 160},
{372, 150},
{425, 141},
{478, 133},
{531, 125},
{584, 118},
{637, 110},
{690, 103},
{743, 95},
{796, 86},
{849, 77},
{902, 65},
{955, 49},
{1008, 17}
};
#endif

View file

@ -1,85 +0,0 @@
#ifndef THERMISTORTABLE_H_
#define THERMISTORTABLE_H_
// Thermistor lookup table for RepRap Temperature Sensor Boards (http://make.rrrf.org/ts)
// See this page:
// http://dev.www.reprap.org/bin/view/Main/Thermistor
// for details of what goes in this table.
// Made with createTemperatureLookup.py (http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py)
// ./createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=4066 --max-adc=1023
// r0: 100000
// t0: 25
// r1: 0
// r2: 4700
// beta: 4066
// max adc: 1023
#define NUMTEMPS 61
const short temptable[NUMTEMPS][2] = {
{ 23 , 300 },
{ 25 , 295 },
{ 27 , 290 },
{ 28 , 285 },
{ 31 , 280 },
{ 33 , 275 },
{ 35 , 270 },
{ 38 , 265 },
{ 41 , 260 },
{ 44 , 255 },
{ 48 , 250 },
{ 52 , 245 },
{ 56 , 240 },
{ 61 , 235 },
{ 66 , 230 },
{ 71 , 225 },
{ 78 , 220 },
{ 84 , 215 },
{ 92 , 210 },
{ 100 , 205 },
{ 109 , 200 },
{ 120 , 195 },
{ 131 , 190 },
{ 143 , 185 },
{ 156 , 180 },
{ 171 , 175 },
{ 187 , 170 },
{ 205 , 165 },
{ 224 , 160 },
{ 245 , 155 },
{ 268 , 150 },
{ 293 , 145 },
{ 320 , 140 },
{ 348 , 135 },
{ 379 , 130 },
{ 411 , 125 },
{ 445 , 120 },
{ 480 , 115 },
{ 516 , 110 },
{ 553 , 105 },
{ 591 , 100 },
{ 628 , 95 },
{ 665 , 90 },
{ 702 , 85 },
{ 737 , 80 },
{ 770 , 75 },
{ 801 , 70 },
{ 830 , 65 },
{ 857 , 60 },
{ 881 , 55 },
{ 903 , 50 },
{ 922 , 45 },
{ 939 , 40 },
{ 954 , 35 },
{ 966 , 30 },
{ 977 , 25 },
{ 985 , 20 },
{ 993 , 15 },
{ 999 , 10 },
{ 1004 , 5 },
{ 1008 , 0 },
};
#endif

View file

@ -1,42 +0,0 @@
#ifndef THERMISTORTABLE_H_
#define THERMISTORTABLE_H_
// Thermistor lookup table for RepRap Temperature Sensor Boards (http://make.rrrf.org/ts)
// See this page:
// http://dev.www.reprap.org/bin/view/Main/Thermistor
// for details of what goes in this table.
// Made with createTemperatureLookup.py (http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py)
// ./createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=4066 --max-adc=1023
// r0: 100000
// t0: 25
// r1: 0
// r2: 4700
// beta: 4066
// max adc: 1023
#define NUMTEMPS 20
const short temptable[NUMTEMPS][2] = {
{1, 848},
{54, 275},
{107, 228},
{160, 202},
{213, 185},
{266, 171},
{319, 160},
{372, 150},
{425, 141},
{478, 133},
{531, 125},
{584, 118},
{637, 110},
{690, 103},
{743, 95},
{796, 86},
{849, 77},
{902, 65},
{955, 49},
{1008, 17}
};
#endif

View file

@ -1,45 +0,0 @@
#ifndef THERMISTORTABLE_H_
#define THERMISTORTABLE_H_
//thermistor table for mendel-parts thermistor
// Standardized R/T characteristic no. 8404
// RS thermistor 484-0183; EPCOS NTC
// Mendel-Parts thermistor G540 / G550
// Optimized for 100...300C working range.
// Max range: -20...300C
// Max reading error on Gen 6 electronics: ~+5%, -3% in 100 - 300C range.
#define NUMTEMPS 28
const short temptable[NUMTEMPS][2] = {
{1,864},
{21,300},
{25,290},
{29,280},
{33,270},
{39,260},
{46,250},
{54,240},
{64,230},
{75,220},
{90,210},
{107,200},
{128,190},
{154,180},
{184,170},
{221,160},
{265,150},
{316,140},
{375,130},
{441,120},
{513,110},
{588,100},
{734,80},
{856,60},
{938,40},
{986,20},
{1008,0},
{1018,-20}
};
#endif

View file

@ -1,156 +0,0 @@
#ifndef PARAMETERS_H
#define PARAMETERS_H
// NO RS485/EXTRUDER CONTROLLER SUPPORT
// PLEASE VERIFY PIN ASSIGNMENTS FOR YOUR CONFIGURATION!!!!!!!
#define MOTHERBOARD 3 // ATMEGA168 = 0, SANGUINO = 1, MOTHERBOARD = 2, MEGA/RAMPS = 3, ATMEGA328 = 4, Gen6 = 5, Sanguinololu = 6
//Comment out to disable SD support
#define SDSUPPORT 1
//Min step delay in microseconds. If you are experiencing missing steps, try to raise the delay microseconds, but be aware this
// If you enable this, make sure STEP_DELAY_RATIO is disabled.
#define STEP_DELAY_MICROS 1
//Step delay over interval ratio. If you are still experiencing missing steps, try to uncomment the following line, but be aware this
//If you enable this, make sure STEP_DELAY_MICROS is disabled.
//#define STEP_DELAY_RATIO 0.25
//Comment this to disable ramp acceleration
#define RAMP_ACCELERATION 1
//Uncomment this to enable exponential acceleration
//#define EXP_ACCELERATION 1
//Acceleration settings
#ifdef RAMP_ACCELERATION
float min_units_per_second = 35.0; // the minimum feedrate
long max_acceleration_units_per_sq_second = 750; // Max acceleration in mm/s^2 for printing moves
long max_travel_acceleration_units_per_sq_second = 1500; // Max acceleration in mm/s^2 for travel moves
#endif
#ifdef EXP_ACCELERATION
float full_velocity_units = 10; // the units between minimum and G1 move feedrate
float travel_move_full_velocity_units = 10; // used for travel moves
float min_units_per_second = 35.0; // the minimum feedrate
float min_constant_speed_units = 2; // the minimum units of an accelerated move that must be done at constant speed
// Note that if the move is shorter than this value, acceleration won't be perfomed,
// but will be done at the minimum between min_units_per_seconds and move feedrate speeds.
#endif
// AD595 THERMOCOUPLE SUPPORT UNTESTED... USE WITH CAUTION!!!!
//PID settings:
//Uncomment the following line to enable PID support. This is untested and could be disastrous. Be careful.
//#define PIDTEMP 1
#ifdef PIDTEMP
#define PID_MAX 255 // limits current to nozzle
#define PID_INTEGRAL_DRIVE_MAX 220
#define PID_PGAIN 180 //100 is 1.0
#define PID_IGAIN 2 //100 is 1.0
#define PID_DGAIN 100 //100 is 1.0
#endif
//How often should the heater check for new temp readings, in milliseconds
#define HEATER_CHECK_INTERVAL 50
#define BED_CHECK_INTERVAL 5000
//Experimental temperature smoothing - only uncomment this if your temp readings are noisy
//#define SMOOTHING 1
//#define SMOOTHFACTOR 16 //best to use a power of two here - determines how many values are averaged together by the smoothing algorithm
//Experimental watchdog and minimal temp
//The watchdog waits for the watchperiod in milliseconds whenever an M104 or M109 increases the target temperature
//If the temperature has not increased at the end of that period, the target temperature is set to zero. It can be reset with another M104/M109
//#define WATCHPERIOD 5000 //5 seconds
//The minimal temperature defines the temperature below which the heater will not be enabled
//#define MINTEMP
//Experimental max temp
//When temperature exceeds max temp, your bot will halt.
//This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
//You should use MINTEMP for thermistor short/failure protection.
//#define MAXTEMP 275
// Select one of these only to define how the nozzle temp is read.
#define HEATER_USES_THERMISTOR
//#define HEATER_USES_AD595
//#define HEATER_USES_MAX6675
// Select one of these only to define how the bed temp is read.
#define BED_USES_THERMISTOR
//#define BED_USES_AD595
// Calibration formulas
// e_extruded_steps_per_mm = e_feedstock_steps_per_mm * (desired_extrusion_diameter^2 / feedstock_diameter^2)
// new_axis_steps_per_mm = previous_axis_steps_per_mm * (test_distance_instructed/test_distance_traveled)
// units are in millimeters or whatever length unit you prefer: inches,football-fields,parsecs etc
//Calibration variables
float x_steps_per_unit = 80.376;
float y_steps_per_unit = 80.376;
float z_steps_per_unit = 3200/1.25;
float e_steps_per_unit = 16;
float max_feedrate = 200000; //mmm, acceleration!
float max_z_feedrate = 120;
//For SAE Prusa mendeel float z_steps_per_unit = should be 3200/1.411 for 5/16-18 rod and 3200/1.058 for 5/16-24
//float x_steps_per_unit = 10.047;
//float y_steps_per_unit = 10.047;
//float z_steps_per_unit = 833.398;
//float e_steps_per_unit = 0.706;
//float max_feedrate = 3000;
//For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
const bool X_ENABLE_ON = 0;
const bool Y_ENABLE_ON = 0;
const bool Z_ENABLE_ON = 0;
const bool E_ENABLE_ON = 0;
//Disables axis when it's not being used.
const bool DISABLE_X = false;
const bool DISABLE_Y = false;
const bool DISABLE_Z = true;
const bool DISABLE_E = false;
const bool INVERT_X_DIR = false;
const bool INVERT_Y_DIR = false;
const bool INVERT_Z_DIR = true;
const bool INVERT_E_DIR = false;
// Sets direction of endstops when homing; 1=MAX, -1=MIN
const int X_HOME_DIR = -1;
const int Y_HOME_DIR = -1;
const int Z_HOME_DIR = -1;
//Thermistor settings:
//Uncomment for 100k thermistor
//#include "ThermistorTable_100k.h"
//#include "BedThermistorTable_100k.h"
//Uncomment for 200k thermistor
//#include "ThermistorTable_200k.h"
//#include "BedThermistorTable_200k.h"
//Identical thermistors on heater and bed - use this if you have no heated bed or if the thermistors are the same on both:
#include "ThermistorTable_200k.h"
//#include "ThermistorTable_100k.h"
//#include "ThermistorTable_mendelparts.h"
#define BNUMTEMPS NUMTEMPS
#define bedtemptable temptable
//Endstop Settings
#define ENDSTOPPULLUPS 1
const bool ENDSTOPS_INVERTING = false;
const bool min_software_endstops = false; //If true, axis won't move to coordinates less than zero.
const bool max_software_endstops = true; //If true, axis won't move to coordinates greater than the defined lengths below.
const int X_MAX_LENGTH = 220;
const int Y_MAX_LENGTH = 220;
const int Z_MAX_LENGTH = 100;
#define BAUDRATE 115200
#endif