9 Commits

Author SHA1 Message Date
jonny_l480
0a05340763 revert mutex, fix state reset, logging, slower
stepsRemaining not necessary in ISR
comment out forced stop at runAbs
statusPrev not needed
TODO: ISR defines state every time, no need to adjust manually while running
adjust calc function to handle remaining steps

Test: broken - slow moves mork but when "extending" movement it just
vibrates
2023-03-13 18:26:50 +01:00
jonny_ji7
45409676a0 Stepper: add mutex, logging, delay, less steps
When testing last commit the stepper task crashed almost instantly and
moved randomly. Trying to fix/debug that with those changes
2023-03-13 11:12:42 +01:00
jonny_ji7
de42b6252e Stepper: Add resume/update functionality (WIP)
add way to extend current move operation without having to wait for IDLE
state (full decel time)
2023-03-12 13:06:30 +01:00
jonny_l480
6c9b1b6fcf Fix rounding, Rework step-calc, Tested
- decrease home speed
- invert direction in stepper test and home function due to changed
  wiring
- stretch travel steps calculation to multiple steps and variables for
  better overview and debugging
- prevent partial steps from being lost -> fixes rounding issue

TESTED: works in general, but steper movement is too jerky. Also there
is a Hardware issue: When VFD/motor is on the steper does not work
properly -> 50ohm pullup near stepper driver fixed this
2023-03-01 18:55:26 +01:00
jonny_ji7
226aa4794c Switch to and Add travelSteps beside travelMm (WIP)
- optimize some variable and macro names
- change/add function that travels guide certain steps
- stepper task: - calculate steps depending on encoder steps
                - move steps if at least 1 step possible
- prepare poti modifier

-> untested
2023-03-01 12:56:24 +01:00
jonny_ji7
118e9714b5 Add Stepper to connection-plan, Add datasheets
- Add datasheets of VFD and stepper driver
- Change pins in config for stepper driver
    - DISABLED LAMP (pin now used for stepper)
- update connection plan with stepper section and wiring
2023-03-01 08:35:19 +01:00
jonny_ji7
74adcbc78a Adjust test-params, CAD: enforce axis-mount
While testing the setup
Optimizations of problems noticed while testing the setup:
    - mount too weak
    - only very slow speeds relevant
    - less distance required
2023-02-27 11:38:37 +01:00
jonny_ji7
06ebb1fbc6 Fix include order for compatibility
including the files in source file instead of header file fixed
'conflicting type' errors in idf macros when using newer version
ESP-IDF v4.4.4-148-g4c2afac355
2023-02-22 17:23:37 +01:00
jonny_ji7
58c5a92d1e Add functional STEPPER_TEST feature
- add macro variable STEPPER_TEST (config.hpp)
    if set: only `task_stepper-test` is started (main.cpp)
- add file for stepper/guide related code (guide-stepper.cpp/hpp)
    currently defines a task that simply moves the axis left to right
    repeatedly with a speed defined by a potentiometer connected to ADC
    GPIO34
2023-02-21 21:27:33 +01:00