0
\$\begingroup\$

For a school project, I need to control a stepper motor with a raspberry pi or Arduino. I was thinking about a NEMA 17 or NEMA 23 motor. I study mechanical engineering so I don't have much experience with programming Arduino or a raspberry pi.

The motor has to move a carriage 450mm linearly with a variable speed between 50 and 250mm/s. I will use a leadscrew with a lead of 25mm/rev. torque is not a big problem. I calculated the max motor speed to be 600rpm for 250mm/s.

  • my questions are:

what motor should I use?

can I program the speed to be adjustable?

is this even possible?

how should I start to program this?

Is 600rpm posible with a nema 23 or 17? on google i find anywere from 400 to 1500rpm max

I hope some of you can help me with some of the questions. if you think you have something you can help me with, please respond.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Have you used Google to search for: "raspberry pi stepper motor" then you will find a whole list of RPi + stepper motor projects. There are so called "hats" for the RPi, a hat is a control board to make the RPi be able to control something, like a motor. See how it is done. Do something similar. There is no need to "re-invent the wheel", this has been done before, learn from that. \$\endgroup\$ Commented Mar 10, 2021 at 9:40

1 Answer 1

1
\$\begingroup\$

25 mm/rev lead screw is probably a little big to drive with a NEMA17. Go with the NEMA23.

A typical motor driver will allow you to send direction and step commands over the GPIO. This is the easiest way to control the motor in open loop mode. Your program will tell the controller to take 200 steps to move your linear slide by 25 mm each step being about .125 mm.

The speed is going to be determined by how fast you send step commands. If you send 1 step every millisecond, you will get a linear velocity of 125 mm/s. If you send a step command every 5 milliseconds, you'll get a linear velocity of 25 mm/s.

Starting a stepper motor at high velocity often doesn't work very well, so you'll likely need to include a ramp-up and ramp-down in your program to prevent the motor from skipping steps. If you are running in open loop mode, you have to make sure this never happens or you won't be able to keep track of the position.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.