- add functions
setSpeed (mm/s)
setTargetPosMm
- add macros and function to define and convert variables to actual units
speed in mm/s instead of unknown
abs pos in mm instead of steps
- simplyfy isr code
new driver works well while testing with one button with debug output
- small changes to isr function that made it fully functional!
- add stepper debug task
- minor optimizations necessary
Partially implemented stepper driver as planned in diagram
works partially (reset button toggles distances)
major issues though - wip
needs debugging and testing
basic task for controlling the stepper
(no accel / decel etc)
works at current speed settings but long moves trigger watchdog
so dropped this idea and using timer as before
Some adjustments to make it work
- fix direction change (temporary)
- fix isr initial start
See notes in stepper.cpp
Todo:
- fix crash after accelerating
- add initial speed (takes long to accelerate from 0
-
- Add stepper driver code from scratch
- Remove / comment out code that used DendoStepper library
- Test custom driver with buttons (guide-stepper.cpp)
untested limited features
- 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
- 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
- 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
While testing the setup
Optimizations of problems noticed while testing the setup:
- mount too weak
- only very slow speeds relevant
- less distance required
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
- 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