From 7f07d5e626651e1a3ea2089d01a837b39e242750 Mon Sep 17 00:00:00 2001 From: peteGSX <97784652+peteGSX@users.noreply.github.com> Date: Fri, 23 Feb 2024 14:47:21 +1000 Subject: [PATCH] Fix traverser build --- config.example.h | 1 + config.traverser.h | 46 +++++++++++++++++++++++++++++++++------------- 2 files changed, 34 insertions(+), 13 deletions(-) diff --git a/config.example.h b/config.example.h index aa9589c..3908277 100644 --- a/config.example.h +++ b/config.example.h @@ -126,6 +126,7 @@ // If dealing with steppers that have a lot of slop, it can be beneficial to force // rotating in one direction only. Enable one (and one only) of the below options if // a single rotation direction is required. +// NOTE this does not apply in TRAVERSER mode. // // #define ROTATE_FORWARD_ONLY // #define ROTATE_REVERSE_ONLY diff --git a/config.traverser.h b/config.traverser.h index 97c2555..0f79d0b 100644 --- a/config.traverser.h +++ b/config.traverser.h @@ -22,6 +22,7 @@ // Enable sensor testing only, prevents all Turntable-EX operations. // Uncomment this line to disable all normal Turntable-EX operations in order to test // and validate that homing and limit sensors activate and deactivate correctly. +// Note that you can enable sensor testing interactively in the serial console with // // #define SENSOR_TESTING @@ -58,6 +59,7 @@ // Refer to the documentation for the full explanation on phase switching, and when // it is recommended to change these options. // +// #define PHASE_SWITCHING AUTO #define PHASE_SWITCHING MANUAL ///////////////////////////////////////////////////////////////////////////////////// @@ -77,24 +79,32 @@ // Define the stepper controller in use according to those available below, refer to the // documentation for further details on which to select for your application. // -// ULN2003_HALF_CW : ULN2003 in half step mode, clockwise homing/calibration -// ULN2003_HALF_CCW : ULN2003 in half step mode, counter clockwise homing/calibration -// ULN2003_FULL_CW : ULN2003 in full step mode, clockwise homing/calibration -// ULN2003_FULL_CCW : ULN2003 in full step mode, counter clockwise homing/calibration -// TWO_WIRE : Two wire drivers (eg. A4988, DRV8825) -// TWO_WIRE_INV : Two wire drivers (eg. A4988, DRV8825), with enable pin inverted +// ULN2003_HALF : ULN2003 in half step mode +// ULN2003_FULL : ULN2003 in full step mode +// A4988 : Two wire drivers (eg. A4988, DRV8825, TMC2208) // // NOTE: If you are using a different controller than those already defined, refer to // the documentation to define the appropriate configuration variables. Note there are // some controllers that are pin-compatible with an existing defined controller, and // in those instances, no custom configuration would be required. // -#define STEPPER_DRIVER ULN2003_HALF_CW -// #define STEPPER_DRIVER ULN2003_HALF_CCW -// #define STEPPER_DRIVER ULN2003_FULL_CW -// #define STEPPER_DRIVER ULN2003_FULL_CCW -// #define STEPPER_DRIVER TWO_WIRE -// #define STEPPER_DRIVER TWO_WIRE_INV + +#define STEPPER_DRIVER ULN2003_HALF +// #define STEPPER_DRIVER ULN2003_FULL +// #define STEPPER_DRIVER A4988 +// +// If you need to invert the direction of the stepper, uncomment this line. This is likely +// required when using a TMC2208. It may also be required to change the rotation from +// counter clockwise to clockwise when using the ULN2003. +// #define INVERT_DIRECTION +// +// When using a two wire driver (eg. A4988, DRV8825, TMC2208), it may be necessary to invert +// the step pin. If so, uncomment this line. +// #define INVERT_STEPS +// +// When using a two wire driver (eg. A4988, DRV8825, TMC2208), it may be necessary to invert +// the enable pin behaviour if you wish to have the stepper driver disabled when not moving. +// #define INVERT_ENABLE ///////////////////////////////////////////////////////////////////////////////////// // Define the various stepper configuration items below if the defaults don't suit @@ -112,6 +122,15 @@ // Step counts sent from EX-CommandStation will be multiplied by this number. #define STEPPER_GEARING_FACTOR 1 +///////////////////////////////////////////////////////////////////////////////////// +// If dealing with steppers that have a lot of slop, it can be beneficial to force +// rotating in one direction only. Enable one (and one only) of the below options if +// a single rotation direction is required. +// NOTE this does not apply in TRAVERSER mode. +// +// #define ROTATE_FORWARD_ONLY +// #define ROTATE_REVERSE_ONLY + ///////////////////////////////////////////////////////////////////////////////////// // Define the LED blink rates for fast and slow blinking in milliseconds. // @@ -126,6 +145,7 @@ // stepper drivers and motors. // // Enable debug outputs if required during troubleshooting. +// Note you can enable debug output interactively in the serial console with // // #define DEBUG // @@ -137,7 +157,7 @@ // Define the minimum number of steps the turntable needs to move before the homing sensor // deactivates, which is required during the calibration sequence. For high step count // setups, this may need to be increased. -// #define HOME_SENSITIVITY 150 +// #define HOME_SENSITIVITY 300 // // Override the step count determined by automatic calibration by uncommenting the line // below, and manually defining a specific step count.