I am working on a project where a spool of filament is rewound from one spool to another. I'm using steppers for spinning the spool and for reeling it up nicely with a leadscrew that moves back and forth in paralell with the rotation axis of the spool.
I'm using TMC2209 drivers that are connected only trough UART and EN to the MCU (that is a STM32F401), as I want to avoid using STEP/DIR for simplicity. The communication between the MCU and TMC drivers works fine, but I am struggling to find examples or understand the documentation of the library on how to achieve precise position and acceleraion control.
So far I succesfully used the driver.VACTUAL(); command to spin the motor at a given RPM, but I can't move any further than that.
Is what I want possible without using the STEP/DIR pins?
This project is not new. Not long ago the same questions was posted here.
The step/dir handling is the fastest way regarding reaction/response time.
Accelstepper is an old and often used library but Mobatools is a modern library, easier to use. There are other helpers knowing it.
I see no way to release and wind up using only the steppers. A kind of tension wheel, spring loaded and sensors registering it, is my suggestion.
Sorry, no. Don't remember if it came to a solution or not. You do at least have a good mechanical view of the machine.
Know that the wind out rate versus the wind in rate differs due to different diameters on the spools. You need to handle that some way.
Yes, I tought about that. I have made an encoder based on a the SS495A hall sensor and magnets rotating on a wheel spun by the filament so i can measure its speed between the middle and implement a PID regulator for keeping it at constant speed.
BTW, does STEP/DIR control require less processing resources than an equivalent control over UART? I mainly wanted to do everything over UART to spare some capacity for other things.
Ok, so after looking into it more, i came to the conclusion that i do in fact need STEP/DIR for precise motion control, as the driver itself offers only a basic form of velocity control using which it is impossible to do what i wanted.
Hope this helps someone in the future.