Controlling motor speed

Hi

I'm doing a project that asks me to control the speed of a motor via an arduino. The requirements are the following:

  • Must be in a closed loop system

  • Must have a sensor which monitors the speed and feeds back

  • With the information the sensor feeds back it must automatically change the speed of the motor if it's going too fast or too slow

  • Must maintain a speed limit

I am completely clueless at the moment on what to :confused: , if any of you could help, it would really great.

Thank you very much

Well if anybody gives you complete details right now, it will confuse the cr@p out of you.

If you are totally new to Arduino, you need to start with some basics. I know that may be difficult advice to take right now if you're under time pressure, but you really ought to start here.

I'm quite new to Arduino and am planning a similar project myself. I have a small dc motor that came with my start up kit. Have just measured the OUTPUT voltage while spinning it with an electric drill and seemed to get a voltage proportional to r.p.m. I plan to use this voltage to set the pwm value that will control the main motor. Sorry if this all theoretical but hope it helps.

@Khizar, once you have those basics under your belt, you can start looking at some details.

First yes as bill-lancaster says, look at speed control with PWM, and iirc one of the basic examples does PWM on an led for brightness; same principle.

Then you'll need to look at encoders, which will enable you to figure out the speed. Those can be optical, magnetic, other methods. Search the Playground for some examples.

Lastly the tricky part: you need some method to control the speed once it reads it and compares to what yu want it to be. That's usually PID and is not a beginner topic; but there's also PID stuff in the Playground, here.

But if you're a beginner, you need to look at some basics first.

Just to expand on my ideas. I'm planning to attach a small d.c. motor to the main motor. The small d.c. will provide a voltage proportional to the maim motor r.p.m. The Arduino would compare this voltage with a preset value and adjust the pwm output accordingly. I have purchased a dc motor controller from http://www.ebay.co.uk/itm/3v-36V-Dual-15A-H-Bridge-DC-Motor-Driver-30A-for-Robot-Car-Arduino-Compatible-/290934853872 which I assume will take a pwm signal straight from Arduino Uno. Hope this is helpful as well as me testing my amateur ideas!