Speed Controlled Motor

I want to control the speed of a motor in the range 100 -2300 rev/min from an UNO. The power output I estimate to be up to 50 watts, but may be much less.

I currently have a PM DC geared motor that can run over this range, from a 12 volts supply, and I am driving it using the UNO PWM output.

The control algorithm is PI (no D) and this works to a fashion, but has shortcomings. The main problem is from rest and at very low revs it takes a while to start, then overshoots and stops, i.e. it oscillates.

I have tuned the PI constants manually - setting P first just below where it 'hunts', then dial in I in the same way. This works quite well at all speeds except low.

The problem seems to be that the motor drive has to overcome the static hold of the magnets, and this causes it to oscillate at low speeds.

My question is, should I keep trying to find a way to overcome this, eg using code tricks, or is it worth ditching the DC motor and trying a brushless motor having no experience of these?

Re brushless motors, if I buy one with an ESC, will this interface with the UNO? What are the comms to it (protocol and electrical)?

I want to keep the motor cost with ESC as low as possible - 10 to 15 GBP. Something like http://www.ebay.co.uk/itm/Hot-2430-7200KV-4P-Sensorless-Brushless-Motor-25A-Brushless-ESC-for-1-18-RC-Car-/131565204715?hash=item1ea1e5b4eb:g:z8EAAOSwHnFVtekj might be worth a try?

Are you using a PID library? The PID library that I use allows one to change the coefficients on the fly (adaptive tuning). So you could set the P term to allow the motor to start and when it reaches a certain speed, set P to a new value that will maintain speed.

PID V1 library

No, I wrote my own program. Reason being I wanted to learn how to program, and I didnt understand the library version. But thanks for the tip, perhaps I will look into that technique if needed.

Further note: I am getting an occasional ovf result on my 'error' signal. This signal is the difference between set value and process output. It is a float variable so I dont know how it can get ovf??

Re the brushless motor idea, I seem to remember that most of the motor/esc combos on ebay are for propellor drives, and i suspect the speed bottom range will not go low enough for me. Also I think £15 buget is way too low so I am going to presever for now.

Since you are "rolling your own" PID this might be helpful. It adds on the fly tuning changes that won't upset the PID control (along with other enhancements). It helped me to understand how the PID library works. It is written by the same guy that wrote PID V1 lib.

writing pid lib

You might get a brushless motor down to 100 RPM, but the torque might not be enough.

OVF discussion