PID Motor Stepper Control

Hi.... Could you give me info/suggestion how to build PID for motor stepper(Tunning PID) and record speed (RPM) with rotary encoder? Thanks

Using a PID with a stepper motor makes no sense at all.... A stepper motor, properly operated, does not NEED an encoder. Unless you overload it, or try to make it move in a way it is not capable of, it will go where you tell it to 100% of the time.

Regards, Ray L.

This forum provides free help by experienced but unpaid volunteers. The way that this works is that you publish what you have tried so far, tell us your results, and ask questions about areas where you need help.

If you want code handed to you, go to Gigs and Collaborations and bring your wallet.

To post code and/or error messages:

  1. Use CTRL-T in the Arduino IDE to autoformat your complete code.
  2. Paste the complete autoformatted code between code tags (the </> button)
    so that we can easily see and deal with your code.
  3. Paste the complete error message between code tags (the </> button)
    so that we can easily see and deal with your messages.
  4. If you already posted without code tags, you may add the code tags by
    editing your post. Do not change your existing posts in any other way.
    You may make additional posts as needed.

Before posting again, you should read the three locked topics at the top of the Programming Questions forum, and any links to which these posts point.

If your project involves wiring, please provide a schematic and/or a wiring diagram and/or a clear photograph of the wiring.

Good Luck!

Like @RayLivingston I cannot envisage any reason to use PID with a stepper motor.

These links may be of interest. Stepper Motor Basics Simple Stepper Code