If you want feedback and both speed AND precision things get much much
more complicated,
typically some PID algorithm is needed to stabilize the loop to get
speed, precision and power at the same time.
My latest PIC project actually was such a (modified) PID motor control.
And I must say it is impressive to
see a 200oz DC motor running at 1K RPM comming to a dead stop in less
than 10mS, and with less than
20deg (200 counts) overshoot !
Just Google for something like "pic dc motor control", should turn up
hundreds of interesting results.
Dave Mucha wrote:
--- In p...@yahoogroups.com, Lez <lez.briddon@n...> wrote:
>
> Hi,
>
>
> I have not programmed a pic in years, since about 99 when the 16cf84
was
> the most used around, and even then it was for simple slow things, ie
> door / window open-close etc with limit switches so no great master
> pieces. (oh and the usual light flashers for the kids)
>
> I now need to build a motor speed control, the motor is to be
controlled
> by a servo(standard pwm as used in RC cars etc) driven speed
controller,
> with an inductive pickup to sense the speed, from about 100 to 4000 rpm.
>
> I can easily get a nice square wave from the pickup.
>
> I need to be able to control the motor with a series of switches:
>
> 1) Start control and maintain current rpm
> 2) go faster
> 3) slow down
> 4) STOP! (active high) stop pwm output
> 5) STOP! (active low) stop pwm output
>
>
> I would also like an output of current pwm value on 3 lines that can
> drive a 3 to 8 line converter to run 8 led's to give a remote
indication
> of the servo position.
Can you offer a little more details here ? I am familiar with DC
motors that have posistion feedback and run at high speed. For CNC
stuff, these are called servos.I am also familair with small hobby devices that move some very
limited travle of less than one revolution. these are also called
servos and are used for things like steering in robots and such.It appears you are talking about something similar by having a
posiston feedback but also a fully rotating unit that will be moving
over some minutes.Dave
--
*******************************************
VISIT MY HOME PAGE:
<http://home.online.no/~eikarlse/index.htm>
LAST UPDATED: 23/08/2003
*******************************************
Regards
Eirik Karlsen