From 87fe7aa944c6de9e2385fa9a898fe2dec1d75b47 Mon Sep 17 00:00:00 2001 From: JamesT42 Date: Sun, 20 Apr 2014 09:46:55 +0200 Subject: [PATCH] Put every option in the config Integrated steps per revolution and microstepping settings, also put in travel limits for both axis --- SphereBot Arduino/SphereBot/SphereBot.ino | 4 +- SphereBot Arduino/SphereBot/config.h | 54 ++++++++++++++--------- 2 files changed, 35 insertions(+), 23 deletions(-) diff --git a/SphereBot Arduino/SphereBot/SphereBot.ino b/SphereBot Arduino/SphereBot/SphereBot.ino index 6a6fd06..026b56e 100644 --- a/SphereBot Arduino/SphereBot/SphereBot.ino +++ b/SphereBot Arduino/SphereBot/SphereBot.ino @@ -41,9 +41,9 @@ #define VERSIONCODE "Spherebot 2.0" StepperModel xAxisStepper(XAXIS_DIR_PIN, XAXIS_STEP_PIN, XAXIS_ENABLE_PIN, XAXIS_ENDSTOP_PIN, XAXIS_MS1_PIN, XAXIS_MS2_PIN, XAXIS_VMS1, XAXIS_VMS2, - XAXIS_MIN_STEPCOUNT, XAXIS_MAX_STEPCOUNT, 200.0, 16); + XAXIS_MIN_STEPCOUNT, XAXIS_MAX_STEPCOUNT, XAXIS_STEPS_PER_FULL_ROTATION, XAXIS_MICROSTEPPING); StepperModel rotationStepper(YAXIS_DIR_PIN, YAXIS_STEP_PIN, YAXIS_ENABLE_PIN, YAXIS_ENDSTOP_PIN, YAXIS_MS1_PIN, YAXIS_MS2_PIN, YAXIS_VMS1, YAXIS_VMS2, - 0, 0, 200.0, 16); + YAXIS_MIN_STEPCOUNT, YAXIS_MIN_STEPCOUNT, YAXIS_STEPS_PER_FULL_ROTATION, YAXIS_MICROSTEPPING); SoftwareServo servo; boolean servoEnabled=true; diff --git a/SphereBot Arduino/SphereBot/config.h b/SphereBot Arduino/SphereBot/config.h index 45e708a..19235c2 100644 --- a/SphereBot Arduino/SphereBot/config.h +++ b/SphereBot Arduino/SphereBot/config.h @@ -1,35 +1,34 @@ /* * PINS */ - - //ms1 and ms2 are optional. You can simply make these settings by hardwiring the pins to high or low - - /* ms1 | ms2 - ---------------- - L | L -> Full Step - H | L -> Half Step - L | H -> Quarter Step - H | H -> Sixteenth Step - */ - -#define XAXIS_VMS1 HIGH -#define XAXIS_VMS2 HIGH -#define YAXIS_VMS1 HIGH -#define YAXIS_VMS2 HIGH - + +// Y-Axis #define YAXIS_DIR_PIN 14 #define YAXIS_STEP_PIN 15 #define YAXIS_ENABLE_PIN 21 -#define YAXIS_MS1_PIN -1 //ADC6 and ADC7 can not be used as a digital pin ( I made the pull up connection manually) +#define YAXIS_MS1_PIN -1 #define YAXIS_MS2_PIN -1 -#define YAXIS_ENDSTOP_PIN -1 //13 +#define YAXIS_ENDSTOP_PIN -1 // -1 -> No Endstop +#define YAXIS_VMS1 HIGH +#define YAXIS_VMS2 HIGH +#define YAXIS_MIN_STEPCOUNT 0 // Travel limits +#define YAXIS_MAX_STEPCOUNT 0 +#define YAXIS_STEPS_PER_FULL_ROTATION 200.0 +#define YAXIS_MICROSTEPPING 8 +//X-Axis #define XAXIS_DIR_PIN 10 #define XAXIS_STEP_PIN 8 #define XAXIS_ENABLE_PIN 2 #define XAXIS_MS1_PIN -1 #define XAXIS_MS2_PIN -1 -#define XAXIS_ENDSTOP_PIN -1 // <0 0> No Endstop! +#define XAXIS_ENDSTOP_PIN -1 // -1 -> No Endstop +#define XAXIS_VMS1 HIGH +#define XAXIS_VMS2 HIGH +#define XAXIS_MIN_STEPCOUNT 0 // Travel limits +#define XAXIS_MAX_STEPCOUNT 0 +#define XAXIS_STEPS_PER_FULL_ROTATION 200.0 +#define XAXIS_MICROSTEPPING 8 #define SERVO_PIN 13 @@ -38,8 +37,21 @@ */ #define DEFAULT_PEN_UP_POSITION 35 -#define XAXIS_MIN_STEPCOUNT -5.6*230000 //max and min Values are not used by the firmware right now -#define XAXIS_MAX_STEPCOUNT 5*230000 // + #define DEFAULT_ZOOM_FACTOR 0.1808 // With a Zoom-Faktor of .65, I can print gcode for Makerbot Unicorn without changes. // The zoom factor can be also manipulated by the propretiary code M402 + +/* + * Microstepping Information + */ + +//ms1 and ms2 are optional. You can simply make these settings by hardwiring the pins to high or low + + /* ms1 | ms2 + ---------------- + L | L -> Full Step + H | L -> Half Step + L | H -> Quarter Step + H | H -> Sixteenth Step + */