Rotary encoder

Hi I'm new to all this and have set off with an idea and just keep researching and playing about till the point I can complete my project

I have been looking at rotary encodes and I see people using them to adjust direct and speed of a motor. Can they be used to program a motor? Example been the speed and direction and the amount of rotations?

Thanks Steve

wilco1989:
Hi I’m new to all this and have set off with an idea and just keep researching and playing about till the point I can complete my project

I have been looking at rotary encodes and I see people using them to adjust direct and speed of a motor. Can they be used to program a motor? Example been the speed and direction and the amount of rotations?

Thanks Steve

Rotary encoders can be used for estimating motor speed and/or controlling motor speed. “Quadrature” rotary encoders can also provide information about direction of rotation.

Are they used to set the estimated speed? Or do you have to turn the encoder? Hard to explain really.

Could you set the desired speed and then set that in the code and not have to touch the encoder again?

If you have attached the encoder to your motor appropriately, it will provide pulses that you can use to calculate speed and direction. You can use that information to control the motor but the encoder itself is just a reporting mechanism.

wilco1989:
Are they used to set the estimated speed? Or do you have to turn the encoder? Hard to explain really.

Could you set the desired speed and then set that in the code and not have to touch the encoder again?

These devices (rotary encoders) are like a measuring unit. They can be used (usually in conjunction with a micro-controller and suitable program code) to ESTIMATE (measure) the speed of a rotating motor shaft. The micro-controller board such as the Arduino, will run a suitable program (that somebody writes, or might be available somewhere online) that will monitor the voltage levels of particular pins of the rotary encoder. The Arduino's program will analyse the detected time-changing voltage level information ------ from which motor speed can be estimated.

And - when the arduino has real-time (or close to real-time) estimates of the motor speed, then it becomes possible to use the arduino (and motor driver combination) for controlling the speed of the motor.

In order to control something such as 'speed' or angular velocity ----- which means making the motor spin at some accurate consistent speed that you want, it is first necessary to measure the motor speed. And measuring motor speed is what the rotary encoder and arduino (combination) can do for us.

Using the arduino and encoders to control the motor speed is and has-been done. Look up closed loop negative feedback control system.

Got it! Exactly what I needed that cheers