Tuning the motors
Your curtain rod uses two stepper motors to open and close the curtains.
These motors work in a very unique way that makes them perfect for this application.
Instead of using a sensor to detect when the curtain has reached either end, it detects when the motors stall by reaching the end.
We need to fine tune some settings to let the motor know when it should and should not be stalling.
First, let's set the speed. If you would like it to move slow, use a speed of 140.
If you would like it to move fast, use 220.
Or you can set it to anything in between.
Now set the acceleration to 40. Keep it at 40 at all times.
The value of the left and right stall depend on the speed you set the curtains.
To begin, set the left stall and right stall values to 60.
You can set them to a range of 0 - 127
At 0, they are very sensitive and will stop the motors to most movements.
At 127, the motors will likely not stop.
Press either Open or Close to test the motors while setting up.
Use 60 as a starting point for the left and right stall value.
If the motors do not move OR move very little and stop: move the values closer to 0. Do this a little at a time while opening and closing the curtains.
IF the motors move but do not stop once they reach the end (do not worry, damage is not occurring, the motors are brushless and nothing is being damaged), then INCREASE the value until they stop when reaching either end.