Hi, I am quite fresh in the world of arduino and need some tips.
Can someone help me out choosing equipment for a simple DC motor feedback control setup?
I have background from cybernetics(control theory, robotics and programming) and electrical engineering, so I have quite good knowledge of feedback control (at least theoretical), but I lack knowledge when it comes to hardware etc...
My plan is to apply various control methods for the DC motor.
Currently, all I have is arduino starter kit.
I have thought of using the frequency measurement setup of starter projects to measure speed of the DC motor without encoder, but don't know if this will work...
hawkman384:
My plan is to apply various control methods for the DC motor.
You have to tell us how you want to control the motor?
If you just want to control the speed then all you need is something that gets triggered every revolution - perhaps a reflective optical sensor (QRE1113) detecting a spot of white paint on a black disk.
Yes Robin, thank you!
Maybe I will try this method. I guess that is the easiest way since I already have a DC motor (without encoder). I guess this will be quite unaccurate for low RPM?
Do you have any suggestions for "simple setup" if I also want to control the angle?
hawkman384:
Yes Robin, thank you!
Maybe I will try this method. I guess that is the easiest way since I already have a DC motor (without encoder). I guess this will be quite unaccurate for low RPM?
What do you mean by "low RPM"?
You could have detection marks at more than one place on the shaft so you get (say) 2 or 4 pulses per revolution.
Do you have any suggestions for "simple setup" if I also want to control the angle?
Controlling the angle is an entirely different matter and it is not what you said in Reply #2
First you need to describe in a lot more detail how you want your system to work. A diagram of the machine you want to make would be a big help.
Is there any reason why you are not just using an off-the-shelf servo?
Nielyay yes I have checked that one out. Good tips for components, but it's an open loop control example.
Yes Robin I know, I was just thinking it takes many marks to get good precision for low rotor speed (RPM), but I guess it's fine
My reason for this post was how to get speed measurement. I have no real plans for this, I just want to try to start out by getting a functional PI speed controller, and then maybe extend the scope, implementing model-based control, kalman filter etc., for no reason at all apart from learning.
The reason I don't want to use a servo motor is that I want to make a functional control system myself.
If I want to also include position control (cascade, see below) I need an H-bridge and better rotor position measurement (speed) if I am not mistaken.
hawkman384:
I have thought of using the frequency measurement setup of starter projects to measure speed of the DC motor without encoder, but don't know if this will work...
Oddly enough a DC motor doesn't have a frequency to measure, being DC.
For low speeds, speed control requires position control really, ie a proper encoder and position-error PID loop.
I know the difference between AC and DC, I meant frequency as in rotor speed I was thinking of measuring frequency of noise made by the DC motor.
I know that position measurement (encoder or other) is needed for accurate PID control of position. The intention of this topic was to be pointed in direction of suitable components (especially the DC motor and encoder) for a simple setup for the purpose of DC motor control structure testing.
hawkman384:
Yes Robin I know, I was just thinking it takes many marks to get good precision for low rotor speed (RPM),
You still have not told us what you mean by "low RPM" - put numbers on it.
My simple one-pulse-per-revolution detector allows me to keep the speed of a small DC motor +/- 1% at speeds from about 30 rps to 250 rps. And it will probably work beyond those limits, I just have not tried.
At the moment this has all the hallmarks of an XY Problem.
hawkman384:
I know the difference between AC and DC, I meant frequency as in rotor speed I was thinking of measuring frequency of noise made by the DC motor.
Noise has all sorts of frequencies... This is not really a viable approach.
I know that position measurement (encoder or other) is needed for accurate PID control of position. The intention of this topic was to be pointed in direction of suitable components (especially the DC motor and encoder) for a simple setup for the purpose of DC motor control structure testing.
You said you already had a motor. As for encoder that depends on the motor shaft size etc. What
specifications are you looking for in terms of accuracy, max speed, etc?
Robin2:
At the moment this has all the hallmarks of an XY Problem.
Interesting to read about the XY Problem, and yes I guess it has developed into one. I am sorry if I haven't formulated the problem well enough The intention of this topic was to be pointed in direction of suitable components (especially the DC motor and encoder) for a simple setup for the purpose of DC motor control structure (say both speed and position) testing.
Robin2:
My simple one-pulse-per-revolution detector...
That is accurate enough for my purpose. I am thinking of having something like 4 or 8 pulses-per-rev.
MarkT:
Noise has all sorts of frequencies... This is not really a viable approach.
I know it is not a viable approach, it was just a thought with the equipment I already have. My thought was to mount something to the rotor so the frequency meter could recognize the rotor speed. I should not have mentioned this because this is not really what I am asking
MarkT:
You said you already had a motor. As for encoder that depends on the motor shaft size etc. What
specifications are you looking for in terms of accuracy, max speed, etc?
This is were I need suggestions. Max speed is not important. The content in the link from Nielyay is perfect, but it doesn't say anything about encoders since it is an open loop example.
Robin2:
And still no indication of what you mean by "low RPM"
...R
To be honest I don't have any numbers here, I was just thinking that low speeds, say RPM in the range 100-200, (1.7-3.3 rotations per second), will not be measured satisfactorily with a one (or a few more) pulse(s) per revolution measurement setup.
hawkman384:
RPM in the range 100-200, (1.7-3.3 rotations per second), will not be measured satisfactorily with a one (or a few more) pulse(s) per revolution measurement setup.
Then you probably need to put a rotary encoder on the motor shaft.
By the way, do you mean that the motor shaft will be rotating that slowly? OR, are you referring to an output shaft driven by the motor through reduction gearing?
If the latter then put the sensor before the reduction gearing.
hawkman384:
Say I want to build a 3-wheel robot with 2 driven wheels
Every few Posts the requirement seems to change.
Please post a diagram (just a simple pencil drawing will do) of the machine you want to make and also post a simple description of how you want it to behave.
A moving vehicle will probably need some external position feedback such as a white line to follow.
Robin2:
Image from Reply #16 so we don't have to download it. See this Simple Image Guide
...R
Thanks!
Robin2:
Every few Posts the requirement seems to change.
Yes it seems so, the discussion have drifted away from what I was initially thinking when making this subject. I know that the application plays a role here, but I thought that it was possible to recommend some equipment in order to have a setup with a DC motor that I can control. Call it testbench for control methods. Say I have a L298 motor driver and a DC motor with encoder (e.g the one I linked previous post or one with a bit higher rated RPM), will it work?