Trying to control a motor speed with a PID circuit.

Thread Starter

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. ^^NV_0105_Dahlen_Figure08.jpg
 

BobTPH

Joined Jun 5, 2013
8,813
What does it do when it is not working?

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

Thread Starter

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 ^^
 

Thread Starter

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.
 

GetDeviceInfo

Joined Jun 7, 2009
2,192
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
3,432
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
8,813
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
2,192
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
8,813
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
4,174
You start off by saying that you want a speed controller but in post #5 you seem to want a position controller.
With the motor NOT connected to the output of the controller do the following. Connect the negative test lead of your DMM to the circuit ground. Set the meter to th3 20 volt DC range. Connect the positive meter lead to the slider (center connection) of the feedback potentiometer . (Marked feedback resistor on your schematic.) Manually rotate the motor to put the feedback potentiometer at bout the center point of it's travel. The meter should now read close to zero volts. Connect the meter's positive lead to the output of U1. Set your set point input voltage (Which should be adjustable between -12 volts to +12 volts ) to zero volts. The meter should read close to zero volts. No manually rotate the motor to move the feedback potentiometer to each end of the travel . Your meter should read close to +12 at one end of it's travel and -12 at the other end of it's travel. Set its position back to the center. Now swing your set point signal to -12 volts. The meter should read about -12 volts. Now swing your set point signal to +12 volts. Your meter should read about +12 volts. If all these thinks happen U1 is working as it should do.
As you have not said in what way the servo does not work if it is driving to the limits of the feedback potentiometer travel then the feedback could be in the wrong sense. (I.E The motor is driving in the direction that increases the error signal rather than reducing it.) If this is the case then reverse the connections to the motor. (I am assuming it is a permanent magnet motor.)

Les.
 
Top