// Configuration for the stepper program
#define _2L_Thingiverse 1
#define _3L_Thingiverse 2
#define TimeWaster 3 // TMC2100
#define Fleischmann_6652_2208 4 // TMC2208 Bernds Drehscheibe mit Relais
#define TimeWasterA 5 // A4988
#define BPA_Nord 6
#define BPA_Sued 7
#define FLM6050 8 // A4988
#define WHICH_TURNTABLE Fleischmann_6652_2208
#if WHICH_TURNTABLE == _2L_Thingiverse // 2L_Thingiverse
#define ALLWAYS_CHECK_STEPS_ONE_TURN 0 // Always check the steps for one turn at power on
#define PORT_CNT 24 // Number of ports
#define CIRCUMFERENCE 942.5 // 300 mm * Pi = circumference of the turntable [mm]
#define ROTATIONSWITCH_DIRECTION -1 // Set from 1 to -1 to change the direction of the rotation switch
#define ROTATIONSWITCH_MENU_DIR -1 // Set from 1 to -1 to change the direction of the rotation switch in the menu
#define STEPPER_RAMP_LENGTH 130 // Steps to speed up the stepper to prevent loosing steps
// Set to 50 if 1/16 steps are used (MS1 - MS3 connected do +5V)
#define POLARISATION_RELAIS_PIN A1 // Polarisation Relais for dual rail system (Set to -1 if not used)
#define POLARISATION_CHANGE_PORT 12 // is > the given value (1..PORT_CNT)
#define POLARISATION_RELAIS_INVERS 0 // 1: Pin is set to low
#define OLED_TYP 91 // Tested with the following displays
#define MOVING_FLASH_INVERS 1 // Normal: 0 = LED connected to GND
#define MOVING_FLASH_MODE 2 // 1 = Blink, 2 double flash
#define ENABLE_DPRINTF 1 //Debug Ausgaben ein
#define SPEED_POTI_MID_RANGE 50 // Range of the speed poti which is 0 (Old 50)
#define SPEED_POTI_CENTER 512 // Center position of the speed poti (Normaly 512)
#define ANALOG_SPEED_DIVISOR 7 // Divisor used to calculate the analog speed with the poti (std 8)
#define STEP_PIN 4 // New Pin 9
#endif
#if WHICH_TURNTABLE == _3L_Thingiverse // 3L_Thingiverse
#define ALLWAYS_CHECK_STEPS_ONE_TURN 0 // Always check the steps for one turn at power on
#define PORT_CNT 24 // Number of ports
#define CIRCUMFERENCE 942.5 // 300 mm * Pi = circumference of the turntable [mm]
#define ROTATIONSWITCH_DIRECTION -1 // Set from 1 to -1 to change the direction of the rotation switch
#define ROTATIONSWITCH_MENU_DIR -1 // Set from 1 to -1 to change the direction of the rotation switch in the menu
#define STEPPER_RAMP_LENGTH 130 // Steps to speed up the stepper to prevent loosing steps
// Set to 50 if 1/16 steps are used (MS1 - MS3 connected do +5V)
#define POLARISATION_RELAIS_PIN A1 // Polarisation Relais for dual rail system (Set to -1 if not used)
#define POLARISATION_CHANGE_PORT 12 // is > the given value (1..PORT_CNT)
#define POLARISATION_RELAIS_INVERS 0 // 1: Pin is set to low
#define OLED_TYP 91 // Tested with the following displays
#define MOVING_FLASH_INVERS 1 // Normal: 0 = LED connected to GND
#define MOVING_FLASH_MODE 2 // 1 = Blink, 2 double flash
#define ENABLE_DPRINTF 1 //Debug Ausgaben ein
#endif
#if WHICH_TURNTABLE == TimeWaster // TimeWaster mit TMC2100
#define ALLWAYS_CHECK_STEPS_ONE_TURN 0 // Always check the steps for one turn at power on
#define PORT_CNT 4 // Number of ports
#define CIRCUMFERENCE 826.24 // 263 mm * Pi = circumference of the turntable [mm]
#define ROTATIONSWITCH_DIRECTION -1 // Set from 1 to -1 to change the direction of the rotation switch
#define ROTATIONSWITCH_MENU_DIR -1 // Set from 1 to -1 to change the direction of the rotation switch in the menu
#define TURNTABLE_DIRECTION 1 // Set to -1 to change the rotation / port number direction
#define TURNBACK_SPEED 5000 // Speed used for TurnBackAndSetZero
#define NOT_ENABLE_PIN -1 // Set to -1 if the stepper driver has an automatic power mode like the TMC2100
// The pin of the module must be left open (std 6)
#define STEPPER_RAMP_LENGTH 100 // Steps to speed up the stepper to prevent loosing steps
// Set to 50 if 1/16 steps are used (MS1 - MS3 connected do +5V)
#define MOVE_SPEED1 5000 // Default speed and activated when DCC_SET_SPEED1_ADDR is received
#define MOVE_SPEED2 4000 // Speed activated when DCC_SET_SPEED2_ADDR is received
#define MOVE_SPEED3 3000 // Speed activated when DCC_SET_SPEED3_ADDR is received
#define MOVE_SPEED4 2000 // Speed activated when DCC_SET_SPEED4_ADDR is received
#define POLARISATION_RELAIS_PIN A1 // Polarisation Relais for dual rail system (Set to -1 if not used)
#define POLARISATION_CHANGE_PORT 12 // is > the given value (1..PORT_CNT)
#define POLARISATION_RELAIS_INVERS 0 // 1: Pin is set to low
#define OLED_TYP 91 // Tested with the following displays
#define MOVING_FLASH_INVERS 1 // Normal: 0 = LED connected to GND
#define MOVING_FLASH_MODE 2 // 1 = Blink, 2 double flash
#define ENABLE_DPRINTF 1 //Debug Ausgaben ein
#define SPEED_POTI_DIRECTION 1 // Set to -1 to change the direction of the speed poti
#define SPEED_POTI_MID_RANGE 50 // Range of the speed poti which is 0 (Old 50)
#define SPEED_POTI_CENTER 512 // Center position of the speed poti (Normaly 512)
#define ANALOG_SPEED_DIVISOR 30 // Divisor used to calculate the analog speed with the poti (std 8, 50)
#define CLEARENCE_TEST_SPEED 5000 // Speed used in the clearance test
#define CALIBRATE_SPEED 5000 // Speed used for the zero point and total number of stepps detection
#define STEP_PIN 9 // New Pin 9, Testboard 4
#define DCC_PORT_ADDR_LIST DCC_PORT_ADDR(1, 229, RED), \
DCC_PORT_ADDR(2, 229, GRN), \
DCC_PORT_ADDR(3, 230, RED), \
DCC_PORT_ADDR(4, 230, GRN)
#define POLARISATION_RELAIS_LIST 0, 0, 1, 1
#endif
#if WHICH_TURNTABLE == Fleischmann_6652_2208 // Bernds Fleischmann 6652 mit TMC2208
#define ALLWAYS_CHECK_STEPS_ONE_TURN 0 // Always check the steps for one turn at power on
#define PORT_CNT 48 // Number of ports
#define CIRCUMFERENCE 1039.34 // 263 mm * Pi = circumference of the turntable [mm]
#define ROTATIONSWITCH_DIRECTION -1 // Set from 1 to -1 to change the direction of the rotation switch
#define ROTATIONSWITCH_MENU_DIR -1 // Set from 1 to -1 to change the direction of the rotation switch in the menu
#define TURNTABLE_DIRECTION 1 // Set 1 to -1 to change the rotation / port number direction
#define TURNBACK_SPEED 4000 // Speed used for TurnBackAndSetZero
#define NOT_ENABLE_PIN 6 // Set to -1 if the stepper driver has an automatic power mode like the TMC2100
// The pin of the module must be left open (std 6)
#define STEPPER_RAMP_LENGTH 50 // Steps to speed up the stepper to prevent loosing steps
// Set to 50 if 1/16 steps are used (MS1 - MS3 connected do +5V)
#define MOVE_SPEED1 4000 // Default speed and activated when DCC_SET_SPEED1_ADDR is received
#define MOVE_SPEED2 3000 // Speed activated when DCC_SET_SPEED2_ADDR is received
#define MOVE_SPEED3 2000 // Speed activated when DCC_SET_SPEED3_ADDR is received
#define MOVE_SPEED4 1000 // Speed activated when DCC_SET_SPEED4_ADDR is received
#define POLARISATION_RELAIS_PIN A1 // Polarisation Relais for dual rail system (Set to -1 if not used)
#define POLARISATION_CHANGE_PORT 23 // is > the given value (1..PORT_CNT)
#define POLARISATION_RELAIS_LIST 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
#define POLARISATION_RELAIS_INVERS 0 // 1: Pin is set to low
#define OLED_TYP 91 // Tested with the following displays 87, 91, 96, 130
#define USE_u8x8 1 // 1 bei 91,
#define MOVING_FLASH_INVERS 0 // Normal: 0 = LED connected to GND
#define MOVING_FLASH_MODE 2 // 1 = Blink, 2 double flash
#define ENABLE_DPRINTF 1 //Debug Ausgaben ein
#define SPEED_POTI_DIRECTION 1 // Set 1 to -1 to change the direction of the speed poti
#define SPEED_POTI_MID_RANGE 50 // Range of the speed poti which is 0 (Old 50)
#define SPEED_POTI_CENTER 512 // Center position of the speed poti (Normaly 512)
#define ANALOG_SPEED_DIVISOR 80 // Divisor used to calculate the analog speed with the poti (std 8, 50)
#define CLEARENCE_TEST_SPEED 4000 // Speed used in the clearance test
#define CALIBRATE_SPEED 4000 // Speed used for the zero point and total number of stepps detection
#define JQ6500_VOLUME 25 // Range: 0..30 (-1 = Don't change the volume)
#define STEP_PIN 9 // New Pin 9,
#define DCC_PORT_ADDR_LIST DCC_PORT_ADDR(1, 229, RED), \
DCC_PORT_ADDR(2, 229, GRN), \
DCC_PORT_ADDR(3, 230, RED), \
DCC_PORT_ADDR(4, 230, GRN), \
DCC_PORT_ADDR(5, 231, RED), \
DCC_PORT_ADDR(6, 231, GRN), \
DCC_PORT_ADDR(7, 232, RED), \
DCC_PORT_ADDR(8, 232, GRN), \
DCC_PORT_ADDR(9, 233, RED), \
DCC_PORT_ADDR(10, 233, GRN), \
DCC_PORT_ADDR(11, 234, RED), \
DCC_PORT_ADDR(12, 234, GRN), \
DCC_PORT_ADDR(13, 235, RED), \
DCC_PORT_ADDR(14, 235, GRN), \
DCC_PORT_ADDR(15, 236, RED), \
DCC_PORT_ADDR(16, 236, GRN), \
DCC_PORT_ADDR(17, 237, RED), \
DCC_PORT_ADDR(18, 237, GRN), \
DCC_PORT_ADDR(19, 238, RED), \
DCC_PORT_ADDR(20, 238, GRN), \
DCC_PORT_ADDR(21, 239, RED), \
DCC_PORT_ADDR(22, 239, GRN), \
DCC_PORT_ADDR(23, 240, RED), \
DCC_PORT_ADDR(24, 240, GRN), \
DCC_PORT_ADDR(25, 241, RED), \
DCC_PORT_ADDR(26, 241, GRN), \
DCC_PORT_ADDR(27, 242, RED), \
DCC_PORT_ADDR(28, 242, GRN), \
DCC_PORT_ADDR(29, 243, RED), \
DCC_PORT_ADDR(30, 243, GRN), \
DCC_PORT_ADDR(31, 244, RED), \
DCC_PORT_ADDR(32, 244, GRN), \
DCC_PORT_ADDR(33, 245, RED), \
DCC_PORT_ADDR(34, 245, GRN), \
DCC_PORT_ADDR(35, 246, RED), \
DCC_PORT_ADDR(36, 246, GRN), \
DCC_PORT_ADDR(37, 247, RED), \
DCC_PORT_ADDR(38, 247, GRN), \
DCC_PORT_ADDR(39, 248, RED), \
DCC_PORT_ADDR(40, 248, GRN), \
DCC_PORT_ADDR(41, 249, RED), \
DCC_PORT_ADDR(42, 249, GRN), \
DCC_PORT_ADDR(43, 250, RED), \
DCC_PORT_ADDR(44, 250, GRN), \
DCC_PORT_ADDR(45, 251, RED), \
DCC_PORT_ADDR(46, 251, GRN), \
DCC_PORT_ADDR(47, 252, RED), \
DCC_PORT_ADDR(48, 252, GRN)
#define LAST_USED_DCC_ADDR DCC_CHKADDR(252, GRN) // If wrong limits are used an "warning: division by zero" will be generated
#endif
#if WHICH_TURNTABLE == TimeWasterA // TimeWaster mit A4998
#define ALLWAYS_CHECK_STEPS_ONE_TURN 0 // Always check the steps for one turn at power on
#define PORT_CNT 4 // Number of ports
#define CIRCUMFERENCE 826.24 // 263 mm * Pi = circumference of the turntable [mm]
#define ROTATIONSWITCH_DIRECTION 1 // Set from 1 to -1 to change the direction of the rotation switch
#define ROTATIONSWITCH_MENU_DIR 1 // Set from 1 to -1 to change the direction of the rotation switch in the menu
#define TURNTABLE_DIRECTION -1 // Set 1 to -1 to change the rotation / port number direction
#define TURNBACK_SPEED 2000 // Speed used for TurnBackAndSetZero
#define NOT_ENABLE_PIN 6 // Set to -1 if the stepper driver has an automatic power mode like the TMC2100
// The pin of the module must be left open (std 6)
#define STEPPER_RAMP_LENGTH 100 // Steps to speed up the stepper to prevent loosing steps
// Set to 50 if 1/16 steps are used (MS1 - MS3 connected do +5V)
#define MOVE_SPEED1 2000 // Default speed and activated when DCC_SET_SPEED1_ADDR is received
#define MOVE_SPEED2 1000 // Speed activated when DCC_SET_SPEED2_ADDR is received
#define MOVE_SPEED3 500 // Speed activated when DCC_SET_SPEED3_ADDR is received
#define MOVE_SPEED4 200 // Speed activated when DCC_SET_SPEED4_ADDR is received
#define POLARISATION_RELAIS_PIN A1 // Polarisation Relais for dual rail system (Set to -1 if not used)
#define POLARISATION_CHANGE_PORT 12 // is > the given value (1..PORT_CNT)
#define POLARISATION_RELAIS_INVERS 0 // 1: Pin is set to low
#define OLED_TYP 91 // Tested with the following displays
#define MOVING_FLASH_INVERS 0 // Normal: 0 = LED connected to GND
#define MOVING_FLASH_MODE 2 // 1 = Blink, 2 double flash
#define ENABLE_DPRINTF 1 //Debug Ausgaben ein
#define SPEED_POTI_DIRECTION 1 // Set 1 to -1 to change the direction of the speed poti
#define SPEED_POTI_MID_RANGE 50 // Range of the speed poti which is 0 (Old 50)
#define SPEED_POTI_CENTER 512 // Center position of the speed poti (Normaly 512)
#define ANALOG_SPEED_DIVISOR 100 // Divisor used to calculate the analog speed with the poti (std 8, 50)
#define CLEARENCE_TEST_SPEED 2000 // Speed used in the clearance test
#define CALIBRATE_SPEED 2000 // Speed used for the zero point and total number of stepps detection
#define STEP_PIN 9 // New Pin 9, Testboard 4
#define DCC_PORT_ADDR_LIST DCC_PORT_ADDR(1, 229, RED), \
DCC_PORT_ADDR(2, 229, GRN), \
DCC_PORT_ADDR(3, 230, RED), \
DCC_PORT_ADDR(4, 230, GRN)
#define POLARISATION_RELAIS_LIST 0, 0, 1, 1
#endif
#if WHICH_TURNTABLE == BPA_Nord // BPA_Nord
#define ALLWAYS_CHECK_STEPS_ONE_TURN 0 // Always check the steps for one turn at power on
#define PORT_CNT 24 // Number of ports
#define CIRCUMFERENCE 826.24 // 263 mm * Pi = circumference of the turntable [mm]
#define ROTATIONSWITCH_DIRECTION -1 // Set from 1 to -1 to change the direction of the rotation switch
#define ROTATIONSWITCH_MENU_DIR -1 // Set from 1 to -1 to change the direction of the rotation switch in the menu
#define STEPPER_RAMP_LENGTH 130 // Steps to speed up the stepper to prevent loosing steps
// Set to 50 if 1/16 steps are used (MS1 - MS3 connected do +5V)
#define POLARISATION_RELAIS_PIN A1 // Polarisation Relais for dual rail system (Set to -1 if not used)
#define POLARISATION_CHANGE_PORT 12 // is > the given value (1..PORT_CNT)
#define POLARISATION_RELAIS_INVERS 0 // 1: Pin is set to low
#define OLED_TYP 91 // Tested with the following displays
#define MOVING_FLASH_INVERS 1 // Normal: 0 = LED connected to GND
#define MOVING_FLASH_MODE 2 // 1 = Blink, 2 double flash
#define ENABLE_DPRINTF 1 //Debug Ausgaben ein
#endif
#if WHICH_TURNTABLE == BPA_Sued // BPA_Sued
#define ALLWAYS_CHECK_STEPS_ONE_TURN 0 // Always check the steps for one turn at power on
#define PORT_CNT 24 // Number of ports
#define CIRCUMFERENCE 826.24 // 263 mm * Pi = circumference of the turntable [mm]
#define ROTATIONSWITCH_DIRECTION -1 // Set from 1 to -1 to change the direction of the rotation switch
#define ROTATIONSWITCH_MENU_DIR -1 // Set from 1 to -1 to change the direction of the rotation switch in the menu
#define STEPPER_RAMP_LENGTH 130 // Steps to speed up the stepper to prevent loosing steps
// Set to 50 if 1/16 steps are used (MS1 - MS3 connected do +5V)
#define POLARISATION_RELAIS_PIN A1 // Polarisation Relais for dual rail system (Set to -1 if not used)
#define POLARISATION_CHANGE_PORT 12 // is > the given value (1..PORT_CNT)
#define POLARISATION_RELAIS_INVERS 0 // 1: Pin is set to low
#define OLED_TYP 91 // Tested with the following displays
#define MOVING_FLASH_INVERS 1 // Normal: 0 = LED connected to GND
#define MOVING_FLASH_MODE 2 // 1 = Blink, 2 double flash
#define ENABLE_DPRINTF 1 //Debug Ausgaben ein
#endif
#if WHICH_TURNTABLE == FLM6050 // Fleischmann 6050 Handdrehscheibe mit A4998
#define ALLWAYS_CHECK_STEPS_ONE_TURN 0 // Always check the steps for one turn at power on
#define PORT_CNT 24 // Number of ports
#define CIRCUMFERENCE 521.50 // 166 mm * Pi = circumference of the turntable [mm]
#define ROTATIONSWITCH_DIRECTION -1 // Set from 1 to -1 to change the direction of the rotation switch
#define ROTATIONSWITCH_MENU_DIR -1 // Set from 1 to -1 to change the direction of the rotation switch in the menu
#define TURNTABLE_DIRECTION -1 // Set 1 to -1 to change the rotation / port number direction
#define TURNBACK_SPEED 25000 // Speed used for TurnBackAndSetZero
#define NOT_ENABLE_PIN 6 // Set to -1 if the stepper driver has an automatic power mode like the TMC2100
// The pin of the module must be left open (std 6)
#define STEPPER_RAMP_LENGTH 50 // Steps to speed up the stepper to prevent loosing steps
// Set to 50 if 1/16 steps are used (MS1 - MS3 connected to +5V)
#define MOVE_SPEED1 25000 // Default speed and activated when DCC_SET_SPEED1_ADDR is received
#define MOVE_SPEED2 15000 // Speed activated when DCC_SET_SPEED2_ADDR is received
#define MOVE_SPEED3 5500 // Speed activated when DCC_SET_SPEED3_ADDR is received
#define MOVE_SPEED4 2500 // Speed activated when DCC_SET_SPEED4_ADDR is received
#define POLARISATION_RELAIS_PIN A1 // Polarisation Relais for dual rail system (Set to -1 if not used)
#define POLARISATION_RELAIS_LIST 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
// #define POLARISATION_CHANGE_PORT 12 // is > the given value (1..PORT_CNT)
#define POLARISATION_RELAIS_INVERS 0 // 1: Pin is set to low
#define OLED_TYP 91 // Tested with the following displays
#define MOVING_FLASH_INVERS 0 // Normal: 0 = LED connected to GND
#define MOVING_FLASH_MODE 2 // 1 = Blink, 2 double flash
#define ENABLE_DPRINTF 1 //Debug Ausgaben ein
#define SPEED_POTI_DIRECTION 1 // Set 1 to -1 to change the direction of the speed poti
#define SPEED_POTI_MID_RANGE 50 // Range of the speed poti which is 0 (Old 50)
#define SPEED_POTI_CENTER 512 // Center position of the speed poti (Normaly 512)
#define ANALOG_SPEED_DIVISOR 8 // Divisor used to calculate the analog speed with the poti (std 8, 50)
#define CLEARENCE_TEST_SPEED 25000 // Speed used in the clearance test
#define CALIBRATE_SPEED 25000 // Speed used for the zero point and total number of stepps detection
#define JQ6500_VOLUME 20 // Range: 0..30 (-1 = Don't change the volume)
#define STEP_PIN 9 // New Pin 9, Testboard 4
#endif