How to calculate torque on DC and stepper motors - need help

Hi all!
I'm new to this and need to confirm what I'm doing, if I'm on the right way or so.

I'm building a robot based on 20 cm polycarbonate disc x 2, one is floor one roof.
2 motors with one wheel each on each side at the middle line on bottom disc
1 rear castor wheel under back part of disc.

Do you get the idea?

The purpose is to build a machine that can run on the floor (or why not on a table) by itself and avoid obtacles.
You heard this before...

My question is how to read the spec.for the stepper motors (if i got everything else right).

Some metrics:

2 Motors
Mass = 1 kg
Wheel radius = 45 mm
Top speed = 50 cm/s
Acceleration = 1 m/s2

Forces

Start force = 1,5 N
Running force 1,0 N

How do i know this?
I measured with a thread fastened to the front of the vehicle and a small bucket at the end of the thread hanging from a table edge and put in coins until it moved, or kept its speed.

Acceleration force 1,0 N since Force = Mass x Acc gives F for Acceleration = 1 x 1 = 1 N

This makes 2 N for running it with the right Acc force and running force.
Torgue = Radius x Forces so 2 x 45 = 90 mNm.

Divided in two its 45 mNm on each motor.
Thats less than 7 oz in. (141 oz in / Nm)
So I bought myself two 19 oz in motor from polo...

And i experienced what you already knew: It didnt run stable on the floor.
So i decided the hard way to move over to stepper motor.

Am i right this far?

If so Ill get to my question:
Looking at stepper specs is quite different from DC:s
DC:s are linear and easy to understand.

Steppers have prefered voltage and current if the spec and then testing results with completly different voltage.
How do i read this data to find a suitable choice?

SvanteJ:
And i experienced what you already knew: It didnt run stable on the floor.

I get the impression that the DC (?) motors you got were powerful enough so I don't understand what you mean by "didn't run stable"

...R

As far as i understand...
By physics a DC motor is at steady speed not able to compensate for sudden differences f ex in the ground/floor regarding friction, height differences. Unless one reads its RPM an compensates. Right?

Divided in two its 45 mNm on each motor.
Thats less than 7 oz in. (141 oz in / Nm)
So I bought myself two 19 oz in motor from polo...

And i experienced what you already knew: It didnt run stable on the floor.
So i decided the hard way to move over to stepper motor.

What motors did you get? You haven't mentioned the speed, 0.5m/s implies a
maximum axle angular velocity of 11rad/s (105rpm) with those wheels, so I'd
have chosen a gear motor with about 120rpm output speed and checked the
torque was more than enough.

For accurate tracking you either need open loop or closed loop control (stepper
motor or encoders with gear motor)

SvanteJ:
As far as i understand...
By physics a DC motor is at steady speed not able to compensate for sudden differences f ex in the ground/floor regarding friction, height differences. Unless one reads its RPM an compensates. Right?

I still don't understand what you mean by "didn't run stable"

...R

The motor i bought had 19 Oz in at stall and 220 rpm freerun at 6. Volts. I used 7,2 V so torque at stall should then be 23 Oz in

Regarding not running stabile...

Torque for Dc motors are linear. If you plot stall torque on y axis and free run rpm on x axis and draw a straight line between them you have the curve. Let's say 100mNm and 100 rpm for a 5 volt motor.
If you have 2 motors and 100 mm wheels. And a force of 1 N is needed to keep it running
How fast will it run?
Since it's 2 motors 25 mNm per motor needs to just keep it running.
Look where y=25 hits the torque curve. Should be at 75 rpm.
So 75 rpm or 40 cm/s.

Let's say the robot is running over a coin with one wheel. What will happen?
The needed force or torque for running the robot increases on that wheel.
Since we already are at maximum torque for this rpm the only way for dc motor to get more torque is to lower rpm until torque is enough. (If you had a control system reading rpm you could raise voltage until same rpm is achieved. )
If the other motor didn't hit a coin it will remain its rpm and the robot will turn from its direction.

SvanteJ:
The motor i bought had 19 Oz in at stall and 220 rpm freerun at 6. Volts. I used 7,2 V so torque at stall should then be 23 Oz in

Regarding not running stabile...

Torque for Dc motors are linear. If you plot stall torque on y axis and free run rpm on x axis and draw a straight line between them you have the curve. Let's say 100mNm and 100 rpm for a 5 volt motor.
If you have 2 motors and 100 mm wheels. And a force of 1 N is needed to keep it running
How fast will it run?
Since it's 2 motors 25 mNm per motor needs to just keep it running.
Look where y=25 hits the torque curve. Should be at 75 rpm.
So 75 rpm or 40 cm/s.

