Constant motor speed

Robin2:
OK. Then it should be straightforward.

Can you measure the speed so that you can tell whether it is above of below your chosen maximum?

I posted some code to illustrate how to monitor speed here

...R

I had no difficulties in measuring the speed. I don't know how to keep it constant. That's the main issue.

claudiasabadac41:
"Title:Controlling the speed of a DC motor(using pwm)

Description:

Designing a system that controls a DC motor whose speed is variable. The motor will be powered by an external power source designed to output 7-25 V. The system will be capable to maintain a preset speed using the microcontroller. The RPM will be displayed on a LCD."

My reading of that does not correspond with what I posted in Reply #10 and which you confirmed in Reply #15

I would interpret the second part of that specification (the bit in green) as meaning that it should be possible to adjust the desired motor speed and that the motor should hold constant at the selected speed. One way to adjust the selected speed is with a potentiometer.

I find the first part of the specification ambiguous - it may simply mean that the input voltage could be fixed anywhere in the range 7v to 25v. I certainly do NOT interpret the specification to mean that there is any relationship between the input voltage and the speed - quite the contrary, in fact. I suggest you seek clarification on this part of the specification.

As @MarkT has suggested a PID system (or perhaps just the PI part) provides an effective way to maintain speed while the load (or the input voltage) varies.

...R

Robin2:
My reading of that does not correspond with what I posted in Reply #10 and which you confirmed in Reply #15.

...R

I only confirmed that because, as I consulted with my professor, that was what it is required from me to do for this project. Thank you for the suggestions. I will do my research on PID systems.

claudiasabadac41:
I only confirmed that because, as I consulted with my professor, that was what it is required from me to do for this project.

That's good. I had not realized that you had checked with your professor.

But, IMHO, your professor did not write the requirement clearly :slight_smile:

...R