Trying to control a motor speed with a PID circuit.

busevaran

Joined Jun 9, 2021
5
Hi everyone! I'm Buse. I'm trying to control a motor speed for a personal project. You can find the schematic of the circuit I found on a book. This circuit works with only the PID parts contrcuted. My problem start when I add the other parts. For example, U1 opamp (top left) is supposed to control the motor like giving it an input and getting an feedback but I cant seem to work it out. Any help is appreciated. ^^

BobTPH

Joined Jun 5, 2013
3,316
What does it do when it is not working?

Edit: I think that circuit is for controlling position, not speed.
Bob

busevaran

Joined Jun 9, 2021
5
What does it do when it is not working?

Edit: I think that circuit is for controlling position, not speed.
Bob
Basically I'm trying to control the speed of the motor by changing the value of a Potentiometer. With the help of PID part the motor should maintain its speed when there is a mass on the shaft the motor is connected. It should get back up to the same angle it makes with the ground. Just like an helicopter tail. When I add the U1 part the circuit doesn't work.
PS. If you think this circuit is for controlling position what kind of a ready circuit scheme you advise for me to use? Ty ^^

Joined Jul 18, 2013
23,121
Typically motor PID positioning and speed rate circuits use a incremental (quadrature) or absolute digital encoder.

busevaran

Joined Jun 9, 2021
5
Typically motor PID positioning and speed rate circuits use a incremental (quadrature) or absolute digital encoder.
Thank you for answer. What I'm tring to do is keeping the shaft (motor is connected to it) (just like a helicopter's tail) on the air with the angle I gave through a POT. The angle should come back to its original state if I add a mass to it. After that I should calculate the error rate (like i gave 5V to motor so that it rises to make an 30 degree with ground but the shaft only rises to 25degree). This is the part I couldn't do. I dont understand how I should do it. Can you help a bit on this maybe? Ty so much.

Joined Jul 18, 2013
23,121
So it is not really motor speed per-se as much as a certain position?
What is the source of the set point?

BobTPH

Joined Jun 5, 2013
3,316
What is producing the feedback?

Bob

busevaran

Joined Jun 9, 2021
5
What is producing the feedback?

Bob
In my head I though about giving and getting the feedback thorugh the potentiometers that I will connect to set point.

busevaran

Joined Jun 9, 2021
5
So it is not really motor speed per-se as much as a certain position?
What is the source of the set point?
I was going to connect a POT to set point, should I or should I not?

GetDeviceInfo

Joined Jun 7, 2009
1,849
The circuit is a position follower. I would remove the I and D sections, leaving the P to start with. If it can’t get to the position with a load, increase the gain.

Sensacell

Joined Jun 19, 2012
2,831
I think you need to wrap your head around the difference between a position servo and a velocity servo control loop.

The circuit you posted is a position control loop, the motor only rotates within the range of the feedback potentiometer, following the setpoint.

A velocity control system would use a different feedback mechanism that measures the speed of the motor.

BobTPH

Joined Jun 5, 2013
3,316
In my head I though about giving and getting the feedback thorugh the potentiometers that I will connect to set point.
You do not understand what feedback means. In a system that controls motor speed, the feedback must be from something that measures the actual speed,

Bob

GetDeviceInfo

Joined Jun 7, 2009
1,849
I’ll ramble a bit over the ‘helicopter’ reference.

If you were attempting to fan a pivoting arm to some position, you would move the feedback pot from the motor to the arm.

Might be a good time to divulge the bigger picture

Last edited:

BobTPH

Joined Jun 5, 2013
3,316
You are confusing the set point with the feedback.

The set point tells the circuit where you want it to be. This is the pot you are talking about.

The feedback tells the circuit where it is now.

And open loop control system requires both of these.

Bob

LesJones

Joined Jan 8, 2017
3,184
You start off by saying that you want a speed controller but in post #5 you seem to want a position controller.