# Calculating total torque of stepper motor to lift and rotate some weight

I am going to design a system that would be control remotely. The system consist of stepper motor and solid cylinder rod of about 30 inches long and needs to lift about 0.5 lb/0.223 kg mean up to 90$$\^\circ\$$ up and down in less than one second, maybe 0.7 sec. Now I want to calculate torque and the total power required to do the above task. For the total torque I knew that the total torque would be equal to;

$$\t\$$(total)=$$\t\$$(require to lift the weight of 0.5lb)+$$\t\$$(torque required to rotate the rod up to 90$$\^\circ\$$ up or down);

How can I calculate $$\t=Ia\$$ where $$\I\$$=moment of inertia=$$\\frac{MR^2}{2}\$$ for solid cylinder? I am confused how to calculate the angular acceleration $$\t=Ia\$$. Any help would be appreciated.

The rod is hollow from inside. Here is the key idea (time to $$\\frac{\pi}{2}\$$ or $$\90^\circ\$$. $$\90^\circ\$$ is missing in the diagram) • At rest, the rod is horizontal? – Transistor Overlord Oct 12 '17 at 20:22
• It would be better if you had a diagram or a drawing of your system so that we can understand your issue better and give you a better solution. – Transistor Overlord Oct 12 '17 at 20:28
• Hi sir..i add the key idea of my design. – mtg Oct 12 '17 at 21:16
• This is not a job for a stepper motor – Chris Stratton Jan 6 at 23:44

This is my attempt at solving this problem.

So, for the sake of simplicity let us just consider that we have this shaft that is attached to the load with a mass of 0.223kg. The load is 30 inches/0.762 meters away from the motor. Though I'll be slightly more since the load isn't going to be a point in space. The gravitational force acting on the load is $$\0.223 \cdot 9.8 = 2.1854N\$$ The torque can be described as $$\\tau = Fd\sin(\theta)\$$ or as $$\\tau = Ia\$$

In this case the motor torque is the sum of the gravitational torque + the torque to rotate something. If you grab something and try to rotate it 90º with your arm, you'll realize that the closer it gets to 90º the easier it is to move it, we can then deduce that the gravitational torque is: $$\\tau = 0.223 \cdot 9.8 \cdot 0.762 \cdot \cos{(\theta)} = 1.665 \cdot \cos{(\theta)}\$$

The torque to rotate something is: $$\\tau = Ia = \frac{0.223 \cdot 0.762^{2}}{2} \cdot a = 0.0647 \cdot a\$$

Now we have an expression for the motor torque $$\\tau = 0.0647 \cdot a + 1.665 \cdot \cos{(\theta)}\$$

Our goal here is to lift and safely rotate the load 90º counterclockwise, therefore a great way to achieve this is by increasing the velocity and then decreasing it as a sinusoidal pattern. We want it to have a maximum velocity half way and then decrease the velocity the other half way. This avoids the need for the motor to instantly break thus avoiding damage. All of this has to be accomplished in 0.7s as you've requested.

First things first, if we want the velocity as a sinusoidal pattern, we need to use the mathematical sine wave. That is, that at any instant moment the velocity can be defined as the following: $$\V = V_{max} \cdot \sin(x)\$$

Now, what is $$\x\$$? Let's think about it, if at half way which is 0.7/2 = 0.35s in the operation we want to have the maximum velocity then $$\\sin(0.35k) = 1\$$, where $$\k\$$ is just some arbitrary constant to help us accomplish the equality. If we solve for $$\k\$$ we find that it is equal to $$\\frac{10}{7}\pi\$$, mathematically it is equal to $$\\frac{10}{7}\pi\ + \frac{40y\pi}{7}\$$, $$\y \in \mathbb{Z}\$$ but since we just need a practical answer for this case then we can assume that $$\y = 0\$$

Going back to the previous expression we now have that $$\V(t) = V_{max} \cdot \sin(t\frac{10}{7}\pi)\$$ since this is a rotational motion then we need an expression for the angular velocity which is analogous to the velocity one: $$\\omega(t) = \omega_{max} \cdot \sin(t\frac{10}{7}\pi)\$$

For figuring out the maximum angular velocity, we'll do the following $$\\omega(t) = \omega_{max} \cdot \sin(t\frac{10}{7}\pi) = \frac{\mathrm{d} \theta}{\mathrm{d} t}\$$ if you think about it, the angular velocity is just the instantaneous change in the angle with respect to time.

We can therefore solve this DE like this:

$$\\int_{0}^{0.7} \omega_{max} \cdot \sin(t\frac{10}{7}\pi) \cdot dt = \int_{0}^{\frac{\pi}{2}}d\theta\$$