Let's say the robot is running over a coin with one wheel. What will happen?
The needed force or torque for running the robot increases on that wheel.
Since we already are at maximum torque for this rpm the only way for dc motor to get more torque is to lower rpm until torque is enough. (If you had a control system reading rpm you could raise voltage until same rpm is achieved. )
If the other motor didn't hit a coin it will remain its rpm and the robot will turn from its direction.

I think you are trying to say it would not stay running in a straight line when one wheel hit a small bump.

I guess that's why cars have steering.

...R

Yes but I wasn't obvious until I understood the physics behind it.
The problem isn't only the dc but also the solution with differential stering.
Cos if I would have built a three wheel thing with one DC motor that drives two driving wheels equally and one wheel that can steer by pointing in different angles it would probably be more stable. Like a car.

But my initial question wasn't rely this but how to read the data sheet for a stepper so please help me with this.

SvanteJ:
But my initial question wasn't rely this but how to read the data sheet for a stepper so please help me with this.

The commonly quoted data for a stepper is the holding torque. That is the torque preventing the motor from rotating when the motor is stationary and the full coil current is flowing. The rotational torque will be less.

Some of the stepper motor datasheets will show a graph of how torque varies (i.e. declines) with speed. Of course these may be the more expensive motors. I suggest you do a bit of Googling to find a few examples of those graphs. As you seem to have a good grasp of the physics of your system you should be able to relate the graphs to what you need. Then (if the datasheets really do relate to expensive motors) you may be able to make a more informed guess about cheaper motors.

If a stepper motor is faced with a movement requiring too much torque it will miss steps and the Arduino will have no way to correct for that. If you use an encoder with a DC motor that problem is avoided at the cost of somewhat more complex code.

Stepper motors need to be powered at high voltage (maybe 24v or 36v or higher) through a proper stepper motor driver board if they are to produce strong torque at higher speed. The voltage quoted on the datasheets is irrelevant - what matters is the coil resistance and the coil current.

And stepper motors are very inefficient and will be a big drain on batteries. For practical purposes they always draw full current.

...R

Thanks for a very clear answer!

I didn't know about the high power consumption. But i had my suspicions. I knew they have a bad torque per weight ratio thou. And I don't really like to add somewhat 350 grams of hardware on my 1 kg device. Looks like I'm gonna aim at shaft encoded DC motor after all. I think I understand the idea. A little like old time computer mouse with a wheel with spokes. and some optical or whatever recognition.

Programming itself isn't a problem as long as the board has enough memory...

I think resolution is the key here but as I understand there are some with 64 bit per turn or so and if motor is geared down by a 100 that's 6400 counts per turn of wheel. By far enough.

Looked at pololu and I can't really find a motor with encoder in my range of need.
Do someone know another site that have a good variety of dc motors with encoders?

What matters is the inductance and the amperage of the stepper motor. Given two stepper motors of the same size the motor capable of more amperage will have a higher torque. The motor with the lower inductance will be capable of a higher speed for a given voltage power supply.

It's not typical to see stepper motors spec'd with their inductance when you're buying from discount retailers, however, and you usually see either the voltage or coil resistance stated instead. But assuming you understand inductance, and again assuming similarly-sized motors, a motor with a lower voltage or resistance spec is going to have a shorter (wire length) coil and thus a lower inductance. In that respect you would prefer a motor with a lower voltage/resistance/inductance rating so you don't have to deal with really high voltage battery packs or power supplies to get peak performance.

SvanteJ:
Looked at pololu and I can't really find a motor with encoder in my range of need.
Do someone know another site that have a good variety of dc motors with encoders?

I don't have any suggestions apart from Google.

You can buy separate encoders to fix to the motors you already have. Some encoders can identify which direction they are rotating and others can't.

I wonder if it would make life easier to put the encoders on the wheels. With fewer pulses per second the Arduino will have less work to do and the small irregularity in motion may not matter.

If your budget is tight you could make an encoder from a card disk with lines drawn (or printed) on it.

...R

You haven't told us your motor size but here's a kit from Sparkfun that lets you add an encoder. You should be able to read all but the fastest speeds with two interrupts. From that feedback you can set one motor as the reference and make the other motor follow it. The reference motor can have velocity feedback to stabilize its speed. The follower motor will also track that stable speed.

Hi all!
Good tip ill have a look at that.

My motors are DC 19 oz-in at stall and 220 rpm freerun at 6V.

Ill power them 7,2 V.

What i did lately was an experiment in a red LED and a photoresistor running above a paper with black and white lines. and what i saw was the following:
Arduino uno can run at 12,3 ms/loop while doing this (and some printing via serial which is probably slow...)
Running over 9 black lines and 10 white can be done with quality in 0,5 seconds

I therefore created an encoder circle with 8+8 fields. Thinking that its ok in quality in this stage.