Saturday, November 23, 2019

How to drive a stepper motor for Common Question

If you are planning stepper motor for 3D printer, CNC router or some other machine which needs accurate positioning. Looking around leads you to a lot of people talking about stepper motors. But what are they exactly and especially- how to drive a stepper motor?

I have gathered some basic misconceptions and questions people have asked me over time about driving stepper motors. Starting with the high-level logic behind running a stepper motor and ending with some common questions and problems.

Consider this as a simplified beginner’s guide. I don’t go into the deep technical and calculation side of things which can get very complicated and application dependent. You can learn all that later. Your current mission is most likely to get the motor running and understand the basics behind running stepper motors.
How to drive a stepper motor for Common Question


What is a stepper motor?
There is a lot of resources online which go into great detail about different types of stepper motors and how they work. Check out, for example, this article about stepper motor types. But this is not important at moment. What you need to know is that stepper motors are not your average DC motors. They will not run by hooking up directly to the power supply. They usually have 4 wires, but there is also a 5, 6 and 8 wires stepper motors.

Stepper motor’s rotation is controlled by exciting coils in correct order and polarity. The motor moves exactly one small predefined angle (called a step) each time coil(s) in motor get excited. But motor will not run continuously- it holds the position while powered. Step angle is usually 1.8 degrees. This means you have to make 200 steps to make a complete 360-degree turn (1.8 * 200). Check out this excellent video on youtube which visualizes driving stepper motor by energizing coils in the correct order.

Even though they are used for accurate positioning, they don’t have any position feedback mechanisms like servos have. But if used correctly- there is no need anyway. Controlling rotation and position is done through making correct amounts of steps.

No comments:

Post a Comment