Running DC motor at constant speed by measuring current?

What I have explained is how a DC motor works, and it is the way to model it in order to know its operating conditions at all times. You only need to calculate the parameters "k" and "Ri", and I assure you that you will be able to perform speed control.

Here is a good explanation

1 Like

I see that no one has mentioned the fact that you DO NOT need to measure the motor speed, IF you can measure the speed of something directly connected to the motor armature. What is the motor turning? Must be something, somewhere, so measure the speed of that something!

Thank you all for your advice. I'll try it and give feedback in a few days.
@Paul_KD7HB: No, unfortunately I cannot think of a way to place a sensor anywhere. But thanks anyway.

Just to give you an idea, what I'm trying to do here: I measured that the speed varies about +-10% around the expected value. If I'd able to reduce that to +-5%, it would be more than enough for my use case.

What they call Back EMF is what I referred to as Vi in what I explained. The speed is proportional to Vi by a constant k that needs to be calculated. You also need to calculate Ri. In your case, I imagine you don’t need a very fast response in speed control, so it’s not necessary to calculate the internal inductance.

1 Like

That could be difficult to control if the speed variations are somewhat fast.

This is indeed the right way to start thinking about the problem. For many brushed DC motors the K value and winding resistance is published in the motor data sheet.

See this page: How are DC motors controlled? - Speed control of DC motors | ASPINA

Measuring motor current can done using the sensors that Pololu sells.

However, consider the case of a vehicle climbing a slope. The power required to maintain constant vehicle speed (or wheel RPMs) increases as the slope increases, so at constant voltage, the current has to increase to maintain constant forward speed.

1 Like

@jim-p: The variations are typically within 3 to 10 seconds. So not very fast.

Control loops can be tricky to implement. You will have to do some experimenting.

@jim-p: You are right, these control loops are a real hassle. I decided against it in the end.
Let me explain: I'm collecting sensor values (too complex to explain in detail here). All that is important here is that the sensor values are influenced by the RPM of the motor.
Instead of making a control loop on the Arduino, I decided to use the voltage values in my application on my PC to correct the errors in the other sensor data.
This also has the advantage, that sensor data and voltage values are synchronous.
Works for me.

If you can do that, it is indeed the easy way

Then I think that "IR compensation" is the easiest way to do it. I think that cheyenne1 actually also suggested that. I think "IR compensation" is the most used term for this method.

I only read this forum now and then, and therefore I just reply now - sorry.

If you make a google search for "DC motor" and "IR compensation", you will find several descriptions of this method of making better speed control of a DC motor. It is a well established method and it have been in use far earlier than digital computers. I suggest you look this YouTube video to get some introduction: https://youtu.be/dzYCeFI8PbQ

The method comes with some limitations. If you compensate too much, the system becomes unstable. It is normal not to compensate more than 80 %. Be aware, that the resistance of copper windings of the motor will increase by temperature. So if the motor got some high loads, you can expect the motor resistance to increase in start up, and then you will not compensate the same amount, if your compensation constant is kept a constant.

Jim-p suggest to measure back EMF. Just be aware, that when you measure back EMF from a DC motor with constant speed, you get some ripple voltage of this signal. A small DC-motor got typically three rotor poles, and then this ripple voltage got a frequency of six times the shaft rotation frequency. With a five rotor poles (for some better DC-motors) you get the ripple frequency of ten times the shaft rotation frequency and a smaller ripple magnitude. For a typical small DC-motor with three poles, I see a peak-peak ripple voltage of about 33% of the mean DC EMF voltage (when I disregard spikes from commutation).

With this EMF method you need to switch off the current to the motor for some short times now and then to measure this back EMF voltage. It will cause some audio response from motor, when you do this.

2 Likes

Have you read this thread carefully? Because your suggestion makes no sense in this context.
I thought I've already made clear that I cannot place any sensor in front of the motor or anywhere near it.
That is literally the main purpose of this thread here.

Thanks for your additional information regarding back EMF.
But I'm nevertheless forced to use a low-pass filter, because the analog input of the Arduino has huge measuring errors.

Did you read what IR compensation is? It has nothing to do with a separate sensor, but you use the measured current to the motor as you ask about.

1 Like

Ok, it is actually ambiguous what the term "ir compensation" means.
It could mean placing an infrared sensor (hence the abreviation "ir") or it could mean measuring the current that the motor draws.

I assumed that you meant the first option, because the second one was already discussed by me in the very first post:

So no matter how to interpret your ambiguous suggestion, you should have read the thread first.
Sorry for the tone in my voice, but I'm facepalming really hard right now.
Btw: Answering a thread that is already marked as solved is most of the time not really helpful.

Other readers of this thread (myself included) appreciate your insightful contribution to the topic discussed — thank you.

Well - I did not invent this term, and it was likely invented by some engineer about 100 years ago before IR sensors were invented. Most information on a topic is not in this forum, but somewhere else, and then you need to find the right terms to search for information. That is why I asked you to search google for "DC motor" and "IR compensation". This is the link for that:
https://www.google.com/search?q=%22DC+motor%22+%22IR+compensation%22

So your initial question about using measured current was also asked 100 years ago and several applications use this method including one of my sewing machines from 1983.

Yes, I did read all this post before I answered it. So I think your initial idea is correct, and you just need to read some of the good descriptions of this method on the internet.

2 Likes

But really did you solve your issue? You marked post #12 as solution. Have you implemented that method? Keep in mind that another user might try that solution when they encounter the same problem, and I'm not sure if that actually works. You needed a certain precision in speed regulation, and I'm not sure if it's possible to measure a reliable value of the generated voltage in such a short time as to remove power, measure voltage, and power up again without affecting the speed. Furthermore, you would have to be performing these power cuts constantly.

The "IR compensation" method that @backflip mentions is the same as what I explained to you at the beginning in post #6. That's the way to do what you want; I didn't invent it nor did it occur to me. As @backflip says, it has been used for a long time.

3 Likes

I agree. I think it is useful to people who may have a similar interest and could be even more useful if knowledgeable helpers have more to contribute. Alternate ideas could be entertained and still be on topic.

@arduno24 ,

I have deleted your rude comments, please remain respectful of the other people who contribute to the forum and those who read it.

The purpose of the forum goes beyond just helping the person who asked the question, it is also for anyone else who might find the answers helpful.

If you continue to be abusive you risk a suspension from the forum.

Thank you.

1 Like