Adjust parameters cable-guide
Adjust some parameters while testing cable guide with new Reel V2.2.2 Guides quite well with current setup, calculated diameter (layer heights) matches quite good now
This commit is contained in:
parent
e65350f643
commit
4c149a7743
@ -24,13 +24,14 @@ extern "C"
|
|||||||
#define STEPPER_TEST_TRAVEL 65 //mm
|
#define STEPPER_TEST_TRAVEL 65 //mm
|
||||||
|
|
||||||
#define MIN_MM 0
|
#define MIN_MM 0
|
||||||
#define MAX_MM 103
|
#define MAX_MM 97 //actual reel is 110, but currently guide turned out to stay at max position for too long TODO: cad: guide rolls closer together
|
||||||
#define POS_MAX_STEPS MAX_MM * STEPPER_STEPS_PER_MM
|
#define POS_MAX_STEPS MAX_MM * STEPPER_STEPS_PER_MM
|
||||||
#define POS_MIN_STEPS MIN_MM * STEPPER_STEPS_PER_MM
|
#define POS_MIN_STEPS MIN_MM * STEPPER_STEPS_PER_MM
|
||||||
|
|
||||||
#define SPEED_MIN 2.0 //mm/s
|
#define SPEED_MIN 2.0 //mm/s
|
||||||
#define SPEED_MAX 60.0 //mm/s
|
#define SPEED_MAX 70.0 //mm/s
|
||||||
|
|
||||||
|
#define LAYER_THICKNESS_MM 5 //height of one cable layer on reel -> increase in radius
|
||||||
#define D_CABLE 6
|
#define D_CABLE 6
|
||||||
#define D_REEL 160
|
#define D_REEL 160
|
||||||
#define PI 3.14159
|
#define PI 3.14159
|
||||||
@ -299,6 +300,7 @@ void task_stepper_ctl(void *pvParameter)
|
|||||||
// set locally stored axis position and counted layers to 0 (used for calculating the target axis coordinate and steps)
|
// set locally stored axis position and counted layers to 0 (used for calculating the target axis coordinate and steps)
|
||||||
posNow = 0;
|
posNow = 0;
|
||||||
layerCount = 0;
|
layerCount = 0;
|
||||||
|
currentAxisDirection = RIGHT;
|
||||||
ESP_LOGW(TAG, "at position 0, reset variables, resuming normal cable guiding operation");
|
ESP_LOGW(TAG, "at position 0, reset variables, resuming normal cable guiding operation");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -315,8 +317,8 @@ void task_stepper_ctl(void *pvParameter)
|
|||||||
|
|
||||||
//calculate steps to move
|
//calculate steps to move
|
||||||
cableLen = (double)encStepsDelta * 1000 / ENCODER_STEPS_PER_METER;
|
cableLen = (double)encStepsDelta * 1000 / ENCODER_STEPS_PER_METER;
|
||||||
// diameter increases each layer
|
// effective diameter increases each layer
|
||||||
currentDiameter = D_REEL + D_CABLE * layerCount; //TODO actually increases in radius per layer -> shoud be x2, but layer is not exactly 1D thick => test this
|
currentDiameter = D_REEL + LAYER_THICKNESS_MM * 2 * layerCount;
|
||||||
turns = cableLen / (PI * currentDiameter);
|
turns = cableLen / (PI * currentDiameter);
|
||||||
travelMm = turns * D_CABLE;
|
travelMm = turns * D_CABLE;
|
||||||
travelStepsExact = travelMm * STEPPER_STEPS_PER_MM + travelStepsPartial; //convert mm to steps and add not moved partial steps
|
travelStepsExact = travelMm * STEPPER_STEPS_PER_MM + travelStepsPartial; //convert mm to steps and add not moved partial steps
|
||||||
|
@ -415,7 +415,6 @@ CONFIG_ESP_MAC_ADDR_UNIVERSE_ETH=y
|
|||||||
# CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_TWO is not set
|
# CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_TWO is not set
|
||||||
CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR=y
|
CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR=y
|
||||||
CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES=4
|
CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES=4
|
||||||
# CONFIG_ESP_MAC_IGNORE_MAC_CRC_ERROR is not set
|
|
||||||
# end of MAC Config
|
# end of MAC Config
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user