Go Down

Topic: measure rpm of stepper motor (Read 1 time) previous topic - next topic

123_able

Please tell me how to measure the rpm of a stepper motor using arduino programing.Also,please explain me the programme.For stepper motor to drive ,we have already used one arduino code.How should the second code be connected to this?please reply.

vinceherman

You tell a stepper motor to step.
So you know when the steps take place.
And you know how may steps per revolution your motor has.

The rest is math, right?

123_able

PLease would be helpful if you give the code for the encoder and also tell me where will the encoder be attached to measure the speed?It should actually be kind of automation so as to reduce human effort of holding the encoder each time.

vinceherman

But it would be a better learning process if you did the work yourself.
Do you have a stepper motor, and appropriate stepper driver and arduino?
Go google examples for that driver.

See if you can make the motor turn.

If you run in to problems, we will be glad to help you.  That is what we do here.

If instead you are looking for us to provide you code to your specification, there is a place for that also.  Over in the forum named Gigs & Collaborations.  There you tell people what you want, agree on the price you will pay them, and they do the coding for you.

jremington

You don't need an encoder, since your program tells the motor when and how often to step.

RPM = 60*(number of steps/second)/(number of steps/revolution)

123_able

I'm told to do the programme by using any one encoder on the moving motor.The thing is the motor is moving and the rpm of the motor needs to be automatically updated without any person holding it each time.

Johan_Ha

Sounds like you actually mean a DC motor and not a stepper motor.
____________________

If you ask for help and write 'u' instead of 'you' because you think it's convenient, I will write 'no' instead of 'yes'. For same reasons.

123_able

No it's a stepper motor only where i mentioned the speed through setSpeed but still using encoders I want to verify the same thing.How should that be done?Also the speed should be displayed automatically each time.

Johan_Ha

The stepper motor has the speed you set it to have. It's not like you set it to 800 rpm and it measures only 792.4 rpm. It's 800.

It can slip and skip steps and that's the only reason why it wouldn't reach 800 rpm. But that you don't detect by measuring rpm.

If you want to use an encoder plate for checking missing steps, you need a gear box to rotate the plate so that after each step the motor performs, the plate turns so that the encoder output toggles from 0 to 1, to 0, to 1 etc. Then you include to the step function a check whether the output toggled. But such a system would put an extra load on the stepper motor.

In short. RPM measuring wirh encoder plates is for dc motors. The equival thing for stepper motors is checking your code to get the right rpm and adjusting the current on the driver to make the motor run smoothly.
____________________

If you ask for help and write 'u' instead of 'you' because you think it's convenient, I will write 'no' instead of 'yes'. For same reasons.