Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b836974c6 |
4 changed files with 63 additions and 24 deletions
17
README
17
README
|
|
@ -1,5 +1,3 @@
|
||||||
//this file is for the CERN Robotics club reprap. All the custom settings for our build are in config.h. Please download and flash this file.
|
|
||||||
|
|
||||||
The leading developers of Sprinter are currently Kliment, caru and midopple, though many others contribute with their patches.
|
The leading developers of Sprinter are currently Kliment, caru and midopple, though many others contribute with their patches.
|
||||||
|
|
||||||
This is a firmware for RAMPS and other reprap single-processor electronics setups. It supports printing from SD card, active heatbed control, and ATmega internal pullups.
|
This is a firmware for RAMPS and other reprap single-processor electronics setups. It supports printing from SD card, active heatbed control, and ATmega internal pullups.
|
||||||
|
|
@ -46,8 +44,16 @@ Software installation
|
||||||
Arduino software v1 has not been tested much, but is known to work with some boards.
|
Arduino software v1 has not been tested much, but is known to work with some boards.
|
||||||
http://www.arduino.cc/en/Main/Software
|
http://www.arduino.cc/en/Main/Software
|
||||||
|
|
||||||
|
3. Get the sanguino software, version 0023
|
||||||
|
http://sanguino.cc/softwareforlinux
|
||||||
|
|
||||||
|
follow the sanguino's readme so that your arduino hardware folder looks like
|
||||||
|
arduino-0023/hardware/arduino
|
||||||
|
arduino-0023/hardware/sanguino
|
||||||
|
arduino-0023/hardware/tools
|
||||||
|
|
||||||
4. Clone the Sprinter git repository.
|
4. Clone the Sprinter git repository.
|
||||||
git clone https://github.com/pingud98/Sprinter.git
|
git clone https://github.com/kliment/Sprinter.git
|
||||||
Optionally, switch to the desired branch
|
Optionally, switch to the desired branch
|
||||||
git branch -a
|
git branch -a
|
||||||
git checkout THE_BRANCH_YOU_WANT
|
git checkout THE_BRANCH_YOU_WANT
|
||||||
|
|
@ -60,11 +66,14 @@ Firmware compilation and upload
|
||||||
6. Run make. If everything goes well Sprinter/applet/Sprinter.cpp should have been created.
|
6. Run make. If everything goes well Sprinter/applet/Sprinter.cpp should have been created.
|
||||||
You can safely ignore the error message mentioning arduino-0023/hardware/arduino/cores/arduino/WString.o
|
You can safely ignore the error message mentioning arduino-0023/hardware/arduino/cores/arduino/WString.o
|
||||||
|
|
||||||
|
7. Connect your Sanguinololu to your computer
|
||||||
|
http://reprap.org/wiki/Sanguinololu
|
||||||
|
|
||||||
8. Launch arduino-0023/arduino, open Sprinter/Sprinter.pde
|
8. Launch arduino-0023/arduino, open Sprinter/Sprinter.pde
|
||||||
|
|
||||||
9. Go to Tools -> Serial Port, and select the relevant option
|
9. Go to Tools -> Serial Port, and select the relevant option
|
||||||
|
|
||||||
10. Go to Tools -> Board, select Arduino Mega 2560
|
10. Go to Tools -> Board, select Sanguino
|
||||||
|
|
||||||
11. Go to the Configuration.h file and edit the following lines:
|
11. Go to the Configuration.h file and edit the following lines:
|
||||||
#define MOTHERBOARD 62
|
#define MOTHERBOARD 62
|
||||||
|
|
|
||||||
|
|
@ -27,17 +27,12 @@
|
||||||
// 5 is ParCan supplied 104GT-2 100K
|
// 5 is ParCan supplied 104GT-2 100K
|
||||||
// 6 is EPCOS 100k
|
// 6 is EPCOS 100k
|
||||||
// 7 is 100k Honeywell thermistor 135-104LAG-J01
|
// 7 is 100k Honeywell thermistor 135-104LAG-J01
|
||||||
#define THERMISTORHEATER 1
|
#define THERMISTORHEATER 7
|
||||||
#define THERMISTORBED 1
|
#define THERMISTORBED 1
|
||||||
|
|
||||||
//// Calibration variables
|
//// Calibration variables
|
||||||
// X, Y, Z, E steps per unit - Metric Prusa Mendel with Wade extruder:
|
// X, Y, Z, E steps per unit - Metric Prusa Mendel with Wade extruder:
|
||||||
|
#define _AXIS_STEP_PER_UNIT {80, 80, 4000,670}
|
||||||
// old values:
|
|
||||||
//#define _AXIS_STEP_PER_UNIT {160, 160, 3200/0.80,350}
|
|
||||||
// new values by Fosfor, 2015-04-29:
|
|
||||||
#define _AXIS_STEP_PER_UNIT {228.57, 160, 5120, 1167.99}
|
|
||||||
|
|
||||||
// Metric Prusa Mendel with Makergear geared stepper extruder:
|
// Metric Prusa Mendel with Makergear geared stepper extruder:
|
||||||
//#define _AXIS_STEP_PER_UNIT {80,80,3200/1.25,1380}
|
//#define _AXIS_STEP_PER_UNIT {80,80,3200/1.25,1380}
|
||||||
// MakerGear Hybrid Prusa Mendel:
|
// MakerGear Hybrid Prusa Mendel:
|
||||||
|
|
@ -50,16 +45,16 @@
|
||||||
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
|
// 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 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:
|
//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 = true;
|
const bool X_ENDSTOP_INVERT = false;
|
||||||
const bool Y_ENDSTOP_INVERT = true;
|
const bool Y_ENDSTOP_INVERT = false;
|
||||||
const bool Z_ENDSTOP_INVERT = true;
|
const bool Z_ENDSTOP_INVERT = false;
|
||||||
|
|
||||||
// This determines the communication speed of the printer
|
// This determines the communication speed of the printer
|
||||||
#define BAUDRATE 115200
|
#define BAUDRATE 115200
|
||||||
//#define BAUDRATE 250000
|
//#define BAUDRATE 250000
|
||||||
|
|
||||||
// Comment out (using // at the start of the line) to disable SD support:
|
// Comment out (using // at the start of the line) to disable SD support:
|
||||||
#define SDSUPPORT
|
//#define SDSUPPORT
|
||||||
|
|
||||||
// Uncomment to make run init.g from SD on boot
|
// Uncomment to make run init.g from SD on boot
|
||||||
//#define SDINITFILE
|
//#define SDINITFILE
|
||||||
|
|
@ -76,11 +71,11 @@ const bool Z_ENDSTOP_INVERT = true;
|
||||||
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
|
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
|
||||||
// M503 - Print settings
|
// M503 - Print settings
|
||||||
// define this to enable eeprom support
|
// define this to enable eeprom support
|
||||||
#define USE_EEPROM_SETTINGS
|
//#define USE_EEPROM_SETTINGS
|
||||||
|
|
||||||
// to disable EEPROM Serial responses and decrease program space by ~1000 byte: comment this out:
|
// to disable EEPROM Serial responses and decrease program space by ~1000 byte: comment this out:
|
||||||
// please keep turned on if you can.
|
// please keep turned on if you can.
|
||||||
#define PRINT_EEPROM_SETTING
|
//#define PRINT_EEPROM_SETTING
|
||||||
|
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
//// ARC Function (G2/G3 Command)
|
//// ARC Function (G2/G3 Command)
|
||||||
|
|
@ -144,15 +139,15 @@ const bool max_software_endstops = true; //If true, axis won't move to coordinat
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
//Max Length for Prusa Mendel, check the ways of your axis and set this Values
|
//Max Length for Prusa Mendel, check the ways of your axis and set this Values
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
const int X_MAX_LENGTH = 130;
|
const int X_MAX_LENGTH = 220;
|
||||||
const int Y_MAX_LENGTH = 110;
|
const int Y_MAX_LENGTH = 200;
|
||||||
const int Z_MAX_LENGTH = 90;
|
const int Z_MAX_LENGTH = 270;
|
||||||
|
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
//// MOVEMENT SETTINGS
|
//// MOVEMENT SETTINGS
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
const int NUM_AXIS = 4; // The axis order in all axis related arrays is X, Y, Z, E
|
const int NUM_AXIS = 4; // The axis order in all axis related arrays is X, Y, Z, E
|
||||||
#define _MAX_FEEDRATE {400, 400, 2, 25} // (mm/sec)
|
#define _MAX_FEEDRATE {400, 400, 2, 45} // (mm/sec)
|
||||||
#define _HOMING_FEEDRATE {1500,1500,120} // (mm/min) !!
|
#define _HOMING_FEEDRATE {1500,1500,120} // (mm/min) !!
|
||||||
#define _AXIS_RELATIVE_MODES {false, false, false, false}
|
#define _AXIS_RELATIVE_MODES {false, false, false, false}
|
||||||
|
|
||||||
|
|
@ -395,4 +390,3 @@ const int dropsegments=5; //everything with less than this number of steps will
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -171,6 +171,7 @@
|
||||||
#define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli()
|
#define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli()
|
||||||
#define CRITICAL_SECTION_END SREG = _sreg
|
#define CRITICAL_SECTION_END SREG = _sreg
|
||||||
#endif //CRITICAL_SECTION_START
|
#endif //CRITICAL_SECTION_START
|
||||||
|
#define SERVO 1
|
||||||
|
|
||||||
void __cxa_pure_virtual(){};
|
void __cxa_pure_virtual(){};
|
||||||
|
|
||||||
|
|
@ -377,6 +378,11 @@ unsigned long stepper_inactive_time = 0;
|
||||||
//Temp Monitor for repetier
|
//Temp Monitor for repetier
|
||||||
unsigned char manage_monitor = 255;
|
unsigned char manage_monitor = 255;
|
||||||
|
|
||||||
|
#ifdef SERVO
|
||||||
|
#define SERVOCOUNT 4
|
||||||
|
#include <Servo.h>
|
||||||
|
static Servo servos[SERVOCOUNT];
|
||||||
|
#endif
|
||||||
|
|
||||||
//------------------------------------------------
|
//------------------------------------------------
|
||||||
//Init the SD card
|
//Init the SD card
|
||||||
|
|
@ -852,6 +858,18 @@ void setup()
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef SERVO
|
||||||
|
servos[0].attach(11);
|
||||||
|
servos[0].write(0);
|
||||||
|
servos[1].attach(6);
|
||||||
|
servos[1].write(180);
|
||||||
|
servos[2].attach(5);
|
||||||
|
servos[2].write(0);
|
||||||
|
servos[3].attach(4);
|
||||||
|
servos[3].write(180);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(PID_SOFT_PWM) || (defined(FAN_SOFT_PWM) && (FAN_PIN > -1))
|
#if defined(PID_SOFT_PWM) || (defined(FAN_SOFT_PWM) && (FAN_PIN > -1))
|
||||||
showString(PSTR("Soft PWM Init\r\n"));
|
showString(PSTR("Soft PWM Init\r\n"));
|
||||||
init_Timer2_softpwm();
|
init_Timer2_softpwm();
|
||||||
|
|
@ -1467,6 +1485,24 @@ FORCE_INLINE void process_commands()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#ifdef SERVO
|
||||||
|
case 43:
|
||||||
|
if (code_seen('S'))
|
||||||
|
{
|
||||||
|
int pin_status = code_value();
|
||||||
|
if (code_seen('P') && pin_status >= 0 && pin_status <= 180)
|
||||||
|
{
|
||||||
|
|
||||||
|
int pin_number = code_value();
|
||||||
|
if (pin_number > -1 && pin_number<SERVOCOUNT)
|
||||||
|
{
|
||||||
|
servos[pin_number].write(pin_status);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case 104: // M104
|
case 104: // M104
|
||||||
#ifdef CHAIN_OF_COMMAND
|
#ifdef CHAIN_OF_COMMAND
|
||||||
st_synchronize(); // wait for all movements to finish
|
st_synchronize(); // wait for all movements to finish
|
||||||
|
|
|
||||||
|
|
@ -794,7 +794,7 @@ int temp2analog_thermistor(int celsius, const short table[][2], int numtemps)
|
||||||
#if defined (HEATER_USES_AD595) || defined (BED_USES_AD595)
|
#if defined (HEATER_USES_AD595) || defined (BED_USES_AD595)
|
||||||
int temp2analog_ad595(int celsius)
|
int temp2analog_ad595(int celsius)
|
||||||
{
|
{
|
||||||
return (celsius * 1024.0) / (500.0);
|
return celsius * 1024 / (500);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -835,7 +835,7 @@ int analog2temp_thermistor(int raw,const short table[][2], int numtemps) {
|
||||||
#if defined (HEATER_USES_AD595) || defined (BED_USES_AD595)
|
#if defined (HEATER_USES_AD595) || defined (BED_USES_AD595)
|
||||||
int analog2temp_ad595(int raw)
|
int analog2temp_ad595(int raw)
|
||||||
{
|
{
|
||||||
return (raw * 500.0) / 1024.0;
|
return raw * 500 / 1024;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue