Frequently asked questions, troubleshooting guides, and documentation for uStepper closed-loop stepper motor controllers.
In open loop stepper motor control, the controller sends step pulses to the motor but has no feedback about whether the motor actually moved to the commanded position. A closed-loop stepper motor controller, like uStepper, uses an encoder to continuously monitor the motor shaft position. If a step is lost due to load or acceleration, the controller detects the error and compensates in real-time. This makes closed-loop stepper motor control more reliable for applications like 3D printing, CNC machining, and robotics where precision is critical.
A step motor controller with closed-loop feedback combines a stepper motor driver with an encoder mounted on the motor shaft. The controller sends step/direction signals to the driver while simultaneously reading the encoder position. If the actual position deviates from the commanded position, the control algorithm adjusts the output to correct the error. uStepper achieves this with a 32-bit microcontroller running real-time control loops at high frequency, providing 0.011-degree position resolution and absolute multi-revolution feedback.
uStepper stepper motor controllers are fully compatible with the Arduino IDE, making it easy to program custom motion control sequences. Simply install the uStepper hardware support package and uStepper library through the Arduino Board Manager and Library Manager. Then you can write Arduino sketches that control your stepper motor with closed-loop precision. See our getting started guide for step-by-step instructions on setting up the Arduino IDE with uStepper.
You can find the uStepper product sheets for technical specifications.
The uStepper library has examples, showing the core functions. For a full description of all the software features visit our uStepper S documentation page or uStepper S-lite documentation page.
This is most likely because the default parameters in the uStepper library does not fit your application. Here’s a short description on what you could do to tune the parameters:
The first two parameters tells that we are doing Drop-in and that microstepping is 1/16 from the printer/CNC controller. The third parameter is the amount of steps that must have been missed for the PID to kick in. The fourth is the number of steps that you are still of before the control stops again. It is advisable to have some hysteresis to avoid oscillating behavior. You can move it to for example 5,0 or 10,0 depending on your mechanical setup and the following PID parameters. The next parameter is P, start with setting this to e.g. 1-5, the next is I, start with a value of maximum 2. The last is D, this you can set to 0 as a start. For info on what P, I and D do, please read the PID wiki page.
Another reason could be that the encoder magnet is slipping – especially when shifting direction. This can be fixed by using double adhesive tape to make the magnet sit tighter to the shaft.
Watch the Arduino IDE setup video on YouTube and read the uStepper S-lite GitHub README.
Three most common issues:
If you happen to have an error in the Arduino IDE while programming and you have made sure the above points are not the issue or you suddenly see a programming error after programming uStepper multiple times you might be having a bootloader problem. In rare cases it can happen that the ATmega 328PB drops its bootloader – but there’s a cure! Read the uStepper bootloader reflash guide.
Try to turn the motor connector (remember to power off uStepper first!). If that does not work, check that the encoder magnet is placed correctly on the motor shaft. Another reason could be that the encoder magnet is slipping – especially when shifting direction. This can be fixed by using double adhesive tape to make the magnet sit tighter to the shaft.
E-mail: contact@ustepper.com
Follow us on Facebook, YouTube, and GitHub.