FAQ

What is the difference between open loop and closed loop stepper motor control?

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.

How does a step motor controller with closed-loop feedback work?

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.

How do I control a stepper motor with Arduino using uStepper?

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.

Where do I find technical info on the uStepper boards?

You can find the uStepper product sheets for technical specifications.

What functionality does the uStepper library provide?

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.

Why do I get erratic behavior when using Drop-in or PID?

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:

uStepper S32 Drop-in and PID tuning parameter configuration screenshot

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.

How do I mount uStepper S/S-lite to my motor?

Watch this video.

How do I set up uStepper S/S-lite in the Arduino IDE?

Watch the Arduino IDE setup video on YouTube and read the uStepper S-lite GitHub README.

I can’t program uStepper from the Arduino IDE, what is wrong?

Three most common issues:

  1. If you use the Windows store app “Arduino IDE” you might experience problems. Download the executable or portable version of Arduino IDE from www.arduino.cc.
  2. Install hardware support and the uStepper library as shown in the Arduino IDE setup video.
  3. Remember to chose uStepper as the board you program to.

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.

When I run uStepper closed loop PID or Drop-in the motor spins up and runs fast in one direction, what is wrong?

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.

Contact us

E-mail: contact@ustepper.com

Follow us on Facebook, YouTube, and GitHub.

Documentation