$$\\omega_{max} = \frac{5\pi^{2}}{14} \approx 3.525 rad/s\$$

In order to simplify things lets just use the decimal approximation, such that: $$\\omega(t) = 3.525 \cdot \sin(t\frac{10}{7}\pi)\$$

If we graph this function this is what it looks like: which is precisely what we want. Rememeber our objective is torque, and that's all got to do with force which is directly proportional to acceleration.

The angular acceleration is nothing more than the instantaneous rate of change of the angular velocity with respect to time, that is $$\a_{\omega}(t) = \frac{\mathrm{d} \omega}{\mathrm{d} t}\$$

Taking the derivative yields: $$\a_{\omega}(t) =\frac{141\pi}{28}\cdot\cos({t\frac{10}{7}\pi)} \approx 15.82\cdot\cos({t\frac{10}{7}\pi)}\$$

The graph is kinda messy to show as a simple image but if you do it on your own you'll see how you start off with maximum acceleration, at half way you have no acceleration and then you start decelerating in order to softly end.

Recall $$\\tau = 0.0647 \cdot a + 1.665 \cdot \cos{(\theta)} = 0.0647 \cdot 15.82\cdot\cos({t\frac{10}{7}\pi)} + 1.665 \cdot\cos({t\frac{5}{7}\pi)} = 1.02\cdot\cos({t\frac{10}{7}\pi)} + 1.665 \cdot\cos({t\frac{5}{7}\pi)}\$$

Why is $$\\theta\$$ all of the sudden $$\t\frac{5}{7}\pi\$$, it's the exact same reason as explained above.

We now have an expression for the torque that changes depending on the time.

We might as well look at a few other things now that we're at it. For instance, the instantaneous power. Power is defined as: $$\P = \tau\omega\$$

$$\P(t) = (1.02\cdot\cos({t\frac{10}{7}\pi)} + 1.665 \cdot\cos({t\frac{5}{7}\pi)}) \cdot 3.525 \cdot \sin(t\frac{10}{7}\pi)\$$

The power graph: The graph clearly depicts how there are instances in time where there is no power.

For the maximum power it's as simple as finding the horizontal tangent since that is the peak of the function, therefore $$\\frac{\mathrm{d} P(t)}{\mathrm{d} t} = 0\$$ solving for $$\t\$$ gives various values, selecting the largest one gives us 0.2245. $$\P(0.2245) = 6W\$$ which is the maximum power.

If we want to calculate the average power, we'll have to first take into consideration that there are two parts to this function, one is positive and the other negative. So, in order to compute the average we shall calculate the sum of the area under the positive curve + the absolute value of the area under the negative curve, all of that divided by 0.7.

The average power is: $$\\frac{1}{0.7}(\int_{0}^{0.5125}(1.02\cdot\cos({t\frac{10}{7}\pi)} + 1.665 \cdot\cos({t\frac{5}{7}\pi)}) \cdot 3.525 \cdot \sin(t\frac{10}{7}\pi) dt + \left |\int_{0.5125}^{0.7}(1.02\cdot\cos({t\frac{10}{7}\pi)} + 1.665 \cdot\cos({t\frac{5}{7}\pi)}) \cdot 3.525 \cdot \sin(t\frac{10}{7}\pi) dt \right |) = 2.78W\$$

The overall total energy used up is the product of the average power and the elapsed time, $$\2.78 \cdot 0.7 = 1.946J\$$

Probably a low power stepper motor has no issue in doing this task. If you really think about it, it is just a 223g load attached to a motor that isn't very far away.

In order to control the angular velocity and torque just use pwm connected to the gate of a mosfet, like shown here: Source

You'd also want to use gears to increase torque and reduce angular velocity. Remember voltage is proportional to angular velocity and current is proportional to torque, but we use gears instead of trying to fry a motor with so much current. In your original question you asked for it to go up and down, that is, you want to change the rotation. This can easily be achieved using a H-bridge with 4 mosfets like so: Source

I hope this has at least somewhat helped you!

Note, I've used SI units all the time so remember to multiply it by some constant to convert it to the units you desire.

At this stage, what I can tell is that the torque is not constant. The Center of Gravity (COG) of the rod acts downwards always (say force F), but as the rod rotates, the torque T = r X F changes in magnitude, where 'r' is the vector from the motor center line and the rod COG.

The highest torque (which is what you should design for), will be when the motor will lift the rod from the horizontal level upwards. In that case just multiply the weight of the rod and the distance from halfway of the rod to the motor centerline

• Transistor Overlord ..thank you sir for your keen interest.i upload the key diagram.the diagram show every aspects that i want. – mtg Oct 12 '17 at 21:17