PID Position Control of a DC motor

hi all,

In a nutshell i will like to achieve this PID Position control of a DC motor . It seems as though he is using an optical encoder.

I am not sure on what encoder or DC motor i will need to achieve this. Can someone suggest some parts and motors I can use to achieve this please?

Also

What is the difference between an quadrature and a rotary position sensor like this ?

Impressive performance on the video..
I have used these with some success. But its a gear motor so performance is a little different but i got it tracking a second encoder quite well

A quadrature encoder gives digital pulses that allow you to track both rotation angle and direction. The position sensor in your link is a resistive /analog one. I do not think it is suitable for continuous rotation

thanks for your contribution. I decided to go with the normal hobby servo.

here is an example of PID Position Control of Hobby Servo motors using Simulink and Arduino. This is the documentation of the above webinar

I have not tested the example yet because I am waiting on my motor shield to be delivered. Does anyone who is familiar with Simulink and Arduino know how to manipulate the arduino or simulink model to allow it to move out of position when a disturbance is applied and have it slowly return to its original desired position ?

That potentiometer you link to doesn't cover the whole 360 degrees so isn't appropriate at all
unlss you are restricted to a limited range of movement.

The resolution of the encoder will limit only the accuracy of the position, not the dynamic
performance. optical and magnetic encoders are available. I've used the AS5040 quite
successfully, its only 10 bit magnetic rotary encoder but you can read it with high speed
SPI or use its quadrature outputs. A special magnet has to be mounted on the end
of the shaft to use it, but these are available from various stores.

Please suggest me how can we develop PID bases on arduino..

Here's my latest servo-motor experiments - I had the luxury of a motor with
built-in driver and encoder. This is a slo-motion video (12 times slowed down)

See this thread for more information and sketch: Neat little BLDCs with built-in controller. - Motors, Mechanics, Power and CNC - Arduino Forum

The resolution of the encoder does affect the dynamic component in that it
affects the noise, the jitter when the motor is supposed to be stationary,
but yes, the basic dyanamics aren't affected.

In summary encoder + PID loop + motor driver = servo motor driver.

Incremental encoder or absolute, any kind of motor which can be driven
proportional to a control signal - DC or sensored BLDC typically.
You can add an encoder to a stepper motor setup, but there you use
it to correct for backlash or miss-steps, so a full loop isn't needed, it
can just provide a correction value. A full loop can be used too to set
the step rate.

nilton61:
Impressive performance on the video..
I have used these with some success. But its a gear motor so performance is a little different but i got it tracking a second encoder quite well

A quadrature encoder gives digital pulses that allow you to track both rotation angle and direction. The position sensor in your link is a resistive /analog one. I do not think it is suitable for continuous rotation

Hi my friend!
Can please share the code witch you use for that project?
Really try to find it.